...

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

Documentation: google.golang.org/api/apigeeregistry/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 apigeeregistry provides access to the Apigee Registry API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub
    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/apigeeregistry/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	apigeeregistryService, err := apigeeregistry.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  //	apigeeregistryService, err := apigeeregistry.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  //	apigeeregistryService, err := apigeeregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package apigeeregistry // import "google.golang.org/api/apigeeregistry/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 = "apigeeregistry:v1"
    90  const apiName = "apigeeregistry"
    91  const apiVersion = "v1"
    92  const basePath = "https://apigeeregistry.googleapis.com/"
    93  const basePathTemplate = "https://apigeeregistry.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://apigeeregistry.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.Apis = NewProjectsLocationsApisService(s)
   172  	rs.Artifacts = NewProjectsLocationsArtifactsService(s)
   173  	rs.Documents = NewProjectsLocationsDocumentsService(s)
   174  	rs.Instances = NewProjectsLocationsInstancesService(s)
   175  	rs.Operations = NewProjectsLocationsOperationsService(s)
   176  	rs.Runtime = NewProjectsLocationsRuntimeService(s)
   177  	return rs
   178  }
   179  
   180  type ProjectsLocationsService struct {
   181  	s *Service
   182  
   183  	Apis *ProjectsLocationsApisService
   184  
   185  	Artifacts *ProjectsLocationsArtifactsService
   186  
   187  	Documents *ProjectsLocationsDocumentsService
   188  
   189  	Instances *ProjectsLocationsInstancesService
   190  
   191  	Operations *ProjectsLocationsOperationsService
   192  
   193  	Runtime *ProjectsLocationsRuntimeService
   194  }
   195  
   196  func NewProjectsLocationsApisService(s *Service) *ProjectsLocationsApisService {
   197  	rs := &ProjectsLocationsApisService{s: s}
   198  	rs.Artifacts = NewProjectsLocationsApisArtifactsService(s)
   199  	rs.Deployments = NewProjectsLocationsApisDeploymentsService(s)
   200  	rs.Versions = NewProjectsLocationsApisVersionsService(s)
   201  	return rs
   202  }
   203  
   204  type ProjectsLocationsApisService struct {
   205  	s *Service
   206  
   207  	Artifacts *ProjectsLocationsApisArtifactsService
   208  
   209  	Deployments *ProjectsLocationsApisDeploymentsService
   210  
   211  	Versions *ProjectsLocationsApisVersionsService
   212  }
   213  
   214  func NewProjectsLocationsApisArtifactsService(s *Service) *ProjectsLocationsApisArtifactsService {
   215  	rs := &ProjectsLocationsApisArtifactsService{s: s}
   216  	return rs
   217  }
   218  
   219  type ProjectsLocationsApisArtifactsService struct {
   220  	s *Service
   221  }
   222  
   223  func NewProjectsLocationsApisDeploymentsService(s *Service) *ProjectsLocationsApisDeploymentsService {
   224  	rs := &ProjectsLocationsApisDeploymentsService{s: s}
   225  	rs.Artifacts = NewProjectsLocationsApisDeploymentsArtifactsService(s)
   226  	return rs
   227  }
   228  
   229  type ProjectsLocationsApisDeploymentsService struct {
   230  	s *Service
   231  
   232  	Artifacts *ProjectsLocationsApisDeploymentsArtifactsService
   233  }
   234  
   235  func NewProjectsLocationsApisDeploymentsArtifactsService(s *Service) *ProjectsLocationsApisDeploymentsArtifactsService {
   236  	rs := &ProjectsLocationsApisDeploymentsArtifactsService{s: s}
   237  	return rs
   238  }
   239  
   240  type ProjectsLocationsApisDeploymentsArtifactsService struct {
   241  	s *Service
   242  }
   243  
   244  func NewProjectsLocationsApisVersionsService(s *Service) *ProjectsLocationsApisVersionsService {
   245  	rs := &ProjectsLocationsApisVersionsService{s: s}
   246  	rs.Artifacts = NewProjectsLocationsApisVersionsArtifactsService(s)
   247  	rs.Specs = NewProjectsLocationsApisVersionsSpecsService(s)
   248  	return rs
   249  }
   250  
   251  type ProjectsLocationsApisVersionsService struct {
   252  	s *Service
   253  
   254  	Artifacts *ProjectsLocationsApisVersionsArtifactsService
   255  
   256  	Specs *ProjectsLocationsApisVersionsSpecsService
   257  }
   258  
   259  func NewProjectsLocationsApisVersionsArtifactsService(s *Service) *ProjectsLocationsApisVersionsArtifactsService {
   260  	rs := &ProjectsLocationsApisVersionsArtifactsService{s: s}
   261  	return rs
   262  }
   263  
   264  type ProjectsLocationsApisVersionsArtifactsService struct {
   265  	s *Service
   266  }
   267  
   268  func NewProjectsLocationsApisVersionsSpecsService(s *Service) *ProjectsLocationsApisVersionsSpecsService {
   269  	rs := &ProjectsLocationsApisVersionsSpecsService{s: s}
   270  	rs.Artifacts = NewProjectsLocationsApisVersionsSpecsArtifactsService(s)
   271  	return rs
   272  }
   273  
   274  type ProjectsLocationsApisVersionsSpecsService struct {
   275  	s *Service
   276  
   277  	Artifacts *ProjectsLocationsApisVersionsSpecsArtifactsService
   278  }
   279  
   280  func NewProjectsLocationsApisVersionsSpecsArtifactsService(s *Service) *ProjectsLocationsApisVersionsSpecsArtifactsService {
   281  	rs := &ProjectsLocationsApisVersionsSpecsArtifactsService{s: s}
   282  	return rs
   283  }
   284  
   285  type ProjectsLocationsApisVersionsSpecsArtifactsService struct {
   286  	s *Service
   287  }
   288  
   289  func NewProjectsLocationsArtifactsService(s *Service) *ProjectsLocationsArtifactsService {
   290  	rs := &ProjectsLocationsArtifactsService{s: s}
   291  	return rs
   292  }
   293  
   294  type ProjectsLocationsArtifactsService struct {
   295  	s *Service
   296  }
   297  
   298  func NewProjectsLocationsDocumentsService(s *Service) *ProjectsLocationsDocumentsService {
   299  	rs := &ProjectsLocationsDocumentsService{s: s}
   300  	return rs
   301  }
   302  
   303  type ProjectsLocationsDocumentsService struct {
   304  	s *Service
   305  }
   306  
   307  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   308  	rs := &ProjectsLocationsInstancesService{s: s}
   309  	return rs
   310  }
   311  
   312  type ProjectsLocationsInstancesService struct {
   313  	s *Service
   314  }
   315  
   316  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   317  	rs := &ProjectsLocationsOperationsService{s: s}
   318  	return rs
   319  }
   320  
   321  type ProjectsLocationsOperationsService struct {
   322  	s *Service
   323  }
   324  
   325  func NewProjectsLocationsRuntimeService(s *Service) *ProjectsLocationsRuntimeService {
   326  	rs := &ProjectsLocationsRuntimeService{s: s}
   327  	return rs
   328  }
   329  
   330  type ProjectsLocationsRuntimeService struct {
   331  	s *Service
   332  }
   333  
   334  // Api: A top-level description of an API. Produced by producers and are
   335  // commitments to provide services.
   336  type Api struct {
   337  	// Annotations: Annotations attach non-identifying metadata to resources.
   338  	// Annotation keys and values are less restricted than those of labels, but
   339  	// should be generally used for small values of broad interest. Larger, topic-
   340  	// specific metadata should be stored in Artifacts.
   341  	Annotations map[string]string `json:"annotations,omitempty"`
   342  	// Availability: A user-definable description of the availability of this
   343  	// service. Format: free-form, but we expect single words that describe
   344  	// availability, e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED",
   345  	// "SHUTDOWN".
   346  	Availability string `json:"availability,omitempty"`
   347  	// CreateTime: Output only. Creation timestamp.
   348  	CreateTime string `json:"createTime,omitempty"`
   349  	// Description: A detailed description.
   350  	Description string `json:"description,omitempty"`
   351  	// DisplayName: Human-meaningful name.
   352  	DisplayName string `json:"displayName,omitempty"`
   353  	// Labels: Labels attach identifying metadata to resources. Identifying
   354  	// metadata can be used to filter list operations. Label keys and values can be
   355  	// no longer than 64 characters (Unicode codepoints), can only contain
   356  	// lowercase letters, numeric characters, underscores, and dashes.
   357  	// International characters are allowed. No more than 64 user labels can be
   358  	// associated with one resource (System labels are excluded). See
   359  	// https://goo.gl/xmQnxf for more information and examples of labels. System
   360  	// reserved label keys are prefixed with `apigeeregistry.googleapis.com/` and
   361  	// cannot be changed.
   362  	Labels map[string]string `json:"labels,omitempty"`
   363  	// Name: Resource name.
   364  	Name string `json:"name,omitempty"`
   365  	// RecommendedDeployment: The recommended deployment of the API. Format:
   366  	// `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}`
   367  	RecommendedDeployment string `json:"recommendedDeployment,omitempty"`
   368  	// RecommendedVersion: The recommended version of the API. Format:
   369  	// `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
   370  	RecommendedVersion string `json:"recommendedVersion,omitempty"`
   371  	// UpdateTime: Output only. Last update timestamp.
   372  	UpdateTime string `json:"updateTime,omitempty"`
   373  
   374  	// ServerResponse contains the HTTP response code and headers from the server.
   375  	googleapi.ServerResponse `json:"-"`
   376  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   377  	// unconditionally include in API requests. By default, fields with empty or
   378  	// default values are omitted from API requests. See
   379  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   380  	// details.
   381  	ForceSendFields []string `json:"-"`
   382  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   383  	// requests with the JSON null value. By default, fields with empty values are
   384  	// omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   386  	NullFields []string `json:"-"`
   387  }
   388  
   389  func (s *Api) MarshalJSON() ([]byte, error) {
   390  	type NoMethod Api
   391  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   392  }
   393  
   394  // ApiDeployment: Describes a service running at particular address that
   395  // provides a particular version of an API. ApiDeployments have revisions which
   396  // correspond to different configurations of a single deployment in time.
   397  // Revision identifiers should be updated whenever the served API spec or
   398  // endpoint address changes.
   399  type ApiDeployment struct {
   400  	// AccessGuidance: Text briefly describing how to access the endpoint. Changes
   401  	// to this value will not affect the revision.
   402  	AccessGuidance string `json:"accessGuidance,omitempty"`
   403  	// Annotations: Annotations attach non-identifying metadata to resources.
   404  	// Annotation keys and values are less restricted than those of labels, but
   405  	// should be generally used for small values of broad interest. Larger, topic-
   406  	// specific metadata should be stored in Artifacts.
   407  	Annotations map[string]string `json:"annotations,omitempty"`
   408  	// ApiSpecRevision: The full resource name (including revision ID) of the spec
   409  	// of the API being served by the deployment. Changes to this value will update
   410  	// the revision. Format:
   411  	// `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/
   412  	// {spec@revision}`
   413  	ApiSpecRevision string `json:"apiSpecRevision,omitempty"`
   414  	// CreateTime: Output only. Creation timestamp; when the deployment resource
   415  	// was created.
   416  	CreateTime string `json:"createTime,omitempty"`
   417  	// Description: A detailed description.
   418  	Description string `json:"description,omitempty"`
   419  	// DisplayName: Human-meaningful name.
   420  	DisplayName string `json:"displayName,omitempty"`
   421  	// EndpointUri: The address where the deployment is serving. Changes to this
   422  	// value will update the revision.
   423  	EndpointUri string `json:"endpointUri,omitempty"`
   424  	// ExternalChannelUri: The address of the external channel of the API (e.g.,
   425  	// the Developer Portal). Changes to this value will not affect the revision.
   426  	ExternalChannelUri string `json:"externalChannelUri,omitempty"`
   427  	// IntendedAudience: Text briefly identifying the intended audience of the API.
   428  	// Changes to this value will not affect the revision.
   429  	IntendedAudience string `json:"intendedAudience,omitempty"`
   430  	// Labels: Labels attach identifying metadata to resources. Identifying
   431  	// metadata can be used to filter list operations. Label keys and values can be
   432  	// no longer than 64 characters (Unicode codepoints), can only contain
   433  	// lowercase letters, numeric characters, underscores and dashes. International
   434  	// characters are allowed. No more than 64 user labels can be associated with
   435  	// one resource (System labels are excluded). See https://goo.gl/xmQnxf for
   436  	// more information and examples of labels. System reserved label keys are
   437  	// prefixed with `apigeeregistry.googleapis.com/` and cannot be changed.
   438  	Labels map[string]string `json:"labels,omitempty"`
   439  	// Name: Resource name.
   440  	Name string `json:"name,omitempty"`
   441  	// RevisionCreateTime: Output only. Revision creation timestamp; when the
   442  	// represented revision was created.
   443  	RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
   444  	// RevisionId: Output only. Immutable. The revision ID of the deployment. A new
   445  	// revision is committed whenever the deployment contents are changed. The
   446  	// format is an 8-character hexadecimal string.
   447  	RevisionId string `json:"revisionId,omitempty"`
   448  	// RevisionUpdateTime: Output only. Last update timestamp: when the represented
   449  	// revision was last modified.
   450  	RevisionUpdateTime string `json:"revisionUpdateTime,omitempty"`
   451  
   452  	// ServerResponse contains the HTTP response code and headers from the server.
   453  	googleapi.ServerResponse `json:"-"`
   454  	// ForceSendFields is a list of field names (e.g. "AccessGuidance") to
   455  	// unconditionally include in API requests. By default, fields with empty or
   456  	// default values are omitted from API requests. See
   457  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   458  	// details.
   459  	ForceSendFields []string `json:"-"`
   460  	// NullFields is a list of field names (e.g. "AccessGuidance") to include in
   461  	// API requests with the JSON null value. By default, fields with empty values
   462  	// are omitted from API requests. See
   463  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   464  	NullFields []string `json:"-"`
   465  }
   466  
   467  func (s *ApiDeployment) MarshalJSON() ([]byte, error) {
   468  	type NoMethod ApiDeployment
   469  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   470  }
   471  
   472  // ApiSpec: Describes a version of an API in a structured way. ApiSpecs provide
   473  // formal descriptions that consumers can use to use a version. ApiSpec
   474  // resources are intended to be fully-resolved descriptions of an ApiVersion.
   475  // When specs consist of multiple files, these should be bundled together
   476  // (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to
   477  // provide representations in different API description formats.
   478  // Synchronization of these representations would be provided by tooling and
   479  // background services.
   480  type ApiSpec struct {
   481  	// Annotations: Annotations attach non-identifying metadata to resources.
   482  	// Annotation keys and values are less restricted than those of labels, but
   483  	// should be generally used for small values of broad interest. Larger, topic-
   484  	// specific metadata should be stored in Artifacts.
   485  	Annotations map[string]string `json:"annotations,omitempty"`
   486  	// Contents: Input only. The contents of the spec. Provided by API callers when
   487  	// specs are created or updated. To access the contents of a spec, use
   488  	// GetApiSpecContents.
   489  	Contents string `json:"contents,omitempty"`
   490  	// CreateTime: Output only. Creation timestamp; when the spec resource was
   491  	// created.
   492  	CreateTime string `json:"createTime,omitempty"`
   493  	// Description: A detailed description.
   494  	Description string `json:"description,omitempty"`
   495  	// Filename: A possibly-hierarchical name used to refer to the spec from other
   496  	// specs.
   497  	Filename string `json:"filename,omitempty"`
   498  	// Hash: Output only. A SHA-256 hash of the spec's contents. If the spec is
   499  	// gzipped, this is the hash of the uncompressed spec.
   500  	Hash string `json:"hash,omitempty"`
   501  	// Labels: Labels attach identifying metadata to resources. Identifying
   502  	// metadata can be used to filter list operations. Label keys and values can be
   503  	// no longer than 64 characters (Unicode codepoints), can only contain
   504  	// lowercase letters, numeric characters, underscores and dashes. International
   505  	// characters are allowed. No more than 64 user labels can be associated with
   506  	// one resource (System labels are excluded). See https://goo.gl/xmQnxf for
   507  	// more information and examples of labels. System reserved label keys are
   508  	// prefixed with `apigeeregistry.googleapis.com/` and cannot be changed.
   509  	Labels map[string]string `json:"labels,omitempty"`
   510  	// MimeType: A style (format) descriptor for this spec that is specified as a
   511  	// Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values
   512  	// include `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`,
   513  	// and `application/vnd.apigee.graphql`, with possible suffixes representing
   514  	// compression types. These hypothetical names are defined in the vendor tree
   515  	// defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
   516  	// Content types can specify compression. Currently only GZip compression is
   517  	// supported (indicated with "+gzip").
   518  	MimeType string `json:"mimeType,omitempty"`
   519  	// Name: Resource name.
   520  	Name string `json:"name,omitempty"`
   521  	// RevisionCreateTime: Output only. Revision creation timestamp; when the
   522  	// represented revision was created.
   523  	RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
   524  	// RevisionId: Output only. Immutable. The revision ID of the spec. A new
   525  	// revision is committed whenever the spec contents are changed. The format is
   526  	// an 8-character hexadecimal string.
   527  	RevisionId string `json:"revisionId,omitempty"`
   528  	// RevisionUpdateTime: Output only. Last update timestamp: when the represented
   529  	// revision was last modified.
   530  	RevisionUpdateTime string `json:"revisionUpdateTime,omitempty"`
   531  	// SizeBytes: Output only. The size of the spec file in bytes. If the spec is
   532  	// gzipped, this is the size of the uncompressed spec.
   533  	SizeBytes int64 `json:"sizeBytes,omitempty"`
   534  	// SourceUri: The original source URI of the spec (if one exists). This is an
   535  	// external location that can be used for reference purposes but which may not
   536  	// be authoritative since this external resource may change after the spec is
   537  	// retrieved.
   538  	SourceUri string `json:"sourceUri,omitempty"`
   539  
   540  	// ServerResponse contains the HTTP response code and headers from the server.
   541  	googleapi.ServerResponse `json:"-"`
   542  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   543  	// unconditionally include in API requests. By default, fields with empty or
   544  	// default values are omitted from API requests. See
   545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   546  	// details.
   547  	ForceSendFields []string `json:"-"`
   548  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   549  	// requests with the JSON null value. By default, fields with empty values are
   550  	// omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   552  	NullFields []string `json:"-"`
   553  }
   554  
   555  func (s *ApiSpec) MarshalJSON() ([]byte, error) {
   556  	type NoMethod ApiSpec
   557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   558  }
   559  
   560  // ApiVersion: Describes a particular version of an API. ApiVersions are what
   561  // consumers actually use.
   562  type ApiVersion struct {
   563  	// Annotations: Annotations attach non-identifying metadata to resources.
   564  	// Annotation keys and values are less restricted than those of labels, but
   565  	// should be generally used for small values of broad interest. Larger, topic-
   566  	// specific metadata should be stored in Artifacts.
   567  	Annotations map[string]string `json:"annotations,omitempty"`
   568  	// CreateTime: Output only. Creation timestamp.
   569  	CreateTime string `json:"createTime,omitempty"`
   570  	// Description: A detailed description.
   571  	Description string `json:"description,omitempty"`
   572  	// DisplayName: Human-meaningful name.
   573  	DisplayName string `json:"displayName,omitempty"`
   574  	// Labels: Labels attach identifying metadata to resources. Identifying
   575  	// metadata can be used to filter list operations. Label keys and values can be
   576  	// no longer than 64 characters (Unicode codepoints), can only contain
   577  	// lowercase letters, numeric characters, underscores and dashes. International
   578  	// characters are allowed. No more than 64 user labels can be associated with
   579  	// one resource (System labels are excluded). See https://goo.gl/xmQnxf for
   580  	// more information and examples of labels. System reserved label keys are
   581  	// prefixed with `apigeeregistry.googleapis.com/` and cannot be changed.
   582  	Labels map[string]string `json:"labels,omitempty"`
   583  	// Name: Resource name.
   584  	Name string `json:"name,omitempty"`
   585  	// PrimarySpec: The primary spec for this version. Format:
   586  	// projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{
   587  	// spec}
   588  	PrimarySpec string `json:"primarySpec,omitempty"`
   589  	// State: A user-definable description of the lifecycle phase of this API
   590  	// version. Format: free-form, but we expect single words that describe API
   591  	// maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
   592  	// "DEPRECATED", "RETIRED".
   593  	State string `json:"state,omitempty"`
   594  	// UpdateTime: Output only. Last update timestamp.
   595  	UpdateTime string `json:"updateTime,omitempty"`
   596  
   597  	// ServerResponse contains the HTTP response code and headers from the server.
   598  	googleapi.ServerResponse `json:"-"`
   599  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   600  	// unconditionally include in API requests. By default, fields with empty or
   601  	// default values are omitted from API requests. See
   602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   603  	// details.
   604  	ForceSendFields []string `json:"-"`
   605  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   606  	// requests with the JSON null value. By default, fields with empty values are
   607  	// omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   609  	NullFields []string `json:"-"`
   610  }
   611  
   612  func (s *ApiVersion) MarshalJSON() ([]byte, error) {
   613  	type NoMethod ApiVersion
   614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   615  }
   616  
   617  // Artifact: Artifacts of resources. Artifacts are unique (single-value) per
   618  // resource and are used to store metadata that is too large or numerous to be
   619  // stored directly on the resource. Since artifacts are stored separately from
   620  // parent resources, they should generally be used for metadata that is needed
   621  // infrequently, i.e., not for display in primary views of the resource but
   622  // perhaps displayed or downloaded upon request. The `ListArtifacts` method
   623  // allows artifacts to be quickly enumerated and checked for presence without
   624  // downloading their (potentially-large) contents.
   625  type Artifact struct {
   626  	// Annotations: Annotations attach non-identifying metadata to resources.
   627  	// Annotation keys and values are less restricted than those of labels, but
   628  	// should be generally used for small values of broad interest. Larger, topic-
   629  	// specific metadata should be stored in Artifacts.
   630  	Annotations map[string]string `json:"annotations,omitempty"`
   631  	// Contents: Input only. The contents of the artifact. Provided by API callers
   632  	// when artifacts are created or replaced. To access the contents of an
   633  	// artifact, use GetArtifactContents.
   634  	Contents string `json:"contents,omitempty"`
   635  	// CreateTime: Output only. Creation timestamp.
   636  	CreateTime string `json:"createTime,omitempty"`
   637  	// Hash: Output only. A SHA-256 hash of the artifact's contents. If the
   638  	// artifact is gzipped, this is the hash of the uncompressed artifact.
   639  	Hash string `json:"hash,omitempty"`
   640  	// Labels: Labels attach identifying metadata to resources. Identifying
   641  	// metadata can be used to filter list operations. Label keys and values can be
   642  	// no longer than 64 characters (Unicode codepoints), can only contain
   643  	// lowercase letters, numeric characters, underscores and dashes. International
   644  	// characters are allowed. No more than 64 user labels can be associated with
   645  	// one resource (System labels are excluded). See https://goo.gl/xmQnxf for
   646  	// more information and examples of labels. System reserved label keys are
   647  	// prefixed with "registry.googleapis.com/" and cannot be changed.
   648  	Labels map[string]string `json:"labels,omitempty"`
   649  	// MimeType: A content type specifier for the artifact. Content type specifiers
   650  	// are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible
   651  	// "schema" parameter that specifies a schema for the stored information.
   652  	// Content types can specify compression. Currently only GZip compression is
   653  	// supported (indicated with "+gzip").
   654  	MimeType string `json:"mimeType,omitempty"`
   655  	// Name: Resource name.
   656  	Name string `json:"name,omitempty"`
   657  	// SizeBytes: Output only. The size of the artifact in bytes. If the artifact
   658  	// is gzipped, this is the size of the uncompressed artifact.
   659  	SizeBytes int64 `json:"sizeBytes,omitempty"`
   660  	// UpdateTime: Output only. Last update timestamp.
   661  	UpdateTime string `json:"updateTime,omitempty"`
   662  
   663  	// ServerResponse contains the HTTP response code and headers from the server.
   664  	googleapi.ServerResponse `json:"-"`
   665  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   666  	// unconditionally include in API requests. By default, fields with empty or
   667  	// default values are omitted from API requests. See
   668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   669  	// details.
   670  	ForceSendFields []string `json:"-"`
   671  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   672  	// requests with the JSON null value. By default, fields with empty values are
   673  	// omitted from API requests. See
   674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   675  	NullFields []string `json:"-"`
   676  }
   677  
   678  func (s *Artifact) MarshalJSON() ([]byte, error) {
   679  	type NoMethod Artifact
   680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   681  }
   682  
   683  // Binding: Associates `members`, or principals, with a `role`.
   684  type Binding struct {
   685  	// Condition: The condition that is associated with this binding. If the
   686  	// condition evaluates to `true`, then this binding applies to the current
   687  	// request. If the condition evaluates to `false`, then this binding does not
   688  	// apply to the current request. However, a different role binding might grant
   689  	// the same role to one or more of the principals in this binding. To learn
   690  	// which resources support conditions in their IAM policies, see the IAM
   691  	// documentation
   692  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   693  	Condition *Expr `json:"condition,omitempty"`
   694  	// Members: Specifies the principals requesting access for a Google Cloud
   695  	// resource. `members` can have the following values: * `allUsers`: A special
   696  	// identifier that represents anyone who is on the internet; with or without a
   697  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   698  	// represents anyone who is authenticated with a Google account or a service
   699  	// account. Does not include identities that come from external identity
   700  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   701  	// address that represents a specific Google account. For example,
   702  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   703  	// represents a Google service account. For example,
   704  	// `my-other-app@appspot.gserviceaccount.com`. *
   705  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   706  	// identifier for a Kubernetes service account
   707  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   708  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   709  	// `group:{emailid}`: An email address that represents a Google group. For
   710  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   711  	// (primary) that represents all the users of that domain. For example,
   712  	// `google.com` or `example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
   713  	// email address (plus unique identifier) representing a user that has been
   714  	// recently deleted. For example,
   715  	// `alice@example.com?uid=123456789012345678901`. If the user is recovered,
   716  	// this value reverts to `user:{emailid}` and the recovered user retains the
   717  	// role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An
   718  	// email address (plus unique identifier) representing a service account that
   719  	// has been recently deleted. For example,
   720  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   721  	// service account is undeleted, this value reverts to
   722  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   723  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   724  	// address (plus unique identifier) representing a Google group that has been
   725  	// recently deleted. For example,
   726  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   727  	// this value reverts to `group:{emailid}` and the recovered group retains the
   728  	// role in the binding.
   729  	Members []string `json:"members,omitempty"`
   730  	// Role: Role that is assigned to the list of `members`, or principals. For
   731  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`.
   732  	Role string `json:"role,omitempty"`
   733  	// ForceSendFields is a list of field names (e.g. "Condition") to
   734  	// unconditionally include in API requests. By default, fields with empty or
   735  	// default values are omitted from API requests. See
   736  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   737  	// details.
   738  	ForceSendFields []string `json:"-"`
   739  	// NullFields is a list of field names (e.g. "Condition") to include in API
   740  	// requests with the JSON null value. By default, fields with empty values are
   741  	// omitted from API requests. See
   742  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   743  	NullFields []string `json:"-"`
   744  }
   745  
   746  func (s *Binding) MarshalJSON() ([]byte, error) {
   747  	type NoMethod Binding
   748  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   749  }
   750  
   751  // Build: Build information of the Instance if it's in `ACTIVE` state.
   752  type Build struct {
   753  	// CommitId: Output only. Commit ID of the latest commit in the build.
   754  	CommitId string `json:"commitId,omitempty"`
   755  	// CommitTime: Output only. Commit time of the latest commit in the build.
   756  	CommitTime string `json:"commitTime,omitempty"`
   757  	// Repo: Output only. Path of the open source repository:
   758  	// github.com/apigee/registry.
   759  	Repo string `json:"repo,omitempty"`
   760  	// ForceSendFields is a list of field names (e.g. "CommitId") to
   761  	// unconditionally include in API requests. By default, fields with empty or
   762  	// default values are omitted from API requests. See
   763  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   764  	// details.
   765  	ForceSendFields []string `json:"-"`
   766  	// NullFields is a list of field names (e.g. "CommitId") to include in API
   767  	// requests with the JSON null value. By default, fields with empty values are
   768  	// omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   770  	NullFields []string `json:"-"`
   771  }
   772  
   773  func (s *Build) MarshalJSON() ([]byte, error) {
   774  	type NoMethod Build
   775  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   776  }
   777  
   778  // CancelOperationRequest: The request message for Operations.CancelOperation.
   779  type CancelOperationRequest struct {
   780  }
   781  
   782  // Config: Available configurations to provision an Instance.
   783  type Config struct {
   784  	// CmekKeyName: Required. The Customer Managed Encryption Key (CMEK) used for
   785  	// data encryption. The CMEK name should follow the format of
   786  	// `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`,
   787  	// where the `location` must match InstanceConfig.location.
   788  	CmekKeyName string `json:"cmekKeyName,omitempty"`
   789  	// Location: Output only. The GCP location where the Instance resides.
   790  	Location string `json:"location,omitempty"`
   791  	// ForceSendFields is a list of field names (e.g. "CmekKeyName") to
   792  	// unconditionally include in API requests. By default, fields with empty or
   793  	// default values are omitted from API requests. See
   794  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   795  	// details.
   796  	ForceSendFields []string `json:"-"`
   797  	// NullFields is a list of field names (e.g. "CmekKeyName") to include in API
   798  	// requests with the JSON null value. By default, fields with empty values are
   799  	// omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   801  	NullFields []string `json:"-"`
   802  }
   803  
   804  func (s *Config) MarshalJSON() ([]byte, error) {
   805  	type NoMethod Config
   806  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   807  }
   808  
   809  // Empty: A generic empty message that you can re-use to avoid defining
   810  // duplicated empty messages in your APIs. A typical example is to use it as
   811  // the request or the response type of an API method. For instance: service Foo
   812  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   813  type Empty struct {
   814  	// ServerResponse contains the HTTP response code and headers from the server.
   815  	googleapi.ServerResponse `json:"-"`
   816  }
   817  
   818  // Expr: Represents a textual expression in the Common Expression Language
   819  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   820  // of CEL are documented at https://github.com/google/cel-spec. Example
   821  // (Comparison): title: "Summary size limit" description: "Determines if a
   822  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   823  // Example (Equality): title: "Requestor is owner" description: "Determines if
   824  // requestor is the document owner" expression: "document.owner ==
   825  // request.auth.claims.email" Example (Logic): title: "Public documents"
   826  // description: "Determine whether the document should be publicly visible"
   827  // expression: "document.type != 'private' && document.type != 'internal'"
   828  // Example (Data Manipulation): title: "Notification string" description:
   829  // "Create a notification string with a timestamp." expression: "'New message
   830  // received at ' + string(document.create_time)" The exact variables and
   831  // functions that may be referenced within an expression are determined by the
   832  // service that evaluates it. See the service documentation for additional
   833  // information.
   834  type Expr struct {
   835  	// Description: Optional. Description of the expression. This is a longer text
   836  	// which describes the expression, e.g. when hovered over it in a UI.
   837  	Description string `json:"description,omitempty"`
   838  	// Expression: Textual representation of an expression in Common Expression
   839  	// Language syntax.
   840  	Expression string `json:"expression,omitempty"`
   841  	// Location: Optional. String indicating the location of the expression for
   842  	// error reporting, e.g. a file name and a position in the file.
   843  	Location string `json:"location,omitempty"`
   844  	// Title: Optional. Title for the expression, i.e. a short string describing
   845  	// its purpose. This can be used e.g. in UIs which allow to enter the
   846  	// expression.
   847  	Title string `json:"title,omitempty"`
   848  	// ForceSendFields is a list of field names (e.g. "Description") to
   849  	// unconditionally include in API requests. By default, fields with empty or
   850  	// default values are omitted from API requests. See
   851  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   852  	// details.
   853  	ForceSendFields []string `json:"-"`
   854  	// NullFields is a list of field names (e.g. "Description") to include in API
   855  	// requests with the JSON null value. By default, fields with empty values are
   856  	// omitted from API requests. See
   857  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   858  	NullFields []string `json:"-"`
   859  }
   860  
   861  func (s *Expr) MarshalJSON() ([]byte, error) {
   862  	type NoMethod Expr
   863  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   864  }
   865  
   866  // HttpBody: Message that represents an arbitrary HTTP body. It should only be
   867  // used for payload formats that can't be represented as JSON, such as raw
   868  // binary or an HTML page. This message can be used both in streaming and
   869  // non-streaming API methods in the request as well as the response. It can be
   870  // used as a top-level request field, which is convenient if one wants to
   871  // extract parameters from either the URL or HTTP template into the request
   872  // fields and also want access to the raw HTTP body. Example: message
   873  // GetResourceRequest { // A unique request id. string request_id = 1; // The
   874  // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; }
   875  // service ResourceService { rpc GetResource(GetResourceRequest) returns
   876  // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns
   877  // (google.protobuf.Empty); } Example with streaming methods: service
   878  // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream
   879  // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns
   880  // (stream google.api.HttpBody); } Use of this type only changes how the
   881  // request and response bodies are handled, all other features will continue to
   882  // work unchanged.
   883  type HttpBody struct {
   884  	// ContentType: The HTTP Content-Type header value specifying the content type
   885  	// of the body.
   886  	ContentType string `json:"contentType,omitempty"`
   887  	// Data: The HTTP request/response body as raw binary.
   888  	Data string `json:"data,omitempty"`
   889  	// Extensions: Application specific response metadata. Must be set in the first
   890  	// response for streaming APIs.
   891  	Extensions []googleapi.RawMessage `json:"extensions,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. "ContentType") 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. "ContentType") 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 *HttpBody) MarshalJSON() ([]byte, error) {
   909  	type NoMethod HttpBody
   910  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   911  }
   912  
   913  // Instance: An Instance represents the instance resources of the Registry.
   914  // Currently, only one instance is allowed for each project.
   915  type Instance struct {
   916  	// Build: Output only. Build info of the Instance if it's in `ACTIVE` state.
   917  	Build *Build `json:"build,omitempty"`
   918  	// Config: Required. Config of the Instance.
   919  	Config *Config `json:"config,omitempty"`
   920  	// CreateTime: Output only. Creation timestamp.
   921  	CreateTime string `json:"createTime,omitempty"`
   922  	// Name: Format: `projects/*/locations/*/instance`. Currently only
   923  	// `locations/global` is supported.
   924  	Name string `json:"name,omitempty"`
   925  	// State: Output only. The current state of the Instance.
   926  	//
   927  	// Possible values:
   928  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
   929  	// is omitted.
   930  	//   "INACTIVE" - The Instance has not been initialized or has been deleted.
   931  	//   "CREATING" - The Instance is being created.
   932  	//   "ACTIVE" - The Instance has been created and is ready for use.
   933  	//   "UPDATING" - The Instance is being updated.
   934  	//   "DELETING" - The Instance is being deleted.
   935  	//   "FAILED" - The Instance encountered an error during a state change.
   936  	State string `json:"state,omitempty"`
   937  	// StateMessage: Output only. Extra information of Instance.State if the state
   938  	// is `FAILED`.
   939  	StateMessage string `json:"stateMessage,omitempty"`
   940  	// UpdateTime: Output only. Last update timestamp.
   941  	UpdateTime string `json:"updateTime,omitempty"`
   942  
   943  	// ServerResponse contains the HTTP response code and headers from the server.
   944  	googleapi.ServerResponse `json:"-"`
   945  	// ForceSendFields is a list of field names (e.g. "Build") to unconditionally
   946  	// include in API requests. By default, fields with empty or default values are
   947  	// omitted from API requests. See
   948  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   949  	// details.
   950  	ForceSendFields []string `json:"-"`
   951  	// NullFields is a list of field names (e.g. "Build") to include in API
   952  	// requests with the JSON null value. By default, fields with empty values are
   953  	// omitted from API requests. See
   954  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   955  	NullFields []string `json:"-"`
   956  }
   957  
   958  func (s *Instance) MarshalJSON() ([]byte, error) {
   959  	type NoMethod Instance
   960  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   961  }
   962  
   963  // ListApiDeploymentRevisionsResponse: Response message for
   964  // ListApiDeploymentRevisionsResponse.
   965  type ListApiDeploymentRevisionsResponse struct {
   966  	// ApiDeployments: The revisions of the deployment.
   967  	ApiDeployments []*ApiDeployment `json:"apiDeployments,omitempty"`
   968  	// NextPageToken: A token that can be sent as `page_token` to retrieve the next
   969  	// page. If this field is omitted, there are no subsequent pages.
   970  	NextPageToken string `json:"nextPageToken,omitempty"`
   971  
   972  	// ServerResponse contains the HTTP response code and headers from the server.
   973  	googleapi.ServerResponse `json:"-"`
   974  	// ForceSendFields is a list of field names (e.g. "ApiDeployments") to
   975  	// unconditionally include in API requests. By default, fields with empty or
   976  	// default values are omitted from API requests. See
   977  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   978  	// details.
   979  	ForceSendFields []string `json:"-"`
   980  	// NullFields is a list of field names (e.g. "ApiDeployments") to include in
   981  	// API requests with the JSON null value. By default, fields with empty values
   982  	// are omitted from API requests. See
   983  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   984  	NullFields []string `json:"-"`
   985  }
   986  
   987  func (s *ListApiDeploymentRevisionsResponse) MarshalJSON() ([]byte, error) {
   988  	type NoMethod ListApiDeploymentRevisionsResponse
   989  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   990  }
   991  
   992  // ListApiDeploymentsResponse: Response message for ListApiDeployments.
   993  type ListApiDeploymentsResponse struct {
   994  	// ApiDeployments: The deployments from the specified publisher.
   995  	ApiDeployments []*ApiDeployment `json:"apiDeployments,omitempty"`
   996  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   997  	// next page. If this field is omitted, there are no subsequent pages.
   998  	NextPageToken string `json:"nextPageToken,omitempty"`
   999  
  1000  	// ServerResponse contains the HTTP response code and headers from the server.
  1001  	googleapi.ServerResponse `json:"-"`
  1002  	// ForceSendFields is a list of field names (e.g. "ApiDeployments") to
  1003  	// unconditionally include in API requests. By default, fields with empty or
  1004  	// default values are omitted from API requests. See
  1005  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1006  	// details.
  1007  	ForceSendFields []string `json:"-"`
  1008  	// NullFields is a list of field names (e.g. "ApiDeployments") to include in
  1009  	// API requests with the JSON null value. By default, fields with empty values
  1010  	// are omitted from API requests. See
  1011  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1012  	NullFields []string `json:"-"`
  1013  }
  1014  
  1015  func (s *ListApiDeploymentsResponse) MarshalJSON() ([]byte, error) {
  1016  	type NoMethod ListApiDeploymentsResponse
  1017  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1018  }
  1019  
  1020  // ListApiSpecRevisionsResponse: Response message for
  1021  // ListApiSpecRevisionsResponse.
  1022  type ListApiSpecRevisionsResponse struct {
  1023  	// ApiSpecs: The revisions of the spec.
  1024  	ApiSpecs []*ApiSpec `json:"apiSpecs,omitempty"`
  1025  	// NextPageToken: A token that can be sent as `page_token` to retrieve the next
  1026  	// page. If this field is omitted, there are no subsequent pages.
  1027  	NextPageToken string `json:"nextPageToken,omitempty"`
  1028  
  1029  	// ServerResponse contains the HTTP response code and headers from the server.
  1030  	googleapi.ServerResponse `json:"-"`
  1031  	// ForceSendFields is a list of field names (e.g. "ApiSpecs") to
  1032  	// unconditionally include in API requests. By default, fields with empty or
  1033  	// default values are omitted from API requests. See
  1034  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1035  	// details.
  1036  	ForceSendFields []string `json:"-"`
  1037  	// NullFields is a list of field names (e.g. "ApiSpecs") to include in API
  1038  	// requests with the JSON null value. By default, fields with empty values are
  1039  	// omitted from API requests. See
  1040  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1041  	NullFields []string `json:"-"`
  1042  }
  1043  
  1044  func (s *ListApiSpecRevisionsResponse) MarshalJSON() ([]byte, error) {
  1045  	type NoMethod ListApiSpecRevisionsResponse
  1046  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1047  }
  1048  
  1049  // ListApiSpecsResponse: Response message for ListApiSpecs.
  1050  type ListApiSpecsResponse struct {
  1051  	// ApiSpecs: The specs from the specified publisher.
  1052  	ApiSpecs []*ApiSpec `json:"apiSpecs,omitempty"`
  1053  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1054  	// next page. If this field is omitted, there are no subsequent pages.
  1055  	NextPageToken string `json:"nextPageToken,omitempty"`
  1056  
  1057  	// ServerResponse contains the HTTP response code and headers from the server.
  1058  	googleapi.ServerResponse `json:"-"`
  1059  	// ForceSendFields is a list of field names (e.g. "ApiSpecs") to
  1060  	// unconditionally include in API requests. By default, fields with empty or
  1061  	// default values are omitted from API requests. See
  1062  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1063  	// details.
  1064  	ForceSendFields []string `json:"-"`
  1065  	// NullFields is a list of field names (e.g. "ApiSpecs") to include in API
  1066  	// requests with the JSON null value. By default, fields with empty values are
  1067  	// omitted from API requests. See
  1068  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1069  	NullFields []string `json:"-"`
  1070  }
  1071  
  1072  func (s *ListApiSpecsResponse) MarshalJSON() ([]byte, error) {
  1073  	type NoMethod ListApiSpecsResponse
  1074  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1075  }
  1076  
  1077  // ListApiVersionsResponse: Response message for ListApiVersions.
  1078  type ListApiVersionsResponse struct {
  1079  	// ApiVersions: The versions from the specified publisher.
  1080  	ApiVersions []*ApiVersion `json:"apiVersions,omitempty"`
  1081  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1082  	// next page. If this field is omitted, there are no subsequent pages.
  1083  	NextPageToken string `json:"nextPageToken,omitempty"`
  1084  
  1085  	// ServerResponse contains the HTTP response code and headers from the server.
  1086  	googleapi.ServerResponse `json:"-"`
  1087  	// ForceSendFields is a list of field names (e.g. "ApiVersions") to
  1088  	// unconditionally include in API requests. By default, fields with empty or
  1089  	// default values are omitted from API requests. See
  1090  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1091  	// details.
  1092  	ForceSendFields []string `json:"-"`
  1093  	// NullFields is a list of field names (e.g. "ApiVersions") to include in API
  1094  	// requests with the JSON null value. By default, fields with empty values are
  1095  	// omitted from API requests. See
  1096  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1097  	NullFields []string `json:"-"`
  1098  }
  1099  
  1100  func (s *ListApiVersionsResponse) MarshalJSON() ([]byte, error) {
  1101  	type NoMethod ListApiVersionsResponse
  1102  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1103  }
  1104  
  1105  // ListApisResponse: Response message for ListApis.
  1106  type ListApisResponse struct {
  1107  	// Apis: The APIs from the specified publisher.
  1108  	Apis []*Api `json:"apis,omitempty"`
  1109  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1110  	// next page. If this field is omitted, there are no subsequent pages.
  1111  	NextPageToken string `json:"nextPageToken,omitempty"`
  1112  
  1113  	// ServerResponse contains the HTTP response code and headers from the server.
  1114  	googleapi.ServerResponse `json:"-"`
  1115  	// ForceSendFields is a list of field names (e.g. "Apis") to unconditionally
  1116  	// include in API requests. By default, fields with empty or default values are
  1117  	// omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1119  	// details.
  1120  	ForceSendFields []string `json:"-"`
  1121  	// NullFields is a list of field names (e.g. "Apis") to include in API requests
  1122  	// with the JSON null value. By default, fields with empty values are omitted
  1123  	// from API requests. See
  1124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1125  	NullFields []string `json:"-"`
  1126  }
  1127  
  1128  func (s *ListApisResponse) MarshalJSON() ([]byte, error) {
  1129  	type NoMethod ListApisResponse
  1130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1131  }
  1132  
  1133  // ListArtifactsResponse: Response message for ListArtifacts.
  1134  type ListArtifactsResponse struct {
  1135  	// Artifacts: The artifacts from the specified publisher.
  1136  	Artifacts []*Artifact `json:"artifacts,omitempty"`
  1137  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1138  	// next page. If this field is omitted, there are no subsequent pages.
  1139  	NextPageToken string `json:"nextPageToken,omitempty"`
  1140  
  1141  	// ServerResponse contains the HTTP response code and headers from the server.
  1142  	googleapi.ServerResponse `json:"-"`
  1143  	// ForceSendFields is a list of field names (e.g. "Artifacts") to
  1144  	// unconditionally include in API requests. By default, fields with empty or
  1145  	// default values are omitted from API requests. See
  1146  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1147  	// details.
  1148  	ForceSendFields []string `json:"-"`
  1149  	// NullFields is a list of field names (e.g. "Artifacts") to include in API
  1150  	// requests with the JSON null value. By default, fields with empty values are
  1151  	// omitted from API requests. See
  1152  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1153  	NullFields []string `json:"-"`
  1154  }
  1155  
  1156  func (s *ListArtifactsResponse) MarshalJSON() ([]byte, error) {
  1157  	type NoMethod ListArtifactsResponse
  1158  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1159  }
  1160  
  1161  // ListLocationsResponse: The response message for Locations.ListLocations.
  1162  type ListLocationsResponse struct {
  1163  	// Locations: A list of locations that matches the specified filter in the
  1164  	// request.
  1165  	Locations []*Location `json:"locations,omitempty"`
  1166  	// NextPageToken: The standard List next-page token.
  1167  	NextPageToken string `json:"nextPageToken,omitempty"`
  1168  
  1169  	// ServerResponse contains the HTTP response code and headers from the server.
  1170  	googleapi.ServerResponse `json:"-"`
  1171  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1172  	// unconditionally include in API requests. By default, fields with empty or
  1173  	// default values are omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1175  	// details.
  1176  	ForceSendFields []string `json:"-"`
  1177  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1178  	// requests with the JSON null value. By default, fields with empty values are
  1179  	// omitted from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1181  	NullFields []string `json:"-"`
  1182  }
  1183  
  1184  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1185  	type NoMethod ListLocationsResponse
  1186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1187  }
  1188  
  1189  // ListOperationsResponse: The response message for Operations.ListOperations.
  1190  type ListOperationsResponse struct {
  1191  	// NextPageToken: The standard List next-page token.
  1192  	NextPageToken string `json:"nextPageToken,omitempty"`
  1193  	// Operations: A list of operations that matches the specified filter in the
  1194  	// request.
  1195  	Operations []*Operation `json:"operations,omitempty"`
  1196  
  1197  	// ServerResponse contains the HTTP response code and headers from the server.
  1198  	googleapi.ServerResponse `json:"-"`
  1199  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1200  	// unconditionally include in API requests. By default, fields with empty or
  1201  	// default values are omitted from API requests. See
  1202  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1203  	// details.
  1204  	ForceSendFields []string `json:"-"`
  1205  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1206  	// requests with the JSON null value. By default, fields with empty values are
  1207  	// omitted from API requests. See
  1208  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1209  	NullFields []string `json:"-"`
  1210  }
  1211  
  1212  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1213  	type NoMethod ListOperationsResponse
  1214  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1215  }
  1216  
  1217  // Location: A resource that represents a Google Cloud location.
  1218  type Location struct {
  1219  	// DisplayName: The friendly name for this location, typically a nearby city
  1220  	// name. For example, "Tokyo".
  1221  	DisplayName string `json:"displayName,omitempty"`
  1222  	// Labels: Cross-service attributes for the location. For example
  1223  	// {"cloud.googleapis.com/region": "us-east1"}
  1224  	Labels map[string]string `json:"labels,omitempty"`
  1225  	// LocationId: The canonical id for this location. For example: "us-east1".
  1226  	LocationId string `json:"locationId,omitempty"`
  1227  	// Metadata: Service-specific metadata. For example the available capacity at
  1228  	// the given location.
  1229  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1230  	// Name: Resource name for the location, which may vary between
  1231  	// implementations. For example:
  1232  	// "projects/example-project/locations/us-east1"
  1233  	Name string `json:"name,omitempty"`
  1234  
  1235  	// ServerResponse contains the HTTP response code and headers from the server.
  1236  	googleapi.ServerResponse `json:"-"`
  1237  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1238  	// unconditionally include in API requests. By default, fields with empty or
  1239  	// default values are omitted from API requests. See
  1240  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1241  	// details.
  1242  	ForceSendFields []string `json:"-"`
  1243  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1244  	// requests with the JSON null value. By default, fields with empty values are
  1245  	// omitted from API requests. See
  1246  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1247  	NullFields []string `json:"-"`
  1248  }
  1249  
  1250  func (s *Location) MarshalJSON() ([]byte, error) {
  1251  	type NoMethod Location
  1252  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1253  }
  1254  
  1255  // Operation: This resource represents a long-running operation that is the
  1256  // result of a network API call.
  1257  type Operation struct {
  1258  	// Done: If the value is `false`, it means the operation is still in progress.
  1259  	// If `true`, the operation is completed, and either `error` or `response` is
  1260  	// available.
  1261  	Done bool `json:"done,omitempty"`
  1262  	// Error: The error result of the operation in case of failure or cancellation.
  1263  	Error *Status `json:"error,omitempty"`
  1264  	// Metadata: Service-specific metadata associated with the operation. It
  1265  	// typically contains progress information and common metadata such as create
  1266  	// time. Some services might not provide such metadata. Any method that returns
  1267  	// a long-running operation should document the metadata type, if any.
  1268  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1269  	// Name: The server-assigned name, which is only unique within the same service
  1270  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1271  	// should be a resource name ending with `operations/{unique_id}`.
  1272  	Name string `json:"name,omitempty"`
  1273  	// Response: The normal, successful response of the operation. If the original
  1274  	// method returns no data on success, such as `Delete`, the response is
  1275  	// `google.protobuf.Empty`. If the original method is standard
  1276  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1277  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1278  	// original method name. For example, if the original method name is
  1279  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1280  	Response googleapi.RawMessage `json:"response,omitempty"`
  1281  
  1282  	// ServerResponse contains the HTTP response code and headers from the server.
  1283  	googleapi.ServerResponse `json:"-"`
  1284  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1285  	// include in API requests. By default, fields with empty or default values are
  1286  	// omitted from API requests. See
  1287  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1288  	// details.
  1289  	ForceSendFields []string `json:"-"`
  1290  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1291  	// with the JSON null value. By default, fields with empty values are omitted
  1292  	// from API requests. See
  1293  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1294  	NullFields []string `json:"-"`
  1295  }
  1296  
  1297  func (s *Operation) MarshalJSON() ([]byte, error) {
  1298  	type NoMethod Operation
  1299  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1300  }
  1301  
  1302  // OperationMetadata: Represents the metadata of the long-running operation.
  1303  type OperationMetadata struct {
  1304  	// ApiVersion: API version used to start the operation.
  1305  	ApiVersion string `json:"apiVersion,omitempty"`
  1306  	// CancellationRequested: Identifies whether the user has requested
  1307  	// cancellation of the operation. Operations that have successfully been
  1308  	// cancelled have Operation.error value with a google.rpc.Status.code of 1,
  1309  	// corresponding to `Code.CANCELLED`.
  1310  	CancellationRequested bool `json:"cancellationRequested,omitempty"`
  1311  	// CreateTime: The time the operation was created.
  1312  	CreateTime string `json:"createTime,omitempty"`
  1313  	// EndTime: The time the operation finished running.
  1314  	EndTime string `json:"endTime,omitempty"`
  1315  	// StatusMessage: Human-readable status of the operation, if any.
  1316  	StatusMessage string `json:"statusMessage,omitempty"`
  1317  	// Target: Server-defined resource path for the target of the operation.
  1318  	Target string `json:"target,omitempty"`
  1319  	// Verb: Name of the verb executed by the operation.
  1320  	Verb string `json:"verb,omitempty"`
  1321  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1322  	// unconditionally include in API requests. By default, fields with empty or
  1323  	// default values are omitted from API requests. See
  1324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1325  	// details.
  1326  	ForceSendFields []string `json:"-"`
  1327  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1328  	// requests with the JSON null value. By default, fields with empty values are
  1329  	// omitted from API requests. See
  1330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1331  	NullFields []string `json:"-"`
  1332  }
  1333  
  1334  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1335  	type NoMethod OperationMetadata
  1336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1337  }
  1338  
  1339  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1340  // access controls for Google Cloud resources. A `Policy` is a collection of
  1341  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1342  // single `role`. Principals can be user accounts, service accounts, Google
  1343  // groups, and domains (such as G Suite). A `role` is a named list of
  1344  // permissions; each `role` can be an IAM predefined role or a user-created
  1345  // custom role. For some types of Google Cloud resources, a `binding` can also
  1346  // specify a `condition`, which is a logical expression that allows access to a
  1347  // resource only if the expression evaluates to `true`. A condition can add
  1348  // constraints based on attributes of the request, the resource, or both. To
  1349  // learn which resources support conditions in their IAM policies, see the IAM
  1350  // documentation
  1351  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1352  // example:** ``` { "bindings": [ { "role":
  1353  // "roles/resourcemanager.organizationAdmin", "members": [
  1354  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1355  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1356  // "roles/resourcemanager.organizationViewer", "members": [
  1357  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1358  // "description": "Does not grant access after Sep 2020", "expression":
  1359  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1360  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1361  // members: - user:mike@example.com - group:admins@example.com -
  1362  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1363  // role: roles/resourcemanager.organizationAdmin - members: -
  1364  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1365  // condition: title: expirable access description: Does not grant access after
  1366  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1367  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1368  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1369  type Policy struct {
  1370  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1371  	// Optionally, may specify a `condition` that determines how and when the
  1372  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1373  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1374  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1375  	// principal counts towards these limits. For example, if the `bindings` grant
  1376  	// 50 different roles to `user:alice@example.com`, and not to any other
  1377  	// principal, then you can add another 1,450 principals to the `bindings` in
  1378  	// the `Policy`.
  1379  	Bindings []*Binding `json:"bindings,omitempty"`
  1380  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1381  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1382  	// strongly suggested that systems make use of the `etag` in the
  1383  	// read-modify-write cycle to perform policy updates in order to avoid race
  1384  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1385  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1386  	// ensure that their change will be applied to the same version of the policy.
  1387  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1388  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1389  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1390  	// the conditions in the version `3` policy are lost.
  1391  	Etag string `json:"etag,omitempty"`
  1392  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1393  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1394  	// affects conditional role bindings must specify version `3`. This requirement
  1395  	// applies to the following operations: * Getting a policy that includes a
  1396  	// conditional role binding * Adding a conditional role binding to a policy *
  1397  	// Changing a conditional role binding in a policy * Removing any role binding,
  1398  	// with or without a condition, from a policy that includes conditions
  1399  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1400  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1401  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1402  	// the conditions in the version `3` policy are lost. If a policy does not
  1403  	// include any conditions, operations on that policy may specify any valid
  1404  	// version or leave the field unset. To learn which resources support
  1405  	// conditions in their IAM policies, see the IAM documentation
  1406  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1407  	Version int64 `json:"version,omitempty"`
  1408  
  1409  	// ServerResponse contains the HTTP response code and headers from the server.
  1410  	googleapi.ServerResponse `json:"-"`
  1411  	// ForceSendFields is a list of field names (e.g. "Bindings") to
  1412  	// unconditionally include in API requests. By default, fields with empty or
  1413  	// default values are omitted from API requests. See
  1414  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1415  	// details.
  1416  	ForceSendFields []string `json:"-"`
  1417  	// NullFields is a list of field names (e.g. "Bindings") to include in API
  1418  	// requests with the JSON null value. By default, fields with empty values are
  1419  	// omitted from API requests. See
  1420  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1421  	NullFields []string `json:"-"`
  1422  }
  1423  
  1424  func (s *Policy) MarshalJSON() ([]byte, error) {
  1425  	type NoMethod Policy
  1426  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1427  }
  1428  
  1429  // RollbackApiDeploymentRequest: Request message for RollbackApiDeployment.
  1430  type RollbackApiDeploymentRequest struct {
  1431  	// RevisionId: Required. The revision ID to roll back to. It must be a revision
  1432  	// of the same deployment. Example: `c7cfa2a8`
  1433  	RevisionId string `json:"revisionId,omitempty"`
  1434  	// ForceSendFields is a list of field names (e.g. "RevisionId") to
  1435  	// unconditionally include in API requests. By default, fields with empty or
  1436  	// default values are omitted from API requests. See
  1437  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1438  	// details.
  1439  	ForceSendFields []string `json:"-"`
  1440  	// NullFields is a list of field names (e.g. "RevisionId") to include in API
  1441  	// requests with the JSON null value. By default, fields with empty values are
  1442  	// omitted from API requests. See
  1443  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1444  	NullFields []string `json:"-"`
  1445  }
  1446  
  1447  func (s *RollbackApiDeploymentRequest) MarshalJSON() ([]byte, error) {
  1448  	type NoMethod RollbackApiDeploymentRequest
  1449  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1450  }
  1451  
  1452  // RollbackApiSpecRequest: Request message for RollbackApiSpec.
  1453  type RollbackApiSpecRequest struct {
  1454  	// RevisionId: Required. The revision ID to roll back to. It must be a revision
  1455  	// of the same spec. Example: `c7cfa2a8`
  1456  	RevisionId string `json:"revisionId,omitempty"`
  1457  	// ForceSendFields is a list of field names (e.g. "RevisionId") to
  1458  	// unconditionally include in API requests. By default, fields with empty or
  1459  	// default values are omitted from API requests. See
  1460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1461  	// details.
  1462  	ForceSendFields []string `json:"-"`
  1463  	// NullFields is a list of field names (e.g. "RevisionId") to include in API
  1464  	// requests with the JSON null value. By default, fields with empty values are
  1465  	// omitted from API requests. See
  1466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1467  	NullFields []string `json:"-"`
  1468  }
  1469  
  1470  func (s *RollbackApiSpecRequest) MarshalJSON() ([]byte, error) {
  1471  	type NoMethod RollbackApiSpecRequest
  1472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1473  }
  1474  
  1475  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1476  type SetIamPolicyRequest struct {
  1477  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1478  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1479  	// policy but certain Google Cloud services (such as Projects) might reject
  1480  	// them.
  1481  	Policy *Policy `json:"policy,omitempty"`
  1482  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1483  	// include in API requests. By default, fields with empty or default values are
  1484  	// omitted from API requests. See
  1485  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1486  	// details.
  1487  	ForceSendFields []string `json:"-"`
  1488  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1489  	// requests with the JSON null value. By default, fields with empty values are
  1490  	// omitted from API requests. See
  1491  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1492  	NullFields []string `json:"-"`
  1493  }
  1494  
  1495  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1496  	type NoMethod SetIamPolicyRequest
  1497  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1498  }
  1499  
  1500  // Status: The `Status` type defines a logical error model that is suitable for
  1501  // different programming environments, including REST APIs and RPC APIs. It is
  1502  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1503  // pieces of data: error code, error message, and error details. You can find
  1504  // out more about this error model and how to work with it in the API Design
  1505  // Guide (https://cloud.google.com/apis/design/errors).
  1506  type Status struct {
  1507  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1508  	Code int64 `json:"code,omitempty"`
  1509  	// Details: A list of messages that carry the error details. There is a common
  1510  	// set of message types for APIs to use.
  1511  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1512  	// Message: A developer-facing error message, which should be in English. Any
  1513  	// user-facing error message should be localized and sent in the
  1514  	// google.rpc.Status.details field, or localized by the client.
  1515  	Message string `json:"message,omitempty"`
  1516  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1517  	// include in API requests. By default, fields with empty or default values are
  1518  	// omitted from API requests. See
  1519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1520  	// details.
  1521  	ForceSendFields []string `json:"-"`
  1522  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1523  	// with the JSON null value. By default, fields with empty values are omitted
  1524  	// from API requests. See
  1525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1526  	NullFields []string `json:"-"`
  1527  }
  1528  
  1529  func (s *Status) MarshalJSON() ([]byte, error) {
  1530  	type NoMethod Status
  1531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1532  }
  1533  
  1534  // TagApiDeploymentRevisionRequest: Request message for
  1535  // TagApiDeploymentRevision.
  1536  type TagApiDeploymentRevisionRequest struct {
  1537  	// Tag: Required. The tag to apply. The tag should be at most 40 characters,
  1538  	// and match `a-z{3,39}`.
  1539  	Tag string `json:"tag,omitempty"`
  1540  	// ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
  1541  	// include in API requests. By default, fields with empty or default values are
  1542  	// omitted from API requests. See
  1543  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1544  	// details.
  1545  	ForceSendFields []string `json:"-"`
  1546  	// NullFields is a list of field names (e.g. "Tag") to include in API requests
  1547  	// with the JSON null value. By default, fields with empty values are omitted
  1548  	// from API requests. See
  1549  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1550  	NullFields []string `json:"-"`
  1551  }
  1552  
  1553  func (s *TagApiDeploymentRevisionRequest) MarshalJSON() ([]byte, error) {
  1554  	type NoMethod TagApiDeploymentRevisionRequest
  1555  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1556  }
  1557  
  1558  // TagApiSpecRevisionRequest: Request message for TagApiSpecRevision.
  1559  type TagApiSpecRevisionRequest struct {
  1560  	// Tag: Required. The tag to apply. The tag should be at most 40 characters,
  1561  	// and match `a-z{3,39}`.
  1562  	Tag string `json:"tag,omitempty"`
  1563  	// ForceSendFields is a list of field names (e.g. "Tag") to unconditionally
  1564  	// include in API requests. By default, fields with empty or default values are
  1565  	// omitted from API requests. See
  1566  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1567  	// details.
  1568  	ForceSendFields []string `json:"-"`
  1569  	// NullFields is a list of field names (e.g. "Tag") to include in API requests
  1570  	// with the JSON null value. By default, fields with empty values are omitted
  1571  	// from API requests. See
  1572  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1573  	NullFields []string `json:"-"`
  1574  }
  1575  
  1576  func (s *TagApiSpecRevisionRequest) MarshalJSON() ([]byte, error) {
  1577  	type NoMethod TagApiSpecRevisionRequest
  1578  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1579  }
  1580  
  1581  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1582  type TestIamPermissionsRequest struct {
  1583  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1584  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1585  	// information see IAM Overview
  1586  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1587  	Permissions []string `json:"permissions,omitempty"`
  1588  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1589  	// unconditionally include in API requests. By default, fields with empty or
  1590  	// default values are omitted from API requests. See
  1591  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1592  	// details.
  1593  	ForceSendFields []string `json:"-"`
  1594  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1595  	// requests with the JSON null value. By default, fields with empty values are
  1596  	// omitted from API requests. See
  1597  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1598  	NullFields []string `json:"-"`
  1599  }
  1600  
  1601  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1602  	type NoMethod TestIamPermissionsRequest
  1603  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1604  }
  1605  
  1606  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1607  // method.
  1608  type TestIamPermissionsResponse struct {
  1609  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1610  	// caller is allowed.
  1611  	Permissions []string `json:"permissions,omitempty"`
  1612  
  1613  	// ServerResponse contains the HTTP response code and headers from the server.
  1614  	googleapi.ServerResponse `json:"-"`
  1615  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1616  	// unconditionally include in API requests. By default, fields with empty or
  1617  	// default values are omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1619  	// details.
  1620  	ForceSendFields []string `json:"-"`
  1621  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1622  	// requests with the JSON null value. By default, fields with empty values are
  1623  	// omitted from API requests. See
  1624  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1625  	NullFields []string `json:"-"`
  1626  }
  1627  
  1628  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1629  	type NoMethod TestIamPermissionsResponse
  1630  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1631  }
  1632  
  1633  type ProjectsLocationsGetCall struct {
  1634  	s            *Service
  1635  	name         string
  1636  	urlParams_   gensupport.URLParams
  1637  	ifNoneMatch_ string
  1638  	ctx_         context.Context
  1639  	header_      http.Header
  1640  }
  1641  
  1642  // Get: Gets information about a location.
  1643  //
  1644  // - name: Resource name for the location.
  1645  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1646  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1647  	c.name = name
  1648  	return c
  1649  }
  1650  
  1651  // Fields allows partial responses to be retrieved. See
  1652  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1653  // details.
  1654  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1655  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1656  	return c
  1657  }
  1658  
  1659  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1660  // object's ETag matches the given value. This is useful for getting updates
  1661  // only after the object has changed since the last request.
  1662  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1663  	c.ifNoneMatch_ = entityTag
  1664  	return c
  1665  }
  1666  
  1667  // Context sets the context to be used in this call's Do method.
  1668  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1669  	c.ctx_ = ctx
  1670  	return c
  1671  }
  1672  
  1673  // Header returns a http.Header that can be modified by the caller to add
  1674  // headers to the request.
  1675  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1676  	if c.header_ == nil {
  1677  		c.header_ = make(http.Header)
  1678  	}
  1679  	return c.header_
  1680  }
  1681  
  1682  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1683  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1684  	if c.ifNoneMatch_ != "" {
  1685  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1686  	}
  1687  	var body io.Reader = nil
  1688  	c.urlParams_.Set("alt", alt)
  1689  	c.urlParams_.Set("prettyPrint", "false")
  1690  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1691  	urls += "?" + c.urlParams_.Encode()
  1692  	req, err := http.NewRequest("GET", urls, body)
  1693  	if err != nil {
  1694  		return nil, err
  1695  	}
  1696  	req.Header = reqHeaders
  1697  	googleapi.Expand(req.URL, map[string]string{
  1698  		"name": c.name,
  1699  	})
  1700  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1701  }
  1702  
  1703  // Do executes the "apigeeregistry.projects.locations.get" call.
  1704  // Any non-2xx status code is an error. Response headers are in either
  1705  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1706  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1707  // whether the returned error was because http.StatusNotModified was returned.
  1708  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1709  	gensupport.SetOptions(c.urlParams_, opts...)
  1710  	res, err := c.doRequest("json")
  1711  	if res != nil && res.StatusCode == http.StatusNotModified {
  1712  		if res.Body != nil {
  1713  			res.Body.Close()
  1714  		}
  1715  		return nil, gensupport.WrapError(&googleapi.Error{
  1716  			Code:   res.StatusCode,
  1717  			Header: res.Header,
  1718  		})
  1719  	}
  1720  	if err != nil {
  1721  		return nil, err
  1722  	}
  1723  	defer googleapi.CloseBody(res)
  1724  	if err := googleapi.CheckResponse(res); err != nil {
  1725  		return nil, gensupport.WrapError(err)
  1726  	}
  1727  	ret := &Location{
  1728  		ServerResponse: googleapi.ServerResponse{
  1729  			Header:         res.Header,
  1730  			HTTPStatusCode: res.StatusCode,
  1731  		},
  1732  	}
  1733  	target := &ret
  1734  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1735  		return nil, err
  1736  	}
  1737  	return ret, nil
  1738  }
  1739  
  1740  type ProjectsLocationsListCall struct {
  1741  	s            *Service
  1742  	name         string
  1743  	urlParams_   gensupport.URLParams
  1744  	ifNoneMatch_ string
  1745  	ctx_         context.Context
  1746  	header_      http.Header
  1747  }
  1748  
  1749  // List: Lists information about the supported locations for this service.
  1750  //
  1751  // - name: The resource that owns the locations collection, if applicable.
  1752  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1753  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1754  	c.name = name
  1755  	return c
  1756  }
  1757  
  1758  // Filter sets the optional parameter "filter": A filter to narrow down results
  1759  // to a preferred subset. The filtering language accepts strings like
  1760  // "displayName=tokyo", and is documented in more detail in AIP-160
  1761  // (https://google.aip.dev/160).
  1762  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1763  	c.urlParams_.Set("filter", filter)
  1764  	return c
  1765  }
  1766  
  1767  // PageSize sets the optional parameter "pageSize": The maximum number of
  1768  // results to return. If not set, the service selects a default.
  1769  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1770  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1771  	return c
  1772  }
  1773  
  1774  // PageToken sets the optional parameter "pageToken": A page token received
  1775  // from the `next_page_token` field in the response. Send that page token to
  1776  // receive the subsequent page.
  1777  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1778  	c.urlParams_.Set("pageToken", pageToken)
  1779  	return c
  1780  }
  1781  
  1782  // Fields allows partial responses to be retrieved. See
  1783  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1784  // details.
  1785  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1786  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1787  	return c
  1788  }
  1789  
  1790  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1791  // object's ETag matches the given value. This is useful for getting updates
  1792  // only after the object has changed since the last request.
  1793  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1794  	c.ifNoneMatch_ = entityTag
  1795  	return c
  1796  }
  1797  
  1798  // Context sets the context to be used in this call's Do method.
  1799  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1800  	c.ctx_ = ctx
  1801  	return c
  1802  }
  1803  
  1804  // Header returns a http.Header that can be modified by the caller to add
  1805  // headers to the request.
  1806  func (c *ProjectsLocationsListCall) Header() http.Header {
  1807  	if c.header_ == nil {
  1808  		c.header_ = make(http.Header)
  1809  	}
  1810  	return c.header_
  1811  }
  1812  
  1813  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1814  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1815  	if c.ifNoneMatch_ != "" {
  1816  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1817  	}
  1818  	var body io.Reader = nil
  1819  	c.urlParams_.Set("alt", alt)
  1820  	c.urlParams_.Set("prettyPrint", "false")
  1821  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  1822  	urls += "?" + c.urlParams_.Encode()
  1823  	req, err := http.NewRequest("GET", urls, body)
  1824  	if err != nil {
  1825  		return nil, err
  1826  	}
  1827  	req.Header = reqHeaders
  1828  	googleapi.Expand(req.URL, map[string]string{
  1829  		"name": c.name,
  1830  	})
  1831  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1832  }
  1833  
  1834  // Do executes the "apigeeregistry.projects.locations.list" call.
  1835  // Any non-2xx status code is an error. Response headers are in either
  1836  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1837  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1838  // check whether the returned error was because http.StatusNotModified was
  1839  // returned.
  1840  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1841  	gensupport.SetOptions(c.urlParams_, opts...)
  1842  	res, err := c.doRequest("json")
  1843  	if res != nil && res.StatusCode == http.StatusNotModified {
  1844  		if res.Body != nil {
  1845  			res.Body.Close()
  1846  		}
  1847  		return nil, gensupport.WrapError(&googleapi.Error{
  1848  			Code:   res.StatusCode,
  1849  			Header: res.Header,
  1850  		})
  1851  	}
  1852  	if err != nil {
  1853  		return nil, err
  1854  	}
  1855  	defer googleapi.CloseBody(res)
  1856  	if err := googleapi.CheckResponse(res); err != nil {
  1857  		return nil, gensupport.WrapError(err)
  1858  	}
  1859  	ret := &ListLocationsResponse{
  1860  		ServerResponse: googleapi.ServerResponse{
  1861  			Header:         res.Header,
  1862  			HTTPStatusCode: res.StatusCode,
  1863  		},
  1864  	}
  1865  	target := &ret
  1866  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1867  		return nil, err
  1868  	}
  1869  	return ret, nil
  1870  }
  1871  
  1872  // Pages invokes f for each page of results.
  1873  // A non-nil error returned from f will halt the iteration.
  1874  // The provided context supersedes any context provided to the Context method.
  1875  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1876  	c.ctx_ = ctx
  1877  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1878  	for {
  1879  		x, err := c.Do()
  1880  		if err != nil {
  1881  			return err
  1882  		}
  1883  		if err := f(x); err != nil {
  1884  			return err
  1885  		}
  1886  		if x.NextPageToken == "" {
  1887  			return nil
  1888  		}
  1889  		c.PageToken(x.NextPageToken)
  1890  	}
  1891  }
  1892  
  1893  type ProjectsLocationsApisCreateCall struct {
  1894  	s          *Service
  1895  	parent     string
  1896  	api        *Api
  1897  	urlParams_ gensupport.URLParams
  1898  	ctx_       context.Context
  1899  	header_    http.Header
  1900  }
  1901  
  1902  // Create: Creates a specified API.
  1903  //
  1904  //   - parent: The parent, which owns this collection of APIs. Format:
  1905  //     `projects/*/locations/*`.
  1906  func (r *ProjectsLocationsApisService) Create(parent string, api *Api) *ProjectsLocationsApisCreateCall {
  1907  	c := &ProjectsLocationsApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1908  	c.parent = parent
  1909  	c.api = api
  1910  	return c
  1911  }
  1912  
  1913  // ApiId sets the optional parameter "apiId": Required. The ID to use for the
  1914  // API, which will become the final component of the API's resource name. This
  1915  // value should be 4-63 characters, and valid characters are /a-z-/. Following
  1916  // AIP-162, IDs must not have the form of a UUID.
  1917  func (c *ProjectsLocationsApisCreateCall) ApiId(apiId string) *ProjectsLocationsApisCreateCall {
  1918  	c.urlParams_.Set("apiId", apiId)
  1919  	return c
  1920  }
  1921  
  1922  // Fields allows partial responses to be retrieved. See
  1923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1924  // details.
  1925  func (c *ProjectsLocationsApisCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisCreateCall {
  1926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1927  	return c
  1928  }
  1929  
  1930  // Context sets the context to be used in this call's Do method.
  1931  func (c *ProjectsLocationsApisCreateCall) Context(ctx context.Context) *ProjectsLocationsApisCreateCall {
  1932  	c.ctx_ = ctx
  1933  	return c
  1934  }
  1935  
  1936  // Header returns a http.Header that can be modified by the caller to add
  1937  // headers to the request.
  1938  func (c *ProjectsLocationsApisCreateCall) Header() http.Header {
  1939  	if c.header_ == nil {
  1940  		c.header_ = make(http.Header)
  1941  	}
  1942  	return c.header_
  1943  }
  1944  
  1945  func (c *ProjectsLocationsApisCreateCall) doRequest(alt string) (*http.Response, error) {
  1946  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1947  	var body io.Reader = nil
  1948  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.api)
  1949  	if err != nil {
  1950  		return nil, err
  1951  	}
  1952  	c.urlParams_.Set("alt", alt)
  1953  	c.urlParams_.Set("prettyPrint", "false")
  1954  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis")
  1955  	urls += "?" + c.urlParams_.Encode()
  1956  	req, err := http.NewRequest("POST", urls, body)
  1957  	if err != nil {
  1958  		return nil, err
  1959  	}
  1960  	req.Header = reqHeaders
  1961  	googleapi.Expand(req.URL, map[string]string{
  1962  		"parent": c.parent,
  1963  	})
  1964  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1965  }
  1966  
  1967  // Do executes the "apigeeregistry.projects.locations.apis.create" call.
  1968  // Any non-2xx status code is an error. Response headers are in either
  1969  // *Api.ServerResponse.Header or (if a response was returned at all) in
  1970  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1971  // whether the returned error was because http.StatusNotModified was returned.
  1972  func (c *ProjectsLocationsApisCreateCall) Do(opts ...googleapi.CallOption) (*Api, error) {
  1973  	gensupport.SetOptions(c.urlParams_, opts...)
  1974  	res, err := c.doRequest("json")
  1975  	if res != nil && res.StatusCode == http.StatusNotModified {
  1976  		if res.Body != nil {
  1977  			res.Body.Close()
  1978  		}
  1979  		return nil, gensupport.WrapError(&googleapi.Error{
  1980  			Code:   res.StatusCode,
  1981  			Header: res.Header,
  1982  		})
  1983  	}
  1984  	if err != nil {
  1985  		return nil, err
  1986  	}
  1987  	defer googleapi.CloseBody(res)
  1988  	if err := googleapi.CheckResponse(res); err != nil {
  1989  		return nil, gensupport.WrapError(err)
  1990  	}
  1991  	ret := &Api{
  1992  		ServerResponse: googleapi.ServerResponse{
  1993  			Header:         res.Header,
  1994  			HTTPStatusCode: res.StatusCode,
  1995  		},
  1996  	}
  1997  	target := &ret
  1998  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1999  		return nil, err
  2000  	}
  2001  	return ret, nil
  2002  }
  2003  
  2004  type ProjectsLocationsApisDeleteCall struct {
  2005  	s          *Service
  2006  	name       string
  2007  	urlParams_ gensupport.URLParams
  2008  	ctx_       context.Context
  2009  	header_    http.Header
  2010  }
  2011  
  2012  // Delete: Removes a specified API and all of the resources that it owns.
  2013  //
  2014  //   - name: The name of the API to delete. Format:
  2015  //     `projects/*/locations/*/apis/*`.
  2016  func (r *ProjectsLocationsApisService) Delete(name string) *ProjectsLocationsApisDeleteCall {
  2017  	c := &ProjectsLocationsApisDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2018  	c.name = name
  2019  	return c
  2020  }
  2021  
  2022  // Force sets the optional parameter "force": If set to true, any child
  2023  // resources will also be deleted. (Otherwise, the request will only work if
  2024  // there are no child resources.)
  2025  func (c *ProjectsLocationsApisDeleteCall) Force(force bool) *ProjectsLocationsApisDeleteCall {
  2026  	c.urlParams_.Set("force", fmt.Sprint(force))
  2027  	return c
  2028  }
  2029  
  2030  // Fields allows partial responses to be retrieved. See
  2031  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2032  // details.
  2033  func (c *ProjectsLocationsApisDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeleteCall {
  2034  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2035  	return c
  2036  }
  2037  
  2038  // Context sets the context to be used in this call's Do method.
  2039  func (c *ProjectsLocationsApisDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisDeleteCall {
  2040  	c.ctx_ = ctx
  2041  	return c
  2042  }
  2043  
  2044  // Header returns a http.Header that can be modified by the caller to add
  2045  // headers to the request.
  2046  func (c *ProjectsLocationsApisDeleteCall) Header() http.Header {
  2047  	if c.header_ == nil {
  2048  		c.header_ = make(http.Header)
  2049  	}
  2050  	return c.header_
  2051  }
  2052  
  2053  func (c *ProjectsLocationsApisDeleteCall) doRequest(alt string) (*http.Response, error) {
  2054  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2055  	var body io.Reader = nil
  2056  	c.urlParams_.Set("alt", alt)
  2057  	c.urlParams_.Set("prettyPrint", "false")
  2058  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2059  	urls += "?" + c.urlParams_.Encode()
  2060  	req, err := http.NewRequest("DELETE", urls, body)
  2061  	if err != nil {
  2062  		return nil, err
  2063  	}
  2064  	req.Header = reqHeaders
  2065  	googleapi.Expand(req.URL, map[string]string{
  2066  		"name": c.name,
  2067  	})
  2068  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2069  }
  2070  
  2071  // Do executes the "apigeeregistry.projects.locations.apis.delete" call.
  2072  // Any non-2xx status code is an error. Response headers are in either
  2073  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2074  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2075  // whether the returned error was because http.StatusNotModified was returned.
  2076  func (c *ProjectsLocationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2077  	gensupport.SetOptions(c.urlParams_, opts...)
  2078  	res, err := c.doRequest("json")
  2079  	if res != nil && res.StatusCode == http.StatusNotModified {
  2080  		if res.Body != nil {
  2081  			res.Body.Close()
  2082  		}
  2083  		return nil, gensupport.WrapError(&googleapi.Error{
  2084  			Code:   res.StatusCode,
  2085  			Header: res.Header,
  2086  		})
  2087  	}
  2088  	if err != nil {
  2089  		return nil, err
  2090  	}
  2091  	defer googleapi.CloseBody(res)
  2092  	if err := googleapi.CheckResponse(res); err != nil {
  2093  		return nil, gensupport.WrapError(err)
  2094  	}
  2095  	ret := &Empty{
  2096  		ServerResponse: googleapi.ServerResponse{
  2097  			Header:         res.Header,
  2098  			HTTPStatusCode: res.StatusCode,
  2099  		},
  2100  	}
  2101  	target := &ret
  2102  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2103  		return nil, err
  2104  	}
  2105  	return ret, nil
  2106  }
  2107  
  2108  type ProjectsLocationsApisGetCall struct {
  2109  	s            *Service
  2110  	name         string
  2111  	urlParams_   gensupport.URLParams
  2112  	ifNoneMatch_ string
  2113  	ctx_         context.Context
  2114  	header_      http.Header
  2115  }
  2116  
  2117  // Get: Returns a specified API.
  2118  //
  2119  //   - name: The name of the API to retrieve. Format:
  2120  //     `projects/*/locations/*/apis/*`.
  2121  func (r *ProjectsLocationsApisService) Get(name string) *ProjectsLocationsApisGetCall {
  2122  	c := &ProjectsLocationsApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2123  	c.name = name
  2124  	return c
  2125  }
  2126  
  2127  // Fields allows partial responses to be retrieved. See
  2128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2129  // details.
  2130  func (c *ProjectsLocationsApisGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisGetCall {
  2131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2132  	return c
  2133  }
  2134  
  2135  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2136  // object's ETag matches the given value. This is useful for getting updates
  2137  // only after the object has changed since the last request.
  2138  func (c *ProjectsLocationsApisGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisGetCall {
  2139  	c.ifNoneMatch_ = entityTag
  2140  	return c
  2141  }
  2142  
  2143  // Context sets the context to be used in this call's Do method.
  2144  func (c *ProjectsLocationsApisGetCall) Context(ctx context.Context) *ProjectsLocationsApisGetCall {
  2145  	c.ctx_ = ctx
  2146  	return c
  2147  }
  2148  
  2149  // Header returns a http.Header that can be modified by the caller to add
  2150  // headers to the request.
  2151  func (c *ProjectsLocationsApisGetCall) Header() http.Header {
  2152  	if c.header_ == nil {
  2153  		c.header_ = make(http.Header)
  2154  	}
  2155  	return c.header_
  2156  }
  2157  
  2158  func (c *ProjectsLocationsApisGetCall) doRequest(alt string) (*http.Response, error) {
  2159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2160  	if c.ifNoneMatch_ != "" {
  2161  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2162  	}
  2163  	var body io.Reader = nil
  2164  	c.urlParams_.Set("alt", alt)
  2165  	c.urlParams_.Set("prettyPrint", "false")
  2166  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2167  	urls += "?" + c.urlParams_.Encode()
  2168  	req, err := http.NewRequest("GET", urls, body)
  2169  	if err != nil {
  2170  		return nil, err
  2171  	}
  2172  	req.Header = reqHeaders
  2173  	googleapi.Expand(req.URL, map[string]string{
  2174  		"name": c.name,
  2175  	})
  2176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2177  }
  2178  
  2179  // Do executes the "apigeeregistry.projects.locations.apis.get" call.
  2180  // Any non-2xx status code is an error. Response headers are in either
  2181  // *Api.ServerResponse.Header or (if a response was returned at all) in
  2182  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2183  // whether the returned error was because http.StatusNotModified was returned.
  2184  func (c *ProjectsLocationsApisGetCall) Do(opts ...googleapi.CallOption) (*Api, error) {
  2185  	gensupport.SetOptions(c.urlParams_, opts...)
  2186  	res, err := c.doRequest("json")
  2187  	if res != nil && res.StatusCode == http.StatusNotModified {
  2188  		if res.Body != nil {
  2189  			res.Body.Close()
  2190  		}
  2191  		return nil, gensupport.WrapError(&googleapi.Error{
  2192  			Code:   res.StatusCode,
  2193  			Header: res.Header,
  2194  		})
  2195  	}
  2196  	if err != nil {
  2197  		return nil, err
  2198  	}
  2199  	defer googleapi.CloseBody(res)
  2200  	if err := googleapi.CheckResponse(res); err != nil {
  2201  		return nil, gensupport.WrapError(err)
  2202  	}
  2203  	ret := &Api{
  2204  		ServerResponse: googleapi.ServerResponse{
  2205  			Header:         res.Header,
  2206  			HTTPStatusCode: res.StatusCode,
  2207  		},
  2208  	}
  2209  	target := &ret
  2210  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2211  		return nil, err
  2212  	}
  2213  	return ret, nil
  2214  }
  2215  
  2216  type ProjectsLocationsApisGetIamPolicyCall struct {
  2217  	s            *Service
  2218  	resource     string
  2219  	urlParams_   gensupport.URLParams
  2220  	ifNoneMatch_ string
  2221  	ctx_         context.Context
  2222  	header_      http.Header
  2223  }
  2224  
  2225  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  2226  // empty policy if the resource exists and does not have a policy set.
  2227  //
  2228  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2229  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2230  //     for the appropriate value for this field.
  2231  func (r *ProjectsLocationsApisService) GetIamPolicy(resource string) *ProjectsLocationsApisGetIamPolicyCall {
  2232  	c := &ProjectsLocationsApisGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2233  	c.resource = resource
  2234  	return c
  2235  }
  2236  
  2237  // OptionsRequestedPolicyVersion sets the optional parameter
  2238  // "options.requestedPolicyVersion": The maximum policy version that will be
  2239  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2240  // an invalid value will be rejected. Requests for policies with any
  2241  // conditional role bindings must specify version 3. Policies with no
  2242  // conditional role bindings may specify any valid value or leave the field
  2243  // unset. The policy in the response might use the policy version that you
  2244  // specified, or it might use a lower policy version. For example, if you
  2245  // specify version 3, but the policy has no conditional role bindings, the
  2246  // response uses version 1. To learn which resources support conditions in
  2247  // their IAM policies, see the IAM documentation
  2248  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2249  func (c *ProjectsLocationsApisGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisGetIamPolicyCall {
  2250  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2251  	return c
  2252  }
  2253  
  2254  // Fields allows partial responses to be retrieved. See
  2255  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2256  // details.
  2257  func (c *ProjectsLocationsApisGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisGetIamPolicyCall {
  2258  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2259  	return c
  2260  }
  2261  
  2262  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2263  // object's ETag matches the given value. This is useful for getting updates
  2264  // only after the object has changed since the last request.
  2265  func (c *ProjectsLocationsApisGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisGetIamPolicyCall {
  2266  	c.ifNoneMatch_ = entityTag
  2267  	return c
  2268  }
  2269  
  2270  // Context sets the context to be used in this call's Do method.
  2271  func (c *ProjectsLocationsApisGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisGetIamPolicyCall {
  2272  	c.ctx_ = ctx
  2273  	return c
  2274  }
  2275  
  2276  // Header returns a http.Header that can be modified by the caller to add
  2277  // headers to the request.
  2278  func (c *ProjectsLocationsApisGetIamPolicyCall) Header() http.Header {
  2279  	if c.header_ == nil {
  2280  		c.header_ = make(http.Header)
  2281  	}
  2282  	return c.header_
  2283  }
  2284  
  2285  func (c *ProjectsLocationsApisGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2286  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2287  	if c.ifNoneMatch_ != "" {
  2288  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2289  	}
  2290  	var body io.Reader = nil
  2291  	c.urlParams_.Set("alt", alt)
  2292  	c.urlParams_.Set("prettyPrint", "false")
  2293  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  2294  	urls += "?" + c.urlParams_.Encode()
  2295  	req, err := http.NewRequest("GET", urls, body)
  2296  	if err != nil {
  2297  		return nil, err
  2298  	}
  2299  	req.Header = reqHeaders
  2300  	googleapi.Expand(req.URL, map[string]string{
  2301  		"resource": c.resource,
  2302  	})
  2303  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2304  }
  2305  
  2306  // Do executes the "apigeeregistry.projects.locations.apis.getIamPolicy" call.
  2307  // Any non-2xx status code is an error. Response headers are in either
  2308  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2309  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2310  // whether the returned error was because http.StatusNotModified was returned.
  2311  func (c *ProjectsLocationsApisGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2312  	gensupport.SetOptions(c.urlParams_, opts...)
  2313  	res, err := c.doRequest("json")
  2314  	if res != nil && res.StatusCode == http.StatusNotModified {
  2315  		if res.Body != nil {
  2316  			res.Body.Close()
  2317  		}
  2318  		return nil, gensupport.WrapError(&googleapi.Error{
  2319  			Code:   res.StatusCode,
  2320  			Header: res.Header,
  2321  		})
  2322  	}
  2323  	if err != nil {
  2324  		return nil, err
  2325  	}
  2326  	defer googleapi.CloseBody(res)
  2327  	if err := googleapi.CheckResponse(res); err != nil {
  2328  		return nil, gensupport.WrapError(err)
  2329  	}
  2330  	ret := &Policy{
  2331  		ServerResponse: googleapi.ServerResponse{
  2332  			Header:         res.Header,
  2333  			HTTPStatusCode: res.StatusCode,
  2334  		},
  2335  	}
  2336  	target := &ret
  2337  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2338  		return nil, err
  2339  	}
  2340  	return ret, nil
  2341  }
  2342  
  2343  type ProjectsLocationsApisListCall struct {
  2344  	s            *Service
  2345  	parent       string
  2346  	urlParams_   gensupport.URLParams
  2347  	ifNoneMatch_ string
  2348  	ctx_         context.Context
  2349  	header_      http.Header
  2350  }
  2351  
  2352  // List: Returns matching APIs.
  2353  //
  2354  //   - parent: The parent, which owns this collection of APIs. Format:
  2355  //     `projects/*/locations/*`.
  2356  func (r *ProjectsLocationsApisService) List(parent string) *ProjectsLocationsApisListCall {
  2357  	c := &ProjectsLocationsApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2358  	c.parent = parent
  2359  	return c
  2360  }
  2361  
  2362  // Filter sets the optional parameter "filter": An expression that can be used
  2363  // to filter the list. Filters use the Common Expression Language and can refer
  2364  // to all message fields.
  2365  func (c *ProjectsLocationsApisListCall) Filter(filter string) *ProjectsLocationsApisListCall {
  2366  	c.urlParams_.Set("filter", filter)
  2367  	return c
  2368  }
  2369  
  2370  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  2371  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  2372  // "desc" identifier, e.g. "foo desc,bar"
  2373  func (c *ProjectsLocationsApisListCall) OrderBy(orderBy string) *ProjectsLocationsApisListCall {
  2374  	c.urlParams_.Set("orderBy", orderBy)
  2375  	return c
  2376  }
  2377  
  2378  // PageSize sets the optional parameter "pageSize": The maximum number of APIs
  2379  // to return. The service may return fewer than this value. If unspecified, at
  2380  // most 50 values will be returned. The maximum is 1000; values above 1000 will
  2381  // be coerced to 1000.
  2382  func (c *ProjectsLocationsApisListCall) PageSize(pageSize int64) *ProjectsLocationsApisListCall {
  2383  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2384  	return c
  2385  }
  2386  
  2387  // PageToken sets the optional parameter "pageToken": A page token, received
  2388  // from a previous `ListApis` call. Provide this to retrieve the subsequent
  2389  // page. When paginating, all other parameters provided to `ListApis` must
  2390  // match the call that provided the page token.
  2391  func (c *ProjectsLocationsApisListCall) PageToken(pageToken string) *ProjectsLocationsApisListCall {
  2392  	c.urlParams_.Set("pageToken", pageToken)
  2393  	return c
  2394  }
  2395  
  2396  // Fields allows partial responses to be retrieved. See
  2397  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2398  // details.
  2399  func (c *ProjectsLocationsApisListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisListCall {
  2400  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2401  	return c
  2402  }
  2403  
  2404  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2405  // object's ETag matches the given value. This is useful for getting updates
  2406  // only after the object has changed since the last request.
  2407  func (c *ProjectsLocationsApisListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisListCall {
  2408  	c.ifNoneMatch_ = entityTag
  2409  	return c
  2410  }
  2411  
  2412  // Context sets the context to be used in this call's Do method.
  2413  func (c *ProjectsLocationsApisListCall) Context(ctx context.Context) *ProjectsLocationsApisListCall {
  2414  	c.ctx_ = ctx
  2415  	return c
  2416  }
  2417  
  2418  // Header returns a http.Header that can be modified by the caller to add
  2419  // headers to the request.
  2420  func (c *ProjectsLocationsApisListCall) Header() http.Header {
  2421  	if c.header_ == nil {
  2422  		c.header_ = make(http.Header)
  2423  	}
  2424  	return c.header_
  2425  }
  2426  
  2427  func (c *ProjectsLocationsApisListCall) doRequest(alt string) (*http.Response, error) {
  2428  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2429  	if c.ifNoneMatch_ != "" {
  2430  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2431  	}
  2432  	var body io.Reader = nil
  2433  	c.urlParams_.Set("alt", alt)
  2434  	c.urlParams_.Set("prettyPrint", "false")
  2435  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/apis")
  2436  	urls += "?" + c.urlParams_.Encode()
  2437  	req, err := http.NewRequest("GET", urls, body)
  2438  	if err != nil {
  2439  		return nil, err
  2440  	}
  2441  	req.Header = reqHeaders
  2442  	googleapi.Expand(req.URL, map[string]string{
  2443  		"parent": c.parent,
  2444  	})
  2445  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2446  }
  2447  
  2448  // Do executes the "apigeeregistry.projects.locations.apis.list" call.
  2449  // Any non-2xx status code is an error. Response headers are in either
  2450  // *ListApisResponse.ServerResponse.Header or (if a response was returned at
  2451  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2452  // check whether the returned error was because http.StatusNotModified was
  2453  // returned.
  2454  func (c *ProjectsLocationsApisListCall) Do(opts ...googleapi.CallOption) (*ListApisResponse, error) {
  2455  	gensupport.SetOptions(c.urlParams_, opts...)
  2456  	res, err := c.doRequest("json")
  2457  	if res != nil && res.StatusCode == http.StatusNotModified {
  2458  		if res.Body != nil {
  2459  			res.Body.Close()
  2460  		}
  2461  		return nil, gensupport.WrapError(&googleapi.Error{
  2462  			Code:   res.StatusCode,
  2463  			Header: res.Header,
  2464  		})
  2465  	}
  2466  	if err != nil {
  2467  		return nil, err
  2468  	}
  2469  	defer googleapi.CloseBody(res)
  2470  	if err := googleapi.CheckResponse(res); err != nil {
  2471  		return nil, gensupport.WrapError(err)
  2472  	}
  2473  	ret := &ListApisResponse{
  2474  		ServerResponse: googleapi.ServerResponse{
  2475  			Header:         res.Header,
  2476  			HTTPStatusCode: res.StatusCode,
  2477  		},
  2478  	}
  2479  	target := &ret
  2480  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2481  		return nil, err
  2482  	}
  2483  	return ret, nil
  2484  }
  2485  
  2486  // Pages invokes f for each page of results.
  2487  // A non-nil error returned from f will halt the iteration.
  2488  // The provided context supersedes any context provided to the Context method.
  2489  func (c *ProjectsLocationsApisListCall) Pages(ctx context.Context, f func(*ListApisResponse) error) error {
  2490  	c.ctx_ = ctx
  2491  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2492  	for {
  2493  		x, err := c.Do()
  2494  		if err != nil {
  2495  			return err
  2496  		}
  2497  		if err := f(x); err != nil {
  2498  			return err
  2499  		}
  2500  		if x.NextPageToken == "" {
  2501  			return nil
  2502  		}
  2503  		c.PageToken(x.NextPageToken)
  2504  	}
  2505  }
  2506  
  2507  type ProjectsLocationsApisPatchCall struct {
  2508  	s          *Service
  2509  	name       string
  2510  	api        *Api
  2511  	urlParams_ gensupport.URLParams
  2512  	ctx_       context.Context
  2513  	header_    http.Header
  2514  }
  2515  
  2516  // Patch: Used to modify a specified API.
  2517  //
  2518  // - name: Resource name.
  2519  func (r *ProjectsLocationsApisService) Patch(name string, api *Api) *ProjectsLocationsApisPatchCall {
  2520  	c := &ProjectsLocationsApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2521  	c.name = name
  2522  	c.api = api
  2523  	return c
  2524  }
  2525  
  2526  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
  2527  // the API is not found, a new API will be created. In this situation,
  2528  // `update_mask` is ignored.
  2529  func (c *ProjectsLocationsApisPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsApisPatchCall {
  2530  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  2531  	return c
  2532  }
  2533  
  2534  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  2535  // be updated. If omitted, all fields are updated that are set in the request
  2536  // message (fields set to default values are ignored). If an asterisk "*" is
  2537  // specified, all fields are updated, including fields that are
  2538  // unspecified/default in the request.
  2539  func (c *ProjectsLocationsApisPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisPatchCall {
  2540  	c.urlParams_.Set("updateMask", updateMask)
  2541  	return c
  2542  }
  2543  
  2544  // Fields allows partial responses to be retrieved. See
  2545  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2546  // details.
  2547  func (c *ProjectsLocationsApisPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisPatchCall {
  2548  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2549  	return c
  2550  }
  2551  
  2552  // Context sets the context to be used in this call's Do method.
  2553  func (c *ProjectsLocationsApisPatchCall) Context(ctx context.Context) *ProjectsLocationsApisPatchCall {
  2554  	c.ctx_ = ctx
  2555  	return c
  2556  }
  2557  
  2558  // Header returns a http.Header that can be modified by the caller to add
  2559  // headers to the request.
  2560  func (c *ProjectsLocationsApisPatchCall) Header() http.Header {
  2561  	if c.header_ == nil {
  2562  		c.header_ = make(http.Header)
  2563  	}
  2564  	return c.header_
  2565  }
  2566  
  2567  func (c *ProjectsLocationsApisPatchCall) doRequest(alt string) (*http.Response, error) {
  2568  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2569  	var body io.Reader = nil
  2570  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.api)
  2571  	if err != nil {
  2572  		return nil, err
  2573  	}
  2574  	c.urlParams_.Set("alt", alt)
  2575  	c.urlParams_.Set("prettyPrint", "false")
  2576  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2577  	urls += "?" + c.urlParams_.Encode()
  2578  	req, err := http.NewRequest("PATCH", urls, body)
  2579  	if err != nil {
  2580  		return nil, err
  2581  	}
  2582  	req.Header = reqHeaders
  2583  	googleapi.Expand(req.URL, map[string]string{
  2584  		"name": c.name,
  2585  	})
  2586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2587  }
  2588  
  2589  // Do executes the "apigeeregistry.projects.locations.apis.patch" call.
  2590  // Any non-2xx status code is an error. Response headers are in either
  2591  // *Api.ServerResponse.Header or (if a response was returned at all) in
  2592  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2593  // whether the returned error was because http.StatusNotModified was returned.
  2594  func (c *ProjectsLocationsApisPatchCall) Do(opts ...googleapi.CallOption) (*Api, error) {
  2595  	gensupport.SetOptions(c.urlParams_, opts...)
  2596  	res, err := c.doRequest("json")
  2597  	if res != nil && res.StatusCode == http.StatusNotModified {
  2598  		if res.Body != nil {
  2599  			res.Body.Close()
  2600  		}
  2601  		return nil, gensupport.WrapError(&googleapi.Error{
  2602  			Code:   res.StatusCode,
  2603  			Header: res.Header,
  2604  		})
  2605  	}
  2606  	if err != nil {
  2607  		return nil, err
  2608  	}
  2609  	defer googleapi.CloseBody(res)
  2610  	if err := googleapi.CheckResponse(res); err != nil {
  2611  		return nil, gensupport.WrapError(err)
  2612  	}
  2613  	ret := &Api{
  2614  		ServerResponse: googleapi.ServerResponse{
  2615  			Header:         res.Header,
  2616  			HTTPStatusCode: res.StatusCode,
  2617  		},
  2618  	}
  2619  	target := &ret
  2620  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2621  		return nil, err
  2622  	}
  2623  	return ret, nil
  2624  }
  2625  
  2626  type ProjectsLocationsApisSetIamPolicyCall struct {
  2627  	s                   *Service
  2628  	resource            string
  2629  	setiampolicyrequest *SetIamPolicyRequest
  2630  	urlParams_          gensupport.URLParams
  2631  	ctx_                context.Context
  2632  	header_             http.Header
  2633  }
  2634  
  2635  // SetIamPolicy: Sets the access control policy on the specified resource.
  2636  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  2637  // and `PERMISSION_DENIED` errors.
  2638  //
  2639  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2640  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2641  //     for the appropriate value for this field.
  2642  func (r *ProjectsLocationsApisService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisSetIamPolicyCall {
  2643  	c := &ProjectsLocationsApisSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2644  	c.resource = resource
  2645  	c.setiampolicyrequest = setiampolicyrequest
  2646  	return c
  2647  }
  2648  
  2649  // Fields allows partial responses to be retrieved. See
  2650  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2651  // details.
  2652  func (c *ProjectsLocationsApisSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisSetIamPolicyCall {
  2653  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2654  	return c
  2655  }
  2656  
  2657  // Context sets the context to be used in this call's Do method.
  2658  func (c *ProjectsLocationsApisSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisSetIamPolicyCall {
  2659  	c.ctx_ = ctx
  2660  	return c
  2661  }
  2662  
  2663  // Header returns a http.Header that can be modified by the caller to add
  2664  // headers to the request.
  2665  func (c *ProjectsLocationsApisSetIamPolicyCall) Header() http.Header {
  2666  	if c.header_ == nil {
  2667  		c.header_ = make(http.Header)
  2668  	}
  2669  	return c.header_
  2670  }
  2671  
  2672  func (c *ProjectsLocationsApisSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2673  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2674  	var body io.Reader = nil
  2675  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2676  	if err != nil {
  2677  		return nil, err
  2678  	}
  2679  	c.urlParams_.Set("alt", alt)
  2680  	c.urlParams_.Set("prettyPrint", "false")
  2681  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  2682  	urls += "?" + c.urlParams_.Encode()
  2683  	req, err := http.NewRequest("POST", urls, body)
  2684  	if err != nil {
  2685  		return nil, err
  2686  	}
  2687  	req.Header = reqHeaders
  2688  	googleapi.Expand(req.URL, map[string]string{
  2689  		"resource": c.resource,
  2690  	})
  2691  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2692  }
  2693  
  2694  // Do executes the "apigeeregistry.projects.locations.apis.setIamPolicy" call.
  2695  // Any non-2xx status code is an error. Response headers are in either
  2696  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2697  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2698  // whether the returned error was because http.StatusNotModified was returned.
  2699  func (c *ProjectsLocationsApisSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2700  	gensupport.SetOptions(c.urlParams_, opts...)
  2701  	res, err := c.doRequest("json")
  2702  	if res != nil && res.StatusCode == http.StatusNotModified {
  2703  		if res.Body != nil {
  2704  			res.Body.Close()
  2705  		}
  2706  		return nil, gensupport.WrapError(&googleapi.Error{
  2707  			Code:   res.StatusCode,
  2708  			Header: res.Header,
  2709  		})
  2710  	}
  2711  	if err != nil {
  2712  		return nil, err
  2713  	}
  2714  	defer googleapi.CloseBody(res)
  2715  	if err := googleapi.CheckResponse(res); err != nil {
  2716  		return nil, gensupport.WrapError(err)
  2717  	}
  2718  	ret := &Policy{
  2719  		ServerResponse: googleapi.ServerResponse{
  2720  			Header:         res.Header,
  2721  			HTTPStatusCode: res.StatusCode,
  2722  		},
  2723  	}
  2724  	target := &ret
  2725  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2726  		return nil, err
  2727  	}
  2728  	return ret, nil
  2729  }
  2730  
  2731  type ProjectsLocationsApisTestIamPermissionsCall struct {
  2732  	s                         *Service
  2733  	resource                  string
  2734  	testiampermissionsrequest *TestIamPermissionsRequest
  2735  	urlParams_                gensupport.URLParams
  2736  	ctx_                      context.Context
  2737  	header_                   http.Header
  2738  }
  2739  
  2740  // TestIamPermissions: Returns permissions that a caller has on the specified
  2741  // resource. If the resource does not exist, this will return an empty set of
  2742  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  2743  // used for building permission-aware UIs and command-line tools, not for
  2744  // authorization checking. This operation may "fail open" without warning.
  2745  //
  2746  //   - resource: REQUIRED: The resource for which the policy detail is being
  2747  //     requested. See Resource names
  2748  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2749  //     value for this field.
  2750  func (r *ProjectsLocationsApisService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisTestIamPermissionsCall {
  2751  	c := &ProjectsLocationsApisTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2752  	c.resource = resource
  2753  	c.testiampermissionsrequest = testiampermissionsrequest
  2754  	return c
  2755  }
  2756  
  2757  // Fields allows partial responses to be retrieved. See
  2758  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2759  // details.
  2760  func (c *ProjectsLocationsApisTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisTestIamPermissionsCall {
  2761  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2762  	return c
  2763  }
  2764  
  2765  // Context sets the context to be used in this call's Do method.
  2766  func (c *ProjectsLocationsApisTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisTestIamPermissionsCall {
  2767  	c.ctx_ = ctx
  2768  	return c
  2769  }
  2770  
  2771  // Header returns a http.Header that can be modified by the caller to add
  2772  // headers to the request.
  2773  func (c *ProjectsLocationsApisTestIamPermissionsCall) Header() http.Header {
  2774  	if c.header_ == nil {
  2775  		c.header_ = make(http.Header)
  2776  	}
  2777  	return c.header_
  2778  }
  2779  
  2780  func (c *ProjectsLocationsApisTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2781  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2782  	var body io.Reader = nil
  2783  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2784  	if err != nil {
  2785  		return nil, err
  2786  	}
  2787  	c.urlParams_.Set("alt", alt)
  2788  	c.urlParams_.Set("prettyPrint", "false")
  2789  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  2790  	urls += "?" + c.urlParams_.Encode()
  2791  	req, err := http.NewRequest("POST", urls, body)
  2792  	if err != nil {
  2793  		return nil, err
  2794  	}
  2795  	req.Header = reqHeaders
  2796  	googleapi.Expand(req.URL, map[string]string{
  2797  		"resource": c.resource,
  2798  	})
  2799  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2800  }
  2801  
  2802  // Do executes the "apigeeregistry.projects.locations.apis.testIamPermissions" call.
  2803  // Any non-2xx status code is an error. Response headers are in either
  2804  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2805  // returned at all) in error.(*googleapi.Error).Header. Use
  2806  // googleapi.IsNotModified to check whether the returned error was because
  2807  // http.StatusNotModified was returned.
  2808  func (c *ProjectsLocationsApisTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2809  	gensupport.SetOptions(c.urlParams_, opts...)
  2810  	res, err := c.doRequest("json")
  2811  	if res != nil && res.StatusCode == http.StatusNotModified {
  2812  		if res.Body != nil {
  2813  			res.Body.Close()
  2814  		}
  2815  		return nil, gensupport.WrapError(&googleapi.Error{
  2816  			Code:   res.StatusCode,
  2817  			Header: res.Header,
  2818  		})
  2819  	}
  2820  	if err != nil {
  2821  		return nil, err
  2822  	}
  2823  	defer googleapi.CloseBody(res)
  2824  	if err := googleapi.CheckResponse(res); err != nil {
  2825  		return nil, gensupport.WrapError(err)
  2826  	}
  2827  	ret := &TestIamPermissionsResponse{
  2828  		ServerResponse: googleapi.ServerResponse{
  2829  			Header:         res.Header,
  2830  			HTTPStatusCode: res.StatusCode,
  2831  		},
  2832  	}
  2833  	target := &ret
  2834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2835  		return nil, err
  2836  	}
  2837  	return ret, nil
  2838  }
  2839  
  2840  type ProjectsLocationsApisArtifactsCreateCall struct {
  2841  	s          *Service
  2842  	parent     string
  2843  	artifact   *Artifact
  2844  	urlParams_ gensupport.URLParams
  2845  	ctx_       context.Context
  2846  	header_    http.Header
  2847  }
  2848  
  2849  // Create: Creates a specified artifact.
  2850  //
  2851  //   - parent: The parent, which owns this collection of artifacts. Format:
  2852  //     `{parent}`.
  2853  func (r *ProjectsLocationsApisArtifactsService) Create(parent string, artifact *Artifact) *ProjectsLocationsApisArtifactsCreateCall {
  2854  	c := &ProjectsLocationsApisArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2855  	c.parent = parent
  2856  	c.artifact = artifact
  2857  	return c
  2858  }
  2859  
  2860  // ArtifactId sets the optional parameter "artifactId": Required. The ID to use
  2861  // for the artifact, which will become the final component of the artifact's
  2862  // resource name. This value should be 4-63 characters, and valid characters
  2863  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
  2864  func (c *ProjectsLocationsApisArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsApisArtifactsCreateCall {
  2865  	c.urlParams_.Set("artifactId", artifactId)
  2866  	return c
  2867  }
  2868  
  2869  // Fields allows partial responses to be retrieved. See
  2870  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2871  // details.
  2872  func (c *ProjectsLocationsApisArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsCreateCall {
  2873  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2874  	return c
  2875  }
  2876  
  2877  // Context sets the context to be used in this call's Do method.
  2878  func (c *ProjectsLocationsApisArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsCreateCall {
  2879  	c.ctx_ = ctx
  2880  	return c
  2881  }
  2882  
  2883  // Header returns a http.Header that can be modified by the caller to add
  2884  // headers to the request.
  2885  func (c *ProjectsLocationsApisArtifactsCreateCall) Header() http.Header {
  2886  	if c.header_ == nil {
  2887  		c.header_ = make(http.Header)
  2888  	}
  2889  	return c.header_
  2890  }
  2891  
  2892  func (c *ProjectsLocationsApisArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
  2893  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2894  	var body io.Reader = nil
  2895  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  2896  	if err != nil {
  2897  		return nil, err
  2898  	}
  2899  	c.urlParams_.Set("alt", alt)
  2900  	c.urlParams_.Set("prettyPrint", "false")
  2901  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  2902  	urls += "?" + c.urlParams_.Encode()
  2903  	req, err := http.NewRequest("POST", urls, body)
  2904  	if err != nil {
  2905  		return nil, err
  2906  	}
  2907  	req.Header = reqHeaders
  2908  	googleapi.Expand(req.URL, map[string]string{
  2909  		"parent": c.parent,
  2910  	})
  2911  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2912  }
  2913  
  2914  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.create" call.
  2915  // Any non-2xx status code is an error. Response headers are in either
  2916  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  2917  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2918  // whether the returned error was because http.StatusNotModified was returned.
  2919  func (c *ProjectsLocationsApisArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  2920  	gensupport.SetOptions(c.urlParams_, opts...)
  2921  	res, err := c.doRequest("json")
  2922  	if res != nil && res.StatusCode == http.StatusNotModified {
  2923  		if res.Body != nil {
  2924  			res.Body.Close()
  2925  		}
  2926  		return nil, gensupport.WrapError(&googleapi.Error{
  2927  			Code:   res.StatusCode,
  2928  			Header: res.Header,
  2929  		})
  2930  	}
  2931  	if err != nil {
  2932  		return nil, err
  2933  	}
  2934  	defer googleapi.CloseBody(res)
  2935  	if err := googleapi.CheckResponse(res); err != nil {
  2936  		return nil, gensupport.WrapError(err)
  2937  	}
  2938  	ret := &Artifact{
  2939  		ServerResponse: googleapi.ServerResponse{
  2940  			Header:         res.Header,
  2941  			HTTPStatusCode: res.StatusCode,
  2942  		},
  2943  	}
  2944  	target := &ret
  2945  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2946  		return nil, err
  2947  	}
  2948  	return ret, nil
  2949  }
  2950  
  2951  type ProjectsLocationsApisArtifactsDeleteCall struct {
  2952  	s          *Service
  2953  	name       string
  2954  	urlParams_ gensupport.URLParams
  2955  	ctx_       context.Context
  2956  	header_    http.Header
  2957  }
  2958  
  2959  // Delete: Removes a specified artifact.
  2960  //
  2961  // - name: The name of the artifact to delete. Format: `{parent}/artifacts/*`.
  2962  func (r *ProjectsLocationsApisArtifactsService) Delete(name string) *ProjectsLocationsApisArtifactsDeleteCall {
  2963  	c := &ProjectsLocationsApisArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2964  	c.name = name
  2965  	return c
  2966  }
  2967  
  2968  // Fields allows partial responses to be retrieved. See
  2969  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2970  // details.
  2971  func (c *ProjectsLocationsApisArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsDeleteCall {
  2972  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2973  	return c
  2974  }
  2975  
  2976  // Context sets the context to be used in this call's Do method.
  2977  func (c *ProjectsLocationsApisArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsDeleteCall {
  2978  	c.ctx_ = ctx
  2979  	return c
  2980  }
  2981  
  2982  // Header returns a http.Header that can be modified by the caller to add
  2983  // headers to the request.
  2984  func (c *ProjectsLocationsApisArtifactsDeleteCall) Header() http.Header {
  2985  	if c.header_ == nil {
  2986  		c.header_ = make(http.Header)
  2987  	}
  2988  	return c.header_
  2989  }
  2990  
  2991  func (c *ProjectsLocationsApisArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2992  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  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("DELETE", 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 "apigeeregistry.projects.locations.apis.artifacts.delete" call.
  3010  // Any non-2xx status code is an error. Response headers are in either
  3011  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3012  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3013  // whether the returned error was because http.StatusNotModified was returned.
  3014  func (c *ProjectsLocationsApisArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3015  	gensupport.SetOptions(c.urlParams_, opts...)
  3016  	res, err := c.doRequest("json")
  3017  	if res != nil && res.StatusCode == http.StatusNotModified {
  3018  		if res.Body != nil {
  3019  			res.Body.Close()
  3020  		}
  3021  		return nil, gensupport.WrapError(&googleapi.Error{
  3022  			Code:   res.StatusCode,
  3023  			Header: res.Header,
  3024  		})
  3025  	}
  3026  	if err != nil {
  3027  		return nil, err
  3028  	}
  3029  	defer googleapi.CloseBody(res)
  3030  	if err := googleapi.CheckResponse(res); err != nil {
  3031  		return nil, gensupport.WrapError(err)
  3032  	}
  3033  	ret := &Empty{
  3034  		ServerResponse: googleapi.ServerResponse{
  3035  			Header:         res.Header,
  3036  			HTTPStatusCode: res.StatusCode,
  3037  		},
  3038  	}
  3039  	target := &ret
  3040  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3041  		return nil, err
  3042  	}
  3043  	return ret, nil
  3044  }
  3045  
  3046  type ProjectsLocationsApisArtifactsGetCall struct {
  3047  	s            *Service
  3048  	name         string
  3049  	urlParams_   gensupport.URLParams
  3050  	ifNoneMatch_ string
  3051  	ctx_         context.Context
  3052  	header_      http.Header
  3053  }
  3054  
  3055  // Get: Returns a specified artifact.
  3056  //
  3057  // - name: The name of the artifact to retrieve. Format: `{parent}/artifacts/*`.
  3058  func (r *ProjectsLocationsApisArtifactsService) Get(name string) *ProjectsLocationsApisArtifactsGetCall {
  3059  	c := &ProjectsLocationsApisArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3060  	c.name = name
  3061  	return c
  3062  }
  3063  
  3064  // Fields allows partial responses to be retrieved. See
  3065  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3066  // details.
  3067  func (c *ProjectsLocationsApisArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsGetCall {
  3068  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3069  	return c
  3070  }
  3071  
  3072  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3073  // object's ETag matches the given value. This is useful for getting updates
  3074  // only after the object has changed since the last request.
  3075  func (c *ProjectsLocationsApisArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisArtifactsGetCall {
  3076  	c.ifNoneMatch_ = entityTag
  3077  	return c
  3078  }
  3079  
  3080  // Context sets the context to be used in this call's Do method.
  3081  func (c *ProjectsLocationsApisArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsGetCall {
  3082  	c.ctx_ = ctx
  3083  	return c
  3084  }
  3085  
  3086  // Header returns a http.Header that can be modified by the caller to add
  3087  // headers to the request.
  3088  func (c *ProjectsLocationsApisArtifactsGetCall) Header() http.Header {
  3089  	if c.header_ == nil {
  3090  		c.header_ = make(http.Header)
  3091  	}
  3092  	return c.header_
  3093  }
  3094  
  3095  func (c *ProjectsLocationsApisArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
  3096  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3097  	if c.ifNoneMatch_ != "" {
  3098  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3099  	}
  3100  	var body io.Reader = nil
  3101  	c.urlParams_.Set("alt", alt)
  3102  	c.urlParams_.Set("prettyPrint", "false")
  3103  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3104  	urls += "?" + c.urlParams_.Encode()
  3105  	req, err := http.NewRequest("GET", urls, body)
  3106  	if err != nil {
  3107  		return nil, err
  3108  	}
  3109  	req.Header = reqHeaders
  3110  	googleapi.Expand(req.URL, map[string]string{
  3111  		"name": c.name,
  3112  	})
  3113  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3114  }
  3115  
  3116  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.get" call.
  3117  // Any non-2xx status code is an error. Response headers are in either
  3118  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  3119  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3120  // whether the returned error was because http.StatusNotModified was returned.
  3121  func (c *ProjectsLocationsApisArtifactsGetCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  3122  	gensupport.SetOptions(c.urlParams_, opts...)
  3123  	res, err := c.doRequest("json")
  3124  	if res != nil && res.StatusCode == http.StatusNotModified {
  3125  		if res.Body != nil {
  3126  			res.Body.Close()
  3127  		}
  3128  		return nil, gensupport.WrapError(&googleapi.Error{
  3129  			Code:   res.StatusCode,
  3130  			Header: res.Header,
  3131  		})
  3132  	}
  3133  	if err != nil {
  3134  		return nil, err
  3135  	}
  3136  	defer googleapi.CloseBody(res)
  3137  	if err := googleapi.CheckResponse(res); err != nil {
  3138  		return nil, gensupport.WrapError(err)
  3139  	}
  3140  	ret := &Artifact{
  3141  		ServerResponse: googleapi.ServerResponse{
  3142  			Header:         res.Header,
  3143  			HTTPStatusCode: res.StatusCode,
  3144  		},
  3145  	}
  3146  	target := &ret
  3147  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3148  		return nil, err
  3149  	}
  3150  	return ret, nil
  3151  }
  3152  
  3153  type ProjectsLocationsApisArtifactsGetContentsCall struct {
  3154  	s            *Service
  3155  	name         string
  3156  	urlParams_   gensupport.URLParams
  3157  	ifNoneMatch_ string
  3158  	ctx_         context.Context
  3159  	header_      http.Header
  3160  }
  3161  
  3162  // GetContents: Returns the contents of a specified artifact. If artifacts are
  3163  // stored with GZip compression, the default behavior is to return the artifact
  3164  // uncompressed (the mime_type response field indicates the exact format
  3165  // returned).
  3166  //
  3167  //   - name: The name of the artifact whose contents should be retrieved. Format:
  3168  //     `{parent}/artifacts/*`.
  3169  func (r *ProjectsLocationsApisArtifactsService) GetContents(name string) *ProjectsLocationsApisArtifactsGetContentsCall {
  3170  	c := &ProjectsLocationsApisArtifactsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3171  	c.name = name
  3172  	return c
  3173  }
  3174  
  3175  // Fields allows partial responses to be retrieved. See
  3176  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3177  // details.
  3178  func (c *ProjectsLocationsApisArtifactsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsGetContentsCall {
  3179  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3180  	return c
  3181  }
  3182  
  3183  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3184  // object's ETag matches the given value. This is useful for getting updates
  3185  // only after the object has changed since the last request.
  3186  func (c *ProjectsLocationsApisArtifactsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisArtifactsGetContentsCall {
  3187  	c.ifNoneMatch_ = entityTag
  3188  	return c
  3189  }
  3190  
  3191  // Context sets the context to be used in this call's Do method.
  3192  func (c *ProjectsLocationsApisArtifactsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsGetContentsCall {
  3193  	c.ctx_ = ctx
  3194  	return c
  3195  }
  3196  
  3197  // Header returns a http.Header that can be modified by the caller to add
  3198  // headers to the request.
  3199  func (c *ProjectsLocationsApisArtifactsGetContentsCall) Header() http.Header {
  3200  	if c.header_ == nil {
  3201  		c.header_ = make(http.Header)
  3202  	}
  3203  	return c.header_
  3204  }
  3205  
  3206  func (c *ProjectsLocationsApisArtifactsGetContentsCall) doRequest(alt string) (*http.Response, error) {
  3207  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3208  	if c.ifNoneMatch_ != "" {
  3209  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3210  	}
  3211  	var body io.Reader = nil
  3212  	c.urlParams_.Set("alt", alt)
  3213  	c.urlParams_.Set("prettyPrint", "false")
  3214  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
  3215  	urls += "?" + c.urlParams_.Encode()
  3216  	req, err := http.NewRequest("GET", urls, body)
  3217  	if err != nil {
  3218  		return nil, err
  3219  	}
  3220  	req.Header = reqHeaders
  3221  	googleapi.Expand(req.URL, map[string]string{
  3222  		"name": c.name,
  3223  	})
  3224  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3225  }
  3226  
  3227  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.getContents" call.
  3228  // Any non-2xx status code is an error. Response headers are in either
  3229  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
  3230  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3231  // whether the returned error was because http.StatusNotModified was returned.
  3232  func (c *ProjectsLocationsApisArtifactsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  3233  	gensupport.SetOptions(c.urlParams_, opts...)
  3234  	res, err := c.doRequest("json")
  3235  	if res != nil && res.StatusCode == http.StatusNotModified {
  3236  		if res.Body != nil {
  3237  			res.Body.Close()
  3238  		}
  3239  		return nil, gensupport.WrapError(&googleapi.Error{
  3240  			Code:   res.StatusCode,
  3241  			Header: res.Header,
  3242  		})
  3243  	}
  3244  	if err != nil {
  3245  		return nil, err
  3246  	}
  3247  	defer googleapi.CloseBody(res)
  3248  	if err := googleapi.CheckResponse(res); err != nil {
  3249  		return nil, gensupport.WrapError(err)
  3250  	}
  3251  	ret := &HttpBody{
  3252  		ServerResponse: googleapi.ServerResponse{
  3253  			Header:         res.Header,
  3254  			HTTPStatusCode: res.StatusCode,
  3255  		},
  3256  	}
  3257  	target := &ret
  3258  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3259  		return nil, err
  3260  	}
  3261  	return ret, nil
  3262  }
  3263  
  3264  type ProjectsLocationsApisArtifactsGetIamPolicyCall struct {
  3265  	s            *Service
  3266  	resource     string
  3267  	urlParams_   gensupport.URLParams
  3268  	ifNoneMatch_ string
  3269  	ctx_         context.Context
  3270  	header_      http.Header
  3271  }
  3272  
  3273  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3274  // empty policy if the resource exists and does not have a policy set.
  3275  //
  3276  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3277  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3278  //     for the appropriate value for this field.
  3279  func (r *ProjectsLocationsApisArtifactsService) GetIamPolicy(resource string) *ProjectsLocationsApisArtifactsGetIamPolicyCall {
  3280  	c := &ProjectsLocationsApisArtifactsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3281  	c.resource = resource
  3282  	return c
  3283  }
  3284  
  3285  // OptionsRequestedPolicyVersion sets the optional parameter
  3286  // "options.requestedPolicyVersion": The maximum policy version that will be
  3287  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3288  // an invalid value will be rejected. Requests for policies with any
  3289  // conditional role bindings must specify version 3. Policies with no
  3290  // conditional role bindings may specify any valid value or leave the field
  3291  // unset. The policy in the response might use the policy version that you
  3292  // specified, or it might use a lower policy version. For example, if you
  3293  // specify version 3, but the policy has no conditional role bindings, the
  3294  // response uses version 1. To learn which resources support conditions in
  3295  // their IAM policies, see the IAM documentation
  3296  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3297  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisArtifactsGetIamPolicyCall {
  3298  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3299  	return c
  3300  }
  3301  
  3302  // Fields allows partial responses to be retrieved. See
  3303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3304  // details.
  3305  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsGetIamPolicyCall {
  3306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3307  	return c
  3308  }
  3309  
  3310  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3311  // object's ETag matches the given value. This is useful for getting updates
  3312  // only after the object has changed since the last request.
  3313  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisArtifactsGetIamPolicyCall {
  3314  	c.ifNoneMatch_ = entityTag
  3315  	return c
  3316  }
  3317  
  3318  // Context sets the context to be used in this call's Do method.
  3319  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsGetIamPolicyCall {
  3320  	c.ctx_ = ctx
  3321  	return c
  3322  }
  3323  
  3324  // Header returns a http.Header that can be modified by the caller to add
  3325  // headers to the request.
  3326  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) Header() http.Header {
  3327  	if c.header_ == nil {
  3328  		c.header_ = make(http.Header)
  3329  	}
  3330  	return c.header_
  3331  }
  3332  
  3333  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3335  	if c.ifNoneMatch_ != "" {
  3336  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3337  	}
  3338  	var body io.Reader = nil
  3339  	c.urlParams_.Set("alt", alt)
  3340  	c.urlParams_.Set("prettyPrint", "false")
  3341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3342  	urls += "?" + c.urlParams_.Encode()
  3343  	req, err := http.NewRequest("GET", urls, body)
  3344  	if err != nil {
  3345  		return nil, err
  3346  	}
  3347  	req.Header = reqHeaders
  3348  	googleapi.Expand(req.URL, map[string]string{
  3349  		"resource": c.resource,
  3350  	})
  3351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3352  }
  3353  
  3354  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.getIamPolicy" call.
  3355  // Any non-2xx status code is an error. Response headers are in either
  3356  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3357  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3358  // whether the returned error was because http.StatusNotModified was returned.
  3359  func (c *ProjectsLocationsApisArtifactsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3360  	gensupport.SetOptions(c.urlParams_, opts...)
  3361  	res, err := c.doRequest("json")
  3362  	if res != nil && res.StatusCode == http.StatusNotModified {
  3363  		if res.Body != nil {
  3364  			res.Body.Close()
  3365  		}
  3366  		return nil, gensupport.WrapError(&googleapi.Error{
  3367  			Code:   res.StatusCode,
  3368  			Header: res.Header,
  3369  		})
  3370  	}
  3371  	if err != nil {
  3372  		return nil, err
  3373  	}
  3374  	defer googleapi.CloseBody(res)
  3375  	if err := googleapi.CheckResponse(res); err != nil {
  3376  		return nil, gensupport.WrapError(err)
  3377  	}
  3378  	ret := &Policy{
  3379  		ServerResponse: googleapi.ServerResponse{
  3380  			Header:         res.Header,
  3381  			HTTPStatusCode: res.StatusCode,
  3382  		},
  3383  	}
  3384  	target := &ret
  3385  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3386  		return nil, err
  3387  	}
  3388  	return ret, nil
  3389  }
  3390  
  3391  type ProjectsLocationsApisArtifactsListCall struct {
  3392  	s            *Service
  3393  	parent       string
  3394  	urlParams_   gensupport.URLParams
  3395  	ifNoneMatch_ string
  3396  	ctx_         context.Context
  3397  	header_      http.Header
  3398  }
  3399  
  3400  // List: Returns matching artifacts.
  3401  //
  3402  //   - parent: The parent, which owns this collection of artifacts. Format:
  3403  //     `{parent}`.
  3404  func (r *ProjectsLocationsApisArtifactsService) List(parent string) *ProjectsLocationsApisArtifactsListCall {
  3405  	c := &ProjectsLocationsApisArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3406  	c.parent = parent
  3407  	return c
  3408  }
  3409  
  3410  // Filter sets the optional parameter "filter": An expression that can be used
  3411  // to filter the list. Filters use the Common Expression Language and can refer
  3412  // to all message fields except contents.
  3413  func (c *ProjectsLocationsApisArtifactsListCall) Filter(filter string) *ProjectsLocationsApisArtifactsListCall {
  3414  	c.urlParams_.Set("filter", filter)
  3415  	return c
  3416  }
  3417  
  3418  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  3419  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  3420  // "desc" identifier, e.g. "foo desc,bar"
  3421  func (c *ProjectsLocationsApisArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsApisArtifactsListCall {
  3422  	c.urlParams_.Set("orderBy", orderBy)
  3423  	return c
  3424  }
  3425  
  3426  // PageSize sets the optional parameter "pageSize": The maximum number of
  3427  // artifacts to return. The service may return fewer than this value. If
  3428  // unspecified, at most 50 values will be returned. The maximum is 1000; values
  3429  // above 1000 will be coerced to 1000.
  3430  func (c *ProjectsLocationsApisArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsApisArtifactsListCall {
  3431  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3432  	return c
  3433  }
  3434  
  3435  // PageToken sets the optional parameter "pageToken": A page token, received
  3436  // from a previous `ListArtifacts` call. Provide this to retrieve the
  3437  // subsequent page. When paginating, all other parameters provided to
  3438  // `ListArtifacts` must match the call that provided the page token.
  3439  func (c *ProjectsLocationsApisArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsApisArtifactsListCall {
  3440  	c.urlParams_.Set("pageToken", pageToken)
  3441  	return c
  3442  }
  3443  
  3444  // Fields allows partial responses to be retrieved. See
  3445  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3446  // details.
  3447  func (c *ProjectsLocationsApisArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsListCall {
  3448  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3449  	return c
  3450  }
  3451  
  3452  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3453  // object's ETag matches the given value. This is useful for getting updates
  3454  // only after the object has changed since the last request.
  3455  func (c *ProjectsLocationsApisArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisArtifactsListCall {
  3456  	c.ifNoneMatch_ = entityTag
  3457  	return c
  3458  }
  3459  
  3460  // Context sets the context to be used in this call's Do method.
  3461  func (c *ProjectsLocationsApisArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsListCall {
  3462  	c.ctx_ = ctx
  3463  	return c
  3464  }
  3465  
  3466  // Header returns a http.Header that can be modified by the caller to add
  3467  // headers to the request.
  3468  func (c *ProjectsLocationsApisArtifactsListCall) Header() http.Header {
  3469  	if c.header_ == nil {
  3470  		c.header_ = make(http.Header)
  3471  	}
  3472  	return c.header_
  3473  }
  3474  
  3475  func (c *ProjectsLocationsApisArtifactsListCall) doRequest(alt string) (*http.Response, error) {
  3476  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3477  	if c.ifNoneMatch_ != "" {
  3478  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3479  	}
  3480  	var body io.Reader = nil
  3481  	c.urlParams_.Set("alt", alt)
  3482  	c.urlParams_.Set("prettyPrint", "false")
  3483  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  3484  	urls += "?" + c.urlParams_.Encode()
  3485  	req, err := http.NewRequest("GET", urls, body)
  3486  	if err != nil {
  3487  		return nil, err
  3488  	}
  3489  	req.Header = reqHeaders
  3490  	googleapi.Expand(req.URL, map[string]string{
  3491  		"parent": c.parent,
  3492  	})
  3493  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3494  }
  3495  
  3496  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.list" call.
  3497  // Any non-2xx status code is an error. Response headers are in either
  3498  // *ListArtifactsResponse.ServerResponse.Header or (if a response was returned
  3499  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3500  // check whether the returned error was because http.StatusNotModified was
  3501  // returned.
  3502  func (c *ProjectsLocationsApisArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListArtifactsResponse, error) {
  3503  	gensupport.SetOptions(c.urlParams_, opts...)
  3504  	res, err := c.doRequest("json")
  3505  	if res != nil && res.StatusCode == http.StatusNotModified {
  3506  		if res.Body != nil {
  3507  			res.Body.Close()
  3508  		}
  3509  		return nil, gensupport.WrapError(&googleapi.Error{
  3510  			Code:   res.StatusCode,
  3511  			Header: res.Header,
  3512  		})
  3513  	}
  3514  	if err != nil {
  3515  		return nil, err
  3516  	}
  3517  	defer googleapi.CloseBody(res)
  3518  	if err := googleapi.CheckResponse(res); err != nil {
  3519  		return nil, gensupport.WrapError(err)
  3520  	}
  3521  	ret := &ListArtifactsResponse{
  3522  		ServerResponse: googleapi.ServerResponse{
  3523  			Header:         res.Header,
  3524  			HTTPStatusCode: res.StatusCode,
  3525  		},
  3526  	}
  3527  	target := &ret
  3528  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3529  		return nil, err
  3530  	}
  3531  	return ret, nil
  3532  }
  3533  
  3534  // Pages invokes f for each page of results.
  3535  // A non-nil error returned from f will halt the iteration.
  3536  // The provided context supersedes any context provided to the Context method.
  3537  func (c *ProjectsLocationsApisArtifactsListCall) Pages(ctx context.Context, f func(*ListArtifactsResponse) error) error {
  3538  	c.ctx_ = ctx
  3539  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3540  	for {
  3541  		x, err := c.Do()
  3542  		if err != nil {
  3543  			return err
  3544  		}
  3545  		if err := f(x); err != nil {
  3546  			return err
  3547  		}
  3548  		if x.NextPageToken == "" {
  3549  			return nil
  3550  		}
  3551  		c.PageToken(x.NextPageToken)
  3552  	}
  3553  }
  3554  
  3555  type ProjectsLocationsApisArtifactsReplaceArtifactCall struct {
  3556  	s          *Service
  3557  	name       string
  3558  	artifact   *Artifact
  3559  	urlParams_ gensupport.URLParams
  3560  	ctx_       context.Context
  3561  	header_    http.Header
  3562  }
  3563  
  3564  // ReplaceArtifact: Used to replace a specified artifact.
  3565  //
  3566  // - name: Resource name.
  3567  func (r *ProjectsLocationsApisArtifactsService) ReplaceArtifact(name string, artifact *Artifact) *ProjectsLocationsApisArtifactsReplaceArtifactCall {
  3568  	c := &ProjectsLocationsApisArtifactsReplaceArtifactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3569  	c.name = name
  3570  	c.artifact = artifact
  3571  	return c
  3572  }
  3573  
  3574  // Fields allows partial responses to be retrieved. See
  3575  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3576  // details.
  3577  func (c *ProjectsLocationsApisArtifactsReplaceArtifactCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsReplaceArtifactCall {
  3578  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3579  	return c
  3580  }
  3581  
  3582  // Context sets the context to be used in this call's Do method.
  3583  func (c *ProjectsLocationsApisArtifactsReplaceArtifactCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsReplaceArtifactCall {
  3584  	c.ctx_ = ctx
  3585  	return c
  3586  }
  3587  
  3588  // Header returns a http.Header that can be modified by the caller to add
  3589  // headers to the request.
  3590  func (c *ProjectsLocationsApisArtifactsReplaceArtifactCall) Header() http.Header {
  3591  	if c.header_ == nil {
  3592  		c.header_ = make(http.Header)
  3593  	}
  3594  	return c.header_
  3595  }
  3596  
  3597  func (c *ProjectsLocationsApisArtifactsReplaceArtifactCall) doRequest(alt string) (*http.Response, error) {
  3598  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3599  	var body io.Reader = nil
  3600  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  3601  	if err != nil {
  3602  		return nil, err
  3603  	}
  3604  	c.urlParams_.Set("alt", alt)
  3605  	c.urlParams_.Set("prettyPrint", "false")
  3606  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3607  	urls += "?" + c.urlParams_.Encode()
  3608  	req, err := http.NewRequest("PUT", urls, body)
  3609  	if err != nil {
  3610  		return nil, err
  3611  	}
  3612  	req.Header = reqHeaders
  3613  	googleapi.Expand(req.URL, map[string]string{
  3614  		"name": c.name,
  3615  	})
  3616  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3617  }
  3618  
  3619  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.replaceArtifact" call.
  3620  // Any non-2xx status code is an error. Response headers are in either
  3621  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  3622  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3623  // whether the returned error was because http.StatusNotModified was returned.
  3624  func (c *ProjectsLocationsApisArtifactsReplaceArtifactCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  3625  	gensupport.SetOptions(c.urlParams_, opts...)
  3626  	res, err := c.doRequest("json")
  3627  	if res != nil && res.StatusCode == http.StatusNotModified {
  3628  		if res.Body != nil {
  3629  			res.Body.Close()
  3630  		}
  3631  		return nil, gensupport.WrapError(&googleapi.Error{
  3632  			Code:   res.StatusCode,
  3633  			Header: res.Header,
  3634  		})
  3635  	}
  3636  	if err != nil {
  3637  		return nil, err
  3638  	}
  3639  	defer googleapi.CloseBody(res)
  3640  	if err := googleapi.CheckResponse(res); err != nil {
  3641  		return nil, gensupport.WrapError(err)
  3642  	}
  3643  	ret := &Artifact{
  3644  		ServerResponse: googleapi.ServerResponse{
  3645  			Header:         res.Header,
  3646  			HTTPStatusCode: res.StatusCode,
  3647  		},
  3648  	}
  3649  	target := &ret
  3650  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3651  		return nil, err
  3652  	}
  3653  	return ret, nil
  3654  }
  3655  
  3656  type ProjectsLocationsApisArtifactsSetIamPolicyCall struct {
  3657  	s                   *Service
  3658  	resource            string
  3659  	setiampolicyrequest *SetIamPolicyRequest
  3660  	urlParams_          gensupport.URLParams
  3661  	ctx_                context.Context
  3662  	header_             http.Header
  3663  }
  3664  
  3665  // SetIamPolicy: Sets the access control policy on the specified resource.
  3666  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  3667  // and `PERMISSION_DENIED` errors.
  3668  //
  3669  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3670  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3671  //     for the appropriate value for this field.
  3672  func (r *ProjectsLocationsApisArtifactsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisArtifactsSetIamPolicyCall {
  3673  	c := &ProjectsLocationsApisArtifactsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3674  	c.resource = resource
  3675  	c.setiampolicyrequest = setiampolicyrequest
  3676  	return c
  3677  }
  3678  
  3679  // Fields allows partial responses to be retrieved. See
  3680  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3681  // details.
  3682  func (c *ProjectsLocationsApisArtifactsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsSetIamPolicyCall {
  3683  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3684  	return c
  3685  }
  3686  
  3687  // Context sets the context to be used in this call's Do method.
  3688  func (c *ProjectsLocationsApisArtifactsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsSetIamPolicyCall {
  3689  	c.ctx_ = ctx
  3690  	return c
  3691  }
  3692  
  3693  // Header returns a http.Header that can be modified by the caller to add
  3694  // headers to the request.
  3695  func (c *ProjectsLocationsApisArtifactsSetIamPolicyCall) Header() http.Header {
  3696  	if c.header_ == nil {
  3697  		c.header_ = make(http.Header)
  3698  	}
  3699  	return c.header_
  3700  }
  3701  
  3702  func (c *ProjectsLocationsApisArtifactsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3703  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3704  	var body io.Reader = nil
  3705  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3706  	if err != nil {
  3707  		return nil, err
  3708  	}
  3709  	c.urlParams_.Set("alt", alt)
  3710  	c.urlParams_.Set("prettyPrint", "false")
  3711  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3712  	urls += "?" + c.urlParams_.Encode()
  3713  	req, err := http.NewRequest("POST", urls, body)
  3714  	if err != nil {
  3715  		return nil, err
  3716  	}
  3717  	req.Header = reqHeaders
  3718  	googleapi.Expand(req.URL, map[string]string{
  3719  		"resource": c.resource,
  3720  	})
  3721  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3722  }
  3723  
  3724  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.setIamPolicy" call.
  3725  // Any non-2xx status code is an error. Response headers are in either
  3726  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3727  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3728  // whether the returned error was because http.StatusNotModified was returned.
  3729  func (c *ProjectsLocationsApisArtifactsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3730  	gensupport.SetOptions(c.urlParams_, opts...)
  3731  	res, err := c.doRequest("json")
  3732  	if res != nil && res.StatusCode == http.StatusNotModified {
  3733  		if res.Body != nil {
  3734  			res.Body.Close()
  3735  		}
  3736  		return nil, gensupport.WrapError(&googleapi.Error{
  3737  			Code:   res.StatusCode,
  3738  			Header: res.Header,
  3739  		})
  3740  	}
  3741  	if err != nil {
  3742  		return nil, err
  3743  	}
  3744  	defer googleapi.CloseBody(res)
  3745  	if err := googleapi.CheckResponse(res); err != nil {
  3746  		return nil, gensupport.WrapError(err)
  3747  	}
  3748  	ret := &Policy{
  3749  		ServerResponse: googleapi.ServerResponse{
  3750  			Header:         res.Header,
  3751  			HTTPStatusCode: res.StatusCode,
  3752  		},
  3753  	}
  3754  	target := &ret
  3755  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3756  		return nil, err
  3757  	}
  3758  	return ret, nil
  3759  }
  3760  
  3761  type ProjectsLocationsApisArtifactsTestIamPermissionsCall struct {
  3762  	s                         *Service
  3763  	resource                  string
  3764  	testiampermissionsrequest *TestIamPermissionsRequest
  3765  	urlParams_                gensupport.URLParams
  3766  	ctx_                      context.Context
  3767  	header_                   http.Header
  3768  }
  3769  
  3770  // TestIamPermissions: Returns permissions that a caller has on the specified
  3771  // resource. If the resource does not exist, this will return an empty set of
  3772  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  3773  // used for building permission-aware UIs and command-line tools, not for
  3774  // authorization checking. This operation may "fail open" without warning.
  3775  //
  3776  //   - resource: REQUIRED: The resource for which the policy detail is being
  3777  //     requested. See Resource names
  3778  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3779  //     value for this field.
  3780  func (r *ProjectsLocationsApisArtifactsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisArtifactsTestIamPermissionsCall {
  3781  	c := &ProjectsLocationsApisArtifactsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3782  	c.resource = resource
  3783  	c.testiampermissionsrequest = testiampermissionsrequest
  3784  	return c
  3785  }
  3786  
  3787  // Fields allows partial responses to be retrieved. See
  3788  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3789  // details.
  3790  func (c *ProjectsLocationsApisArtifactsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisArtifactsTestIamPermissionsCall {
  3791  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3792  	return c
  3793  }
  3794  
  3795  // Context sets the context to be used in this call's Do method.
  3796  func (c *ProjectsLocationsApisArtifactsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisArtifactsTestIamPermissionsCall {
  3797  	c.ctx_ = ctx
  3798  	return c
  3799  }
  3800  
  3801  // Header returns a http.Header that can be modified by the caller to add
  3802  // headers to the request.
  3803  func (c *ProjectsLocationsApisArtifactsTestIamPermissionsCall) Header() http.Header {
  3804  	if c.header_ == nil {
  3805  		c.header_ = make(http.Header)
  3806  	}
  3807  	return c.header_
  3808  }
  3809  
  3810  func (c *ProjectsLocationsApisArtifactsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3811  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3812  	var body io.Reader = nil
  3813  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3814  	if err != nil {
  3815  		return nil, err
  3816  	}
  3817  	c.urlParams_.Set("alt", alt)
  3818  	c.urlParams_.Set("prettyPrint", "false")
  3819  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  3820  	urls += "?" + c.urlParams_.Encode()
  3821  	req, err := http.NewRequest("POST", urls, body)
  3822  	if err != nil {
  3823  		return nil, err
  3824  	}
  3825  	req.Header = reqHeaders
  3826  	googleapi.Expand(req.URL, map[string]string{
  3827  		"resource": c.resource,
  3828  	})
  3829  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3830  }
  3831  
  3832  // Do executes the "apigeeregistry.projects.locations.apis.artifacts.testIamPermissions" call.
  3833  // Any non-2xx status code is an error. Response headers are in either
  3834  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3835  // returned at all) in error.(*googleapi.Error).Header. Use
  3836  // googleapi.IsNotModified to check whether the returned error was because
  3837  // http.StatusNotModified was returned.
  3838  func (c *ProjectsLocationsApisArtifactsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3839  	gensupport.SetOptions(c.urlParams_, opts...)
  3840  	res, err := c.doRequest("json")
  3841  	if res != nil && res.StatusCode == http.StatusNotModified {
  3842  		if res.Body != nil {
  3843  			res.Body.Close()
  3844  		}
  3845  		return nil, gensupport.WrapError(&googleapi.Error{
  3846  			Code:   res.StatusCode,
  3847  			Header: res.Header,
  3848  		})
  3849  	}
  3850  	if err != nil {
  3851  		return nil, err
  3852  	}
  3853  	defer googleapi.CloseBody(res)
  3854  	if err := googleapi.CheckResponse(res); err != nil {
  3855  		return nil, gensupport.WrapError(err)
  3856  	}
  3857  	ret := &TestIamPermissionsResponse{
  3858  		ServerResponse: googleapi.ServerResponse{
  3859  			Header:         res.Header,
  3860  			HTTPStatusCode: res.StatusCode,
  3861  		},
  3862  	}
  3863  	target := &ret
  3864  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3865  		return nil, err
  3866  	}
  3867  	return ret, nil
  3868  }
  3869  
  3870  type ProjectsLocationsApisDeploymentsCreateCall struct {
  3871  	s             *Service
  3872  	parent        string
  3873  	apideployment *ApiDeployment
  3874  	urlParams_    gensupport.URLParams
  3875  	ctx_          context.Context
  3876  	header_       http.Header
  3877  }
  3878  
  3879  // Create: Creates a specified deployment.
  3880  //
  3881  //   - parent: The parent, which owns this collection of deployments. Format:
  3882  //     `projects/*/locations/*/apis/*`.
  3883  func (r *ProjectsLocationsApisDeploymentsService) Create(parent string, apideployment *ApiDeployment) *ProjectsLocationsApisDeploymentsCreateCall {
  3884  	c := &ProjectsLocationsApisDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3885  	c.parent = parent
  3886  	c.apideployment = apideployment
  3887  	return c
  3888  }
  3889  
  3890  // ApiDeploymentId sets the optional parameter "apiDeploymentId": Required. The
  3891  // ID to use for the deployment, which will become the final component of the
  3892  // deployment's resource name. This value should be 4-63 characters, and valid
  3893  // characters are /a-z-/. Following AIP-162, IDs must not have the form of a
  3894  // UUID.
  3895  func (c *ProjectsLocationsApisDeploymentsCreateCall) ApiDeploymentId(apiDeploymentId string) *ProjectsLocationsApisDeploymentsCreateCall {
  3896  	c.urlParams_.Set("apiDeploymentId", apiDeploymentId)
  3897  	return c
  3898  }
  3899  
  3900  // Fields allows partial responses to be retrieved. See
  3901  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3902  // details.
  3903  func (c *ProjectsLocationsApisDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsCreateCall {
  3904  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3905  	return c
  3906  }
  3907  
  3908  // Context sets the context to be used in this call's Do method.
  3909  func (c *ProjectsLocationsApisDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsCreateCall {
  3910  	c.ctx_ = ctx
  3911  	return c
  3912  }
  3913  
  3914  // Header returns a http.Header that can be modified by the caller to add
  3915  // headers to the request.
  3916  func (c *ProjectsLocationsApisDeploymentsCreateCall) Header() http.Header {
  3917  	if c.header_ == nil {
  3918  		c.header_ = make(http.Header)
  3919  	}
  3920  	return c.header_
  3921  }
  3922  
  3923  func (c *ProjectsLocationsApisDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
  3924  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3925  	var body io.Reader = nil
  3926  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apideployment)
  3927  	if err != nil {
  3928  		return nil, err
  3929  	}
  3930  	c.urlParams_.Set("alt", alt)
  3931  	c.urlParams_.Set("prettyPrint", "false")
  3932  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
  3933  	urls += "?" + c.urlParams_.Encode()
  3934  	req, err := http.NewRequest("POST", urls, body)
  3935  	if err != nil {
  3936  		return nil, err
  3937  	}
  3938  	req.Header = reqHeaders
  3939  	googleapi.Expand(req.URL, map[string]string{
  3940  		"parent": c.parent,
  3941  	})
  3942  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3943  }
  3944  
  3945  // Do executes the "apigeeregistry.projects.locations.apis.deployments.create" call.
  3946  // Any non-2xx status code is an error. Response headers are in either
  3947  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  3948  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3949  // whether the returned error was because http.StatusNotModified was returned.
  3950  func (c *ProjectsLocationsApisDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  3951  	gensupport.SetOptions(c.urlParams_, opts...)
  3952  	res, err := c.doRequest("json")
  3953  	if res != nil && res.StatusCode == http.StatusNotModified {
  3954  		if res.Body != nil {
  3955  			res.Body.Close()
  3956  		}
  3957  		return nil, gensupport.WrapError(&googleapi.Error{
  3958  			Code:   res.StatusCode,
  3959  			Header: res.Header,
  3960  		})
  3961  	}
  3962  	if err != nil {
  3963  		return nil, err
  3964  	}
  3965  	defer googleapi.CloseBody(res)
  3966  	if err := googleapi.CheckResponse(res); err != nil {
  3967  		return nil, gensupport.WrapError(err)
  3968  	}
  3969  	ret := &ApiDeployment{
  3970  		ServerResponse: googleapi.ServerResponse{
  3971  			Header:         res.Header,
  3972  			HTTPStatusCode: res.StatusCode,
  3973  		},
  3974  	}
  3975  	target := &ret
  3976  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3977  		return nil, err
  3978  	}
  3979  	return ret, nil
  3980  }
  3981  
  3982  type ProjectsLocationsApisDeploymentsDeleteCall struct {
  3983  	s          *Service
  3984  	name       string
  3985  	urlParams_ gensupport.URLParams
  3986  	ctx_       context.Context
  3987  	header_    http.Header
  3988  }
  3989  
  3990  // Delete: Removes a specified deployment, all revisions, and all child
  3991  // resources (e.g., artifacts).
  3992  //
  3993  //   - name: The name of the deployment to delete. Format:
  3994  //     `projects/*/locations/*/apis/*/deployments/*`.
  3995  func (r *ProjectsLocationsApisDeploymentsService) Delete(name string) *ProjectsLocationsApisDeploymentsDeleteCall {
  3996  	c := &ProjectsLocationsApisDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3997  	c.name = name
  3998  	return c
  3999  }
  4000  
  4001  // Force sets the optional parameter "force": If set to true, any child
  4002  // resources will also be deleted. (Otherwise, the request will only work if
  4003  // there are no child resources.)
  4004  func (c *ProjectsLocationsApisDeploymentsDeleteCall) Force(force bool) *ProjectsLocationsApisDeploymentsDeleteCall {
  4005  	c.urlParams_.Set("force", fmt.Sprint(force))
  4006  	return c
  4007  }
  4008  
  4009  // Fields allows partial responses to be retrieved. See
  4010  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4011  // details.
  4012  func (c *ProjectsLocationsApisDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsDeleteCall {
  4013  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4014  	return c
  4015  }
  4016  
  4017  // Context sets the context to be used in this call's Do method.
  4018  func (c *ProjectsLocationsApisDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsDeleteCall {
  4019  	c.ctx_ = ctx
  4020  	return c
  4021  }
  4022  
  4023  // Header returns a http.Header that can be modified by the caller to add
  4024  // headers to the request.
  4025  func (c *ProjectsLocationsApisDeploymentsDeleteCall) Header() http.Header {
  4026  	if c.header_ == nil {
  4027  		c.header_ = make(http.Header)
  4028  	}
  4029  	return c.header_
  4030  }
  4031  
  4032  func (c *ProjectsLocationsApisDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4033  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4034  	var body io.Reader = nil
  4035  	c.urlParams_.Set("alt", alt)
  4036  	c.urlParams_.Set("prettyPrint", "false")
  4037  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4038  	urls += "?" + c.urlParams_.Encode()
  4039  	req, err := http.NewRequest("DELETE", urls, body)
  4040  	if err != nil {
  4041  		return nil, err
  4042  	}
  4043  	req.Header = reqHeaders
  4044  	googleapi.Expand(req.URL, map[string]string{
  4045  		"name": c.name,
  4046  	})
  4047  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4048  }
  4049  
  4050  // Do executes the "apigeeregistry.projects.locations.apis.deployments.delete" call.
  4051  // Any non-2xx status code is an error. Response headers are in either
  4052  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4053  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4054  // whether the returned error was because http.StatusNotModified was returned.
  4055  func (c *ProjectsLocationsApisDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4056  	gensupport.SetOptions(c.urlParams_, opts...)
  4057  	res, err := c.doRequest("json")
  4058  	if res != nil && res.StatusCode == http.StatusNotModified {
  4059  		if res.Body != nil {
  4060  			res.Body.Close()
  4061  		}
  4062  		return nil, gensupport.WrapError(&googleapi.Error{
  4063  			Code:   res.StatusCode,
  4064  			Header: res.Header,
  4065  		})
  4066  	}
  4067  	if err != nil {
  4068  		return nil, err
  4069  	}
  4070  	defer googleapi.CloseBody(res)
  4071  	if err := googleapi.CheckResponse(res); err != nil {
  4072  		return nil, gensupport.WrapError(err)
  4073  	}
  4074  	ret := &Empty{
  4075  		ServerResponse: googleapi.ServerResponse{
  4076  			Header:         res.Header,
  4077  			HTTPStatusCode: res.StatusCode,
  4078  		},
  4079  	}
  4080  	target := &ret
  4081  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4082  		return nil, err
  4083  	}
  4084  	return ret, nil
  4085  }
  4086  
  4087  type ProjectsLocationsApisDeploymentsDeleteRevisionCall struct {
  4088  	s          *Service
  4089  	name       string
  4090  	urlParams_ gensupport.URLParams
  4091  	ctx_       context.Context
  4092  	header_    http.Header
  4093  }
  4094  
  4095  // DeleteRevision: Deletes a revision of a deployment.
  4096  //
  4097  //   - name: The name of the deployment revision to be deleted, with a revision
  4098  //     ID explicitly included. Example:
  4099  //     `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`.
  4100  func (r *ProjectsLocationsApisDeploymentsService) DeleteRevision(name string) *ProjectsLocationsApisDeploymentsDeleteRevisionCall {
  4101  	c := &ProjectsLocationsApisDeploymentsDeleteRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4102  	c.name = name
  4103  	return c
  4104  }
  4105  
  4106  // Fields allows partial responses to be retrieved. See
  4107  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4108  // details.
  4109  func (c *ProjectsLocationsApisDeploymentsDeleteRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsDeleteRevisionCall {
  4110  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4111  	return c
  4112  }
  4113  
  4114  // Context sets the context to be used in this call's Do method.
  4115  func (c *ProjectsLocationsApisDeploymentsDeleteRevisionCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsDeleteRevisionCall {
  4116  	c.ctx_ = ctx
  4117  	return c
  4118  }
  4119  
  4120  // Header returns a http.Header that can be modified by the caller to add
  4121  // headers to the request.
  4122  func (c *ProjectsLocationsApisDeploymentsDeleteRevisionCall) Header() http.Header {
  4123  	if c.header_ == nil {
  4124  		c.header_ = make(http.Header)
  4125  	}
  4126  	return c.header_
  4127  }
  4128  
  4129  func (c *ProjectsLocationsApisDeploymentsDeleteRevisionCall) doRequest(alt string) (*http.Response, error) {
  4130  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4131  	var body io.Reader = nil
  4132  	c.urlParams_.Set("alt", alt)
  4133  	c.urlParams_.Set("prettyPrint", "false")
  4134  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteRevision")
  4135  	urls += "?" + c.urlParams_.Encode()
  4136  	req, err := http.NewRequest("DELETE", urls, body)
  4137  	if err != nil {
  4138  		return nil, err
  4139  	}
  4140  	req.Header = reqHeaders
  4141  	googleapi.Expand(req.URL, map[string]string{
  4142  		"name": c.name,
  4143  	})
  4144  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4145  }
  4146  
  4147  // Do executes the "apigeeregistry.projects.locations.apis.deployments.deleteRevision" call.
  4148  // Any non-2xx status code is an error. Response headers are in either
  4149  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  4150  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4151  // whether the returned error was because http.StatusNotModified was returned.
  4152  func (c *ProjectsLocationsApisDeploymentsDeleteRevisionCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  4153  	gensupport.SetOptions(c.urlParams_, opts...)
  4154  	res, err := c.doRequest("json")
  4155  	if res != nil && res.StatusCode == http.StatusNotModified {
  4156  		if res.Body != nil {
  4157  			res.Body.Close()
  4158  		}
  4159  		return nil, gensupport.WrapError(&googleapi.Error{
  4160  			Code:   res.StatusCode,
  4161  			Header: res.Header,
  4162  		})
  4163  	}
  4164  	if err != nil {
  4165  		return nil, err
  4166  	}
  4167  	defer googleapi.CloseBody(res)
  4168  	if err := googleapi.CheckResponse(res); err != nil {
  4169  		return nil, gensupport.WrapError(err)
  4170  	}
  4171  	ret := &ApiDeployment{
  4172  		ServerResponse: googleapi.ServerResponse{
  4173  			Header:         res.Header,
  4174  			HTTPStatusCode: res.StatusCode,
  4175  		},
  4176  	}
  4177  	target := &ret
  4178  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4179  		return nil, err
  4180  	}
  4181  	return ret, nil
  4182  }
  4183  
  4184  type ProjectsLocationsApisDeploymentsGetCall struct {
  4185  	s            *Service
  4186  	name         string
  4187  	urlParams_   gensupport.URLParams
  4188  	ifNoneMatch_ string
  4189  	ctx_         context.Context
  4190  	header_      http.Header
  4191  }
  4192  
  4193  // Get: Returns a specified deployment.
  4194  //
  4195  //   - name: The name of the deployment to retrieve. Format:
  4196  //     `projects/*/locations/*/apis/*/deployments/*`.
  4197  func (r *ProjectsLocationsApisDeploymentsService) Get(name string) *ProjectsLocationsApisDeploymentsGetCall {
  4198  	c := &ProjectsLocationsApisDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4199  	c.name = name
  4200  	return c
  4201  }
  4202  
  4203  // Fields allows partial responses to be retrieved. See
  4204  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4205  // details.
  4206  func (c *ProjectsLocationsApisDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsGetCall {
  4207  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4208  	return c
  4209  }
  4210  
  4211  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4212  // object's ETag matches the given value. This is useful for getting updates
  4213  // only after the object has changed since the last request.
  4214  func (c *ProjectsLocationsApisDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsGetCall {
  4215  	c.ifNoneMatch_ = entityTag
  4216  	return c
  4217  }
  4218  
  4219  // Context sets the context to be used in this call's Do method.
  4220  func (c *ProjectsLocationsApisDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsGetCall {
  4221  	c.ctx_ = ctx
  4222  	return c
  4223  }
  4224  
  4225  // Header returns a http.Header that can be modified by the caller to add
  4226  // headers to the request.
  4227  func (c *ProjectsLocationsApisDeploymentsGetCall) Header() http.Header {
  4228  	if c.header_ == nil {
  4229  		c.header_ = make(http.Header)
  4230  	}
  4231  	return c.header_
  4232  }
  4233  
  4234  func (c *ProjectsLocationsApisDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  4235  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4236  	if c.ifNoneMatch_ != "" {
  4237  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4238  	}
  4239  	var body io.Reader = nil
  4240  	c.urlParams_.Set("alt", alt)
  4241  	c.urlParams_.Set("prettyPrint", "false")
  4242  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4243  	urls += "?" + c.urlParams_.Encode()
  4244  	req, err := http.NewRequest("GET", urls, body)
  4245  	if err != nil {
  4246  		return nil, err
  4247  	}
  4248  	req.Header = reqHeaders
  4249  	googleapi.Expand(req.URL, map[string]string{
  4250  		"name": c.name,
  4251  	})
  4252  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4253  }
  4254  
  4255  // Do executes the "apigeeregistry.projects.locations.apis.deployments.get" call.
  4256  // Any non-2xx status code is an error. Response headers are in either
  4257  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  4258  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4259  // whether the returned error was because http.StatusNotModified was returned.
  4260  func (c *ProjectsLocationsApisDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  4261  	gensupport.SetOptions(c.urlParams_, opts...)
  4262  	res, err := c.doRequest("json")
  4263  	if res != nil && res.StatusCode == http.StatusNotModified {
  4264  		if res.Body != nil {
  4265  			res.Body.Close()
  4266  		}
  4267  		return nil, gensupport.WrapError(&googleapi.Error{
  4268  			Code:   res.StatusCode,
  4269  			Header: res.Header,
  4270  		})
  4271  	}
  4272  	if err != nil {
  4273  		return nil, err
  4274  	}
  4275  	defer googleapi.CloseBody(res)
  4276  	if err := googleapi.CheckResponse(res); err != nil {
  4277  		return nil, gensupport.WrapError(err)
  4278  	}
  4279  	ret := &ApiDeployment{
  4280  		ServerResponse: googleapi.ServerResponse{
  4281  			Header:         res.Header,
  4282  			HTTPStatusCode: res.StatusCode,
  4283  		},
  4284  	}
  4285  	target := &ret
  4286  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4287  		return nil, err
  4288  	}
  4289  	return ret, nil
  4290  }
  4291  
  4292  type ProjectsLocationsApisDeploymentsGetIamPolicyCall struct {
  4293  	s            *Service
  4294  	resource     string
  4295  	urlParams_   gensupport.URLParams
  4296  	ifNoneMatch_ string
  4297  	ctx_         context.Context
  4298  	header_      http.Header
  4299  }
  4300  
  4301  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4302  // empty policy if the resource exists and does not have a policy set.
  4303  //
  4304  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4305  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4306  //     for the appropriate value for this field.
  4307  func (r *ProjectsLocationsApisDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsApisDeploymentsGetIamPolicyCall {
  4308  	c := &ProjectsLocationsApisDeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4309  	c.resource = resource
  4310  	return c
  4311  }
  4312  
  4313  // OptionsRequestedPolicyVersion sets the optional parameter
  4314  // "options.requestedPolicyVersion": The maximum policy version that will be
  4315  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4316  // an invalid value will be rejected. Requests for policies with any
  4317  // conditional role bindings must specify version 3. Policies with no
  4318  // conditional role bindings may specify any valid value or leave the field
  4319  // unset. The policy in the response might use the policy version that you
  4320  // specified, or it might use a lower policy version. For example, if you
  4321  // specify version 3, but the policy has no conditional role bindings, the
  4322  // response uses version 1. To learn which resources support conditions in
  4323  // their IAM policies, see the IAM documentation
  4324  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4325  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisDeploymentsGetIamPolicyCall {
  4326  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4327  	return c
  4328  }
  4329  
  4330  // Fields allows partial responses to be retrieved. See
  4331  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4332  // details.
  4333  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsGetIamPolicyCall {
  4334  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4335  	return c
  4336  }
  4337  
  4338  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4339  // object's ETag matches the given value. This is useful for getting updates
  4340  // only after the object has changed since the last request.
  4341  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsGetIamPolicyCall {
  4342  	c.ifNoneMatch_ = entityTag
  4343  	return c
  4344  }
  4345  
  4346  // Context sets the context to be used in this call's Do method.
  4347  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsGetIamPolicyCall {
  4348  	c.ctx_ = ctx
  4349  	return c
  4350  }
  4351  
  4352  // Header returns a http.Header that can be modified by the caller to add
  4353  // headers to the request.
  4354  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) Header() http.Header {
  4355  	if c.header_ == nil {
  4356  		c.header_ = make(http.Header)
  4357  	}
  4358  	return c.header_
  4359  }
  4360  
  4361  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4362  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4363  	if c.ifNoneMatch_ != "" {
  4364  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4365  	}
  4366  	var body io.Reader = nil
  4367  	c.urlParams_.Set("alt", alt)
  4368  	c.urlParams_.Set("prettyPrint", "false")
  4369  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4370  	urls += "?" + c.urlParams_.Encode()
  4371  	req, err := http.NewRequest("GET", urls, body)
  4372  	if err != nil {
  4373  		return nil, err
  4374  	}
  4375  	req.Header = reqHeaders
  4376  	googleapi.Expand(req.URL, map[string]string{
  4377  		"resource": c.resource,
  4378  	})
  4379  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4380  }
  4381  
  4382  // Do executes the "apigeeregistry.projects.locations.apis.deployments.getIamPolicy" call.
  4383  // Any non-2xx status code is an error. Response headers are in either
  4384  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4385  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4386  // whether the returned error was because http.StatusNotModified was returned.
  4387  func (c *ProjectsLocationsApisDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4388  	gensupport.SetOptions(c.urlParams_, opts...)
  4389  	res, err := c.doRequest("json")
  4390  	if res != nil && res.StatusCode == http.StatusNotModified {
  4391  		if res.Body != nil {
  4392  			res.Body.Close()
  4393  		}
  4394  		return nil, gensupport.WrapError(&googleapi.Error{
  4395  			Code:   res.StatusCode,
  4396  			Header: res.Header,
  4397  		})
  4398  	}
  4399  	if err != nil {
  4400  		return nil, err
  4401  	}
  4402  	defer googleapi.CloseBody(res)
  4403  	if err := googleapi.CheckResponse(res); err != nil {
  4404  		return nil, gensupport.WrapError(err)
  4405  	}
  4406  	ret := &Policy{
  4407  		ServerResponse: googleapi.ServerResponse{
  4408  			Header:         res.Header,
  4409  			HTTPStatusCode: res.StatusCode,
  4410  		},
  4411  	}
  4412  	target := &ret
  4413  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4414  		return nil, err
  4415  	}
  4416  	return ret, nil
  4417  }
  4418  
  4419  type ProjectsLocationsApisDeploymentsListCall struct {
  4420  	s            *Service
  4421  	parent       string
  4422  	urlParams_   gensupport.URLParams
  4423  	ifNoneMatch_ string
  4424  	ctx_         context.Context
  4425  	header_      http.Header
  4426  }
  4427  
  4428  // List: Returns matching deployments.
  4429  //
  4430  //   - parent: The parent, which owns this collection of deployments. Format:
  4431  //     `projects/*/locations/*/apis/*`.
  4432  func (r *ProjectsLocationsApisDeploymentsService) List(parent string) *ProjectsLocationsApisDeploymentsListCall {
  4433  	c := &ProjectsLocationsApisDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4434  	c.parent = parent
  4435  	return c
  4436  }
  4437  
  4438  // Filter sets the optional parameter "filter": An expression that can be used
  4439  // to filter the list. Filters use the Common Expression Language and can refer
  4440  // to all message fields.
  4441  func (c *ProjectsLocationsApisDeploymentsListCall) Filter(filter string) *ProjectsLocationsApisDeploymentsListCall {
  4442  	c.urlParams_.Set("filter", filter)
  4443  	return c
  4444  }
  4445  
  4446  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  4447  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  4448  // "desc" identifier, e.g. "foo desc,bar"
  4449  func (c *ProjectsLocationsApisDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsApisDeploymentsListCall {
  4450  	c.urlParams_.Set("orderBy", orderBy)
  4451  	return c
  4452  }
  4453  
  4454  // PageSize sets the optional parameter "pageSize": The maximum number of
  4455  // deployments to return. The service may return fewer than this value. If
  4456  // unspecified, at most 50 values will be returned. The maximum is 1000; values
  4457  // above 1000 will be coerced to 1000.
  4458  func (c *ProjectsLocationsApisDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsApisDeploymentsListCall {
  4459  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4460  	return c
  4461  }
  4462  
  4463  // PageToken sets the optional parameter "pageToken": A page token, received
  4464  // from a previous `ListApiDeployments` call. Provide this to retrieve the
  4465  // subsequent page. When paginating, all other parameters provided to
  4466  // `ListApiDeployments` must match the call that provided the page token.
  4467  func (c *ProjectsLocationsApisDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsApisDeploymentsListCall {
  4468  	c.urlParams_.Set("pageToken", pageToken)
  4469  	return c
  4470  }
  4471  
  4472  // Fields allows partial responses to be retrieved. See
  4473  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4474  // details.
  4475  func (c *ProjectsLocationsApisDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsListCall {
  4476  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4477  	return c
  4478  }
  4479  
  4480  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4481  // object's ETag matches the given value. This is useful for getting updates
  4482  // only after the object has changed since the last request.
  4483  func (c *ProjectsLocationsApisDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsListCall {
  4484  	c.ifNoneMatch_ = entityTag
  4485  	return c
  4486  }
  4487  
  4488  // Context sets the context to be used in this call's Do method.
  4489  func (c *ProjectsLocationsApisDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsListCall {
  4490  	c.ctx_ = ctx
  4491  	return c
  4492  }
  4493  
  4494  // Header returns a http.Header that can be modified by the caller to add
  4495  // headers to the request.
  4496  func (c *ProjectsLocationsApisDeploymentsListCall) Header() http.Header {
  4497  	if c.header_ == nil {
  4498  		c.header_ = make(http.Header)
  4499  	}
  4500  	return c.header_
  4501  }
  4502  
  4503  func (c *ProjectsLocationsApisDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  4504  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4505  	if c.ifNoneMatch_ != "" {
  4506  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4507  	}
  4508  	var body io.Reader = nil
  4509  	c.urlParams_.Set("alt", alt)
  4510  	c.urlParams_.Set("prettyPrint", "false")
  4511  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
  4512  	urls += "?" + c.urlParams_.Encode()
  4513  	req, err := http.NewRequest("GET", urls, body)
  4514  	if err != nil {
  4515  		return nil, err
  4516  	}
  4517  	req.Header = reqHeaders
  4518  	googleapi.Expand(req.URL, map[string]string{
  4519  		"parent": c.parent,
  4520  	})
  4521  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4522  }
  4523  
  4524  // Do executes the "apigeeregistry.projects.locations.apis.deployments.list" call.
  4525  // Any non-2xx status code is an error. Response headers are in either
  4526  // *ListApiDeploymentsResponse.ServerResponse.Header or (if a response was
  4527  // returned at all) in error.(*googleapi.Error).Header. Use
  4528  // googleapi.IsNotModified to check whether the returned error was because
  4529  // http.StatusNotModified was returned.
  4530  func (c *ProjectsLocationsApisDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListApiDeploymentsResponse, error) {
  4531  	gensupport.SetOptions(c.urlParams_, opts...)
  4532  	res, err := c.doRequest("json")
  4533  	if res != nil && res.StatusCode == http.StatusNotModified {
  4534  		if res.Body != nil {
  4535  			res.Body.Close()
  4536  		}
  4537  		return nil, gensupport.WrapError(&googleapi.Error{
  4538  			Code:   res.StatusCode,
  4539  			Header: res.Header,
  4540  		})
  4541  	}
  4542  	if err != nil {
  4543  		return nil, err
  4544  	}
  4545  	defer googleapi.CloseBody(res)
  4546  	if err := googleapi.CheckResponse(res); err != nil {
  4547  		return nil, gensupport.WrapError(err)
  4548  	}
  4549  	ret := &ListApiDeploymentsResponse{
  4550  		ServerResponse: googleapi.ServerResponse{
  4551  			Header:         res.Header,
  4552  			HTTPStatusCode: res.StatusCode,
  4553  		},
  4554  	}
  4555  	target := &ret
  4556  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4557  		return nil, err
  4558  	}
  4559  	return ret, nil
  4560  }
  4561  
  4562  // Pages invokes f for each page of results.
  4563  // A non-nil error returned from f will halt the iteration.
  4564  // The provided context supersedes any context provided to the Context method.
  4565  func (c *ProjectsLocationsApisDeploymentsListCall) Pages(ctx context.Context, f func(*ListApiDeploymentsResponse) error) error {
  4566  	c.ctx_ = ctx
  4567  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4568  	for {
  4569  		x, err := c.Do()
  4570  		if err != nil {
  4571  			return err
  4572  		}
  4573  		if err := f(x); err != nil {
  4574  			return err
  4575  		}
  4576  		if x.NextPageToken == "" {
  4577  			return nil
  4578  		}
  4579  		c.PageToken(x.NextPageToken)
  4580  	}
  4581  }
  4582  
  4583  type ProjectsLocationsApisDeploymentsListRevisionsCall struct {
  4584  	s            *Service
  4585  	name         string
  4586  	urlParams_   gensupport.URLParams
  4587  	ifNoneMatch_ string
  4588  	ctx_         context.Context
  4589  	header_      http.Header
  4590  }
  4591  
  4592  // ListRevisions: Lists all revisions of a deployment. Revisions are returned
  4593  // in descending order of revision creation time.
  4594  //
  4595  // - name: The name of the deployment to list revisions for.
  4596  func (r *ProjectsLocationsApisDeploymentsService) ListRevisions(name string) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4597  	c := &ProjectsLocationsApisDeploymentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4598  	c.name = name
  4599  	return c
  4600  }
  4601  
  4602  // Filter sets the optional parameter "filter": An expression that can be used
  4603  // to filter the list. Filters use the Common Expression Language and can refer
  4604  // to all message fields.
  4605  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Filter(filter string) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4606  	c.urlParams_.Set("filter", filter)
  4607  	return c
  4608  }
  4609  
  4610  // PageSize sets the optional parameter "pageSize": The maximum number of
  4611  // revisions to return per page.
  4612  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4613  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4614  	return c
  4615  }
  4616  
  4617  // PageToken sets the optional parameter "pageToken": The page token, received
  4618  // from a previous ListApiDeploymentRevisions call. Provide this to retrieve
  4619  // the subsequent page.
  4620  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4621  	c.urlParams_.Set("pageToken", pageToken)
  4622  	return c
  4623  }
  4624  
  4625  // Fields allows partial responses to be retrieved. See
  4626  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4627  // details.
  4628  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4629  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4630  	return c
  4631  }
  4632  
  4633  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4634  // object's ETag matches the given value. This is useful for getting updates
  4635  // only after the object has changed since the last request.
  4636  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4637  	c.ifNoneMatch_ = entityTag
  4638  	return c
  4639  }
  4640  
  4641  // Context sets the context to be used in this call's Do method.
  4642  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsListRevisionsCall {
  4643  	c.ctx_ = ctx
  4644  	return c
  4645  }
  4646  
  4647  // Header returns a http.Header that can be modified by the caller to add
  4648  // headers to the request.
  4649  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Header() http.Header {
  4650  	if c.header_ == nil {
  4651  		c.header_ = make(http.Header)
  4652  	}
  4653  	return c.header_
  4654  }
  4655  
  4656  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
  4657  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4658  	if c.ifNoneMatch_ != "" {
  4659  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4660  	}
  4661  	var body io.Reader = nil
  4662  	c.urlParams_.Set("alt", alt)
  4663  	c.urlParams_.Set("prettyPrint", "false")
  4664  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions")
  4665  	urls += "?" + c.urlParams_.Encode()
  4666  	req, err := http.NewRequest("GET", urls, body)
  4667  	if err != nil {
  4668  		return nil, err
  4669  	}
  4670  	req.Header = reqHeaders
  4671  	googleapi.Expand(req.URL, map[string]string{
  4672  		"name": c.name,
  4673  	})
  4674  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4675  }
  4676  
  4677  // Do executes the "apigeeregistry.projects.locations.apis.deployments.listRevisions" call.
  4678  // Any non-2xx status code is an error. Response headers are in either
  4679  // *ListApiDeploymentRevisionsResponse.ServerResponse.Header or (if a response
  4680  // was returned at all) in error.(*googleapi.Error).Header. Use
  4681  // googleapi.IsNotModified to check whether the returned error was because
  4682  // http.StatusNotModified was returned.
  4683  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListApiDeploymentRevisionsResponse, error) {
  4684  	gensupport.SetOptions(c.urlParams_, opts...)
  4685  	res, err := c.doRequest("json")
  4686  	if res != nil && res.StatusCode == http.StatusNotModified {
  4687  		if res.Body != nil {
  4688  			res.Body.Close()
  4689  		}
  4690  		return nil, gensupport.WrapError(&googleapi.Error{
  4691  			Code:   res.StatusCode,
  4692  			Header: res.Header,
  4693  		})
  4694  	}
  4695  	if err != nil {
  4696  		return nil, err
  4697  	}
  4698  	defer googleapi.CloseBody(res)
  4699  	if err := googleapi.CheckResponse(res); err != nil {
  4700  		return nil, gensupport.WrapError(err)
  4701  	}
  4702  	ret := &ListApiDeploymentRevisionsResponse{
  4703  		ServerResponse: googleapi.ServerResponse{
  4704  			Header:         res.Header,
  4705  			HTTPStatusCode: res.StatusCode,
  4706  		},
  4707  	}
  4708  	target := &ret
  4709  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4710  		return nil, err
  4711  	}
  4712  	return ret, nil
  4713  }
  4714  
  4715  // Pages invokes f for each page of results.
  4716  // A non-nil error returned from f will halt the iteration.
  4717  // The provided context supersedes any context provided to the Context method.
  4718  func (c *ProjectsLocationsApisDeploymentsListRevisionsCall) Pages(ctx context.Context, f func(*ListApiDeploymentRevisionsResponse) error) error {
  4719  	c.ctx_ = ctx
  4720  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4721  	for {
  4722  		x, err := c.Do()
  4723  		if err != nil {
  4724  			return err
  4725  		}
  4726  		if err := f(x); err != nil {
  4727  			return err
  4728  		}
  4729  		if x.NextPageToken == "" {
  4730  			return nil
  4731  		}
  4732  		c.PageToken(x.NextPageToken)
  4733  	}
  4734  }
  4735  
  4736  type ProjectsLocationsApisDeploymentsPatchCall struct {
  4737  	s             *Service
  4738  	name          string
  4739  	apideployment *ApiDeployment
  4740  	urlParams_    gensupport.URLParams
  4741  	ctx_          context.Context
  4742  	header_       http.Header
  4743  }
  4744  
  4745  // Patch: Used to modify a specified deployment.
  4746  //
  4747  // - name: Resource name.
  4748  func (r *ProjectsLocationsApisDeploymentsService) Patch(name string, apideployment *ApiDeployment) *ProjectsLocationsApisDeploymentsPatchCall {
  4749  	c := &ProjectsLocationsApisDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4750  	c.name = name
  4751  	c.apideployment = apideployment
  4752  	return c
  4753  }
  4754  
  4755  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
  4756  // the deployment is not found, a new deployment will be created. In this
  4757  // situation, `update_mask` is ignored.
  4758  func (c *ProjectsLocationsApisDeploymentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsApisDeploymentsPatchCall {
  4759  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  4760  	return c
  4761  }
  4762  
  4763  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  4764  // be updated. If omitted, all fields are updated that are set in the request
  4765  // message (fields set to default values are ignored). If an asterisk "*" is
  4766  // specified, all fields are updated, including fields that are
  4767  // unspecified/default in the request.
  4768  func (c *ProjectsLocationsApisDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisDeploymentsPatchCall {
  4769  	c.urlParams_.Set("updateMask", updateMask)
  4770  	return c
  4771  }
  4772  
  4773  // Fields allows partial responses to be retrieved. See
  4774  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4775  // details.
  4776  func (c *ProjectsLocationsApisDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsPatchCall {
  4777  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4778  	return c
  4779  }
  4780  
  4781  // Context sets the context to be used in this call's Do method.
  4782  func (c *ProjectsLocationsApisDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsPatchCall {
  4783  	c.ctx_ = ctx
  4784  	return c
  4785  }
  4786  
  4787  // Header returns a http.Header that can be modified by the caller to add
  4788  // headers to the request.
  4789  func (c *ProjectsLocationsApisDeploymentsPatchCall) Header() http.Header {
  4790  	if c.header_ == nil {
  4791  		c.header_ = make(http.Header)
  4792  	}
  4793  	return c.header_
  4794  }
  4795  
  4796  func (c *ProjectsLocationsApisDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  4797  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4798  	var body io.Reader = nil
  4799  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apideployment)
  4800  	if err != nil {
  4801  		return nil, err
  4802  	}
  4803  	c.urlParams_.Set("alt", alt)
  4804  	c.urlParams_.Set("prettyPrint", "false")
  4805  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4806  	urls += "?" + c.urlParams_.Encode()
  4807  	req, err := http.NewRequest("PATCH", urls, body)
  4808  	if err != nil {
  4809  		return nil, err
  4810  	}
  4811  	req.Header = reqHeaders
  4812  	googleapi.Expand(req.URL, map[string]string{
  4813  		"name": c.name,
  4814  	})
  4815  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4816  }
  4817  
  4818  // Do executes the "apigeeregistry.projects.locations.apis.deployments.patch" call.
  4819  // Any non-2xx status code is an error. Response headers are in either
  4820  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  4821  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4822  // whether the returned error was because http.StatusNotModified was returned.
  4823  func (c *ProjectsLocationsApisDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  4824  	gensupport.SetOptions(c.urlParams_, opts...)
  4825  	res, err := c.doRequest("json")
  4826  	if res != nil && res.StatusCode == http.StatusNotModified {
  4827  		if res.Body != nil {
  4828  			res.Body.Close()
  4829  		}
  4830  		return nil, gensupport.WrapError(&googleapi.Error{
  4831  			Code:   res.StatusCode,
  4832  			Header: res.Header,
  4833  		})
  4834  	}
  4835  	if err != nil {
  4836  		return nil, err
  4837  	}
  4838  	defer googleapi.CloseBody(res)
  4839  	if err := googleapi.CheckResponse(res); err != nil {
  4840  		return nil, gensupport.WrapError(err)
  4841  	}
  4842  	ret := &ApiDeployment{
  4843  		ServerResponse: googleapi.ServerResponse{
  4844  			Header:         res.Header,
  4845  			HTTPStatusCode: res.StatusCode,
  4846  		},
  4847  	}
  4848  	target := &ret
  4849  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4850  		return nil, err
  4851  	}
  4852  	return ret, nil
  4853  }
  4854  
  4855  type ProjectsLocationsApisDeploymentsRollbackCall struct {
  4856  	s                            *Service
  4857  	name                         string
  4858  	rollbackapideploymentrequest *RollbackApiDeploymentRequest
  4859  	urlParams_                   gensupport.URLParams
  4860  	ctx_                         context.Context
  4861  	header_                      http.Header
  4862  }
  4863  
  4864  // Rollback: Sets the current revision to a specified prior revision. Note that
  4865  // this creates a new revision with a new revision ID.
  4866  //
  4867  // - name: The deployment being rolled back.
  4868  func (r *ProjectsLocationsApisDeploymentsService) Rollback(name string, rollbackapideploymentrequest *RollbackApiDeploymentRequest) *ProjectsLocationsApisDeploymentsRollbackCall {
  4869  	c := &ProjectsLocationsApisDeploymentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4870  	c.name = name
  4871  	c.rollbackapideploymentrequest = rollbackapideploymentrequest
  4872  	return c
  4873  }
  4874  
  4875  // Fields allows partial responses to be retrieved. See
  4876  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4877  // details.
  4878  func (c *ProjectsLocationsApisDeploymentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsRollbackCall {
  4879  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4880  	return c
  4881  }
  4882  
  4883  // Context sets the context to be used in this call's Do method.
  4884  func (c *ProjectsLocationsApisDeploymentsRollbackCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsRollbackCall {
  4885  	c.ctx_ = ctx
  4886  	return c
  4887  }
  4888  
  4889  // Header returns a http.Header that can be modified by the caller to add
  4890  // headers to the request.
  4891  func (c *ProjectsLocationsApisDeploymentsRollbackCall) Header() http.Header {
  4892  	if c.header_ == nil {
  4893  		c.header_ = make(http.Header)
  4894  	}
  4895  	return c.header_
  4896  }
  4897  
  4898  func (c *ProjectsLocationsApisDeploymentsRollbackCall) doRequest(alt string) (*http.Response, error) {
  4899  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4900  	var body io.Reader = nil
  4901  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackapideploymentrequest)
  4902  	if err != nil {
  4903  		return nil, err
  4904  	}
  4905  	c.urlParams_.Set("alt", alt)
  4906  	c.urlParams_.Set("prettyPrint", "false")
  4907  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
  4908  	urls += "?" + c.urlParams_.Encode()
  4909  	req, err := http.NewRequest("POST", urls, body)
  4910  	if err != nil {
  4911  		return nil, err
  4912  	}
  4913  	req.Header = reqHeaders
  4914  	googleapi.Expand(req.URL, map[string]string{
  4915  		"name": c.name,
  4916  	})
  4917  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4918  }
  4919  
  4920  // Do executes the "apigeeregistry.projects.locations.apis.deployments.rollback" call.
  4921  // Any non-2xx status code is an error. Response headers are in either
  4922  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  4923  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4924  // whether the returned error was because http.StatusNotModified was returned.
  4925  func (c *ProjectsLocationsApisDeploymentsRollbackCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  4926  	gensupport.SetOptions(c.urlParams_, opts...)
  4927  	res, err := c.doRequest("json")
  4928  	if res != nil && res.StatusCode == http.StatusNotModified {
  4929  		if res.Body != nil {
  4930  			res.Body.Close()
  4931  		}
  4932  		return nil, gensupport.WrapError(&googleapi.Error{
  4933  			Code:   res.StatusCode,
  4934  			Header: res.Header,
  4935  		})
  4936  	}
  4937  	if err != nil {
  4938  		return nil, err
  4939  	}
  4940  	defer googleapi.CloseBody(res)
  4941  	if err := googleapi.CheckResponse(res); err != nil {
  4942  		return nil, gensupport.WrapError(err)
  4943  	}
  4944  	ret := &ApiDeployment{
  4945  		ServerResponse: googleapi.ServerResponse{
  4946  			Header:         res.Header,
  4947  			HTTPStatusCode: res.StatusCode,
  4948  		},
  4949  	}
  4950  	target := &ret
  4951  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4952  		return nil, err
  4953  	}
  4954  	return ret, nil
  4955  }
  4956  
  4957  type ProjectsLocationsApisDeploymentsSetIamPolicyCall struct {
  4958  	s                   *Service
  4959  	resource            string
  4960  	setiampolicyrequest *SetIamPolicyRequest
  4961  	urlParams_          gensupport.URLParams
  4962  	ctx_                context.Context
  4963  	header_             http.Header
  4964  }
  4965  
  4966  // SetIamPolicy: Sets the access control policy on the specified resource.
  4967  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4968  // and `PERMISSION_DENIED` errors.
  4969  //
  4970  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4971  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4972  //     for the appropriate value for this field.
  4973  func (r *ProjectsLocationsApisDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisDeploymentsSetIamPolicyCall {
  4974  	c := &ProjectsLocationsApisDeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4975  	c.resource = resource
  4976  	c.setiampolicyrequest = setiampolicyrequest
  4977  	return c
  4978  }
  4979  
  4980  // Fields allows partial responses to be retrieved. See
  4981  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4982  // details.
  4983  func (c *ProjectsLocationsApisDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsSetIamPolicyCall {
  4984  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4985  	return c
  4986  }
  4987  
  4988  // Context sets the context to be used in this call's Do method.
  4989  func (c *ProjectsLocationsApisDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsSetIamPolicyCall {
  4990  	c.ctx_ = ctx
  4991  	return c
  4992  }
  4993  
  4994  // Header returns a http.Header that can be modified by the caller to add
  4995  // headers to the request.
  4996  func (c *ProjectsLocationsApisDeploymentsSetIamPolicyCall) Header() http.Header {
  4997  	if c.header_ == nil {
  4998  		c.header_ = make(http.Header)
  4999  	}
  5000  	return c.header_
  5001  }
  5002  
  5003  func (c *ProjectsLocationsApisDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5004  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5005  	var body io.Reader = nil
  5006  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5007  	if err != nil {
  5008  		return nil, err
  5009  	}
  5010  	c.urlParams_.Set("alt", alt)
  5011  	c.urlParams_.Set("prettyPrint", "false")
  5012  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5013  	urls += "?" + c.urlParams_.Encode()
  5014  	req, err := http.NewRequest("POST", urls, body)
  5015  	if err != nil {
  5016  		return nil, err
  5017  	}
  5018  	req.Header = reqHeaders
  5019  	googleapi.Expand(req.URL, map[string]string{
  5020  		"resource": c.resource,
  5021  	})
  5022  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5023  }
  5024  
  5025  // Do executes the "apigeeregistry.projects.locations.apis.deployments.setIamPolicy" call.
  5026  // Any non-2xx status code is an error. Response headers are in either
  5027  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5028  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5029  // whether the returned error was because http.StatusNotModified was returned.
  5030  func (c *ProjectsLocationsApisDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5031  	gensupport.SetOptions(c.urlParams_, opts...)
  5032  	res, err := c.doRequest("json")
  5033  	if res != nil && res.StatusCode == http.StatusNotModified {
  5034  		if res.Body != nil {
  5035  			res.Body.Close()
  5036  		}
  5037  		return nil, gensupport.WrapError(&googleapi.Error{
  5038  			Code:   res.StatusCode,
  5039  			Header: res.Header,
  5040  		})
  5041  	}
  5042  	if err != nil {
  5043  		return nil, err
  5044  	}
  5045  	defer googleapi.CloseBody(res)
  5046  	if err := googleapi.CheckResponse(res); err != nil {
  5047  		return nil, gensupport.WrapError(err)
  5048  	}
  5049  	ret := &Policy{
  5050  		ServerResponse: googleapi.ServerResponse{
  5051  			Header:         res.Header,
  5052  			HTTPStatusCode: res.StatusCode,
  5053  		},
  5054  	}
  5055  	target := &ret
  5056  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5057  		return nil, err
  5058  	}
  5059  	return ret, nil
  5060  }
  5061  
  5062  type ProjectsLocationsApisDeploymentsTagRevisionCall struct {
  5063  	s                               *Service
  5064  	name                            string
  5065  	tagapideploymentrevisionrequest *TagApiDeploymentRevisionRequest
  5066  	urlParams_                      gensupport.URLParams
  5067  	ctx_                            context.Context
  5068  	header_                         http.Header
  5069  }
  5070  
  5071  // TagRevision: Adds a tag to a specified revision of a deployment.
  5072  //
  5073  //   - name: The name of the deployment to be tagged, including the revision ID
  5074  //     is optional. If a revision is not specified, it will tag the latest
  5075  //     revision.
  5076  func (r *ProjectsLocationsApisDeploymentsService) TagRevision(name string, tagapideploymentrevisionrequest *TagApiDeploymentRevisionRequest) *ProjectsLocationsApisDeploymentsTagRevisionCall {
  5077  	c := &ProjectsLocationsApisDeploymentsTagRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5078  	c.name = name
  5079  	c.tagapideploymentrevisionrequest = tagapideploymentrevisionrequest
  5080  	return c
  5081  }
  5082  
  5083  // Fields allows partial responses to be retrieved. See
  5084  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5085  // details.
  5086  func (c *ProjectsLocationsApisDeploymentsTagRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsTagRevisionCall {
  5087  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5088  	return c
  5089  }
  5090  
  5091  // Context sets the context to be used in this call's Do method.
  5092  func (c *ProjectsLocationsApisDeploymentsTagRevisionCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsTagRevisionCall {
  5093  	c.ctx_ = ctx
  5094  	return c
  5095  }
  5096  
  5097  // Header returns a http.Header that can be modified by the caller to add
  5098  // headers to the request.
  5099  func (c *ProjectsLocationsApisDeploymentsTagRevisionCall) Header() http.Header {
  5100  	if c.header_ == nil {
  5101  		c.header_ = make(http.Header)
  5102  	}
  5103  	return c.header_
  5104  }
  5105  
  5106  func (c *ProjectsLocationsApisDeploymentsTagRevisionCall) doRequest(alt string) (*http.Response, error) {
  5107  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5108  	var body io.Reader = nil
  5109  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagapideploymentrevisionrequest)
  5110  	if err != nil {
  5111  		return nil, err
  5112  	}
  5113  	c.urlParams_.Set("alt", alt)
  5114  	c.urlParams_.Set("prettyPrint", "false")
  5115  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:tagRevision")
  5116  	urls += "?" + c.urlParams_.Encode()
  5117  	req, err := http.NewRequest("POST", urls, body)
  5118  	if err != nil {
  5119  		return nil, err
  5120  	}
  5121  	req.Header = reqHeaders
  5122  	googleapi.Expand(req.URL, map[string]string{
  5123  		"name": c.name,
  5124  	})
  5125  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5126  }
  5127  
  5128  // Do executes the "apigeeregistry.projects.locations.apis.deployments.tagRevision" call.
  5129  // Any non-2xx status code is an error. Response headers are in either
  5130  // *ApiDeployment.ServerResponse.Header or (if a response was returned at all)
  5131  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5132  // whether the returned error was because http.StatusNotModified was returned.
  5133  func (c *ProjectsLocationsApisDeploymentsTagRevisionCall) Do(opts ...googleapi.CallOption) (*ApiDeployment, error) {
  5134  	gensupport.SetOptions(c.urlParams_, opts...)
  5135  	res, err := c.doRequest("json")
  5136  	if res != nil && res.StatusCode == http.StatusNotModified {
  5137  		if res.Body != nil {
  5138  			res.Body.Close()
  5139  		}
  5140  		return nil, gensupport.WrapError(&googleapi.Error{
  5141  			Code:   res.StatusCode,
  5142  			Header: res.Header,
  5143  		})
  5144  	}
  5145  	if err != nil {
  5146  		return nil, err
  5147  	}
  5148  	defer googleapi.CloseBody(res)
  5149  	if err := googleapi.CheckResponse(res); err != nil {
  5150  		return nil, gensupport.WrapError(err)
  5151  	}
  5152  	ret := &ApiDeployment{
  5153  		ServerResponse: googleapi.ServerResponse{
  5154  			Header:         res.Header,
  5155  			HTTPStatusCode: res.StatusCode,
  5156  		},
  5157  	}
  5158  	target := &ret
  5159  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5160  		return nil, err
  5161  	}
  5162  	return ret, nil
  5163  }
  5164  
  5165  type ProjectsLocationsApisDeploymentsTestIamPermissionsCall struct {
  5166  	s                         *Service
  5167  	resource                  string
  5168  	testiampermissionsrequest *TestIamPermissionsRequest
  5169  	urlParams_                gensupport.URLParams
  5170  	ctx_                      context.Context
  5171  	header_                   http.Header
  5172  }
  5173  
  5174  // TestIamPermissions: Returns permissions that a caller has on the specified
  5175  // resource. If the resource does not exist, this will return an empty set of
  5176  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5177  // used for building permission-aware UIs and command-line tools, not for
  5178  // authorization checking. This operation may "fail open" without warning.
  5179  //
  5180  //   - resource: REQUIRED: The resource for which the policy detail is being
  5181  //     requested. See Resource names
  5182  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5183  //     value for this field.
  5184  func (r *ProjectsLocationsApisDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisDeploymentsTestIamPermissionsCall {
  5185  	c := &ProjectsLocationsApisDeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5186  	c.resource = resource
  5187  	c.testiampermissionsrequest = testiampermissionsrequest
  5188  	return c
  5189  }
  5190  
  5191  // Fields allows partial responses to be retrieved. See
  5192  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5193  // details.
  5194  func (c *ProjectsLocationsApisDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsTestIamPermissionsCall {
  5195  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5196  	return c
  5197  }
  5198  
  5199  // Context sets the context to be used in this call's Do method.
  5200  func (c *ProjectsLocationsApisDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsTestIamPermissionsCall {
  5201  	c.ctx_ = ctx
  5202  	return c
  5203  }
  5204  
  5205  // Header returns a http.Header that can be modified by the caller to add
  5206  // headers to the request.
  5207  func (c *ProjectsLocationsApisDeploymentsTestIamPermissionsCall) Header() http.Header {
  5208  	if c.header_ == nil {
  5209  		c.header_ = make(http.Header)
  5210  	}
  5211  	return c.header_
  5212  }
  5213  
  5214  func (c *ProjectsLocationsApisDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5215  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5216  	var body io.Reader = nil
  5217  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5218  	if err != nil {
  5219  		return nil, err
  5220  	}
  5221  	c.urlParams_.Set("alt", alt)
  5222  	c.urlParams_.Set("prettyPrint", "false")
  5223  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5224  	urls += "?" + c.urlParams_.Encode()
  5225  	req, err := http.NewRequest("POST", urls, body)
  5226  	if err != nil {
  5227  		return nil, err
  5228  	}
  5229  	req.Header = reqHeaders
  5230  	googleapi.Expand(req.URL, map[string]string{
  5231  		"resource": c.resource,
  5232  	})
  5233  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5234  }
  5235  
  5236  // Do executes the "apigeeregistry.projects.locations.apis.deployments.testIamPermissions" call.
  5237  // Any non-2xx status code is an error. Response headers are in either
  5238  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5239  // returned at all) in error.(*googleapi.Error).Header. Use
  5240  // googleapi.IsNotModified to check whether the returned error was because
  5241  // http.StatusNotModified was returned.
  5242  func (c *ProjectsLocationsApisDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5243  	gensupport.SetOptions(c.urlParams_, opts...)
  5244  	res, err := c.doRequest("json")
  5245  	if res != nil && res.StatusCode == http.StatusNotModified {
  5246  		if res.Body != nil {
  5247  			res.Body.Close()
  5248  		}
  5249  		return nil, gensupport.WrapError(&googleapi.Error{
  5250  			Code:   res.StatusCode,
  5251  			Header: res.Header,
  5252  		})
  5253  	}
  5254  	if err != nil {
  5255  		return nil, err
  5256  	}
  5257  	defer googleapi.CloseBody(res)
  5258  	if err := googleapi.CheckResponse(res); err != nil {
  5259  		return nil, gensupport.WrapError(err)
  5260  	}
  5261  	ret := &TestIamPermissionsResponse{
  5262  		ServerResponse: googleapi.ServerResponse{
  5263  			Header:         res.Header,
  5264  			HTTPStatusCode: res.StatusCode,
  5265  		},
  5266  	}
  5267  	target := &ret
  5268  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5269  		return nil, err
  5270  	}
  5271  	return ret, nil
  5272  }
  5273  
  5274  type ProjectsLocationsApisDeploymentsArtifactsCreateCall struct {
  5275  	s          *Service
  5276  	parent     string
  5277  	artifact   *Artifact
  5278  	urlParams_ gensupport.URLParams
  5279  	ctx_       context.Context
  5280  	header_    http.Header
  5281  }
  5282  
  5283  // Create: Creates a specified artifact.
  5284  //
  5285  //   - parent: The parent, which owns this collection of artifacts. Format:
  5286  //     `{parent}`.
  5287  func (r *ProjectsLocationsApisDeploymentsArtifactsService) Create(parent string, artifact *Artifact) *ProjectsLocationsApisDeploymentsArtifactsCreateCall {
  5288  	c := &ProjectsLocationsApisDeploymentsArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5289  	c.parent = parent
  5290  	c.artifact = artifact
  5291  	return c
  5292  }
  5293  
  5294  // ArtifactId sets the optional parameter "artifactId": Required. The ID to use
  5295  // for the artifact, which will become the final component of the artifact's
  5296  // resource name. This value should be 4-63 characters, and valid characters
  5297  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
  5298  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsApisDeploymentsArtifactsCreateCall {
  5299  	c.urlParams_.Set("artifactId", artifactId)
  5300  	return c
  5301  }
  5302  
  5303  // Fields allows partial responses to be retrieved. See
  5304  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5305  // details.
  5306  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsCreateCall {
  5307  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5308  	return c
  5309  }
  5310  
  5311  // Context sets the context to be used in this call's Do method.
  5312  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsCreateCall {
  5313  	c.ctx_ = ctx
  5314  	return c
  5315  }
  5316  
  5317  // Header returns a http.Header that can be modified by the caller to add
  5318  // headers to the request.
  5319  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) Header() http.Header {
  5320  	if c.header_ == nil {
  5321  		c.header_ = make(http.Header)
  5322  	}
  5323  	return c.header_
  5324  }
  5325  
  5326  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
  5327  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5328  	var body io.Reader = nil
  5329  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  5330  	if err != nil {
  5331  		return nil, err
  5332  	}
  5333  	c.urlParams_.Set("alt", alt)
  5334  	c.urlParams_.Set("prettyPrint", "false")
  5335  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  5336  	urls += "?" + c.urlParams_.Encode()
  5337  	req, err := http.NewRequest("POST", urls, body)
  5338  	if err != nil {
  5339  		return nil, err
  5340  	}
  5341  	req.Header = reqHeaders
  5342  	googleapi.Expand(req.URL, map[string]string{
  5343  		"parent": c.parent,
  5344  	})
  5345  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5346  }
  5347  
  5348  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.create" call.
  5349  // Any non-2xx status code is an error. Response headers are in either
  5350  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  5351  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5352  // whether the returned error was because http.StatusNotModified was returned.
  5353  func (c *ProjectsLocationsApisDeploymentsArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  5354  	gensupport.SetOptions(c.urlParams_, opts...)
  5355  	res, err := c.doRequest("json")
  5356  	if res != nil && res.StatusCode == http.StatusNotModified {
  5357  		if res.Body != nil {
  5358  			res.Body.Close()
  5359  		}
  5360  		return nil, gensupport.WrapError(&googleapi.Error{
  5361  			Code:   res.StatusCode,
  5362  			Header: res.Header,
  5363  		})
  5364  	}
  5365  	if err != nil {
  5366  		return nil, err
  5367  	}
  5368  	defer googleapi.CloseBody(res)
  5369  	if err := googleapi.CheckResponse(res); err != nil {
  5370  		return nil, gensupport.WrapError(err)
  5371  	}
  5372  	ret := &Artifact{
  5373  		ServerResponse: googleapi.ServerResponse{
  5374  			Header:         res.Header,
  5375  			HTTPStatusCode: res.StatusCode,
  5376  		},
  5377  	}
  5378  	target := &ret
  5379  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5380  		return nil, err
  5381  	}
  5382  	return ret, nil
  5383  }
  5384  
  5385  type ProjectsLocationsApisDeploymentsArtifactsDeleteCall struct {
  5386  	s          *Service
  5387  	name       string
  5388  	urlParams_ gensupport.URLParams
  5389  	ctx_       context.Context
  5390  	header_    http.Header
  5391  }
  5392  
  5393  // Delete: Removes a specified artifact.
  5394  //
  5395  // - name: The name of the artifact to delete. Format: `{parent}/artifacts/*`.
  5396  func (r *ProjectsLocationsApisDeploymentsArtifactsService) Delete(name string) *ProjectsLocationsApisDeploymentsArtifactsDeleteCall {
  5397  	c := &ProjectsLocationsApisDeploymentsArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5398  	c.name = name
  5399  	return c
  5400  }
  5401  
  5402  // Fields allows partial responses to be retrieved. See
  5403  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5404  // details.
  5405  func (c *ProjectsLocationsApisDeploymentsArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsDeleteCall {
  5406  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5407  	return c
  5408  }
  5409  
  5410  // Context sets the context to be used in this call's Do method.
  5411  func (c *ProjectsLocationsApisDeploymentsArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsDeleteCall {
  5412  	c.ctx_ = ctx
  5413  	return c
  5414  }
  5415  
  5416  // Header returns a http.Header that can be modified by the caller to add
  5417  // headers to the request.
  5418  func (c *ProjectsLocationsApisDeploymentsArtifactsDeleteCall) Header() http.Header {
  5419  	if c.header_ == nil {
  5420  		c.header_ = make(http.Header)
  5421  	}
  5422  	return c.header_
  5423  }
  5424  
  5425  func (c *ProjectsLocationsApisDeploymentsArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5427  	var body io.Reader = nil
  5428  	c.urlParams_.Set("alt", alt)
  5429  	c.urlParams_.Set("prettyPrint", "false")
  5430  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5431  	urls += "?" + c.urlParams_.Encode()
  5432  	req, err := http.NewRequest("DELETE", urls, body)
  5433  	if err != nil {
  5434  		return nil, err
  5435  	}
  5436  	req.Header = reqHeaders
  5437  	googleapi.Expand(req.URL, map[string]string{
  5438  		"name": c.name,
  5439  	})
  5440  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5441  }
  5442  
  5443  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.delete" call.
  5444  // Any non-2xx status code is an error. Response headers are in either
  5445  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5446  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5447  // whether the returned error was because http.StatusNotModified was returned.
  5448  func (c *ProjectsLocationsApisDeploymentsArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5449  	gensupport.SetOptions(c.urlParams_, opts...)
  5450  	res, err := c.doRequest("json")
  5451  	if res != nil && res.StatusCode == http.StatusNotModified {
  5452  		if res.Body != nil {
  5453  			res.Body.Close()
  5454  		}
  5455  		return nil, gensupport.WrapError(&googleapi.Error{
  5456  			Code:   res.StatusCode,
  5457  			Header: res.Header,
  5458  		})
  5459  	}
  5460  	if err != nil {
  5461  		return nil, err
  5462  	}
  5463  	defer googleapi.CloseBody(res)
  5464  	if err := googleapi.CheckResponse(res); err != nil {
  5465  		return nil, gensupport.WrapError(err)
  5466  	}
  5467  	ret := &Empty{
  5468  		ServerResponse: googleapi.ServerResponse{
  5469  			Header:         res.Header,
  5470  			HTTPStatusCode: res.StatusCode,
  5471  		},
  5472  	}
  5473  	target := &ret
  5474  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5475  		return nil, err
  5476  	}
  5477  	return ret, nil
  5478  }
  5479  
  5480  type ProjectsLocationsApisDeploymentsArtifactsGetCall struct {
  5481  	s            *Service
  5482  	name         string
  5483  	urlParams_   gensupport.URLParams
  5484  	ifNoneMatch_ string
  5485  	ctx_         context.Context
  5486  	header_      http.Header
  5487  }
  5488  
  5489  // Get: Returns a specified artifact.
  5490  //
  5491  // - name: The name of the artifact to retrieve. Format: `{parent}/artifacts/*`.
  5492  func (r *ProjectsLocationsApisDeploymentsArtifactsService) Get(name string) *ProjectsLocationsApisDeploymentsArtifactsGetCall {
  5493  	c := &ProjectsLocationsApisDeploymentsArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5494  	c.name = name
  5495  	return c
  5496  }
  5497  
  5498  // Fields allows partial responses to be retrieved. See
  5499  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5500  // details.
  5501  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsGetCall {
  5502  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5503  	return c
  5504  }
  5505  
  5506  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5507  // object's ETag matches the given value. This is useful for getting updates
  5508  // only after the object has changed since the last request.
  5509  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsArtifactsGetCall {
  5510  	c.ifNoneMatch_ = entityTag
  5511  	return c
  5512  }
  5513  
  5514  // Context sets the context to be used in this call's Do method.
  5515  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsGetCall {
  5516  	c.ctx_ = ctx
  5517  	return c
  5518  }
  5519  
  5520  // Header returns a http.Header that can be modified by the caller to add
  5521  // headers to the request.
  5522  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) Header() http.Header {
  5523  	if c.header_ == nil {
  5524  		c.header_ = make(http.Header)
  5525  	}
  5526  	return c.header_
  5527  }
  5528  
  5529  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
  5530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5531  	if c.ifNoneMatch_ != "" {
  5532  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5533  	}
  5534  	var body io.Reader = nil
  5535  	c.urlParams_.Set("alt", alt)
  5536  	c.urlParams_.Set("prettyPrint", "false")
  5537  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5538  	urls += "?" + c.urlParams_.Encode()
  5539  	req, err := http.NewRequest("GET", urls, body)
  5540  	if err != nil {
  5541  		return nil, err
  5542  	}
  5543  	req.Header = reqHeaders
  5544  	googleapi.Expand(req.URL, map[string]string{
  5545  		"name": c.name,
  5546  	})
  5547  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5548  }
  5549  
  5550  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.get" call.
  5551  // Any non-2xx status code is an error. Response headers are in either
  5552  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  5553  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5554  // whether the returned error was because http.StatusNotModified was returned.
  5555  func (c *ProjectsLocationsApisDeploymentsArtifactsGetCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  5556  	gensupport.SetOptions(c.urlParams_, opts...)
  5557  	res, err := c.doRequest("json")
  5558  	if res != nil && res.StatusCode == http.StatusNotModified {
  5559  		if res.Body != nil {
  5560  			res.Body.Close()
  5561  		}
  5562  		return nil, gensupport.WrapError(&googleapi.Error{
  5563  			Code:   res.StatusCode,
  5564  			Header: res.Header,
  5565  		})
  5566  	}
  5567  	if err != nil {
  5568  		return nil, err
  5569  	}
  5570  	defer googleapi.CloseBody(res)
  5571  	if err := googleapi.CheckResponse(res); err != nil {
  5572  		return nil, gensupport.WrapError(err)
  5573  	}
  5574  	ret := &Artifact{
  5575  		ServerResponse: googleapi.ServerResponse{
  5576  			Header:         res.Header,
  5577  			HTTPStatusCode: res.StatusCode,
  5578  		},
  5579  	}
  5580  	target := &ret
  5581  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5582  		return nil, err
  5583  	}
  5584  	return ret, nil
  5585  }
  5586  
  5587  type ProjectsLocationsApisDeploymentsArtifactsGetContentsCall struct {
  5588  	s            *Service
  5589  	name         string
  5590  	urlParams_   gensupport.URLParams
  5591  	ifNoneMatch_ string
  5592  	ctx_         context.Context
  5593  	header_      http.Header
  5594  }
  5595  
  5596  // GetContents: Returns the contents of a specified artifact. If artifacts are
  5597  // stored with GZip compression, the default behavior is to return the artifact
  5598  // uncompressed (the mime_type response field indicates the exact format
  5599  // returned).
  5600  //
  5601  //   - name: The name of the artifact whose contents should be retrieved. Format:
  5602  //     `{parent}/artifacts/*`.
  5603  func (r *ProjectsLocationsApisDeploymentsArtifactsService) GetContents(name string) *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall {
  5604  	c := &ProjectsLocationsApisDeploymentsArtifactsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5605  	c.name = name
  5606  	return c
  5607  }
  5608  
  5609  // Fields allows partial responses to be retrieved. See
  5610  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5611  // details.
  5612  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall {
  5613  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5614  	return c
  5615  }
  5616  
  5617  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5618  // object's ETag matches the given value. This is useful for getting updates
  5619  // only after the object has changed since the last request.
  5620  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall {
  5621  	c.ifNoneMatch_ = entityTag
  5622  	return c
  5623  }
  5624  
  5625  // Context sets the context to be used in this call's Do method.
  5626  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall {
  5627  	c.ctx_ = ctx
  5628  	return c
  5629  }
  5630  
  5631  // Header returns a http.Header that can be modified by the caller to add
  5632  // headers to the request.
  5633  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) Header() http.Header {
  5634  	if c.header_ == nil {
  5635  		c.header_ = make(http.Header)
  5636  	}
  5637  	return c.header_
  5638  }
  5639  
  5640  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) doRequest(alt string) (*http.Response, error) {
  5641  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5642  	if c.ifNoneMatch_ != "" {
  5643  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5644  	}
  5645  	var body io.Reader = nil
  5646  	c.urlParams_.Set("alt", alt)
  5647  	c.urlParams_.Set("prettyPrint", "false")
  5648  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
  5649  	urls += "?" + c.urlParams_.Encode()
  5650  	req, err := http.NewRequest("GET", urls, body)
  5651  	if err != nil {
  5652  		return nil, err
  5653  	}
  5654  	req.Header = reqHeaders
  5655  	googleapi.Expand(req.URL, map[string]string{
  5656  		"name": c.name,
  5657  	})
  5658  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5659  }
  5660  
  5661  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.getContents" call.
  5662  // Any non-2xx status code is an error. Response headers are in either
  5663  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
  5664  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5665  // whether the returned error was because http.StatusNotModified was returned.
  5666  func (c *ProjectsLocationsApisDeploymentsArtifactsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  5667  	gensupport.SetOptions(c.urlParams_, opts...)
  5668  	res, err := c.doRequest("json")
  5669  	if res != nil && res.StatusCode == http.StatusNotModified {
  5670  		if res.Body != nil {
  5671  			res.Body.Close()
  5672  		}
  5673  		return nil, gensupport.WrapError(&googleapi.Error{
  5674  			Code:   res.StatusCode,
  5675  			Header: res.Header,
  5676  		})
  5677  	}
  5678  	if err != nil {
  5679  		return nil, err
  5680  	}
  5681  	defer googleapi.CloseBody(res)
  5682  	if err := googleapi.CheckResponse(res); err != nil {
  5683  		return nil, gensupport.WrapError(err)
  5684  	}
  5685  	ret := &HttpBody{
  5686  		ServerResponse: googleapi.ServerResponse{
  5687  			Header:         res.Header,
  5688  			HTTPStatusCode: res.StatusCode,
  5689  		},
  5690  	}
  5691  	target := &ret
  5692  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5693  		return nil, err
  5694  	}
  5695  	return ret, nil
  5696  }
  5697  
  5698  type ProjectsLocationsApisDeploymentsArtifactsListCall struct {
  5699  	s            *Service
  5700  	parent       string
  5701  	urlParams_   gensupport.URLParams
  5702  	ifNoneMatch_ string
  5703  	ctx_         context.Context
  5704  	header_      http.Header
  5705  }
  5706  
  5707  // List: Returns matching artifacts.
  5708  //
  5709  //   - parent: The parent, which owns this collection of artifacts. Format:
  5710  //     `{parent}`.
  5711  func (r *ProjectsLocationsApisDeploymentsArtifactsService) List(parent string) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5712  	c := &ProjectsLocationsApisDeploymentsArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5713  	c.parent = parent
  5714  	return c
  5715  }
  5716  
  5717  // Filter sets the optional parameter "filter": An expression that can be used
  5718  // to filter the list. Filters use the Common Expression Language and can refer
  5719  // to all message fields except contents.
  5720  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Filter(filter string) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5721  	c.urlParams_.Set("filter", filter)
  5722  	return c
  5723  }
  5724  
  5725  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  5726  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  5727  // "desc" identifier, e.g. "foo desc,bar"
  5728  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5729  	c.urlParams_.Set("orderBy", orderBy)
  5730  	return c
  5731  }
  5732  
  5733  // PageSize sets the optional parameter "pageSize": The maximum number of
  5734  // artifacts to return. The service may return fewer than this value. If
  5735  // unspecified, at most 50 values will be returned. The maximum is 1000; values
  5736  // above 1000 will be coerced to 1000.
  5737  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5738  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5739  	return c
  5740  }
  5741  
  5742  // PageToken sets the optional parameter "pageToken": A page token, received
  5743  // from a previous `ListArtifacts` call. Provide this to retrieve the
  5744  // subsequent page. When paginating, all other parameters provided to
  5745  // `ListArtifacts` must match the call that provided the page token.
  5746  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5747  	c.urlParams_.Set("pageToken", pageToken)
  5748  	return c
  5749  }
  5750  
  5751  // Fields allows partial responses to be retrieved. See
  5752  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5753  // details.
  5754  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5755  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5756  	return c
  5757  }
  5758  
  5759  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5760  // object's ETag matches the given value. This is useful for getting updates
  5761  // only after the object has changed since the last request.
  5762  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5763  	c.ifNoneMatch_ = entityTag
  5764  	return c
  5765  }
  5766  
  5767  // Context sets the context to be used in this call's Do method.
  5768  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsListCall {
  5769  	c.ctx_ = ctx
  5770  	return c
  5771  }
  5772  
  5773  // Header returns a http.Header that can be modified by the caller to add
  5774  // headers to the request.
  5775  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Header() http.Header {
  5776  	if c.header_ == nil {
  5777  		c.header_ = make(http.Header)
  5778  	}
  5779  	return c.header_
  5780  }
  5781  
  5782  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) doRequest(alt string) (*http.Response, error) {
  5783  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5784  	if c.ifNoneMatch_ != "" {
  5785  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5786  	}
  5787  	var body io.Reader = nil
  5788  	c.urlParams_.Set("alt", alt)
  5789  	c.urlParams_.Set("prettyPrint", "false")
  5790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  5791  	urls += "?" + c.urlParams_.Encode()
  5792  	req, err := http.NewRequest("GET", urls, body)
  5793  	if err != nil {
  5794  		return nil, err
  5795  	}
  5796  	req.Header = reqHeaders
  5797  	googleapi.Expand(req.URL, map[string]string{
  5798  		"parent": c.parent,
  5799  	})
  5800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5801  }
  5802  
  5803  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.list" call.
  5804  // Any non-2xx status code is an error. Response headers are in either
  5805  // *ListArtifactsResponse.ServerResponse.Header or (if a response was returned
  5806  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5807  // check whether the returned error was because http.StatusNotModified was
  5808  // returned.
  5809  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListArtifactsResponse, error) {
  5810  	gensupport.SetOptions(c.urlParams_, opts...)
  5811  	res, err := c.doRequest("json")
  5812  	if res != nil && res.StatusCode == http.StatusNotModified {
  5813  		if res.Body != nil {
  5814  			res.Body.Close()
  5815  		}
  5816  		return nil, gensupport.WrapError(&googleapi.Error{
  5817  			Code:   res.StatusCode,
  5818  			Header: res.Header,
  5819  		})
  5820  	}
  5821  	if err != nil {
  5822  		return nil, err
  5823  	}
  5824  	defer googleapi.CloseBody(res)
  5825  	if err := googleapi.CheckResponse(res); err != nil {
  5826  		return nil, gensupport.WrapError(err)
  5827  	}
  5828  	ret := &ListArtifactsResponse{
  5829  		ServerResponse: googleapi.ServerResponse{
  5830  			Header:         res.Header,
  5831  			HTTPStatusCode: res.StatusCode,
  5832  		},
  5833  	}
  5834  	target := &ret
  5835  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5836  		return nil, err
  5837  	}
  5838  	return ret, nil
  5839  }
  5840  
  5841  // Pages invokes f for each page of results.
  5842  // A non-nil error returned from f will halt the iteration.
  5843  // The provided context supersedes any context provided to the Context method.
  5844  func (c *ProjectsLocationsApisDeploymentsArtifactsListCall) Pages(ctx context.Context, f func(*ListArtifactsResponse) error) error {
  5845  	c.ctx_ = ctx
  5846  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5847  	for {
  5848  		x, err := c.Do()
  5849  		if err != nil {
  5850  			return err
  5851  		}
  5852  		if err := f(x); err != nil {
  5853  			return err
  5854  		}
  5855  		if x.NextPageToken == "" {
  5856  			return nil
  5857  		}
  5858  		c.PageToken(x.NextPageToken)
  5859  	}
  5860  }
  5861  
  5862  type ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall struct {
  5863  	s          *Service
  5864  	name       string
  5865  	artifact   *Artifact
  5866  	urlParams_ gensupport.URLParams
  5867  	ctx_       context.Context
  5868  	header_    http.Header
  5869  }
  5870  
  5871  // ReplaceArtifact: Used to replace a specified artifact.
  5872  //
  5873  // - name: Resource name.
  5874  func (r *ProjectsLocationsApisDeploymentsArtifactsService) ReplaceArtifact(name string, artifact *Artifact) *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall {
  5875  	c := &ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5876  	c.name = name
  5877  	c.artifact = artifact
  5878  	return c
  5879  }
  5880  
  5881  // Fields allows partial responses to be retrieved. See
  5882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5883  // details.
  5884  func (c *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall {
  5885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5886  	return c
  5887  }
  5888  
  5889  // Context sets the context to be used in this call's Do method.
  5890  func (c *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall) Context(ctx context.Context) *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall {
  5891  	c.ctx_ = ctx
  5892  	return c
  5893  }
  5894  
  5895  // Header returns a http.Header that can be modified by the caller to add
  5896  // headers to the request.
  5897  func (c *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall) Header() http.Header {
  5898  	if c.header_ == nil {
  5899  		c.header_ = make(http.Header)
  5900  	}
  5901  	return c.header_
  5902  }
  5903  
  5904  func (c *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall) doRequest(alt string) (*http.Response, error) {
  5905  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5906  	var body io.Reader = nil
  5907  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  5908  	if err != nil {
  5909  		return nil, err
  5910  	}
  5911  	c.urlParams_.Set("alt", alt)
  5912  	c.urlParams_.Set("prettyPrint", "false")
  5913  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5914  	urls += "?" + c.urlParams_.Encode()
  5915  	req, err := http.NewRequest("PUT", urls, body)
  5916  	if err != nil {
  5917  		return nil, err
  5918  	}
  5919  	req.Header = reqHeaders
  5920  	googleapi.Expand(req.URL, map[string]string{
  5921  		"name": c.name,
  5922  	})
  5923  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5924  }
  5925  
  5926  // Do executes the "apigeeregistry.projects.locations.apis.deployments.artifacts.replaceArtifact" call.
  5927  // Any non-2xx status code is an error. Response headers are in either
  5928  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  5929  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5930  // whether the returned error was because http.StatusNotModified was returned.
  5931  func (c *ProjectsLocationsApisDeploymentsArtifactsReplaceArtifactCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  5932  	gensupport.SetOptions(c.urlParams_, opts...)
  5933  	res, err := c.doRequest("json")
  5934  	if res != nil && res.StatusCode == http.StatusNotModified {
  5935  		if res.Body != nil {
  5936  			res.Body.Close()
  5937  		}
  5938  		return nil, gensupport.WrapError(&googleapi.Error{
  5939  			Code:   res.StatusCode,
  5940  			Header: res.Header,
  5941  		})
  5942  	}
  5943  	if err != nil {
  5944  		return nil, err
  5945  	}
  5946  	defer googleapi.CloseBody(res)
  5947  	if err := googleapi.CheckResponse(res); err != nil {
  5948  		return nil, gensupport.WrapError(err)
  5949  	}
  5950  	ret := &Artifact{
  5951  		ServerResponse: googleapi.ServerResponse{
  5952  			Header:         res.Header,
  5953  			HTTPStatusCode: res.StatusCode,
  5954  		},
  5955  	}
  5956  	target := &ret
  5957  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5958  		return nil, err
  5959  	}
  5960  	return ret, nil
  5961  }
  5962  
  5963  type ProjectsLocationsApisVersionsCreateCall struct {
  5964  	s          *Service
  5965  	parent     string
  5966  	apiversion *ApiVersion
  5967  	urlParams_ gensupport.URLParams
  5968  	ctx_       context.Context
  5969  	header_    http.Header
  5970  }
  5971  
  5972  // Create: Creates a specified version.
  5973  //
  5974  //   - parent: The parent, which owns this collection of versions. Format:
  5975  //     `projects/*/locations/*/apis/*`.
  5976  func (r *ProjectsLocationsApisVersionsService) Create(parent string, apiversion *ApiVersion) *ProjectsLocationsApisVersionsCreateCall {
  5977  	c := &ProjectsLocationsApisVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5978  	c.parent = parent
  5979  	c.apiversion = apiversion
  5980  	return c
  5981  }
  5982  
  5983  // ApiVersionId sets the optional parameter "apiVersionId": Required. The ID to
  5984  // use for the version, which will become the final component of the version's
  5985  // resource name. This value should be 1-63 characters, and valid characters
  5986  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
  5987  func (c *ProjectsLocationsApisVersionsCreateCall) ApiVersionId(apiVersionId string) *ProjectsLocationsApisVersionsCreateCall {
  5988  	c.urlParams_.Set("apiVersionId", apiVersionId)
  5989  	return c
  5990  }
  5991  
  5992  // Fields allows partial responses to be retrieved. See
  5993  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5994  // details.
  5995  func (c *ProjectsLocationsApisVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsCreateCall {
  5996  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5997  	return c
  5998  }
  5999  
  6000  // Context sets the context to be used in this call's Do method.
  6001  func (c *ProjectsLocationsApisVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsCreateCall {
  6002  	c.ctx_ = ctx
  6003  	return c
  6004  }
  6005  
  6006  // Header returns a http.Header that can be modified by the caller to add
  6007  // headers to the request.
  6008  func (c *ProjectsLocationsApisVersionsCreateCall) Header() http.Header {
  6009  	if c.header_ == nil {
  6010  		c.header_ = make(http.Header)
  6011  	}
  6012  	return c.header_
  6013  }
  6014  
  6015  func (c *ProjectsLocationsApisVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
  6016  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6017  	var body io.Reader = nil
  6018  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apiversion)
  6019  	if err != nil {
  6020  		return nil, err
  6021  	}
  6022  	c.urlParams_.Set("alt", alt)
  6023  	c.urlParams_.Set("prettyPrint", "false")
  6024  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
  6025  	urls += "?" + c.urlParams_.Encode()
  6026  	req, err := http.NewRequest("POST", urls, body)
  6027  	if err != nil {
  6028  		return nil, err
  6029  	}
  6030  	req.Header = reqHeaders
  6031  	googleapi.Expand(req.URL, map[string]string{
  6032  		"parent": c.parent,
  6033  	})
  6034  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6035  }
  6036  
  6037  // Do executes the "apigeeregistry.projects.locations.apis.versions.create" call.
  6038  // Any non-2xx status code is an error. Response headers are in either
  6039  // *ApiVersion.ServerResponse.Header or (if a response was returned at all) in
  6040  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6041  // whether the returned error was because http.StatusNotModified was returned.
  6042  func (c *ProjectsLocationsApisVersionsCreateCall) Do(opts ...googleapi.CallOption) (*ApiVersion, error) {
  6043  	gensupport.SetOptions(c.urlParams_, opts...)
  6044  	res, err := c.doRequest("json")
  6045  	if res != nil && res.StatusCode == http.StatusNotModified {
  6046  		if res.Body != nil {
  6047  			res.Body.Close()
  6048  		}
  6049  		return nil, gensupport.WrapError(&googleapi.Error{
  6050  			Code:   res.StatusCode,
  6051  			Header: res.Header,
  6052  		})
  6053  	}
  6054  	if err != nil {
  6055  		return nil, err
  6056  	}
  6057  	defer googleapi.CloseBody(res)
  6058  	if err := googleapi.CheckResponse(res); err != nil {
  6059  		return nil, gensupport.WrapError(err)
  6060  	}
  6061  	ret := &ApiVersion{
  6062  		ServerResponse: googleapi.ServerResponse{
  6063  			Header:         res.Header,
  6064  			HTTPStatusCode: res.StatusCode,
  6065  		},
  6066  	}
  6067  	target := &ret
  6068  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6069  		return nil, err
  6070  	}
  6071  	return ret, nil
  6072  }
  6073  
  6074  type ProjectsLocationsApisVersionsDeleteCall struct {
  6075  	s          *Service
  6076  	name       string
  6077  	urlParams_ gensupport.URLParams
  6078  	ctx_       context.Context
  6079  	header_    http.Header
  6080  }
  6081  
  6082  // Delete: Removes a specified version and all of the resources that it owns.
  6083  //
  6084  //   - name: The name of the version to delete. Format:
  6085  //     `projects/*/locations/*/apis/*/versions/*`.
  6086  func (r *ProjectsLocationsApisVersionsService) Delete(name string) *ProjectsLocationsApisVersionsDeleteCall {
  6087  	c := &ProjectsLocationsApisVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6088  	c.name = name
  6089  	return c
  6090  }
  6091  
  6092  // Force sets the optional parameter "force": If set to true, any child
  6093  // resources will also be deleted. (Otherwise, the request will only work if
  6094  // there are no child resources.)
  6095  func (c *ProjectsLocationsApisVersionsDeleteCall) Force(force bool) *ProjectsLocationsApisVersionsDeleteCall {
  6096  	c.urlParams_.Set("force", fmt.Sprint(force))
  6097  	return c
  6098  }
  6099  
  6100  // Fields allows partial responses to be retrieved. See
  6101  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6102  // details.
  6103  func (c *ProjectsLocationsApisVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsDeleteCall {
  6104  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6105  	return c
  6106  }
  6107  
  6108  // Context sets the context to be used in this call's Do method.
  6109  func (c *ProjectsLocationsApisVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsDeleteCall {
  6110  	c.ctx_ = ctx
  6111  	return c
  6112  }
  6113  
  6114  // Header returns a http.Header that can be modified by the caller to add
  6115  // headers to the request.
  6116  func (c *ProjectsLocationsApisVersionsDeleteCall) Header() http.Header {
  6117  	if c.header_ == nil {
  6118  		c.header_ = make(http.Header)
  6119  	}
  6120  	return c.header_
  6121  }
  6122  
  6123  func (c *ProjectsLocationsApisVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6124  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6125  	var body io.Reader = nil
  6126  	c.urlParams_.Set("alt", alt)
  6127  	c.urlParams_.Set("prettyPrint", "false")
  6128  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6129  	urls += "?" + c.urlParams_.Encode()
  6130  	req, err := http.NewRequest("DELETE", urls, body)
  6131  	if err != nil {
  6132  		return nil, err
  6133  	}
  6134  	req.Header = reqHeaders
  6135  	googleapi.Expand(req.URL, map[string]string{
  6136  		"name": c.name,
  6137  	})
  6138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6139  }
  6140  
  6141  // Do executes the "apigeeregistry.projects.locations.apis.versions.delete" call.
  6142  // Any non-2xx status code is an error. Response headers are in either
  6143  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6144  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6145  // whether the returned error was because http.StatusNotModified was returned.
  6146  func (c *ProjectsLocationsApisVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6147  	gensupport.SetOptions(c.urlParams_, opts...)
  6148  	res, err := c.doRequest("json")
  6149  	if res != nil && res.StatusCode == http.StatusNotModified {
  6150  		if res.Body != nil {
  6151  			res.Body.Close()
  6152  		}
  6153  		return nil, gensupport.WrapError(&googleapi.Error{
  6154  			Code:   res.StatusCode,
  6155  			Header: res.Header,
  6156  		})
  6157  	}
  6158  	if err != nil {
  6159  		return nil, err
  6160  	}
  6161  	defer googleapi.CloseBody(res)
  6162  	if err := googleapi.CheckResponse(res); err != nil {
  6163  		return nil, gensupport.WrapError(err)
  6164  	}
  6165  	ret := &Empty{
  6166  		ServerResponse: googleapi.ServerResponse{
  6167  			Header:         res.Header,
  6168  			HTTPStatusCode: res.StatusCode,
  6169  		},
  6170  	}
  6171  	target := &ret
  6172  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6173  		return nil, err
  6174  	}
  6175  	return ret, nil
  6176  }
  6177  
  6178  type ProjectsLocationsApisVersionsGetCall struct {
  6179  	s            *Service
  6180  	name         string
  6181  	urlParams_   gensupport.URLParams
  6182  	ifNoneMatch_ string
  6183  	ctx_         context.Context
  6184  	header_      http.Header
  6185  }
  6186  
  6187  // Get: Returns a specified version.
  6188  //
  6189  //   - name: The name of the version to retrieve. Format:
  6190  //     `projects/*/locations/*/apis/*/versions/*`.
  6191  func (r *ProjectsLocationsApisVersionsService) Get(name string) *ProjectsLocationsApisVersionsGetCall {
  6192  	c := &ProjectsLocationsApisVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6193  	c.name = name
  6194  	return c
  6195  }
  6196  
  6197  // Fields allows partial responses to be retrieved. See
  6198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6199  // details.
  6200  func (c *ProjectsLocationsApisVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsGetCall {
  6201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6202  	return c
  6203  }
  6204  
  6205  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6206  // object's ETag matches the given value. This is useful for getting updates
  6207  // only after the object has changed since the last request.
  6208  func (c *ProjectsLocationsApisVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsGetCall {
  6209  	c.ifNoneMatch_ = entityTag
  6210  	return c
  6211  }
  6212  
  6213  // Context sets the context to be used in this call's Do method.
  6214  func (c *ProjectsLocationsApisVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsGetCall {
  6215  	c.ctx_ = ctx
  6216  	return c
  6217  }
  6218  
  6219  // Header returns a http.Header that can be modified by the caller to add
  6220  // headers to the request.
  6221  func (c *ProjectsLocationsApisVersionsGetCall) Header() http.Header {
  6222  	if c.header_ == nil {
  6223  		c.header_ = make(http.Header)
  6224  	}
  6225  	return c.header_
  6226  }
  6227  
  6228  func (c *ProjectsLocationsApisVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  6229  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6230  	if c.ifNoneMatch_ != "" {
  6231  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6232  	}
  6233  	var body io.Reader = nil
  6234  	c.urlParams_.Set("alt", alt)
  6235  	c.urlParams_.Set("prettyPrint", "false")
  6236  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6237  	urls += "?" + c.urlParams_.Encode()
  6238  	req, err := http.NewRequest("GET", urls, body)
  6239  	if err != nil {
  6240  		return nil, err
  6241  	}
  6242  	req.Header = reqHeaders
  6243  	googleapi.Expand(req.URL, map[string]string{
  6244  		"name": c.name,
  6245  	})
  6246  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6247  }
  6248  
  6249  // Do executes the "apigeeregistry.projects.locations.apis.versions.get" call.
  6250  // Any non-2xx status code is an error. Response headers are in either
  6251  // *ApiVersion.ServerResponse.Header or (if a response was returned at all) in
  6252  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6253  // whether the returned error was because http.StatusNotModified was returned.
  6254  func (c *ProjectsLocationsApisVersionsGetCall) Do(opts ...googleapi.CallOption) (*ApiVersion, error) {
  6255  	gensupport.SetOptions(c.urlParams_, opts...)
  6256  	res, err := c.doRequest("json")
  6257  	if res != nil && res.StatusCode == http.StatusNotModified {
  6258  		if res.Body != nil {
  6259  			res.Body.Close()
  6260  		}
  6261  		return nil, gensupport.WrapError(&googleapi.Error{
  6262  			Code:   res.StatusCode,
  6263  			Header: res.Header,
  6264  		})
  6265  	}
  6266  	if err != nil {
  6267  		return nil, err
  6268  	}
  6269  	defer googleapi.CloseBody(res)
  6270  	if err := googleapi.CheckResponse(res); err != nil {
  6271  		return nil, gensupport.WrapError(err)
  6272  	}
  6273  	ret := &ApiVersion{
  6274  		ServerResponse: googleapi.ServerResponse{
  6275  			Header:         res.Header,
  6276  			HTTPStatusCode: res.StatusCode,
  6277  		},
  6278  	}
  6279  	target := &ret
  6280  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6281  		return nil, err
  6282  	}
  6283  	return ret, nil
  6284  }
  6285  
  6286  type ProjectsLocationsApisVersionsGetIamPolicyCall struct {
  6287  	s            *Service
  6288  	resource     string
  6289  	urlParams_   gensupport.URLParams
  6290  	ifNoneMatch_ string
  6291  	ctx_         context.Context
  6292  	header_      http.Header
  6293  }
  6294  
  6295  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  6296  // empty policy if the resource exists and does not have a policy set.
  6297  //
  6298  //   - resource: REQUIRED: The resource for which the policy is being requested.
  6299  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6300  //     for the appropriate value for this field.
  6301  func (r *ProjectsLocationsApisVersionsService) GetIamPolicy(resource string) *ProjectsLocationsApisVersionsGetIamPolicyCall {
  6302  	c := &ProjectsLocationsApisVersionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6303  	c.resource = resource
  6304  	return c
  6305  }
  6306  
  6307  // OptionsRequestedPolicyVersion sets the optional parameter
  6308  // "options.requestedPolicyVersion": The maximum policy version that will be
  6309  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  6310  // an invalid value will be rejected. Requests for policies with any
  6311  // conditional role bindings must specify version 3. Policies with no
  6312  // conditional role bindings may specify any valid value or leave the field
  6313  // unset. The policy in the response might use the policy version that you
  6314  // specified, or it might use a lower policy version. For example, if you
  6315  // specify version 3, but the policy has no conditional role bindings, the
  6316  // response uses version 1. To learn which resources support conditions in
  6317  // their IAM policies, see the IAM documentation
  6318  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  6319  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisVersionsGetIamPolicyCall {
  6320  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  6321  	return c
  6322  }
  6323  
  6324  // Fields allows partial responses to be retrieved. See
  6325  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6326  // details.
  6327  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsGetIamPolicyCall {
  6328  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6329  	return c
  6330  }
  6331  
  6332  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6333  // object's ETag matches the given value. This is useful for getting updates
  6334  // only after the object has changed since the last request.
  6335  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsGetIamPolicyCall {
  6336  	c.ifNoneMatch_ = entityTag
  6337  	return c
  6338  }
  6339  
  6340  // Context sets the context to be used in this call's Do method.
  6341  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsGetIamPolicyCall {
  6342  	c.ctx_ = ctx
  6343  	return c
  6344  }
  6345  
  6346  // Header returns a http.Header that can be modified by the caller to add
  6347  // headers to the request.
  6348  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) Header() http.Header {
  6349  	if c.header_ == nil {
  6350  		c.header_ = make(http.Header)
  6351  	}
  6352  	return c.header_
  6353  }
  6354  
  6355  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6356  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6357  	if c.ifNoneMatch_ != "" {
  6358  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6359  	}
  6360  	var body io.Reader = nil
  6361  	c.urlParams_.Set("alt", alt)
  6362  	c.urlParams_.Set("prettyPrint", "false")
  6363  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6364  	urls += "?" + c.urlParams_.Encode()
  6365  	req, err := http.NewRequest("GET", urls, body)
  6366  	if err != nil {
  6367  		return nil, err
  6368  	}
  6369  	req.Header = reqHeaders
  6370  	googleapi.Expand(req.URL, map[string]string{
  6371  		"resource": c.resource,
  6372  	})
  6373  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6374  }
  6375  
  6376  // Do executes the "apigeeregistry.projects.locations.apis.versions.getIamPolicy" call.
  6377  // Any non-2xx status code is an error. Response headers are in either
  6378  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6379  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6380  // whether the returned error was because http.StatusNotModified was returned.
  6381  func (c *ProjectsLocationsApisVersionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6382  	gensupport.SetOptions(c.urlParams_, opts...)
  6383  	res, err := c.doRequest("json")
  6384  	if res != nil && res.StatusCode == http.StatusNotModified {
  6385  		if res.Body != nil {
  6386  			res.Body.Close()
  6387  		}
  6388  		return nil, gensupport.WrapError(&googleapi.Error{
  6389  			Code:   res.StatusCode,
  6390  			Header: res.Header,
  6391  		})
  6392  	}
  6393  	if err != nil {
  6394  		return nil, err
  6395  	}
  6396  	defer googleapi.CloseBody(res)
  6397  	if err := googleapi.CheckResponse(res); err != nil {
  6398  		return nil, gensupport.WrapError(err)
  6399  	}
  6400  	ret := &Policy{
  6401  		ServerResponse: googleapi.ServerResponse{
  6402  			Header:         res.Header,
  6403  			HTTPStatusCode: res.StatusCode,
  6404  		},
  6405  	}
  6406  	target := &ret
  6407  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6408  		return nil, err
  6409  	}
  6410  	return ret, nil
  6411  }
  6412  
  6413  type ProjectsLocationsApisVersionsListCall struct {
  6414  	s            *Service
  6415  	parent       string
  6416  	urlParams_   gensupport.URLParams
  6417  	ifNoneMatch_ string
  6418  	ctx_         context.Context
  6419  	header_      http.Header
  6420  }
  6421  
  6422  // List: Returns matching versions.
  6423  //
  6424  //   - parent: The parent, which owns this collection of versions. Format:
  6425  //     `projects/*/locations/*/apis/*`.
  6426  func (r *ProjectsLocationsApisVersionsService) List(parent string) *ProjectsLocationsApisVersionsListCall {
  6427  	c := &ProjectsLocationsApisVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6428  	c.parent = parent
  6429  	return c
  6430  }
  6431  
  6432  // Filter sets the optional parameter "filter": An expression that can be used
  6433  // to filter the list. Filters use the Common Expression Language and can refer
  6434  // to all message fields.
  6435  func (c *ProjectsLocationsApisVersionsListCall) Filter(filter string) *ProjectsLocationsApisVersionsListCall {
  6436  	c.urlParams_.Set("filter", filter)
  6437  	return c
  6438  }
  6439  
  6440  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  6441  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  6442  // "desc" identifier, e.g. "foo desc,bar"
  6443  func (c *ProjectsLocationsApisVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsApisVersionsListCall {
  6444  	c.urlParams_.Set("orderBy", orderBy)
  6445  	return c
  6446  }
  6447  
  6448  // PageSize sets the optional parameter "pageSize": The maximum number of
  6449  // versions to return. The service may return fewer than this value. If
  6450  // unspecified, at most 50 values will be returned. The maximum is 1000; values
  6451  // above 1000 will be coerced to 1000.
  6452  func (c *ProjectsLocationsApisVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsListCall {
  6453  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6454  	return c
  6455  }
  6456  
  6457  // PageToken sets the optional parameter "pageToken": A page token, received
  6458  // from a previous `ListApiVersions` call. Provide this to retrieve the
  6459  // subsequent page. When paginating, all other parameters provided to
  6460  // `ListApiVersions` must match the call that provided the page token.
  6461  func (c *ProjectsLocationsApisVersionsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsListCall {
  6462  	c.urlParams_.Set("pageToken", pageToken)
  6463  	return c
  6464  }
  6465  
  6466  // Fields allows partial responses to be retrieved. See
  6467  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6468  // details.
  6469  func (c *ProjectsLocationsApisVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsListCall {
  6470  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6471  	return c
  6472  }
  6473  
  6474  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6475  // object's ETag matches the given value. This is useful for getting updates
  6476  // only after the object has changed since the last request.
  6477  func (c *ProjectsLocationsApisVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsListCall {
  6478  	c.ifNoneMatch_ = entityTag
  6479  	return c
  6480  }
  6481  
  6482  // Context sets the context to be used in this call's Do method.
  6483  func (c *ProjectsLocationsApisVersionsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsListCall {
  6484  	c.ctx_ = ctx
  6485  	return c
  6486  }
  6487  
  6488  // Header returns a http.Header that can be modified by the caller to add
  6489  // headers to the request.
  6490  func (c *ProjectsLocationsApisVersionsListCall) Header() http.Header {
  6491  	if c.header_ == nil {
  6492  		c.header_ = make(http.Header)
  6493  	}
  6494  	return c.header_
  6495  }
  6496  
  6497  func (c *ProjectsLocationsApisVersionsListCall) doRequest(alt string) (*http.Response, error) {
  6498  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6499  	if c.ifNoneMatch_ != "" {
  6500  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6501  	}
  6502  	var body io.Reader = nil
  6503  	c.urlParams_.Set("alt", alt)
  6504  	c.urlParams_.Set("prettyPrint", "false")
  6505  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
  6506  	urls += "?" + c.urlParams_.Encode()
  6507  	req, err := http.NewRequest("GET", urls, body)
  6508  	if err != nil {
  6509  		return nil, err
  6510  	}
  6511  	req.Header = reqHeaders
  6512  	googleapi.Expand(req.URL, map[string]string{
  6513  		"parent": c.parent,
  6514  	})
  6515  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6516  }
  6517  
  6518  // Do executes the "apigeeregistry.projects.locations.apis.versions.list" call.
  6519  // Any non-2xx status code is an error. Response headers are in either
  6520  // *ListApiVersionsResponse.ServerResponse.Header or (if a response was
  6521  // returned at all) in error.(*googleapi.Error).Header. Use
  6522  // googleapi.IsNotModified to check whether the returned error was because
  6523  // http.StatusNotModified was returned.
  6524  func (c *ProjectsLocationsApisVersionsListCall) Do(opts ...googleapi.CallOption) (*ListApiVersionsResponse, error) {
  6525  	gensupport.SetOptions(c.urlParams_, opts...)
  6526  	res, err := c.doRequest("json")
  6527  	if res != nil && res.StatusCode == http.StatusNotModified {
  6528  		if res.Body != nil {
  6529  			res.Body.Close()
  6530  		}
  6531  		return nil, gensupport.WrapError(&googleapi.Error{
  6532  			Code:   res.StatusCode,
  6533  			Header: res.Header,
  6534  		})
  6535  	}
  6536  	if err != nil {
  6537  		return nil, err
  6538  	}
  6539  	defer googleapi.CloseBody(res)
  6540  	if err := googleapi.CheckResponse(res); err != nil {
  6541  		return nil, gensupport.WrapError(err)
  6542  	}
  6543  	ret := &ListApiVersionsResponse{
  6544  		ServerResponse: googleapi.ServerResponse{
  6545  			Header:         res.Header,
  6546  			HTTPStatusCode: res.StatusCode,
  6547  		},
  6548  	}
  6549  	target := &ret
  6550  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6551  		return nil, err
  6552  	}
  6553  	return ret, nil
  6554  }
  6555  
  6556  // Pages invokes f for each page of results.
  6557  // A non-nil error returned from f will halt the iteration.
  6558  // The provided context supersedes any context provided to the Context method.
  6559  func (c *ProjectsLocationsApisVersionsListCall) Pages(ctx context.Context, f func(*ListApiVersionsResponse) error) error {
  6560  	c.ctx_ = ctx
  6561  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6562  	for {
  6563  		x, err := c.Do()
  6564  		if err != nil {
  6565  			return err
  6566  		}
  6567  		if err := f(x); err != nil {
  6568  			return err
  6569  		}
  6570  		if x.NextPageToken == "" {
  6571  			return nil
  6572  		}
  6573  		c.PageToken(x.NextPageToken)
  6574  	}
  6575  }
  6576  
  6577  type ProjectsLocationsApisVersionsPatchCall struct {
  6578  	s          *Service
  6579  	name       string
  6580  	apiversion *ApiVersion
  6581  	urlParams_ gensupport.URLParams
  6582  	ctx_       context.Context
  6583  	header_    http.Header
  6584  }
  6585  
  6586  // Patch: Used to modify a specified version.
  6587  //
  6588  // - name: Resource name.
  6589  func (r *ProjectsLocationsApisVersionsService) Patch(name string, apiversion *ApiVersion) *ProjectsLocationsApisVersionsPatchCall {
  6590  	c := &ProjectsLocationsApisVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6591  	c.name = name
  6592  	c.apiversion = apiversion
  6593  	return c
  6594  }
  6595  
  6596  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
  6597  // the version is not found, a new version will be created. In this situation,
  6598  // `update_mask` is ignored.
  6599  func (c *ProjectsLocationsApisVersionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsApisVersionsPatchCall {
  6600  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  6601  	return c
  6602  }
  6603  
  6604  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  6605  // be updated. If omitted, all fields are updated that are set in the request
  6606  // message (fields set to default values are ignored). If an asterisk "*" is
  6607  // specified, all fields are updated, including fields that are
  6608  // unspecified/default in the request.
  6609  func (c *ProjectsLocationsApisVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisVersionsPatchCall {
  6610  	c.urlParams_.Set("updateMask", updateMask)
  6611  	return c
  6612  }
  6613  
  6614  // Fields allows partial responses to be retrieved. See
  6615  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6616  // details.
  6617  func (c *ProjectsLocationsApisVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsPatchCall {
  6618  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6619  	return c
  6620  }
  6621  
  6622  // Context sets the context to be used in this call's Do method.
  6623  func (c *ProjectsLocationsApisVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsPatchCall {
  6624  	c.ctx_ = ctx
  6625  	return c
  6626  }
  6627  
  6628  // Header returns a http.Header that can be modified by the caller to add
  6629  // headers to the request.
  6630  func (c *ProjectsLocationsApisVersionsPatchCall) Header() http.Header {
  6631  	if c.header_ == nil {
  6632  		c.header_ = make(http.Header)
  6633  	}
  6634  	return c.header_
  6635  }
  6636  
  6637  func (c *ProjectsLocationsApisVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
  6638  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6639  	var body io.Reader = nil
  6640  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apiversion)
  6641  	if err != nil {
  6642  		return nil, err
  6643  	}
  6644  	c.urlParams_.Set("alt", alt)
  6645  	c.urlParams_.Set("prettyPrint", "false")
  6646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6647  	urls += "?" + c.urlParams_.Encode()
  6648  	req, err := http.NewRequest("PATCH", urls, body)
  6649  	if err != nil {
  6650  		return nil, err
  6651  	}
  6652  	req.Header = reqHeaders
  6653  	googleapi.Expand(req.URL, map[string]string{
  6654  		"name": c.name,
  6655  	})
  6656  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6657  }
  6658  
  6659  // Do executes the "apigeeregistry.projects.locations.apis.versions.patch" call.
  6660  // Any non-2xx status code is an error. Response headers are in either
  6661  // *ApiVersion.ServerResponse.Header or (if a response was returned at all) in
  6662  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6663  // whether the returned error was because http.StatusNotModified was returned.
  6664  func (c *ProjectsLocationsApisVersionsPatchCall) Do(opts ...googleapi.CallOption) (*ApiVersion, error) {
  6665  	gensupport.SetOptions(c.urlParams_, opts...)
  6666  	res, err := c.doRequest("json")
  6667  	if res != nil && res.StatusCode == http.StatusNotModified {
  6668  		if res.Body != nil {
  6669  			res.Body.Close()
  6670  		}
  6671  		return nil, gensupport.WrapError(&googleapi.Error{
  6672  			Code:   res.StatusCode,
  6673  			Header: res.Header,
  6674  		})
  6675  	}
  6676  	if err != nil {
  6677  		return nil, err
  6678  	}
  6679  	defer googleapi.CloseBody(res)
  6680  	if err := googleapi.CheckResponse(res); err != nil {
  6681  		return nil, gensupport.WrapError(err)
  6682  	}
  6683  	ret := &ApiVersion{
  6684  		ServerResponse: googleapi.ServerResponse{
  6685  			Header:         res.Header,
  6686  			HTTPStatusCode: res.StatusCode,
  6687  		},
  6688  	}
  6689  	target := &ret
  6690  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6691  		return nil, err
  6692  	}
  6693  	return ret, nil
  6694  }
  6695  
  6696  type ProjectsLocationsApisVersionsSetIamPolicyCall struct {
  6697  	s                   *Service
  6698  	resource            string
  6699  	setiampolicyrequest *SetIamPolicyRequest
  6700  	urlParams_          gensupport.URLParams
  6701  	ctx_                context.Context
  6702  	header_             http.Header
  6703  }
  6704  
  6705  // SetIamPolicy: Sets the access control policy on the specified resource.
  6706  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  6707  // and `PERMISSION_DENIED` errors.
  6708  //
  6709  //   - resource: REQUIRED: The resource for which the policy is being specified.
  6710  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6711  //     for the appropriate value for this field.
  6712  func (r *ProjectsLocationsApisVersionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisVersionsSetIamPolicyCall {
  6713  	c := &ProjectsLocationsApisVersionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6714  	c.resource = resource
  6715  	c.setiampolicyrequest = setiampolicyrequest
  6716  	return c
  6717  }
  6718  
  6719  // Fields allows partial responses to be retrieved. See
  6720  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6721  // details.
  6722  func (c *ProjectsLocationsApisVersionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSetIamPolicyCall {
  6723  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6724  	return c
  6725  }
  6726  
  6727  // Context sets the context to be used in this call's Do method.
  6728  func (c *ProjectsLocationsApisVersionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSetIamPolicyCall {
  6729  	c.ctx_ = ctx
  6730  	return c
  6731  }
  6732  
  6733  // Header returns a http.Header that can be modified by the caller to add
  6734  // headers to the request.
  6735  func (c *ProjectsLocationsApisVersionsSetIamPolicyCall) Header() http.Header {
  6736  	if c.header_ == nil {
  6737  		c.header_ = make(http.Header)
  6738  	}
  6739  	return c.header_
  6740  }
  6741  
  6742  func (c *ProjectsLocationsApisVersionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6743  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6744  	var body io.Reader = nil
  6745  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6746  	if err != nil {
  6747  		return nil, err
  6748  	}
  6749  	c.urlParams_.Set("alt", alt)
  6750  	c.urlParams_.Set("prettyPrint", "false")
  6751  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  6752  	urls += "?" + c.urlParams_.Encode()
  6753  	req, err := http.NewRequest("POST", urls, body)
  6754  	if err != nil {
  6755  		return nil, err
  6756  	}
  6757  	req.Header = reqHeaders
  6758  	googleapi.Expand(req.URL, map[string]string{
  6759  		"resource": c.resource,
  6760  	})
  6761  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6762  }
  6763  
  6764  // Do executes the "apigeeregistry.projects.locations.apis.versions.setIamPolicy" call.
  6765  // Any non-2xx status code is an error. Response headers are in either
  6766  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6767  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6768  // whether the returned error was because http.StatusNotModified was returned.
  6769  func (c *ProjectsLocationsApisVersionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6770  	gensupport.SetOptions(c.urlParams_, opts...)
  6771  	res, err := c.doRequest("json")
  6772  	if res != nil && res.StatusCode == http.StatusNotModified {
  6773  		if res.Body != nil {
  6774  			res.Body.Close()
  6775  		}
  6776  		return nil, gensupport.WrapError(&googleapi.Error{
  6777  			Code:   res.StatusCode,
  6778  			Header: res.Header,
  6779  		})
  6780  	}
  6781  	if err != nil {
  6782  		return nil, err
  6783  	}
  6784  	defer googleapi.CloseBody(res)
  6785  	if err := googleapi.CheckResponse(res); err != nil {
  6786  		return nil, gensupport.WrapError(err)
  6787  	}
  6788  	ret := &Policy{
  6789  		ServerResponse: googleapi.ServerResponse{
  6790  			Header:         res.Header,
  6791  			HTTPStatusCode: res.StatusCode,
  6792  		},
  6793  	}
  6794  	target := &ret
  6795  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6796  		return nil, err
  6797  	}
  6798  	return ret, nil
  6799  }
  6800  
  6801  type ProjectsLocationsApisVersionsTestIamPermissionsCall struct {
  6802  	s                         *Service
  6803  	resource                  string
  6804  	testiampermissionsrequest *TestIamPermissionsRequest
  6805  	urlParams_                gensupport.URLParams
  6806  	ctx_                      context.Context
  6807  	header_                   http.Header
  6808  }
  6809  
  6810  // TestIamPermissions: Returns permissions that a caller has on the specified
  6811  // resource. If the resource does not exist, this will return an empty set of
  6812  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  6813  // used for building permission-aware UIs and command-line tools, not for
  6814  // authorization checking. This operation may "fail open" without warning.
  6815  //
  6816  //   - resource: REQUIRED: The resource for which the policy detail is being
  6817  //     requested. See Resource names
  6818  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  6819  //     value for this field.
  6820  func (r *ProjectsLocationsApisVersionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisVersionsTestIamPermissionsCall {
  6821  	c := &ProjectsLocationsApisVersionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6822  	c.resource = resource
  6823  	c.testiampermissionsrequest = testiampermissionsrequest
  6824  	return c
  6825  }
  6826  
  6827  // Fields allows partial responses to be retrieved. See
  6828  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6829  // details.
  6830  func (c *ProjectsLocationsApisVersionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsTestIamPermissionsCall {
  6831  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6832  	return c
  6833  }
  6834  
  6835  // Context sets the context to be used in this call's Do method.
  6836  func (c *ProjectsLocationsApisVersionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsTestIamPermissionsCall {
  6837  	c.ctx_ = ctx
  6838  	return c
  6839  }
  6840  
  6841  // Header returns a http.Header that can be modified by the caller to add
  6842  // headers to the request.
  6843  func (c *ProjectsLocationsApisVersionsTestIamPermissionsCall) Header() http.Header {
  6844  	if c.header_ == nil {
  6845  		c.header_ = make(http.Header)
  6846  	}
  6847  	return c.header_
  6848  }
  6849  
  6850  func (c *ProjectsLocationsApisVersionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6851  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6852  	var body io.Reader = nil
  6853  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6854  	if err != nil {
  6855  		return nil, err
  6856  	}
  6857  	c.urlParams_.Set("alt", alt)
  6858  	c.urlParams_.Set("prettyPrint", "false")
  6859  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  6860  	urls += "?" + c.urlParams_.Encode()
  6861  	req, err := http.NewRequest("POST", urls, body)
  6862  	if err != nil {
  6863  		return nil, err
  6864  	}
  6865  	req.Header = reqHeaders
  6866  	googleapi.Expand(req.URL, map[string]string{
  6867  		"resource": c.resource,
  6868  	})
  6869  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6870  }
  6871  
  6872  // Do executes the "apigeeregistry.projects.locations.apis.versions.testIamPermissions" call.
  6873  // Any non-2xx status code is an error. Response headers are in either
  6874  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  6875  // returned at all) in error.(*googleapi.Error).Header. Use
  6876  // googleapi.IsNotModified to check whether the returned error was because
  6877  // http.StatusNotModified was returned.
  6878  func (c *ProjectsLocationsApisVersionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6879  	gensupport.SetOptions(c.urlParams_, opts...)
  6880  	res, err := c.doRequest("json")
  6881  	if res != nil && res.StatusCode == http.StatusNotModified {
  6882  		if res.Body != nil {
  6883  			res.Body.Close()
  6884  		}
  6885  		return nil, gensupport.WrapError(&googleapi.Error{
  6886  			Code:   res.StatusCode,
  6887  			Header: res.Header,
  6888  		})
  6889  	}
  6890  	if err != nil {
  6891  		return nil, err
  6892  	}
  6893  	defer googleapi.CloseBody(res)
  6894  	if err := googleapi.CheckResponse(res); err != nil {
  6895  		return nil, gensupport.WrapError(err)
  6896  	}
  6897  	ret := &TestIamPermissionsResponse{
  6898  		ServerResponse: googleapi.ServerResponse{
  6899  			Header:         res.Header,
  6900  			HTTPStatusCode: res.StatusCode,
  6901  		},
  6902  	}
  6903  	target := &ret
  6904  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6905  		return nil, err
  6906  	}
  6907  	return ret, nil
  6908  }
  6909  
  6910  type ProjectsLocationsApisVersionsArtifactsCreateCall struct {
  6911  	s          *Service
  6912  	parent     string
  6913  	artifact   *Artifact
  6914  	urlParams_ gensupport.URLParams
  6915  	ctx_       context.Context
  6916  	header_    http.Header
  6917  }
  6918  
  6919  // Create: Creates a specified artifact.
  6920  //
  6921  //   - parent: The parent, which owns this collection of artifacts. Format:
  6922  //     `{parent}`.
  6923  func (r *ProjectsLocationsApisVersionsArtifactsService) Create(parent string, artifact *Artifact) *ProjectsLocationsApisVersionsArtifactsCreateCall {
  6924  	c := &ProjectsLocationsApisVersionsArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6925  	c.parent = parent
  6926  	c.artifact = artifact
  6927  	return c
  6928  }
  6929  
  6930  // ArtifactId sets the optional parameter "artifactId": Required. The ID to use
  6931  // for the artifact, which will become the final component of the artifact's
  6932  // resource name. This value should be 4-63 characters, and valid characters
  6933  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
  6934  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsApisVersionsArtifactsCreateCall {
  6935  	c.urlParams_.Set("artifactId", artifactId)
  6936  	return c
  6937  }
  6938  
  6939  // Fields allows partial responses to be retrieved. See
  6940  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6941  // details.
  6942  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsCreateCall {
  6943  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6944  	return c
  6945  }
  6946  
  6947  // Context sets the context to be used in this call's Do method.
  6948  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsCreateCall {
  6949  	c.ctx_ = ctx
  6950  	return c
  6951  }
  6952  
  6953  // Header returns a http.Header that can be modified by the caller to add
  6954  // headers to the request.
  6955  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) Header() http.Header {
  6956  	if c.header_ == nil {
  6957  		c.header_ = make(http.Header)
  6958  	}
  6959  	return c.header_
  6960  }
  6961  
  6962  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
  6963  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6964  	var body io.Reader = nil
  6965  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  6966  	if err != nil {
  6967  		return nil, err
  6968  	}
  6969  	c.urlParams_.Set("alt", alt)
  6970  	c.urlParams_.Set("prettyPrint", "false")
  6971  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  6972  	urls += "?" + c.urlParams_.Encode()
  6973  	req, err := http.NewRequest("POST", urls, body)
  6974  	if err != nil {
  6975  		return nil, err
  6976  	}
  6977  	req.Header = reqHeaders
  6978  	googleapi.Expand(req.URL, map[string]string{
  6979  		"parent": c.parent,
  6980  	})
  6981  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6982  }
  6983  
  6984  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.create" call.
  6985  // Any non-2xx status code is an error. Response headers are in either
  6986  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  6987  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6988  // whether the returned error was because http.StatusNotModified was returned.
  6989  func (c *ProjectsLocationsApisVersionsArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  6990  	gensupport.SetOptions(c.urlParams_, opts...)
  6991  	res, err := c.doRequest("json")
  6992  	if res != nil && res.StatusCode == http.StatusNotModified {
  6993  		if res.Body != nil {
  6994  			res.Body.Close()
  6995  		}
  6996  		return nil, gensupport.WrapError(&googleapi.Error{
  6997  			Code:   res.StatusCode,
  6998  			Header: res.Header,
  6999  		})
  7000  	}
  7001  	if err != nil {
  7002  		return nil, err
  7003  	}
  7004  	defer googleapi.CloseBody(res)
  7005  	if err := googleapi.CheckResponse(res); err != nil {
  7006  		return nil, gensupport.WrapError(err)
  7007  	}
  7008  	ret := &Artifact{
  7009  		ServerResponse: googleapi.ServerResponse{
  7010  			Header:         res.Header,
  7011  			HTTPStatusCode: res.StatusCode,
  7012  		},
  7013  	}
  7014  	target := &ret
  7015  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7016  		return nil, err
  7017  	}
  7018  	return ret, nil
  7019  }
  7020  
  7021  type ProjectsLocationsApisVersionsArtifactsDeleteCall struct {
  7022  	s          *Service
  7023  	name       string
  7024  	urlParams_ gensupport.URLParams
  7025  	ctx_       context.Context
  7026  	header_    http.Header
  7027  }
  7028  
  7029  // Delete: Removes a specified artifact.
  7030  //
  7031  // - name: The name of the artifact to delete. Format: `{parent}/artifacts/*`.
  7032  func (r *ProjectsLocationsApisVersionsArtifactsService) Delete(name string) *ProjectsLocationsApisVersionsArtifactsDeleteCall {
  7033  	c := &ProjectsLocationsApisVersionsArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7034  	c.name = name
  7035  	return c
  7036  }
  7037  
  7038  // Fields allows partial responses to be retrieved. See
  7039  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7040  // details.
  7041  func (c *ProjectsLocationsApisVersionsArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsDeleteCall {
  7042  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7043  	return c
  7044  }
  7045  
  7046  // Context sets the context to be used in this call's Do method.
  7047  func (c *ProjectsLocationsApisVersionsArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsDeleteCall {
  7048  	c.ctx_ = ctx
  7049  	return c
  7050  }
  7051  
  7052  // Header returns a http.Header that can be modified by the caller to add
  7053  // headers to the request.
  7054  func (c *ProjectsLocationsApisVersionsArtifactsDeleteCall) Header() http.Header {
  7055  	if c.header_ == nil {
  7056  		c.header_ = make(http.Header)
  7057  	}
  7058  	return c.header_
  7059  }
  7060  
  7061  func (c *ProjectsLocationsApisVersionsArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7062  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7063  	var body io.Reader = nil
  7064  	c.urlParams_.Set("alt", alt)
  7065  	c.urlParams_.Set("prettyPrint", "false")
  7066  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7067  	urls += "?" + c.urlParams_.Encode()
  7068  	req, err := http.NewRequest("DELETE", urls, body)
  7069  	if err != nil {
  7070  		return nil, err
  7071  	}
  7072  	req.Header = reqHeaders
  7073  	googleapi.Expand(req.URL, map[string]string{
  7074  		"name": c.name,
  7075  	})
  7076  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7077  }
  7078  
  7079  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.delete" call.
  7080  // Any non-2xx status code is an error. Response headers are in either
  7081  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7082  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7083  // whether the returned error was because http.StatusNotModified was returned.
  7084  func (c *ProjectsLocationsApisVersionsArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7085  	gensupport.SetOptions(c.urlParams_, opts...)
  7086  	res, err := c.doRequest("json")
  7087  	if res != nil && res.StatusCode == http.StatusNotModified {
  7088  		if res.Body != nil {
  7089  			res.Body.Close()
  7090  		}
  7091  		return nil, gensupport.WrapError(&googleapi.Error{
  7092  			Code:   res.StatusCode,
  7093  			Header: res.Header,
  7094  		})
  7095  	}
  7096  	if err != nil {
  7097  		return nil, err
  7098  	}
  7099  	defer googleapi.CloseBody(res)
  7100  	if err := googleapi.CheckResponse(res); err != nil {
  7101  		return nil, gensupport.WrapError(err)
  7102  	}
  7103  	ret := &Empty{
  7104  		ServerResponse: googleapi.ServerResponse{
  7105  			Header:         res.Header,
  7106  			HTTPStatusCode: res.StatusCode,
  7107  		},
  7108  	}
  7109  	target := &ret
  7110  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7111  		return nil, err
  7112  	}
  7113  	return ret, nil
  7114  }
  7115  
  7116  type ProjectsLocationsApisVersionsArtifactsGetCall struct {
  7117  	s            *Service
  7118  	name         string
  7119  	urlParams_   gensupport.URLParams
  7120  	ifNoneMatch_ string
  7121  	ctx_         context.Context
  7122  	header_      http.Header
  7123  }
  7124  
  7125  // Get: Returns a specified artifact.
  7126  //
  7127  // - name: The name of the artifact to retrieve. Format: `{parent}/artifacts/*`.
  7128  func (r *ProjectsLocationsApisVersionsArtifactsService) Get(name string) *ProjectsLocationsApisVersionsArtifactsGetCall {
  7129  	c := &ProjectsLocationsApisVersionsArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7130  	c.name = name
  7131  	return c
  7132  }
  7133  
  7134  // Fields allows partial responses to be retrieved. See
  7135  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7136  // details.
  7137  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsGetCall {
  7138  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7139  	return c
  7140  }
  7141  
  7142  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7143  // object's ETag matches the given value. This is useful for getting updates
  7144  // only after the object has changed since the last request.
  7145  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsArtifactsGetCall {
  7146  	c.ifNoneMatch_ = entityTag
  7147  	return c
  7148  }
  7149  
  7150  // Context sets the context to be used in this call's Do method.
  7151  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsGetCall {
  7152  	c.ctx_ = ctx
  7153  	return c
  7154  }
  7155  
  7156  // Header returns a http.Header that can be modified by the caller to add
  7157  // headers to the request.
  7158  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) Header() http.Header {
  7159  	if c.header_ == nil {
  7160  		c.header_ = make(http.Header)
  7161  	}
  7162  	return c.header_
  7163  }
  7164  
  7165  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
  7166  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7167  	if c.ifNoneMatch_ != "" {
  7168  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7169  	}
  7170  	var body io.Reader = nil
  7171  	c.urlParams_.Set("alt", alt)
  7172  	c.urlParams_.Set("prettyPrint", "false")
  7173  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7174  	urls += "?" + c.urlParams_.Encode()
  7175  	req, err := http.NewRequest("GET", urls, body)
  7176  	if err != nil {
  7177  		return nil, err
  7178  	}
  7179  	req.Header = reqHeaders
  7180  	googleapi.Expand(req.URL, map[string]string{
  7181  		"name": c.name,
  7182  	})
  7183  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7184  }
  7185  
  7186  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.get" call.
  7187  // Any non-2xx status code is an error. Response headers are in either
  7188  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  7189  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7190  // whether the returned error was because http.StatusNotModified was returned.
  7191  func (c *ProjectsLocationsApisVersionsArtifactsGetCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  7192  	gensupport.SetOptions(c.urlParams_, opts...)
  7193  	res, err := c.doRequest("json")
  7194  	if res != nil && res.StatusCode == http.StatusNotModified {
  7195  		if res.Body != nil {
  7196  			res.Body.Close()
  7197  		}
  7198  		return nil, gensupport.WrapError(&googleapi.Error{
  7199  			Code:   res.StatusCode,
  7200  			Header: res.Header,
  7201  		})
  7202  	}
  7203  	if err != nil {
  7204  		return nil, err
  7205  	}
  7206  	defer googleapi.CloseBody(res)
  7207  	if err := googleapi.CheckResponse(res); err != nil {
  7208  		return nil, gensupport.WrapError(err)
  7209  	}
  7210  	ret := &Artifact{
  7211  		ServerResponse: googleapi.ServerResponse{
  7212  			Header:         res.Header,
  7213  			HTTPStatusCode: res.StatusCode,
  7214  		},
  7215  	}
  7216  	target := &ret
  7217  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7218  		return nil, err
  7219  	}
  7220  	return ret, nil
  7221  }
  7222  
  7223  type ProjectsLocationsApisVersionsArtifactsGetContentsCall struct {
  7224  	s            *Service
  7225  	name         string
  7226  	urlParams_   gensupport.URLParams
  7227  	ifNoneMatch_ string
  7228  	ctx_         context.Context
  7229  	header_      http.Header
  7230  }
  7231  
  7232  // GetContents: Returns the contents of a specified artifact. If artifacts are
  7233  // stored with GZip compression, the default behavior is to return the artifact
  7234  // uncompressed (the mime_type response field indicates the exact format
  7235  // returned).
  7236  //
  7237  //   - name: The name of the artifact whose contents should be retrieved. Format:
  7238  //     `{parent}/artifacts/*`.
  7239  func (r *ProjectsLocationsApisVersionsArtifactsService) GetContents(name string) *ProjectsLocationsApisVersionsArtifactsGetContentsCall {
  7240  	c := &ProjectsLocationsApisVersionsArtifactsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7241  	c.name = name
  7242  	return c
  7243  }
  7244  
  7245  // Fields allows partial responses to be retrieved. See
  7246  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7247  // details.
  7248  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsGetContentsCall {
  7249  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7250  	return c
  7251  }
  7252  
  7253  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7254  // object's ETag matches the given value. This is useful for getting updates
  7255  // only after the object has changed since the last request.
  7256  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsArtifactsGetContentsCall {
  7257  	c.ifNoneMatch_ = entityTag
  7258  	return c
  7259  }
  7260  
  7261  // Context sets the context to be used in this call's Do method.
  7262  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsGetContentsCall {
  7263  	c.ctx_ = ctx
  7264  	return c
  7265  }
  7266  
  7267  // Header returns a http.Header that can be modified by the caller to add
  7268  // headers to the request.
  7269  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) Header() http.Header {
  7270  	if c.header_ == nil {
  7271  		c.header_ = make(http.Header)
  7272  	}
  7273  	return c.header_
  7274  }
  7275  
  7276  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) doRequest(alt string) (*http.Response, error) {
  7277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7278  	if c.ifNoneMatch_ != "" {
  7279  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7280  	}
  7281  	var body io.Reader = nil
  7282  	c.urlParams_.Set("alt", alt)
  7283  	c.urlParams_.Set("prettyPrint", "false")
  7284  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
  7285  	urls += "?" + c.urlParams_.Encode()
  7286  	req, err := http.NewRequest("GET", urls, body)
  7287  	if err != nil {
  7288  		return nil, err
  7289  	}
  7290  	req.Header = reqHeaders
  7291  	googleapi.Expand(req.URL, map[string]string{
  7292  		"name": c.name,
  7293  	})
  7294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7295  }
  7296  
  7297  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.getContents" call.
  7298  // Any non-2xx status code is an error. Response headers are in either
  7299  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
  7300  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7301  // whether the returned error was because http.StatusNotModified was returned.
  7302  func (c *ProjectsLocationsApisVersionsArtifactsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  7303  	gensupport.SetOptions(c.urlParams_, opts...)
  7304  	res, err := c.doRequest("json")
  7305  	if res != nil && res.StatusCode == http.StatusNotModified {
  7306  		if res.Body != nil {
  7307  			res.Body.Close()
  7308  		}
  7309  		return nil, gensupport.WrapError(&googleapi.Error{
  7310  			Code:   res.StatusCode,
  7311  			Header: res.Header,
  7312  		})
  7313  	}
  7314  	if err != nil {
  7315  		return nil, err
  7316  	}
  7317  	defer googleapi.CloseBody(res)
  7318  	if err := googleapi.CheckResponse(res); err != nil {
  7319  		return nil, gensupport.WrapError(err)
  7320  	}
  7321  	ret := &HttpBody{
  7322  		ServerResponse: googleapi.ServerResponse{
  7323  			Header:         res.Header,
  7324  			HTTPStatusCode: res.StatusCode,
  7325  		},
  7326  	}
  7327  	target := &ret
  7328  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7329  		return nil, err
  7330  	}
  7331  	return ret, nil
  7332  }
  7333  
  7334  type ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall struct {
  7335  	s            *Service
  7336  	resource     string
  7337  	urlParams_   gensupport.URLParams
  7338  	ifNoneMatch_ string
  7339  	ctx_         context.Context
  7340  	header_      http.Header
  7341  }
  7342  
  7343  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  7344  // empty policy if the resource exists and does not have a policy set.
  7345  //
  7346  //   - resource: REQUIRED: The resource for which the policy is being requested.
  7347  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7348  //     for the appropriate value for this field.
  7349  func (r *ProjectsLocationsApisVersionsArtifactsService) GetIamPolicy(resource string) *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall {
  7350  	c := &ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7351  	c.resource = resource
  7352  	return c
  7353  }
  7354  
  7355  // OptionsRequestedPolicyVersion sets the optional parameter
  7356  // "options.requestedPolicyVersion": The maximum policy version that will be
  7357  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  7358  // an invalid value will be rejected. Requests for policies with any
  7359  // conditional role bindings must specify version 3. Policies with no
  7360  // conditional role bindings may specify any valid value or leave the field
  7361  // unset. The policy in the response might use the policy version that you
  7362  // specified, or it might use a lower policy version. For example, if you
  7363  // specify version 3, but the policy has no conditional role bindings, the
  7364  // response uses version 1. To learn which resources support conditions in
  7365  // their IAM policies, see the IAM documentation
  7366  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  7367  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall {
  7368  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  7369  	return c
  7370  }
  7371  
  7372  // Fields allows partial responses to be retrieved. See
  7373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7374  // details.
  7375  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall {
  7376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7377  	return c
  7378  }
  7379  
  7380  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7381  // object's ETag matches the given value. This is useful for getting updates
  7382  // only after the object has changed since the last request.
  7383  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall {
  7384  	c.ifNoneMatch_ = entityTag
  7385  	return c
  7386  }
  7387  
  7388  // Context sets the context to be used in this call's Do method.
  7389  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall {
  7390  	c.ctx_ = ctx
  7391  	return c
  7392  }
  7393  
  7394  // Header returns a http.Header that can be modified by the caller to add
  7395  // headers to the request.
  7396  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) Header() http.Header {
  7397  	if c.header_ == nil {
  7398  		c.header_ = make(http.Header)
  7399  	}
  7400  	return c.header_
  7401  }
  7402  
  7403  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7404  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7405  	if c.ifNoneMatch_ != "" {
  7406  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7407  	}
  7408  	var body io.Reader = nil
  7409  	c.urlParams_.Set("alt", alt)
  7410  	c.urlParams_.Set("prettyPrint", "false")
  7411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  7412  	urls += "?" + c.urlParams_.Encode()
  7413  	req, err := http.NewRequest("GET", urls, body)
  7414  	if err != nil {
  7415  		return nil, err
  7416  	}
  7417  	req.Header = reqHeaders
  7418  	googleapi.Expand(req.URL, map[string]string{
  7419  		"resource": c.resource,
  7420  	})
  7421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7422  }
  7423  
  7424  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.getIamPolicy" call.
  7425  // Any non-2xx status code is an error. Response headers are in either
  7426  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  7427  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7428  // whether the returned error was because http.StatusNotModified was returned.
  7429  func (c *ProjectsLocationsApisVersionsArtifactsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7430  	gensupport.SetOptions(c.urlParams_, opts...)
  7431  	res, err := c.doRequest("json")
  7432  	if res != nil && res.StatusCode == http.StatusNotModified {
  7433  		if res.Body != nil {
  7434  			res.Body.Close()
  7435  		}
  7436  		return nil, gensupport.WrapError(&googleapi.Error{
  7437  			Code:   res.StatusCode,
  7438  			Header: res.Header,
  7439  		})
  7440  	}
  7441  	if err != nil {
  7442  		return nil, err
  7443  	}
  7444  	defer googleapi.CloseBody(res)
  7445  	if err := googleapi.CheckResponse(res); err != nil {
  7446  		return nil, gensupport.WrapError(err)
  7447  	}
  7448  	ret := &Policy{
  7449  		ServerResponse: googleapi.ServerResponse{
  7450  			Header:         res.Header,
  7451  			HTTPStatusCode: res.StatusCode,
  7452  		},
  7453  	}
  7454  	target := &ret
  7455  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7456  		return nil, err
  7457  	}
  7458  	return ret, nil
  7459  }
  7460  
  7461  type ProjectsLocationsApisVersionsArtifactsListCall struct {
  7462  	s            *Service
  7463  	parent       string
  7464  	urlParams_   gensupport.URLParams
  7465  	ifNoneMatch_ string
  7466  	ctx_         context.Context
  7467  	header_      http.Header
  7468  }
  7469  
  7470  // List: Returns matching artifacts.
  7471  //
  7472  //   - parent: The parent, which owns this collection of artifacts. Format:
  7473  //     `{parent}`.
  7474  func (r *ProjectsLocationsApisVersionsArtifactsService) List(parent string) *ProjectsLocationsApisVersionsArtifactsListCall {
  7475  	c := &ProjectsLocationsApisVersionsArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7476  	c.parent = parent
  7477  	return c
  7478  }
  7479  
  7480  // Filter sets the optional parameter "filter": An expression that can be used
  7481  // to filter the list. Filters use the Common Expression Language and can refer
  7482  // to all message fields except contents.
  7483  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Filter(filter string) *ProjectsLocationsApisVersionsArtifactsListCall {
  7484  	c.urlParams_.Set("filter", filter)
  7485  	return c
  7486  }
  7487  
  7488  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  7489  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  7490  // "desc" identifier, e.g. "foo desc,bar"
  7491  func (c *ProjectsLocationsApisVersionsArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsApisVersionsArtifactsListCall {
  7492  	c.urlParams_.Set("orderBy", orderBy)
  7493  	return c
  7494  }
  7495  
  7496  // PageSize sets the optional parameter "pageSize": The maximum number of
  7497  // artifacts to return. The service may return fewer than this value. If
  7498  // unspecified, at most 50 values will be returned. The maximum is 1000; values
  7499  // above 1000 will be coerced to 1000.
  7500  func (c *ProjectsLocationsApisVersionsArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsArtifactsListCall {
  7501  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7502  	return c
  7503  }
  7504  
  7505  // PageToken sets the optional parameter "pageToken": A page token, received
  7506  // from a previous `ListArtifacts` call. Provide this to retrieve the
  7507  // subsequent page. When paginating, all other parameters provided to
  7508  // `ListArtifacts` must match the call that provided the page token.
  7509  func (c *ProjectsLocationsApisVersionsArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsArtifactsListCall {
  7510  	c.urlParams_.Set("pageToken", pageToken)
  7511  	return c
  7512  }
  7513  
  7514  // Fields allows partial responses to be retrieved. See
  7515  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7516  // details.
  7517  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsListCall {
  7518  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7519  	return c
  7520  }
  7521  
  7522  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7523  // object's ETag matches the given value. This is useful for getting updates
  7524  // only after the object has changed since the last request.
  7525  func (c *ProjectsLocationsApisVersionsArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsArtifactsListCall {
  7526  	c.ifNoneMatch_ = entityTag
  7527  	return c
  7528  }
  7529  
  7530  // Context sets the context to be used in this call's Do method.
  7531  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsListCall {
  7532  	c.ctx_ = ctx
  7533  	return c
  7534  }
  7535  
  7536  // Header returns a http.Header that can be modified by the caller to add
  7537  // headers to the request.
  7538  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Header() http.Header {
  7539  	if c.header_ == nil {
  7540  		c.header_ = make(http.Header)
  7541  	}
  7542  	return c.header_
  7543  }
  7544  
  7545  func (c *ProjectsLocationsApisVersionsArtifactsListCall) doRequest(alt string) (*http.Response, error) {
  7546  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7547  	if c.ifNoneMatch_ != "" {
  7548  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7549  	}
  7550  	var body io.Reader = nil
  7551  	c.urlParams_.Set("alt", alt)
  7552  	c.urlParams_.Set("prettyPrint", "false")
  7553  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  7554  	urls += "?" + c.urlParams_.Encode()
  7555  	req, err := http.NewRequest("GET", urls, body)
  7556  	if err != nil {
  7557  		return nil, err
  7558  	}
  7559  	req.Header = reqHeaders
  7560  	googleapi.Expand(req.URL, map[string]string{
  7561  		"parent": c.parent,
  7562  	})
  7563  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7564  }
  7565  
  7566  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.list" call.
  7567  // Any non-2xx status code is an error. Response headers are in either
  7568  // *ListArtifactsResponse.ServerResponse.Header or (if a response was returned
  7569  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7570  // check whether the returned error was because http.StatusNotModified was
  7571  // returned.
  7572  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListArtifactsResponse, error) {
  7573  	gensupport.SetOptions(c.urlParams_, opts...)
  7574  	res, err := c.doRequest("json")
  7575  	if res != nil && res.StatusCode == http.StatusNotModified {
  7576  		if res.Body != nil {
  7577  			res.Body.Close()
  7578  		}
  7579  		return nil, gensupport.WrapError(&googleapi.Error{
  7580  			Code:   res.StatusCode,
  7581  			Header: res.Header,
  7582  		})
  7583  	}
  7584  	if err != nil {
  7585  		return nil, err
  7586  	}
  7587  	defer googleapi.CloseBody(res)
  7588  	if err := googleapi.CheckResponse(res); err != nil {
  7589  		return nil, gensupport.WrapError(err)
  7590  	}
  7591  	ret := &ListArtifactsResponse{
  7592  		ServerResponse: googleapi.ServerResponse{
  7593  			Header:         res.Header,
  7594  			HTTPStatusCode: res.StatusCode,
  7595  		},
  7596  	}
  7597  	target := &ret
  7598  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7599  		return nil, err
  7600  	}
  7601  	return ret, nil
  7602  }
  7603  
  7604  // Pages invokes f for each page of results.
  7605  // A non-nil error returned from f will halt the iteration.
  7606  // The provided context supersedes any context provided to the Context method.
  7607  func (c *ProjectsLocationsApisVersionsArtifactsListCall) Pages(ctx context.Context, f func(*ListArtifactsResponse) error) error {
  7608  	c.ctx_ = ctx
  7609  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7610  	for {
  7611  		x, err := c.Do()
  7612  		if err != nil {
  7613  			return err
  7614  		}
  7615  		if err := f(x); err != nil {
  7616  			return err
  7617  		}
  7618  		if x.NextPageToken == "" {
  7619  			return nil
  7620  		}
  7621  		c.PageToken(x.NextPageToken)
  7622  	}
  7623  }
  7624  
  7625  type ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall struct {
  7626  	s          *Service
  7627  	name       string
  7628  	artifact   *Artifact
  7629  	urlParams_ gensupport.URLParams
  7630  	ctx_       context.Context
  7631  	header_    http.Header
  7632  }
  7633  
  7634  // ReplaceArtifact: Used to replace a specified artifact.
  7635  //
  7636  // - name: Resource name.
  7637  func (r *ProjectsLocationsApisVersionsArtifactsService) ReplaceArtifact(name string, artifact *Artifact) *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall {
  7638  	c := &ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7639  	c.name = name
  7640  	c.artifact = artifact
  7641  	return c
  7642  }
  7643  
  7644  // Fields allows partial responses to be retrieved. See
  7645  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7646  // details.
  7647  func (c *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall {
  7648  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7649  	return c
  7650  }
  7651  
  7652  // Context sets the context to be used in this call's Do method.
  7653  func (c *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall {
  7654  	c.ctx_ = ctx
  7655  	return c
  7656  }
  7657  
  7658  // Header returns a http.Header that can be modified by the caller to add
  7659  // headers to the request.
  7660  func (c *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall) Header() http.Header {
  7661  	if c.header_ == nil {
  7662  		c.header_ = make(http.Header)
  7663  	}
  7664  	return c.header_
  7665  }
  7666  
  7667  func (c *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall) doRequest(alt string) (*http.Response, error) {
  7668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7669  	var body io.Reader = nil
  7670  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  7671  	if err != nil {
  7672  		return nil, err
  7673  	}
  7674  	c.urlParams_.Set("alt", alt)
  7675  	c.urlParams_.Set("prettyPrint", "false")
  7676  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7677  	urls += "?" + c.urlParams_.Encode()
  7678  	req, err := http.NewRequest("PUT", urls, body)
  7679  	if err != nil {
  7680  		return nil, err
  7681  	}
  7682  	req.Header = reqHeaders
  7683  	googleapi.Expand(req.URL, map[string]string{
  7684  		"name": c.name,
  7685  	})
  7686  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7687  }
  7688  
  7689  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.replaceArtifact" call.
  7690  // Any non-2xx status code is an error. Response headers are in either
  7691  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  7692  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7693  // whether the returned error was because http.StatusNotModified was returned.
  7694  func (c *ProjectsLocationsApisVersionsArtifactsReplaceArtifactCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  7695  	gensupport.SetOptions(c.urlParams_, opts...)
  7696  	res, err := c.doRequest("json")
  7697  	if res != nil && res.StatusCode == http.StatusNotModified {
  7698  		if res.Body != nil {
  7699  			res.Body.Close()
  7700  		}
  7701  		return nil, gensupport.WrapError(&googleapi.Error{
  7702  			Code:   res.StatusCode,
  7703  			Header: res.Header,
  7704  		})
  7705  	}
  7706  	if err != nil {
  7707  		return nil, err
  7708  	}
  7709  	defer googleapi.CloseBody(res)
  7710  	if err := googleapi.CheckResponse(res); err != nil {
  7711  		return nil, gensupport.WrapError(err)
  7712  	}
  7713  	ret := &Artifact{
  7714  		ServerResponse: googleapi.ServerResponse{
  7715  			Header:         res.Header,
  7716  			HTTPStatusCode: res.StatusCode,
  7717  		},
  7718  	}
  7719  	target := &ret
  7720  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7721  		return nil, err
  7722  	}
  7723  	return ret, nil
  7724  }
  7725  
  7726  type ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall struct {
  7727  	s                   *Service
  7728  	resource            string
  7729  	setiampolicyrequest *SetIamPolicyRequest
  7730  	urlParams_          gensupport.URLParams
  7731  	ctx_                context.Context
  7732  	header_             http.Header
  7733  }
  7734  
  7735  // SetIamPolicy: Sets the access control policy on the specified resource.
  7736  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  7737  // and `PERMISSION_DENIED` errors.
  7738  //
  7739  //   - resource: REQUIRED: The resource for which the policy is being specified.
  7740  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7741  //     for the appropriate value for this field.
  7742  func (r *ProjectsLocationsApisVersionsArtifactsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall {
  7743  	c := &ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7744  	c.resource = resource
  7745  	c.setiampolicyrequest = setiampolicyrequest
  7746  	return c
  7747  }
  7748  
  7749  // Fields allows partial responses to be retrieved. See
  7750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7751  // details.
  7752  func (c *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall {
  7753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7754  	return c
  7755  }
  7756  
  7757  // Context sets the context to be used in this call's Do method.
  7758  func (c *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall {
  7759  	c.ctx_ = ctx
  7760  	return c
  7761  }
  7762  
  7763  // Header returns a http.Header that can be modified by the caller to add
  7764  // headers to the request.
  7765  func (c *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall) Header() http.Header {
  7766  	if c.header_ == nil {
  7767  		c.header_ = make(http.Header)
  7768  	}
  7769  	return c.header_
  7770  }
  7771  
  7772  func (c *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7773  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7774  	var body io.Reader = nil
  7775  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  7776  	if err != nil {
  7777  		return nil, err
  7778  	}
  7779  	c.urlParams_.Set("alt", alt)
  7780  	c.urlParams_.Set("prettyPrint", "false")
  7781  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  7782  	urls += "?" + c.urlParams_.Encode()
  7783  	req, err := http.NewRequest("POST", urls, body)
  7784  	if err != nil {
  7785  		return nil, err
  7786  	}
  7787  	req.Header = reqHeaders
  7788  	googleapi.Expand(req.URL, map[string]string{
  7789  		"resource": c.resource,
  7790  	})
  7791  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7792  }
  7793  
  7794  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.setIamPolicy" call.
  7795  // Any non-2xx status code is an error. Response headers are in either
  7796  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  7797  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7798  // whether the returned error was because http.StatusNotModified was returned.
  7799  func (c *ProjectsLocationsApisVersionsArtifactsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7800  	gensupport.SetOptions(c.urlParams_, opts...)
  7801  	res, err := c.doRequest("json")
  7802  	if res != nil && res.StatusCode == http.StatusNotModified {
  7803  		if res.Body != nil {
  7804  			res.Body.Close()
  7805  		}
  7806  		return nil, gensupport.WrapError(&googleapi.Error{
  7807  			Code:   res.StatusCode,
  7808  			Header: res.Header,
  7809  		})
  7810  	}
  7811  	if err != nil {
  7812  		return nil, err
  7813  	}
  7814  	defer googleapi.CloseBody(res)
  7815  	if err := googleapi.CheckResponse(res); err != nil {
  7816  		return nil, gensupport.WrapError(err)
  7817  	}
  7818  	ret := &Policy{
  7819  		ServerResponse: googleapi.ServerResponse{
  7820  			Header:         res.Header,
  7821  			HTTPStatusCode: res.StatusCode,
  7822  		},
  7823  	}
  7824  	target := &ret
  7825  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7826  		return nil, err
  7827  	}
  7828  	return ret, nil
  7829  }
  7830  
  7831  type ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall struct {
  7832  	s                         *Service
  7833  	resource                  string
  7834  	testiampermissionsrequest *TestIamPermissionsRequest
  7835  	urlParams_                gensupport.URLParams
  7836  	ctx_                      context.Context
  7837  	header_                   http.Header
  7838  }
  7839  
  7840  // TestIamPermissions: Returns permissions that a caller has on the specified
  7841  // resource. If the resource does not exist, this will return an empty set of
  7842  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  7843  // used for building permission-aware UIs and command-line tools, not for
  7844  // authorization checking. This operation may "fail open" without warning.
  7845  //
  7846  //   - resource: REQUIRED: The resource for which the policy detail is being
  7847  //     requested. See Resource names
  7848  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  7849  //     value for this field.
  7850  func (r *ProjectsLocationsApisVersionsArtifactsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall {
  7851  	c := &ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7852  	c.resource = resource
  7853  	c.testiampermissionsrequest = testiampermissionsrequest
  7854  	return c
  7855  }
  7856  
  7857  // Fields allows partial responses to be retrieved. See
  7858  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7859  // details.
  7860  func (c *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall {
  7861  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7862  	return c
  7863  }
  7864  
  7865  // Context sets the context to be used in this call's Do method.
  7866  func (c *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall {
  7867  	c.ctx_ = ctx
  7868  	return c
  7869  }
  7870  
  7871  // Header returns a http.Header that can be modified by the caller to add
  7872  // headers to the request.
  7873  func (c *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall) Header() http.Header {
  7874  	if c.header_ == nil {
  7875  		c.header_ = make(http.Header)
  7876  	}
  7877  	return c.header_
  7878  }
  7879  
  7880  func (c *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  7881  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7882  	var body io.Reader = nil
  7883  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  7884  	if err != nil {
  7885  		return nil, err
  7886  	}
  7887  	c.urlParams_.Set("alt", alt)
  7888  	c.urlParams_.Set("prettyPrint", "false")
  7889  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  7890  	urls += "?" + c.urlParams_.Encode()
  7891  	req, err := http.NewRequest("POST", urls, body)
  7892  	if err != nil {
  7893  		return nil, err
  7894  	}
  7895  	req.Header = reqHeaders
  7896  	googleapi.Expand(req.URL, map[string]string{
  7897  		"resource": c.resource,
  7898  	})
  7899  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7900  }
  7901  
  7902  // Do executes the "apigeeregistry.projects.locations.apis.versions.artifacts.testIamPermissions" call.
  7903  // Any non-2xx status code is an error. Response headers are in either
  7904  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  7905  // returned at all) in error.(*googleapi.Error).Header. Use
  7906  // googleapi.IsNotModified to check whether the returned error was because
  7907  // http.StatusNotModified was returned.
  7908  func (c *ProjectsLocationsApisVersionsArtifactsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  7909  	gensupport.SetOptions(c.urlParams_, opts...)
  7910  	res, err := c.doRequest("json")
  7911  	if res != nil && res.StatusCode == http.StatusNotModified {
  7912  		if res.Body != nil {
  7913  			res.Body.Close()
  7914  		}
  7915  		return nil, gensupport.WrapError(&googleapi.Error{
  7916  			Code:   res.StatusCode,
  7917  			Header: res.Header,
  7918  		})
  7919  	}
  7920  	if err != nil {
  7921  		return nil, err
  7922  	}
  7923  	defer googleapi.CloseBody(res)
  7924  	if err := googleapi.CheckResponse(res); err != nil {
  7925  		return nil, gensupport.WrapError(err)
  7926  	}
  7927  	ret := &TestIamPermissionsResponse{
  7928  		ServerResponse: googleapi.ServerResponse{
  7929  			Header:         res.Header,
  7930  			HTTPStatusCode: res.StatusCode,
  7931  		},
  7932  	}
  7933  	target := &ret
  7934  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7935  		return nil, err
  7936  	}
  7937  	return ret, nil
  7938  }
  7939  
  7940  type ProjectsLocationsApisVersionsSpecsCreateCall struct {
  7941  	s          *Service
  7942  	parent     string
  7943  	apispec    *ApiSpec
  7944  	urlParams_ gensupport.URLParams
  7945  	ctx_       context.Context
  7946  	header_    http.Header
  7947  }
  7948  
  7949  // Create: Creates a specified spec.
  7950  //
  7951  //   - parent: The parent, which owns this collection of specs. Format:
  7952  //     `projects/*/locations/*/apis/*/versions/*`.
  7953  func (r *ProjectsLocationsApisVersionsSpecsService) Create(parent string, apispec *ApiSpec) *ProjectsLocationsApisVersionsSpecsCreateCall {
  7954  	c := &ProjectsLocationsApisVersionsSpecsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7955  	c.parent = parent
  7956  	c.apispec = apispec
  7957  	return c
  7958  }
  7959  
  7960  // ApiSpecId sets the optional parameter "apiSpecId": Required. The ID to use
  7961  // for the spec, which will become the final component of the spec's resource
  7962  // name. This value should be 4-63 characters, and valid characters are /a-z-/.
  7963  // Following AIP-162, IDs must not have the form of a UUID.
  7964  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) ApiSpecId(apiSpecId string) *ProjectsLocationsApisVersionsSpecsCreateCall {
  7965  	c.urlParams_.Set("apiSpecId", apiSpecId)
  7966  	return c
  7967  }
  7968  
  7969  // Fields allows partial responses to be retrieved. See
  7970  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7971  // details.
  7972  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsCreateCall {
  7973  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7974  	return c
  7975  }
  7976  
  7977  // Context sets the context to be used in this call's Do method.
  7978  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsCreateCall {
  7979  	c.ctx_ = ctx
  7980  	return c
  7981  }
  7982  
  7983  // Header returns a http.Header that can be modified by the caller to add
  7984  // headers to the request.
  7985  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Header() http.Header {
  7986  	if c.header_ == nil {
  7987  		c.header_ = make(http.Header)
  7988  	}
  7989  	return c.header_
  7990  }
  7991  
  7992  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) doRequest(alt string) (*http.Response, error) {
  7993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7994  	var body io.Reader = nil
  7995  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apispec)
  7996  	if err != nil {
  7997  		return nil, err
  7998  	}
  7999  	c.urlParams_.Set("alt", alt)
  8000  	c.urlParams_.Set("prettyPrint", "false")
  8001  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/specs")
  8002  	urls += "?" + c.urlParams_.Encode()
  8003  	req, err := http.NewRequest("POST", urls, body)
  8004  	if err != nil {
  8005  		return nil, err
  8006  	}
  8007  	req.Header = reqHeaders
  8008  	googleapi.Expand(req.URL, map[string]string{
  8009  		"parent": c.parent,
  8010  	})
  8011  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8012  }
  8013  
  8014  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.create" call.
  8015  // Any non-2xx status code is an error. Response headers are in either
  8016  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  8017  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8018  // whether the returned error was because http.StatusNotModified was returned.
  8019  func (c *ProjectsLocationsApisVersionsSpecsCreateCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  8020  	gensupport.SetOptions(c.urlParams_, opts...)
  8021  	res, err := c.doRequest("json")
  8022  	if res != nil && res.StatusCode == http.StatusNotModified {
  8023  		if res.Body != nil {
  8024  			res.Body.Close()
  8025  		}
  8026  		return nil, gensupport.WrapError(&googleapi.Error{
  8027  			Code:   res.StatusCode,
  8028  			Header: res.Header,
  8029  		})
  8030  	}
  8031  	if err != nil {
  8032  		return nil, err
  8033  	}
  8034  	defer googleapi.CloseBody(res)
  8035  	if err := googleapi.CheckResponse(res); err != nil {
  8036  		return nil, gensupport.WrapError(err)
  8037  	}
  8038  	ret := &ApiSpec{
  8039  		ServerResponse: googleapi.ServerResponse{
  8040  			Header:         res.Header,
  8041  			HTTPStatusCode: res.StatusCode,
  8042  		},
  8043  	}
  8044  	target := &ret
  8045  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8046  		return nil, err
  8047  	}
  8048  	return ret, nil
  8049  }
  8050  
  8051  type ProjectsLocationsApisVersionsSpecsDeleteCall struct {
  8052  	s          *Service
  8053  	name       string
  8054  	urlParams_ gensupport.URLParams
  8055  	ctx_       context.Context
  8056  	header_    http.Header
  8057  }
  8058  
  8059  // Delete: Removes a specified spec, all revisions, and all child resources
  8060  // (e.g., artifacts).
  8061  //
  8062  //   - name: The name of the spec to delete. Format:
  8063  //     `projects/*/locations/*/apis/*/versions/*/specs/*`.
  8064  func (r *ProjectsLocationsApisVersionsSpecsService) Delete(name string) *ProjectsLocationsApisVersionsSpecsDeleteCall {
  8065  	c := &ProjectsLocationsApisVersionsSpecsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8066  	c.name = name
  8067  	return c
  8068  }
  8069  
  8070  // Force sets the optional parameter "force": If set to true, any child
  8071  // resources will also be deleted. (Otherwise, the request will only work if
  8072  // there are no child resources.)
  8073  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Force(force bool) *ProjectsLocationsApisVersionsSpecsDeleteCall {
  8074  	c.urlParams_.Set("force", fmt.Sprint(force))
  8075  	return c
  8076  }
  8077  
  8078  // Fields allows partial responses to be retrieved. See
  8079  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8080  // details.
  8081  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsDeleteCall {
  8082  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8083  	return c
  8084  }
  8085  
  8086  // Context sets the context to be used in this call's Do method.
  8087  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsDeleteCall {
  8088  	c.ctx_ = ctx
  8089  	return c
  8090  }
  8091  
  8092  // Header returns a http.Header that can be modified by the caller to add
  8093  // headers to the request.
  8094  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Header() http.Header {
  8095  	if c.header_ == nil {
  8096  		c.header_ = make(http.Header)
  8097  	}
  8098  	return c.header_
  8099  }
  8100  
  8101  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8102  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8103  	var body io.Reader = nil
  8104  	c.urlParams_.Set("alt", alt)
  8105  	c.urlParams_.Set("prettyPrint", "false")
  8106  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8107  	urls += "?" + c.urlParams_.Encode()
  8108  	req, err := http.NewRequest("DELETE", urls, body)
  8109  	if err != nil {
  8110  		return nil, err
  8111  	}
  8112  	req.Header = reqHeaders
  8113  	googleapi.Expand(req.URL, map[string]string{
  8114  		"name": c.name,
  8115  	})
  8116  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8117  }
  8118  
  8119  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.delete" call.
  8120  // Any non-2xx status code is an error. Response headers are in either
  8121  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8122  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8123  // whether the returned error was because http.StatusNotModified was returned.
  8124  func (c *ProjectsLocationsApisVersionsSpecsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8125  	gensupport.SetOptions(c.urlParams_, opts...)
  8126  	res, err := c.doRequest("json")
  8127  	if res != nil && res.StatusCode == http.StatusNotModified {
  8128  		if res.Body != nil {
  8129  			res.Body.Close()
  8130  		}
  8131  		return nil, gensupport.WrapError(&googleapi.Error{
  8132  			Code:   res.StatusCode,
  8133  			Header: res.Header,
  8134  		})
  8135  	}
  8136  	if err != nil {
  8137  		return nil, err
  8138  	}
  8139  	defer googleapi.CloseBody(res)
  8140  	if err := googleapi.CheckResponse(res); err != nil {
  8141  		return nil, gensupport.WrapError(err)
  8142  	}
  8143  	ret := &Empty{
  8144  		ServerResponse: googleapi.ServerResponse{
  8145  			Header:         res.Header,
  8146  			HTTPStatusCode: res.StatusCode,
  8147  		},
  8148  	}
  8149  	target := &ret
  8150  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8151  		return nil, err
  8152  	}
  8153  	return ret, nil
  8154  }
  8155  
  8156  type ProjectsLocationsApisVersionsSpecsDeleteRevisionCall struct {
  8157  	s          *Service
  8158  	name       string
  8159  	urlParams_ gensupport.URLParams
  8160  	ctx_       context.Context
  8161  	header_    http.Header
  8162  }
  8163  
  8164  // DeleteRevision: Deletes a revision of a spec.
  8165  //
  8166  //   - name: The name of the spec revision to be deleted, with a revision ID
  8167  //     explicitly included. Example:
  8168  //     `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openap
  8169  //     i.yaml@c7cfa2a8`.
  8170  func (r *ProjectsLocationsApisVersionsSpecsService) DeleteRevision(name string) *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall {
  8171  	c := &ProjectsLocationsApisVersionsSpecsDeleteRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8172  	c.name = name
  8173  	return c
  8174  }
  8175  
  8176  // Fields allows partial responses to be retrieved. See
  8177  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8178  // details.
  8179  func (c *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall {
  8180  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8181  	return c
  8182  }
  8183  
  8184  // Context sets the context to be used in this call's Do method.
  8185  func (c *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall {
  8186  	c.ctx_ = ctx
  8187  	return c
  8188  }
  8189  
  8190  // Header returns a http.Header that can be modified by the caller to add
  8191  // headers to the request.
  8192  func (c *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall) Header() http.Header {
  8193  	if c.header_ == nil {
  8194  		c.header_ = make(http.Header)
  8195  	}
  8196  	return c.header_
  8197  }
  8198  
  8199  func (c *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall) doRequest(alt string) (*http.Response, error) {
  8200  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8201  	var body io.Reader = nil
  8202  	c.urlParams_.Set("alt", alt)
  8203  	c.urlParams_.Set("prettyPrint", "false")
  8204  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteRevision")
  8205  	urls += "?" + c.urlParams_.Encode()
  8206  	req, err := http.NewRequest("DELETE", urls, body)
  8207  	if err != nil {
  8208  		return nil, err
  8209  	}
  8210  	req.Header = reqHeaders
  8211  	googleapi.Expand(req.URL, map[string]string{
  8212  		"name": c.name,
  8213  	})
  8214  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8215  }
  8216  
  8217  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.deleteRevision" call.
  8218  // Any non-2xx status code is an error. Response headers are in either
  8219  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  8220  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8221  // whether the returned error was because http.StatusNotModified was returned.
  8222  func (c *ProjectsLocationsApisVersionsSpecsDeleteRevisionCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  8223  	gensupport.SetOptions(c.urlParams_, opts...)
  8224  	res, err := c.doRequest("json")
  8225  	if res != nil && res.StatusCode == http.StatusNotModified {
  8226  		if res.Body != nil {
  8227  			res.Body.Close()
  8228  		}
  8229  		return nil, gensupport.WrapError(&googleapi.Error{
  8230  			Code:   res.StatusCode,
  8231  			Header: res.Header,
  8232  		})
  8233  	}
  8234  	if err != nil {
  8235  		return nil, err
  8236  	}
  8237  	defer googleapi.CloseBody(res)
  8238  	if err := googleapi.CheckResponse(res); err != nil {
  8239  		return nil, gensupport.WrapError(err)
  8240  	}
  8241  	ret := &ApiSpec{
  8242  		ServerResponse: googleapi.ServerResponse{
  8243  			Header:         res.Header,
  8244  			HTTPStatusCode: res.StatusCode,
  8245  		},
  8246  	}
  8247  	target := &ret
  8248  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8249  		return nil, err
  8250  	}
  8251  	return ret, nil
  8252  }
  8253  
  8254  type ProjectsLocationsApisVersionsSpecsGetCall struct {
  8255  	s            *Service
  8256  	name         string
  8257  	urlParams_   gensupport.URLParams
  8258  	ifNoneMatch_ string
  8259  	ctx_         context.Context
  8260  	header_      http.Header
  8261  }
  8262  
  8263  // Get: Returns a specified spec.
  8264  //
  8265  //   - name: The name of the spec to retrieve. Format:
  8266  //     `projects/*/locations/*/apis/*/versions/*/specs/*`.
  8267  func (r *ProjectsLocationsApisVersionsSpecsService) Get(name string) *ProjectsLocationsApisVersionsSpecsGetCall {
  8268  	c := &ProjectsLocationsApisVersionsSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8269  	c.name = name
  8270  	return c
  8271  }
  8272  
  8273  // Fields allows partial responses to be retrieved. See
  8274  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8275  // details.
  8276  func (c *ProjectsLocationsApisVersionsSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsGetCall {
  8277  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8278  	return c
  8279  }
  8280  
  8281  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8282  // object's ETag matches the given value. This is useful for getting updates
  8283  // only after the object has changed since the last request.
  8284  func (c *ProjectsLocationsApisVersionsSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsGetCall {
  8285  	c.ifNoneMatch_ = entityTag
  8286  	return c
  8287  }
  8288  
  8289  // Context sets the context to be used in this call's Do method.
  8290  func (c *ProjectsLocationsApisVersionsSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsGetCall {
  8291  	c.ctx_ = ctx
  8292  	return c
  8293  }
  8294  
  8295  // Header returns a http.Header that can be modified by the caller to add
  8296  // headers to the request.
  8297  func (c *ProjectsLocationsApisVersionsSpecsGetCall) Header() http.Header {
  8298  	if c.header_ == nil {
  8299  		c.header_ = make(http.Header)
  8300  	}
  8301  	return c.header_
  8302  }
  8303  
  8304  func (c *ProjectsLocationsApisVersionsSpecsGetCall) doRequest(alt string) (*http.Response, error) {
  8305  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8306  	if c.ifNoneMatch_ != "" {
  8307  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8308  	}
  8309  	var body io.Reader = nil
  8310  	c.urlParams_.Set("alt", alt)
  8311  	c.urlParams_.Set("prettyPrint", "false")
  8312  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8313  	urls += "?" + c.urlParams_.Encode()
  8314  	req, err := http.NewRequest("GET", urls, body)
  8315  	if err != nil {
  8316  		return nil, err
  8317  	}
  8318  	req.Header = reqHeaders
  8319  	googleapi.Expand(req.URL, map[string]string{
  8320  		"name": c.name,
  8321  	})
  8322  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8323  }
  8324  
  8325  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.get" call.
  8326  // Any non-2xx status code is an error. Response headers are in either
  8327  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  8328  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8329  // whether the returned error was because http.StatusNotModified was returned.
  8330  func (c *ProjectsLocationsApisVersionsSpecsGetCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  8331  	gensupport.SetOptions(c.urlParams_, opts...)
  8332  	res, err := c.doRequest("json")
  8333  	if res != nil && res.StatusCode == http.StatusNotModified {
  8334  		if res.Body != nil {
  8335  			res.Body.Close()
  8336  		}
  8337  		return nil, gensupport.WrapError(&googleapi.Error{
  8338  			Code:   res.StatusCode,
  8339  			Header: res.Header,
  8340  		})
  8341  	}
  8342  	if err != nil {
  8343  		return nil, err
  8344  	}
  8345  	defer googleapi.CloseBody(res)
  8346  	if err := googleapi.CheckResponse(res); err != nil {
  8347  		return nil, gensupport.WrapError(err)
  8348  	}
  8349  	ret := &ApiSpec{
  8350  		ServerResponse: googleapi.ServerResponse{
  8351  			Header:         res.Header,
  8352  			HTTPStatusCode: res.StatusCode,
  8353  		},
  8354  	}
  8355  	target := &ret
  8356  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8357  		return nil, err
  8358  	}
  8359  	return ret, nil
  8360  }
  8361  
  8362  type ProjectsLocationsApisVersionsSpecsGetContentsCall struct {
  8363  	s            *Service
  8364  	name         string
  8365  	urlParams_   gensupport.URLParams
  8366  	ifNoneMatch_ string
  8367  	ctx_         context.Context
  8368  	header_      http.Header
  8369  }
  8370  
  8371  // GetContents: Returns the contents of a specified spec. If specs are stored
  8372  // with GZip compression, the default behavior is to return the spec
  8373  // uncompressed (the mime_type response field indicates the exact format
  8374  // returned).
  8375  //
  8376  //   - name: The name of the spec whose contents should be retrieved. Format:
  8377  //     `projects/*/locations/*/apis/*/versions/*/specs/*`.
  8378  func (r *ProjectsLocationsApisVersionsSpecsService) GetContents(name string) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
  8379  	c := &ProjectsLocationsApisVersionsSpecsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8380  	c.name = name
  8381  	return c
  8382  }
  8383  
  8384  // Fields allows partial responses to be retrieved. See
  8385  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8386  // details.
  8387  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
  8388  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8389  	return c
  8390  }
  8391  
  8392  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8393  // object's ETag matches the given value. This is useful for getting updates
  8394  // only after the object has changed since the last request.
  8395  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
  8396  	c.ifNoneMatch_ = entityTag
  8397  	return c
  8398  }
  8399  
  8400  // Context sets the context to be used in this call's Do method.
  8401  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsGetContentsCall {
  8402  	c.ctx_ = ctx
  8403  	return c
  8404  }
  8405  
  8406  // Header returns a http.Header that can be modified by the caller to add
  8407  // headers to the request.
  8408  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Header() http.Header {
  8409  	if c.header_ == nil {
  8410  		c.header_ = make(http.Header)
  8411  	}
  8412  	return c.header_
  8413  }
  8414  
  8415  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) doRequest(alt string) (*http.Response, error) {
  8416  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8417  	if c.ifNoneMatch_ != "" {
  8418  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8419  	}
  8420  	var body io.Reader = nil
  8421  	c.urlParams_.Set("alt", alt)
  8422  	c.urlParams_.Set("prettyPrint", "false")
  8423  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
  8424  	urls += "?" + c.urlParams_.Encode()
  8425  	req, err := http.NewRequest("GET", urls, body)
  8426  	if err != nil {
  8427  		return nil, err
  8428  	}
  8429  	req.Header = reqHeaders
  8430  	googleapi.Expand(req.URL, map[string]string{
  8431  		"name": c.name,
  8432  	})
  8433  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8434  }
  8435  
  8436  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.getContents" call.
  8437  // Any non-2xx status code is an error. Response headers are in either
  8438  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
  8439  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8440  // whether the returned error was because http.StatusNotModified was returned.
  8441  func (c *ProjectsLocationsApisVersionsSpecsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  8442  	gensupport.SetOptions(c.urlParams_, opts...)
  8443  	res, err := c.doRequest("json")
  8444  	if res != nil && res.StatusCode == http.StatusNotModified {
  8445  		if res.Body != nil {
  8446  			res.Body.Close()
  8447  		}
  8448  		return nil, gensupport.WrapError(&googleapi.Error{
  8449  			Code:   res.StatusCode,
  8450  			Header: res.Header,
  8451  		})
  8452  	}
  8453  	if err != nil {
  8454  		return nil, err
  8455  	}
  8456  	defer googleapi.CloseBody(res)
  8457  	if err := googleapi.CheckResponse(res); err != nil {
  8458  		return nil, gensupport.WrapError(err)
  8459  	}
  8460  	ret := &HttpBody{
  8461  		ServerResponse: googleapi.ServerResponse{
  8462  			Header:         res.Header,
  8463  			HTTPStatusCode: res.StatusCode,
  8464  		},
  8465  	}
  8466  	target := &ret
  8467  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8468  		return nil, err
  8469  	}
  8470  	return ret, nil
  8471  }
  8472  
  8473  type ProjectsLocationsApisVersionsSpecsGetIamPolicyCall struct {
  8474  	s            *Service
  8475  	resource     string
  8476  	urlParams_   gensupport.URLParams
  8477  	ifNoneMatch_ string
  8478  	ctx_         context.Context
  8479  	header_      http.Header
  8480  }
  8481  
  8482  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  8483  // empty policy if the resource exists and does not have a policy set.
  8484  //
  8485  //   - resource: REQUIRED: The resource for which the policy is being requested.
  8486  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  8487  //     for the appropriate value for this field.
  8488  func (r *ProjectsLocationsApisVersionsSpecsService) GetIamPolicy(resource string) *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall {
  8489  	c := &ProjectsLocationsApisVersionsSpecsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8490  	c.resource = resource
  8491  	return c
  8492  }
  8493  
  8494  // OptionsRequestedPolicyVersion sets the optional parameter
  8495  // "options.requestedPolicyVersion": The maximum policy version that will be
  8496  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  8497  // an invalid value will be rejected. Requests for policies with any
  8498  // conditional role bindings must specify version 3. Policies with no
  8499  // conditional role bindings may specify any valid value or leave the field
  8500  // unset. The policy in the response might use the policy version that you
  8501  // specified, or it might use a lower policy version. For example, if you
  8502  // specify version 3, but the policy has no conditional role bindings, the
  8503  // response uses version 1. To learn which resources support conditions in
  8504  // their IAM policies, see the IAM documentation
  8505  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  8506  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall {
  8507  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  8508  	return c
  8509  }
  8510  
  8511  // Fields allows partial responses to be retrieved. See
  8512  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8513  // details.
  8514  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall {
  8515  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8516  	return c
  8517  }
  8518  
  8519  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8520  // object's ETag matches the given value. This is useful for getting updates
  8521  // only after the object has changed since the last request.
  8522  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall {
  8523  	c.ifNoneMatch_ = entityTag
  8524  	return c
  8525  }
  8526  
  8527  // Context sets the context to be used in this call's Do method.
  8528  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall {
  8529  	c.ctx_ = ctx
  8530  	return c
  8531  }
  8532  
  8533  // Header returns a http.Header that can be modified by the caller to add
  8534  // headers to the request.
  8535  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) Header() http.Header {
  8536  	if c.header_ == nil {
  8537  		c.header_ = make(http.Header)
  8538  	}
  8539  	return c.header_
  8540  }
  8541  
  8542  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8544  	if c.ifNoneMatch_ != "" {
  8545  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8546  	}
  8547  	var body io.Reader = nil
  8548  	c.urlParams_.Set("alt", alt)
  8549  	c.urlParams_.Set("prettyPrint", "false")
  8550  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  8551  	urls += "?" + c.urlParams_.Encode()
  8552  	req, err := http.NewRequest("GET", urls, body)
  8553  	if err != nil {
  8554  		return nil, err
  8555  	}
  8556  	req.Header = reqHeaders
  8557  	googleapi.Expand(req.URL, map[string]string{
  8558  		"resource": c.resource,
  8559  	})
  8560  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8561  }
  8562  
  8563  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.getIamPolicy" call.
  8564  // Any non-2xx status code is an error. Response headers are in either
  8565  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8566  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8567  // whether the returned error was because http.StatusNotModified was returned.
  8568  func (c *ProjectsLocationsApisVersionsSpecsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8569  	gensupport.SetOptions(c.urlParams_, opts...)
  8570  	res, err := c.doRequest("json")
  8571  	if res != nil && res.StatusCode == http.StatusNotModified {
  8572  		if res.Body != nil {
  8573  			res.Body.Close()
  8574  		}
  8575  		return nil, gensupport.WrapError(&googleapi.Error{
  8576  			Code:   res.StatusCode,
  8577  			Header: res.Header,
  8578  		})
  8579  	}
  8580  	if err != nil {
  8581  		return nil, err
  8582  	}
  8583  	defer googleapi.CloseBody(res)
  8584  	if err := googleapi.CheckResponse(res); err != nil {
  8585  		return nil, gensupport.WrapError(err)
  8586  	}
  8587  	ret := &Policy{
  8588  		ServerResponse: googleapi.ServerResponse{
  8589  			Header:         res.Header,
  8590  			HTTPStatusCode: res.StatusCode,
  8591  		},
  8592  	}
  8593  	target := &ret
  8594  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8595  		return nil, err
  8596  	}
  8597  	return ret, nil
  8598  }
  8599  
  8600  type ProjectsLocationsApisVersionsSpecsListCall struct {
  8601  	s            *Service
  8602  	parent       string
  8603  	urlParams_   gensupport.URLParams
  8604  	ifNoneMatch_ string
  8605  	ctx_         context.Context
  8606  	header_      http.Header
  8607  }
  8608  
  8609  // List: Returns matching specs.
  8610  //
  8611  //   - parent: The parent, which owns this collection of specs. Format:
  8612  //     `projects/*/locations/*/apis/*/versions/*`.
  8613  func (r *ProjectsLocationsApisVersionsSpecsService) List(parent string) *ProjectsLocationsApisVersionsSpecsListCall {
  8614  	c := &ProjectsLocationsApisVersionsSpecsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8615  	c.parent = parent
  8616  	return c
  8617  }
  8618  
  8619  // Filter sets the optional parameter "filter": An expression that can be used
  8620  // to filter the list. Filters use the Common Expression Language and can refer
  8621  // to all message fields except contents.
  8622  func (c *ProjectsLocationsApisVersionsSpecsListCall) Filter(filter string) *ProjectsLocationsApisVersionsSpecsListCall {
  8623  	c.urlParams_.Set("filter", filter)
  8624  	return c
  8625  }
  8626  
  8627  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  8628  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
  8629  // "desc" identifier, e.g. "foo desc,bar"
  8630  func (c *ProjectsLocationsApisVersionsSpecsListCall) OrderBy(orderBy string) *ProjectsLocationsApisVersionsSpecsListCall {
  8631  	c.urlParams_.Set("orderBy", orderBy)
  8632  	return c
  8633  }
  8634  
  8635  // PageSize sets the optional parameter "pageSize": The maximum number of specs
  8636  // to return. The service may return fewer than this value. If unspecified, at
  8637  // most 50 values will be returned. The maximum is 1000; values above 1000 will
  8638  // be coerced to 1000.
  8639  func (c *ProjectsLocationsApisVersionsSpecsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsSpecsListCall {
  8640  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8641  	return c
  8642  }
  8643  
  8644  // PageToken sets the optional parameter "pageToken": A page token, received
  8645  // from a previous `ListApiSpecs` call. Provide this to retrieve the subsequent
  8646  // page. When paginating, all other parameters provided to `ListApiSpecs` must
  8647  // match the call that provided the page token.
  8648  func (c *ProjectsLocationsApisVersionsSpecsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsSpecsListCall {
  8649  	c.urlParams_.Set("pageToken", pageToken)
  8650  	return c
  8651  }
  8652  
  8653  // Fields allows partial responses to be retrieved. See
  8654  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8655  // details.
  8656  func (c *ProjectsLocationsApisVersionsSpecsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsListCall {
  8657  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8658  	return c
  8659  }
  8660  
  8661  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8662  // object's ETag matches the given value. This is useful for getting updates
  8663  // only after the object has changed since the last request.
  8664  func (c *ProjectsLocationsApisVersionsSpecsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsListCall {
  8665  	c.ifNoneMatch_ = entityTag
  8666  	return c
  8667  }
  8668  
  8669  // Context sets the context to be used in this call's Do method.
  8670  func (c *ProjectsLocationsApisVersionsSpecsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsListCall {
  8671  	c.ctx_ = ctx
  8672  	return c
  8673  }
  8674  
  8675  // Header returns a http.Header that can be modified by the caller to add
  8676  // headers to the request.
  8677  func (c *ProjectsLocationsApisVersionsSpecsListCall) Header() http.Header {
  8678  	if c.header_ == nil {
  8679  		c.header_ = make(http.Header)
  8680  	}
  8681  	return c.header_
  8682  }
  8683  
  8684  func (c *ProjectsLocationsApisVersionsSpecsListCall) doRequest(alt string) (*http.Response, error) {
  8685  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8686  	if c.ifNoneMatch_ != "" {
  8687  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8688  	}
  8689  	var body io.Reader = nil
  8690  	c.urlParams_.Set("alt", alt)
  8691  	c.urlParams_.Set("prettyPrint", "false")
  8692  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/specs")
  8693  	urls += "?" + c.urlParams_.Encode()
  8694  	req, err := http.NewRequest("GET", urls, body)
  8695  	if err != nil {
  8696  		return nil, err
  8697  	}
  8698  	req.Header = reqHeaders
  8699  	googleapi.Expand(req.URL, map[string]string{
  8700  		"parent": c.parent,
  8701  	})
  8702  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8703  }
  8704  
  8705  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.list" call.
  8706  // Any non-2xx status code is an error. Response headers are in either
  8707  // *ListApiSpecsResponse.ServerResponse.Header or (if a response was returned
  8708  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8709  // check whether the returned error was because http.StatusNotModified was
  8710  // returned.
  8711  func (c *ProjectsLocationsApisVersionsSpecsListCall) Do(opts ...googleapi.CallOption) (*ListApiSpecsResponse, error) {
  8712  	gensupport.SetOptions(c.urlParams_, opts...)
  8713  	res, err := c.doRequest("json")
  8714  	if res != nil && res.StatusCode == http.StatusNotModified {
  8715  		if res.Body != nil {
  8716  			res.Body.Close()
  8717  		}
  8718  		return nil, gensupport.WrapError(&googleapi.Error{
  8719  			Code:   res.StatusCode,
  8720  			Header: res.Header,
  8721  		})
  8722  	}
  8723  	if err != nil {
  8724  		return nil, err
  8725  	}
  8726  	defer googleapi.CloseBody(res)
  8727  	if err := googleapi.CheckResponse(res); err != nil {
  8728  		return nil, gensupport.WrapError(err)
  8729  	}
  8730  	ret := &ListApiSpecsResponse{
  8731  		ServerResponse: googleapi.ServerResponse{
  8732  			Header:         res.Header,
  8733  			HTTPStatusCode: res.StatusCode,
  8734  		},
  8735  	}
  8736  	target := &ret
  8737  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8738  		return nil, err
  8739  	}
  8740  	return ret, nil
  8741  }
  8742  
  8743  // Pages invokes f for each page of results.
  8744  // A non-nil error returned from f will halt the iteration.
  8745  // The provided context supersedes any context provided to the Context method.
  8746  func (c *ProjectsLocationsApisVersionsSpecsListCall) Pages(ctx context.Context, f func(*ListApiSpecsResponse) error) error {
  8747  	c.ctx_ = ctx
  8748  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8749  	for {
  8750  		x, err := c.Do()
  8751  		if err != nil {
  8752  			return err
  8753  		}
  8754  		if err := f(x); err != nil {
  8755  			return err
  8756  		}
  8757  		if x.NextPageToken == "" {
  8758  			return nil
  8759  		}
  8760  		c.PageToken(x.NextPageToken)
  8761  	}
  8762  }
  8763  
  8764  type ProjectsLocationsApisVersionsSpecsListRevisionsCall struct {
  8765  	s            *Service
  8766  	name         string
  8767  	urlParams_   gensupport.URLParams
  8768  	ifNoneMatch_ string
  8769  	ctx_         context.Context
  8770  	header_      http.Header
  8771  }
  8772  
  8773  // ListRevisions: Lists all revisions of a spec. Revisions are returned in
  8774  // descending order of revision creation time.
  8775  //
  8776  // - name: The name of the spec to list revisions for.
  8777  func (r *ProjectsLocationsApisVersionsSpecsService) ListRevisions(name string) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8778  	c := &ProjectsLocationsApisVersionsSpecsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8779  	c.name = name
  8780  	return c
  8781  }
  8782  
  8783  // Filter sets the optional parameter "filter": An expression that can be used
  8784  // to filter the list. Filters use the Common Expression Language and can refer
  8785  // to all message fields.
  8786  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Filter(filter string) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8787  	c.urlParams_.Set("filter", filter)
  8788  	return c
  8789  }
  8790  
  8791  // PageSize sets the optional parameter "pageSize": The maximum number of
  8792  // revisions to return per page.
  8793  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8794  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8795  	return c
  8796  }
  8797  
  8798  // PageToken sets the optional parameter "pageToken": The page token, received
  8799  // from a previous ListApiSpecRevisions call. Provide this to retrieve the
  8800  // subsequent page.
  8801  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8802  	c.urlParams_.Set("pageToken", pageToken)
  8803  	return c
  8804  }
  8805  
  8806  // Fields allows partial responses to be retrieved. See
  8807  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8808  // details.
  8809  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8810  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8811  	return c
  8812  }
  8813  
  8814  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8815  // object's ETag matches the given value. This is useful for getting updates
  8816  // only after the object has changed since the last request.
  8817  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8818  	c.ifNoneMatch_ = entityTag
  8819  	return c
  8820  }
  8821  
  8822  // Context sets the context to be used in this call's Do method.
  8823  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsListRevisionsCall {
  8824  	c.ctx_ = ctx
  8825  	return c
  8826  }
  8827  
  8828  // Header returns a http.Header that can be modified by the caller to add
  8829  // headers to the request.
  8830  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Header() http.Header {
  8831  	if c.header_ == nil {
  8832  		c.header_ = make(http.Header)
  8833  	}
  8834  	return c.header_
  8835  }
  8836  
  8837  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
  8838  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8839  	if c.ifNoneMatch_ != "" {
  8840  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8841  	}
  8842  	var body io.Reader = nil
  8843  	c.urlParams_.Set("alt", alt)
  8844  	c.urlParams_.Set("prettyPrint", "false")
  8845  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions")
  8846  	urls += "?" + c.urlParams_.Encode()
  8847  	req, err := http.NewRequest("GET", urls, body)
  8848  	if err != nil {
  8849  		return nil, err
  8850  	}
  8851  	req.Header = reqHeaders
  8852  	googleapi.Expand(req.URL, map[string]string{
  8853  		"name": c.name,
  8854  	})
  8855  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8856  }
  8857  
  8858  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.listRevisions" call.
  8859  // Any non-2xx status code is an error. Response headers are in either
  8860  // *ListApiSpecRevisionsResponse.ServerResponse.Header or (if a response was
  8861  // returned at all) in error.(*googleapi.Error).Header. Use
  8862  // googleapi.IsNotModified to check whether the returned error was because
  8863  // http.StatusNotModified was returned.
  8864  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListApiSpecRevisionsResponse, error) {
  8865  	gensupport.SetOptions(c.urlParams_, opts...)
  8866  	res, err := c.doRequest("json")
  8867  	if res != nil && res.StatusCode == http.StatusNotModified {
  8868  		if res.Body != nil {
  8869  			res.Body.Close()
  8870  		}
  8871  		return nil, gensupport.WrapError(&googleapi.Error{
  8872  			Code:   res.StatusCode,
  8873  			Header: res.Header,
  8874  		})
  8875  	}
  8876  	if err != nil {
  8877  		return nil, err
  8878  	}
  8879  	defer googleapi.CloseBody(res)
  8880  	if err := googleapi.CheckResponse(res); err != nil {
  8881  		return nil, gensupport.WrapError(err)
  8882  	}
  8883  	ret := &ListApiSpecRevisionsResponse{
  8884  		ServerResponse: googleapi.ServerResponse{
  8885  			Header:         res.Header,
  8886  			HTTPStatusCode: res.StatusCode,
  8887  		},
  8888  	}
  8889  	target := &ret
  8890  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8891  		return nil, err
  8892  	}
  8893  	return ret, nil
  8894  }
  8895  
  8896  // Pages invokes f for each page of results.
  8897  // A non-nil error returned from f will halt the iteration.
  8898  // The provided context supersedes any context provided to the Context method.
  8899  func (c *ProjectsLocationsApisVersionsSpecsListRevisionsCall) Pages(ctx context.Context, f func(*ListApiSpecRevisionsResponse) error) error {
  8900  	c.ctx_ = ctx
  8901  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8902  	for {
  8903  		x, err := c.Do()
  8904  		if err != nil {
  8905  			return err
  8906  		}
  8907  		if err := f(x); err != nil {
  8908  			return err
  8909  		}
  8910  		if x.NextPageToken == "" {
  8911  			return nil
  8912  		}
  8913  		c.PageToken(x.NextPageToken)
  8914  	}
  8915  }
  8916  
  8917  type ProjectsLocationsApisVersionsSpecsPatchCall struct {
  8918  	s          *Service
  8919  	name       string
  8920  	apispec    *ApiSpec
  8921  	urlParams_ gensupport.URLParams
  8922  	ctx_       context.Context
  8923  	header_    http.Header
  8924  }
  8925  
  8926  // Patch: Used to modify a specified spec.
  8927  //
  8928  // - name: Resource name.
  8929  func (r *ProjectsLocationsApisVersionsSpecsService) Patch(name string, apispec *ApiSpec) *ProjectsLocationsApisVersionsSpecsPatchCall {
  8930  	c := &ProjectsLocationsApisVersionsSpecsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8931  	c.name = name
  8932  	c.apispec = apispec
  8933  	return c
  8934  }
  8935  
  8936  // AllowMissing sets the optional parameter "allowMissing": If set to true, and
  8937  // the spec is not found, a new spec will be created. In this situation,
  8938  // `update_mask` is ignored.
  8939  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsApisVersionsSpecsPatchCall {
  8940  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  8941  	return c
  8942  }
  8943  
  8944  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  8945  // be updated. If omitted, all fields are updated that are set in the request
  8946  // message (fields set to default values are ignored). If an asterisk "*" is
  8947  // specified, all fields are updated, including fields that are
  8948  // unspecified/default in the request.
  8949  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisVersionsSpecsPatchCall {
  8950  	c.urlParams_.Set("updateMask", updateMask)
  8951  	return c
  8952  }
  8953  
  8954  // Fields allows partial responses to be retrieved. See
  8955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8956  // details.
  8957  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsPatchCall {
  8958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8959  	return c
  8960  }
  8961  
  8962  // Context sets the context to be used in this call's Do method.
  8963  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsPatchCall {
  8964  	c.ctx_ = ctx
  8965  	return c
  8966  }
  8967  
  8968  // Header returns a http.Header that can be modified by the caller to add
  8969  // headers to the request.
  8970  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Header() http.Header {
  8971  	if c.header_ == nil {
  8972  		c.header_ = make(http.Header)
  8973  	}
  8974  	return c.header_
  8975  }
  8976  
  8977  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) doRequest(alt string) (*http.Response, error) {
  8978  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8979  	var body io.Reader = nil
  8980  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apispec)
  8981  	if err != nil {
  8982  		return nil, err
  8983  	}
  8984  	c.urlParams_.Set("alt", alt)
  8985  	c.urlParams_.Set("prettyPrint", "false")
  8986  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8987  	urls += "?" + c.urlParams_.Encode()
  8988  	req, err := http.NewRequest("PATCH", urls, body)
  8989  	if err != nil {
  8990  		return nil, err
  8991  	}
  8992  	req.Header = reqHeaders
  8993  	googleapi.Expand(req.URL, map[string]string{
  8994  		"name": c.name,
  8995  	})
  8996  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8997  }
  8998  
  8999  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.patch" call.
  9000  // Any non-2xx status code is an error. Response headers are in either
  9001  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  9002  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9003  // whether the returned error was because http.StatusNotModified was returned.
  9004  func (c *ProjectsLocationsApisVersionsSpecsPatchCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  9005  	gensupport.SetOptions(c.urlParams_, opts...)
  9006  	res, err := c.doRequest("json")
  9007  	if res != nil && res.StatusCode == http.StatusNotModified {
  9008  		if res.Body != nil {
  9009  			res.Body.Close()
  9010  		}
  9011  		return nil, gensupport.WrapError(&googleapi.Error{
  9012  			Code:   res.StatusCode,
  9013  			Header: res.Header,
  9014  		})
  9015  	}
  9016  	if err != nil {
  9017  		return nil, err
  9018  	}
  9019  	defer googleapi.CloseBody(res)
  9020  	if err := googleapi.CheckResponse(res); err != nil {
  9021  		return nil, gensupport.WrapError(err)
  9022  	}
  9023  	ret := &ApiSpec{
  9024  		ServerResponse: googleapi.ServerResponse{
  9025  			Header:         res.Header,
  9026  			HTTPStatusCode: res.StatusCode,
  9027  		},
  9028  	}
  9029  	target := &ret
  9030  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9031  		return nil, err
  9032  	}
  9033  	return ret, nil
  9034  }
  9035  
  9036  type ProjectsLocationsApisVersionsSpecsRollbackCall struct {
  9037  	s                      *Service
  9038  	name                   string
  9039  	rollbackapispecrequest *RollbackApiSpecRequest
  9040  	urlParams_             gensupport.URLParams
  9041  	ctx_                   context.Context
  9042  	header_                http.Header
  9043  }
  9044  
  9045  // Rollback: Sets the current revision to a specified prior revision. Note that
  9046  // this creates a new revision with a new revision ID.
  9047  //
  9048  // - name: The spec being rolled back.
  9049  func (r *ProjectsLocationsApisVersionsSpecsService) Rollback(name string, rollbackapispecrequest *RollbackApiSpecRequest) *ProjectsLocationsApisVersionsSpecsRollbackCall {
  9050  	c := &ProjectsLocationsApisVersionsSpecsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9051  	c.name = name
  9052  	c.rollbackapispecrequest = rollbackapispecrequest
  9053  	return c
  9054  }
  9055  
  9056  // Fields allows partial responses to be retrieved. See
  9057  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9058  // details.
  9059  func (c *ProjectsLocationsApisVersionsSpecsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsRollbackCall {
  9060  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9061  	return c
  9062  }
  9063  
  9064  // Context sets the context to be used in this call's Do method.
  9065  func (c *ProjectsLocationsApisVersionsSpecsRollbackCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsRollbackCall {
  9066  	c.ctx_ = ctx
  9067  	return c
  9068  }
  9069  
  9070  // Header returns a http.Header that can be modified by the caller to add
  9071  // headers to the request.
  9072  func (c *ProjectsLocationsApisVersionsSpecsRollbackCall) Header() http.Header {
  9073  	if c.header_ == nil {
  9074  		c.header_ = make(http.Header)
  9075  	}
  9076  	return c.header_
  9077  }
  9078  
  9079  func (c *ProjectsLocationsApisVersionsSpecsRollbackCall) doRequest(alt string) (*http.Response, error) {
  9080  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9081  	var body io.Reader = nil
  9082  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackapispecrequest)
  9083  	if err != nil {
  9084  		return nil, err
  9085  	}
  9086  	c.urlParams_.Set("alt", alt)
  9087  	c.urlParams_.Set("prettyPrint", "false")
  9088  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
  9089  	urls += "?" + c.urlParams_.Encode()
  9090  	req, err := http.NewRequest("POST", urls, body)
  9091  	if err != nil {
  9092  		return nil, err
  9093  	}
  9094  	req.Header = reqHeaders
  9095  	googleapi.Expand(req.URL, map[string]string{
  9096  		"name": c.name,
  9097  	})
  9098  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9099  }
  9100  
  9101  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.rollback" call.
  9102  // Any non-2xx status code is an error. Response headers are in either
  9103  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  9104  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9105  // whether the returned error was because http.StatusNotModified was returned.
  9106  func (c *ProjectsLocationsApisVersionsSpecsRollbackCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  9107  	gensupport.SetOptions(c.urlParams_, opts...)
  9108  	res, err := c.doRequest("json")
  9109  	if res != nil && res.StatusCode == http.StatusNotModified {
  9110  		if res.Body != nil {
  9111  			res.Body.Close()
  9112  		}
  9113  		return nil, gensupport.WrapError(&googleapi.Error{
  9114  			Code:   res.StatusCode,
  9115  			Header: res.Header,
  9116  		})
  9117  	}
  9118  	if err != nil {
  9119  		return nil, err
  9120  	}
  9121  	defer googleapi.CloseBody(res)
  9122  	if err := googleapi.CheckResponse(res); err != nil {
  9123  		return nil, gensupport.WrapError(err)
  9124  	}
  9125  	ret := &ApiSpec{
  9126  		ServerResponse: googleapi.ServerResponse{
  9127  			Header:         res.Header,
  9128  			HTTPStatusCode: res.StatusCode,
  9129  		},
  9130  	}
  9131  	target := &ret
  9132  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9133  		return nil, err
  9134  	}
  9135  	return ret, nil
  9136  }
  9137  
  9138  type ProjectsLocationsApisVersionsSpecsSetIamPolicyCall struct {
  9139  	s                   *Service
  9140  	resource            string
  9141  	setiampolicyrequest *SetIamPolicyRequest
  9142  	urlParams_          gensupport.URLParams
  9143  	ctx_                context.Context
  9144  	header_             http.Header
  9145  }
  9146  
  9147  // SetIamPolicy: Sets the access control policy on the specified resource.
  9148  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  9149  // and `PERMISSION_DENIED` errors.
  9150  //
  9151  //   - resource: REQUIRED: The resource for which the policy is being specified.
  9152  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9153  //     for the appropriate value for this field.
  9154  func (r *ProjectsLocationsApisVersionsSpecsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall {
  9155  	c := &ProjectsLocationsApisVersionsSpecsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9156  	c.resource = resource
  9157  	c.setiampolicyrequest = setiampolicyrequest
  9158  	return c
  9159  }
  9160  
  9161  // Fields allows partial responses to be retrieved. See
  9162  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9163  // details.
  9164  func (c *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall {
  9165  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9166  	return c
  9167  }
  9168  
  9169  // Context sets the context to be used in this call's Do method.
  9170  func (c *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall {
  9171  	c.ctx_ = ctx
  9172  	return c
  9173  }
  9174  
  9175  // Header returns a http.Header that can be modified by the caller to add
  9176  // headers to the request.
  9177  func (c *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall) Header() http.Header {
  9178  	if c.header_ == nil {
  9179  		c.header_ = make(http.Header)
  9180  	}
  9181  	return c.header_
  9182  }
  9183  
  9184  func (c *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9185  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9186  	var body io.Reader = nil
  9187  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  9188  	if err != nil {
  9189  		return nil, err
  9190  	}
  9191  	c.urlParams_.Set("alt", alt)
  9192  	c.urlParams_.Set("prettyPrint", "false")
  9193  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  9194  	urls += "?" + c.urlParams_.Encode()
  9195  	req, err := http.NewRequest("POST", urls, body)
  9196  	if err != nil {
  9197  		return nil, err
  9198  	}
  9199  	req.Header = reqHeaders
  9200  	googleapi.Expand(req.URL, map[string]string{
  9201  		"resource": c.resource,
  9202  	})
  9203  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9204  }
  9205  
  9206  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.setIamPolicy" call.
  9207  // Any non-2xx status code is an error. Response headers are in either
  9208  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9209  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9210  // whether the returned error was because http.StatusNotModified was returned.
  9211  func (c *ProjectsLocationsApisVersionsSpecsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9212  	gensupport.SetOptions(c.urlParams_, opts...)
  9213  	res, err := c.doRequest("json")
  9214  	if res != nil && res.StatusCode == http.StatusNotModified {
  9215  		if res.Body != nil {
  9216  			res.Body.Close()
  9217  		}
  9218  		return nil, gensupport.WrapError(&googleapi.Error{
  9219  			Code:   res.StatusCode,
  9220  			Header: res.Header,
  9221  		})
  9222  	}
  9223  	if err != nil {
  9224  		return nil, err
  9225  	}
  9226  	defer googleapi.CloseBody(res)
  9227  	if err := googleapi.CheckResponse(res); err != nil {
  9228  		return nil, gensupport.WrapError(err)
  9229  	}
  9230  	ret := &Policy{
  9231  		ServerResponse: googleapi.ServerResponse{
  9232  			Header:         res.Header,
  9233  			HTTPStatusCode: res.StatusCode,
  9234  		},
  9235  	}
  9236  	target := &ret
  9237  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9238  		return nil, err
  9239  	}
  9240  	return ret, nil
  9241  }
  9242  
  9243  type ProjectsLocationsApisVersionsSpecsTagRevisionCall struct {
  9244  	s                         *Service
  9245  	name                      string
  9246  	tagapispecrevisionrequest *TagApiSpecRevisionRequest
  9247  	urlParams_                gensupport.URLParams
  9248  	ctx_                      context.Context
  9249  	header_                   http.Header
  9250  }
  9251  
  9252  // TagRevision: Adds a tag to a specified revision of a spec.
  9253  //
  9254  //   - name: The name of the spec to be tagged, including the revision ID is
  9255  //     optional. If a revision is not specified, it will tag the latest revision.
  9256  func (r *ProjectsLocationsApisVersionsSpecsService) TagRevision(name string, tagapispecrevisionrequest *TagApiSpecRevisionRequest) *ProjectsLocationsApisVersionsSpecsTagRevisionCall {
  9257  	c := &ProjectsLocationsApisVersionsSpecsTagRevisionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9258  	c.name = name
  9259  	c.tagapispecrevisionrequest = tagapispecrevisionrequest
  9260  	return c
  9261  }
  9262  
  9263  // Fields allows partial responses to be retrieved. See
  9264  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9265  // details.
  9266  func (c *ProjectsLocationsApisVersionsSpecsTagRevisionCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsTagRevisionCall {
  9267  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9268  	return c
  9269  }
  9270  
  9271  // Context sets the context to be used in this call's Do method.
  9272  func (c *ProjectsLocationsApisVersionsSpecsTagRevisionCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsTagRevisionCall {
  9273  	c.ctx_ = ctx
  9274  	return c
  9275  }
  9276  
  9277  // Header returns a http.Header that can be modified by the caller to add
  9278  // headers to the request.
  9279  func (c *ProjectsLocationsApisVersionsSpecsTagRevisionCall) Header() http.Header {
  9280  	if c.header_ == nil {
  9281  		c.header_ = make(http.Header)
  9282  	}
  9283  	return c.header_
  9284  }
  9285  
  9286  func (c *ProjectsLocationsApisVersionsSpecsTagRevisionCall) doRequest(alt string) (*http.Response, error) {
  9287  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9288  	var body io.Reader = nil
  9289  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagapispecrevisionrequest)
  9290  	if err != nil {
  9291  		return nil, err
  9292  	}
  9293  	c.urlParams_.Set("alt", alt)
  9294  	c.urlParams_.Set("prettyPrint", "false")
  9295  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:tagRevision")
  9296  	urls += "?" + c.urlParams_.Encode()
  9297  	req, err := http.NewRequest("POST", urls, body)
  9298  	if err != nil {
  9299  		return nil, err
  9300  	}
  9301  	req.Header = reqHeaders
  9302  	googleapi.Expand(req.URL, map[string]string{
  9303  		"name": c.name,
  9304  	})
  9305  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9306  }
  9307  
  9308  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.tagRevision" call.
  9309  // Any non-2xx status code is an error. Response headers are in either
  9310  // *ApiSpec.ServerResponse.Header or (if a response was returned at all) in
  9311  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9312  // whether the returned error was because http.StatusNotModified was returned.
  9313  func (c *ProjectsLocationsApisVersionsSpecsTagRevisionCall) Do(opts ...googleapi.CallOption) (*ApiSpec, error) {
  9314  	gensupport.SetOptions(c.urlParams_, opts...)
  9315  	res, err := c.doRequest("json")
  9316  	if res != nil && res.StatusCode == http.StatusNotModified {
  9317  		if res.Body != nil {
  9318  			res.Body.Close()
  9319  		}
  9320  		return nil, gensupport.WrapError(&googleapi.Error{
  9321  			Code:   res.StatusCode,
  9322  			Header: res.Header,
  9323  		})
  9324  	}
  9325  	if err != nil {
  9326  		return nil, err
  9327  	}
  9328  	defer googleapi.CloseBody(res)
  9329  	if err := googleapi.CheckResponse(res); err != nil {
  9330  		return nil, gensupport.WrapError(err)
  9331  	}
  9332  	ret := &ApiSpec{
  9333  		ServerResponse: googleapi.ServerResponse{
  9334  			Header:         res.Header,
  9335  			HTTPStatusCode: res.StatusCode,
  9336  		},
  9337  	}
  9338  	target := &ret
  9339  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9340  		return nil, err
  9341  	}
  9342  	return ret, nil
  9343  }
  9344  
  9345  type ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall struct {
  9346  	s                         *Service
  9347  	resource                  string
  9348  	testiampermissionsrequest *TestIamPermissionsRequest
  9349  	urlParams_                gensupport.URLParams
  9350  	ctx_                      context.Context
  9351  	header_                   http.Header
  9352  }
  9353  
  9354  // TestIamPermissions: Returns permissions that a caller has on the specified
  9355  // resource. If the resource does not exist, this will return an empty set of
  9356  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  9357  // used for building permission-aware UIs and command-line tools, not for
  9358  // authorization checking. This operation may "fail open" without warning.
  9359  //
  9360  //   - resource: REQUIRED: The resource for which the policy detail is being
  9361  //     requested. See Resource names
  9362  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  9363  //     value for this field.
  9364  func (r *ProjectsLocationsApisVersionsSpecsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall {
  9365  	c := &ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9366  	c.resource = resource
  9367  	c.testiampermissionsrequest = testiampermissionsrequest
  9368  	return c
  9369  }
  9370  
  9371  // Fields allows partial responses to be retrieved. See
  9372  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9373  // details.
  9374  func (c *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall {
  9375  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9376  	return c
  9377  }
  9378  
  9379  // Context sets the context to be used in this call's Do method.
  9380  func (c *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall {
  9381  	c.ctx_ = ctx
  9382  	return c
  9383  }
  9384  
  9385  // Header returns a http.Header that can be modified by the caller to add
  9386  // headers to the request.
  9387  func (c *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall) Header() http.Header {
  9388  	if c.header_ == nil {
  9389  		c.header_ = make(http.Header)
  9390  	}
  9391  	return c.header_
  9392  }
  9393  
  9394  func (c *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  9395  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9396  	var body io.Reader = nil
  9397  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  9398  	if err != nil {
  9399  		return nil, err
  9400  	}
  9401  	c.urlParams_.Set("alt", alt)
  9402  	c.urlParams_.Set("prettyPrint", "false")
  9403  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  9404  	urls += "?" + c.urlParams_.Encode()
  9405  	req, err := http.NewRequest("POST", urls, body)
  9406  	if err != nil {
  9407  		return nil, err
  9408  	}
  9409  	req.Header = reqHeaders
  9410  	googleapi.Expand(req.URL, map[string]string{
  9411  		"resource": c.resource,
  9412  	})
  9413  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9414  }
  9415  
  9416  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.testIamPermissions" call.
  9417  // Any non-2xx status code is an error. Response headers are in either
  9418  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  9419  // returned at all) in error.(*googleapi.Error).Header. Use
  9420  // googleapi.IsNotModified to check whether the returned error was because
  9421  // http.StatusNotModified was returned.
  9422  func (c *ProjectsLocationsApisVersionsSpecsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  9423  	gensupport.SetOptions(c.urlParams_, opts...)
  9424  	res, err := c.doRequest("json")
  9425  	if res != nil && res.StatusCode == http.StatusNotModified {
  9426  		if res.Body != nil {
  9427  			res.Body.Close()
  9428  		}
  9429  		return nil, gensupport.WrapError(&googleapi.Error{
  9430  			Code:   res.StatusCode,
  9431  			Header: res.Header,
  9432  		})
  9433  	}
  9434  	if err != nil {
  9435  		return nil, err
  9436  	}
  9437  	defer googleapi.CloseBody(res)
  9438  	if err := googleapi.CheckResponse(res); err != nil {
  9439  		return nil, gensupport.WrapError(err)
  9440  	}
  9441  	ret := &TestIamPermissionsResponse{
  9442  		ServerResponse: googleapi.ServerResponse{
  9443  			Header:         res.Header,
  9444  			HTTPStatusCode: res.StatusCode,
  9445  		},
  9446  	}
  9447  	target := &ret
  9448  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9449  		return nil, err
  9450  	}
  9451  	return ret, nil
  9452  }
  9453  
  9454  type ProjectsLocationsApisVersionsSpecsArtifactsCreateCall struct {
  9455  	s          *Service
  9456  	parent     string
  9457  	artifact   *Artifact
  9458  	urlParams_ gensupport.URLParams
  9459  	ctx_       context.Context
  9460  	header_    http.Header
  9461  }
  9462  
  9463  // Create: Creates a specified artifact.
  9464  //
  9465  //   - parent: The parent, which owns this collection of artifacts. Format:
  9466  //     `{parent}`.
  9467  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) Create(parent string, artifact *Artifact) *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall {
  9468  	c := &ProjectsLocationsApisVersionsSpecsArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9469  	c.parent = parent
  9470  	c.artifact = artifact
  9471  	return c
  9472  }
  9473  
  9474  // ArtifactId sets the optional parameter "artifactId": Required. The ID to use
  9475  // for the artifact, which will become the final component of the artifact's
  9476  // resource name. This value should be 4-63 characters, and valid characters
  9477  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
  9478  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall {
  9479  	c.urlParams_.Set("artifactId", artifactId)
  9480  	return c
  9481  }
  9482  
  9483  // Fields allows partial responses to be retrieved. See
  9484  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9485  // details.
  9486  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall {
  9487  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9488  	return c
  9489  }
  9490  
  9491  // Context sets the context to be used in this call's Do method.
  9492  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall {
  9493  	c.ctx_ = ctx
  9494  	return c
  9495  }
  9496  
  9497  // Header returns a http.Header that can be modified by the caller to add
  9498  // headers to the request.
  9499  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) Header() http.Header {
  9500  	if c.header_ == nil {
  9501  		c.header_ = make(http.Header)
  9502  	}
  9503  	return c.header_
  9504  }
  9505  
  9506  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
  9507  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9508  	var body io.Reader = nil
  9509  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
  9510  	if err != nil {
  9511  		return nil, err
  9512  	}
  9513  	c.urlParams_.Set("alt", alt)
  9514  	c.urlParams_.Set("prettyPrint", "false")
  9515  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
  9516  	urls += "?" + c.urlParams_.Encode()
  9517  	req, err := http.NewRequest("POST", urls, body)
  9518  	if err != nil {
  9519  		return nil, err
  9520  	}
  9521  	req.Header = reqHeaders
  9522  	googleapi.Expand(req.URL, map[string]string{
  9523  		"parent": c.parent,
  9524  	})
  9525  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9526  }
  9527  
  9528  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.create" call.
  9529  // Any non-2xx status code is an error. Response headers are in either
  9530  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  9531  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9532  // whether the returned error was because http.StatusNotModified was returned.
  9533  func (c *ProjectsLocationsApisVersionsSpecsArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  9534  	gensupport.SetOptions(c.urlParams_, opts...)
  9535  	res, err := c.doRequest("json")
  9536  	if res != nil && res.StatusCode == http.StatusNotModified {
  9537  		if res.Body != nil {
  9538  			res.Body.Close()
  9539  		}
  9540  		return nil, gensupport.WrapError(&googleapi.Error{
  9541  			Code:   res.StatusCode,
  9542  			Header: res.Header,
  9543  		})
  9544  	}
  9545  	if err != nil {
  9546  		return nil, err
  9547  	}
  9548  	defer googleapi.CloseBody(res)
  9549  	if err := googleapi.CheckResponse(res); err != nil {
  9550  		return nil, gensupport.WrapError(err)
  9551  	}
  9552  	ret := &Artifact{
  9553  		ServerResponse: googleapi.ServerResponse{
  9554  			Header:         res.Header,
  9555  			HTTPStatusCode: res.StatusCode,
  9556  		},
  9557  	}
  9558  	target := &ret
  9559  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9560  		return nil, err
  9561  	}
  9562  	return ret, nil
  9563  }
  9564  
  9565  type ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall struct {
  9566  	s          *Service
  9567  	name       string
  9568  	urlParams_ gensupport.URLParams
  9569  	ctx_       context.Context
  9570  	header_    http.Header
  9571  }
  9572  
  9573  // Delete: Removes a specified artifact.
  9574  //
  9575  // - name: The name of the artifact to delete. Format: `{parent}/artifacts/*`.
  9576  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) Delete(name string) *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall {
  9577  	c := &ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9578  	c.name = name
  9579  	return c
  9580  }
  9581  
  9582  // Fields allows partial responses to be retrieved. See
  9583  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9584  // details.
  9585  func (c *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall {
  9586  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9587  	return c
  9588  }
  9589  
  9590  // Context sets the context to be used in this call's Do method.
  9591  func (c *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall {
  9592  	c.ctx_ = ctx
  9593  	return c
  9594  }
  9595  
  9596  // Header returns a http.Header that can be modified by the caller to add
  9597  // headers to the request.
  9598  func (c *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall) Header() http.Header {
  9599  	if c.header_ == nil {
  9600  		c.header_ = make(http.Header)
  9601  	}
  9602  	return c.header_
  9603  }
  9604  
  9605  func (c *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9606  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9607  	var body io.Reader = nil
  9608  	c.urlParams_.Set("alt", alt)
  9609  	c.urlParams_.Set("prettyPrint", "false")
  9610  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9611  	urls += "?" + c.urlParams_.Encode()
  9612  	req, err := http.NewRequest("DELETE", urls, body)
  9613  	if err != nil {
  9614  		return nil, err
  9615  	}
  9616  	req.Header = reqHeaders
  9617  	googleapi.Expand(req.URL, map[string]string{
  9618  		"name": c.name,
  9619  	})
  9620  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9621  }
  9622  
  9623  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.delete" call.
  9624  // Any non-2xx status code is an error. Response headers are in either
  9625  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9626  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9627  // whether the returned error was because http.StatusNotModified was returned.
  9628  func (c *ProjectsLocationsApisVersionsSpecsArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9629  	gensupport.SetOptions(c.urlParams_, opts...)
  9630  	res, err := c.doRequest("json")
  9631  	if res != nil && res.StatusCode == http.StatusNotModified {
  9632  		if res.Body != nil {
  9633  			res.Body.Close()
  9634  		}
  9635  		return nil, gensupport.WrapError(&googleapi.Error{
  9636  			Code:   res.StatusCode,
  9637  			Header: res.Header,
  9638  		})
  9639  	}
  9640  	if err != nil {
  9641  		return nil, err
  9642  	}
  9643  	defer googleapi.CloseBody(res)
  9644  	if err := googleapi.CheckResponse(res); err != nil {
  9645  		return nil, gensupport.WrapError(err)
  9646  	}
  9647  	ret := &Empty{
  9648  		ServerResponse: googleapi.ServerResponse{
  9649  			Header:         res.Header,
  9650  			HTTPStatusCode: res.StatusCode,
  9651  		},
  9652  	}
  9653  	target := &ret
  9654  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9655  		return nil, err
  9656  	}
  9657  	return ret, nil
  9658  }
  9659  
  9660  type ProjectsLocationsApisVersionsSpecsArtifactsGetCall struct {
  9661  	s            *Service
  9662  	name         string
  9663  	urlParams_   gensupport.URLParams
  9664  	ifNoneMatch_ string
  9665  	ctx_         context.Context
  9666  	header_      http.Header
  9667  }
  9668  
  9669  // Get: Returns a specified artifact.
  9670  //
  9671  // - name: The name of the artifact to retrieve. Format: `{parent}/artifacts/*`.
  9672  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) Get(name string) *ProjectsLocationsApisVersionsSpecsArtifactsGetCall {
  9673  	c := &ProjectsLocationsApisVersionsSpecsArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9674  	c.name = name
  9675  	return c
  9676  }
  9677  
  9678  // Fields allows partial responses to be retrieved. See
  9679  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9680  // details.
  9681  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsGetCall {
  9682  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9683  	return c
  9684  }
  9685  
  9686  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9687  // object's ETag matches the given value. This is useful for getting updates
  9688  // only after the object has changed since the last request.
  9689  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsArtifactsGetCall {
  9690  	c.ifNoneMatch_ = entityTag
  9691  	return c
  9692  }
  9693  
  9694  // Context sets the context to be used in this call's Do method.
  9695  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsGetCall {
  9696  	c.ctx_ = ctx
  9697  	return c
  9698  }
  9699  
  9700  // Header returns a http.Header that can be modified by the caller to add
  9701  // headers to the request.
  9702  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) Header() http.Header {
  9703  	if c.header_ == nil {
  9704  		c.header_ = make(http.Header)
  9705  	}
  9706  	return c.header_
  9707  }
  9708  
  9709  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
  9710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9711  	if c.ifNoneMatch_ != "" {
  9712  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9713  	}
  9714  	var body io.Reader = nil
  9715  	c.urlParams_.Set("alt", alt)
  9716  	c.urlParams_.Set("prettyPrint", "false")
  9717  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9718  	urls += "?" + c.urlParams_.Encode()
  9719  	req, err := http.NewRequest("GET", urls, body)
  9720  	if err != nil {
  9721  		return nil, err
  9722  	}
  9723  	req.Header = reqHeaders
  9724  	googleapi.Expand(req.URL, map[string]string{
  9725  		"name": c.name,
  9726  	})
  9727  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9728  }
  9729  
  9730  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.get" call.
  9731  // Any non-2xx status code is an error. Response headers are in either
  9732  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
  9733  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9734  // whether the returned error was because http.StatusNotModified was returned.
  9735  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
  9736  	gensupport.SetOptions(c.urlParams_, opts...)
  9737  	res, err := c.doRequest("json")
  9738  	if res != nil && res.StatusCode == http.StatusNotModified {
  9739  		if res.Body != nil {
  9740  			res.Body.Close()
  9741  		}
  9742  		return nil, gensupport.WrapError(&googleapi.Error{
  9743  			Code:   res.StatusCode,
  9744  			Header: res.Header,
  9745  		})
  9746  	}
  9747  	if err != nil {
  9748  		return nil, err
  9749  	}
  9750  	defer googleapi.CloseBody(res)
  9751  	if err := googleapi.CheckResponse(res); err != nil {
  9752  		return nil, gensupport.WrapError(err)
  9753  	}
  9754  	ret := &Artifact{
  9755  		ServerResponse: googleapi.ServerResponse{
  9756  			Header:         res.Header,
  9757  			HTTPStatusCode: res.StatusCode,
  9758  		},
  9759  	}
  9760  	target := &ret
  9761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9762  		return nil, err
  9763  	}
  9764  	return ret, nil
  9765  }
  9766  
  9767  type ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall struct {
  9768  	s            *Service
  9769  	name         string
  9770  	urlParams_   gensupport.URLParams
  9771  	ifNoneMatch_ string
  9772  	ctx_         context.Context
  9773  	header_      http.Header
  9774  }
  9775  
  9776  // GetContents: Returns the contents of a specified artifact. If artifacts are
  9777  // stored with GZip compression, the default behavior is to return the artifact
  9778  // uncompressed (the mime_type response field indicates the exact format
  9779  // returned).
  9780  //
  9781  //   - name: The name of the artifact whose contents should be retrieved. Format:
  9782  //     `{parent}/artifacts/*`.
  9783  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) GetContents(name string) *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall {
  9784  	c := &ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9785  	c.name = name
  9786  	return c
  9787  }
  9788  
  9789  // Fields allows partial responses to be retrieved. See
  9790  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9791  // details.
  9792  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall {
  9793  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9794  	return c
  9795  }
  9796  
  9797  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9798  // object's ETag matches the given value. This is useful for getting updates
  9799  // only after the object has changed since the last request.
  9800  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall {
  9801  	c.ifNoneMatch_ = entityTag
  9802  	return c
  9803  }
  9804  
  9805  // Context sets the context to be used in this call's Do method.
  9806  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall {
  9807  	c.ctx_ = ctx
  9808  	return c
  9809  }
  9810  
  9811  // Header returns a http.Header that can be modified by the caller to add
  9812  // headers to the request.
  9813  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) Header() http.Header {
  9814  	if c.header_ == nil {
  9815  		c.header_ = make(http.Header)
  9816  	}
  9817  	return c.header_
  9818  }
  9819  
  9820  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) doRequest(alt string) (*http.Response, error) {
  9821  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9822  	if c.ifNoneMatch_ != "" {
  9823  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9824  	}
  9825  	var body io.Reader = nil
  9826  	c.urlParams_.Set("alt", alt)
  9827  	c.urlParams_.Set("prettyPrint", "false")
  9828  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
  9829  	urls += "?" + c.urlParams_.Encode()
  9830  	req, err := http.NewRequest("GET", urls, body)
  9831  	if err != nil {
  9832  		return nil, err
  9833  	}
  9834  	req.Header = reqHeaders
  9835  	googleapi.Expand(req.URL, map[string]string{
  9836  		"name": c.name,
  9837  	})
  9838  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9839  }
  9840  
  9841  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.getContents" call.
  9842  // Any non-2xx status code is an error. Response headers are in either
  9843  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
  9844  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9845  // whether the returned error was because http.StatusNotModified was returned.
  9846  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
  9847  	gensupport.SetOptions(c.urlParams_, opts...)
  9848  	res, err := c.doRequest("json")
  9849  	if res != nil && res.StatusCode == http.StatusNotModified {
  9850  		if res.Body != nil {
  9851  			res.Body.Close()
  9852  		}
  9853  		return nil, gensupport.WrapError(&googleapi.Error{
  9854  			Code:   res.StatusCode,
  9855  			Header: res.Header,
  9856  		})
  9857  	}
  9858  	if err != nil {
  9859  		return nil, err
  9860  	}
  9861  	defer googleapi.CloseBody(res)
  9862  	if err := googleapi.CheckResponse(res); err != nil {
  9863  		return nil, gensupport.WrapError(err)
  9864  	}
  9865  	ret := &HttpBody{
  9866  		ServerResponse: googleapi.ServerResponse{
  9867  			Header:         res.Header,
  9868  			HTTPStatusCode: res.StatusCode,
  9869  		},
  9870  	}
  9871  	target := &ret
  9872  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9873  		return nil, err
  9874  	}
  9875  	return ret, nil
  9876  }
  9877  
  9878  type ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall struct {
  9879  	s            *Service
  9880  	resource     string
  9881  	urlParams_   gensupport.URLParams
  9882  	ifNoneMatch_ string
  9883  	ctx_         context.Context
  9884  	header_      http.Header
  9885  }
  9886  
  9887  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  9888  // empty policy if the resource exists and does not have a policy set.
  9889  //
  9890  //   - resource: REQUIRED: The resource for which the policy is being requested.
  9891  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9892  //     for the appropriate value for this field.
  9893  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) GetIamPolicy(resource string) *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall {
  9894  	c := &ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9895  	c.resource = resource
  9896  	return c
  9897  }
  9898  
  9899  // OptionsRequestedPolicyVersion sets the optional parameter
  9900  // "options.requestedPolicyVersion": The maximum policy version that will be
  9901  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  9902  // an invalid value will be rejected. Requests for policies with any
  9903  // conditional role bindings must specify version 3. Policies with no
  9904  // conditional role bindings may specify any valid value or leave the field
  9905  // unset. The policy in the response might use the policy version that you
  9906  // specified, or it might use a lower policy version. For example, if you
  9907  // specify version 3, but the policy has no conditional role bindings, the
  9908  // response uses version 1. To learn which resources support conditions in
  9909  // their IAM policies, see the IAM documentation
  9910  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  9911  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall {
  9912  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  9913  	return c
  9914  }
  9915  
  9916  // Fields allows partial responses to be retrieved. See
  9917  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9918  // details.
  9919  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall {
  9920  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9921  	return c
  9922  }
  9923  
  9924  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9925  // object's ETag matches the given value. This is useful for getting updates
  9926  // only after the object has changed since the last request.
  9927  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall {
  9928  	c.ifNoneMatch_ = entityTag
  9929  	return c
  9930  }
  9931  
  9932  // Context sets the context to be used in this call's Do method.
  9933  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall {
  9934  	c.ctx_ = ctx
  9935  	return c
  9936  }
  9937  
  9938  // Header returns a http.Header that can be modified by the caller to add
  9939  // headers to the request.
  9940  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) Header() http.Header {
  9941  	if c.header_ == nil {
  9942  		c.header_ = make(http.Header)
  9943  	}
  9944  	return c.header_
  9945  }
  9946  
  9947  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9948  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9949  	if c.ifNoneMatch_ != "" {
  9950  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9951  	}
  9952  	var body io.Reader = nil
  9953  	c.urlParams_.Set("alt", alt)
  9954  	c.urlParams_.Set("prettyPrint", "false")
  9955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  9956  	urls += "?" + c.urlParams_.Encode()
  9957  	req, err := http.NewRequest("GET", urls, body)
  9958  	if err != nil {
  9959  		return nil, err
  9960  	}
  9961  	req.Header = reqHeaders
  9962  	googleapi.Expand(req.URL, map[string]string{
  9963  		"resource": c.resource,
  9964  	})
  9965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9966  }
  9967  
  9968  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.getIamPolicy" call.
  9969  // Any non-2xx status code is an error. Response headers are in either
  9970  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9971  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9972  // whether the returned error was because http.StatusNotModified was returned.
  9973  func (c *ProjectsLocationsApisVersionsSpecsArtifactsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9974  	gensupport.SetOptions(c.urlParams_, opts...)
  9975  	res, err := c.doRequest("json")
  9976  	if res != nil && res.StatusCode == http.StatusNotModified {
  9977  		if res.Body != nil {
  9978  			res.Body.Close()
  9979  		}
  9980  		return nil, gensupport.WrapError(&googleapi.Error{
  9981  			Code:   res.StatusCode,
  9982  			Header: res.Header,
  9983  		})
  9984  	}
  9985  	if err != nil {
  9986  		return nil, err
  9987  	}
  9988  	defer googleapi.CloseBody(res)
  9989  	if err := googleapi.CheckResponse(res); err != nil {
  9990  		return nil, gensupport.WrapError(err)
  9991  	}
  9992  	ret := &Policy{
  9993  		ServerResponse: googleapi.ServerResponse{
  9994  			Header:         res.Header,
  9995  			HTTPStatusCode: res.StatusCode,
  9996  		},
  9997  	}
  9998  	target := &ret
  9999  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10000  		return nil, err
 10001  	}
 10002  	return ret, nil
 10003  }
 10004  
 10005  type ProjectsLocationsApisVersionsSpecsArtifactsListCall struct {
 10006  	s            *Service
 10007  	parent       string
 10008  	urlParams_   gensupport.URLParams
 10009  	ifNoneMatch_ string
 10010  	ctx_         context.Context
 10011  	header_      http.Header
 10012  }
 10013  
 10014  // List: Returns matching artifacts.
 10015  //
 10016  //   - parent: The parent, which owns this collection of artifacts. Format:
 10017  //     `{parent}`.
 10018  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) List(parent string) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10019  	c := &ProjectsLocationsApisVersionsSpecsArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10020  	c.parent = parent
 10021  	return c
 10022  }
 10023  
 10024  // Filter sets the optional parameter "filter": An expression that can be used
 10025  // to filter the list. Filters use the Common Expression Language and can refer
 10026  // to all message fields except contents.
 10027  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Filter(filter string) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10028  	c.urlParams_.Set("filter", filter)
 10029  	return c
 10030  }
 10031  
 10032  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
 10033  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
 10034  // "desc" identifier, e.g. "foo desc,bar"
 10035  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10036  	c.urlParams_.Set("orderBy", orderBy)
 10037  	return c
 10038  }
 10039  
 10040  // PageSize sets the optional parameter "pageSize": The maximum number of
 10041  // artifacts to return. The service may return fewer than this value. If
 10042  // unspecified, at most 50 values will be returned. The maximum is 1000; values
 10043  // above 1000 will be coerced to 1000.
 10044  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10045  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10046  	return c
 10047  }
 10048  
 10049  // PageToken sets the optional parameter "pageToken": A page token, received
 10050  // from a previous `ListArtifacts` call. Provide this to retrieve the
 10051  // subsequent page. When paginating, all other parameters provided to
 10052  // `ListArtifacts` must match the call that provided the page token.
 10053  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10054  	c.urlParams_.Set("pageToken", pageToken)
 10055  	return c
 10056  }
 10057  
 10058  // Fields allows partial responses to be retrieved. See
 10059  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10060  // details.
 10061  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10062  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10063  	return c
 10064  }
 10065  
 10066  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10067  // object's ETag matches the given value. This is useful for getting updates
 10068  // only after the object has changed since the last request.
 10069  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10070  	c.ifNoneMatch_ = entityTag
 10071  	return c
 10072  }
 10073  
 10074  // Context sets the context to be used in this call's Do method.
 10075  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsListCall {
 10076  	c.ctx_ = ctx
 10077  	return c
 10078  }
 10079  
 10080  // Header returns a http.Header that can be modified by the caller to add
 10081  // headers to the request.
 10082  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Header() http.Header {
 10083  	if c.header_ == nil {
 10084  		c.header_ = make(http.Header)
 10085  	}
 10086  	return c.header_
 10087  }
 10088  
 10089  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) doRequest(alt string) (*http.Response, error) {
 10090  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10091  	if c.ifNoneMatch_ != "" {
 10092  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10093  	}
 10094  	var body io.Reader = nil
 10095  	c.urlParams_.Set("alt", alt)
 10096  	c.urlParams_.Set("prettyPrint", "false")
 10097  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
 10098  	urls += "?" + c.urlParams_.Encode()
 10099  	req, err := http.NewRequest("GET", urls, body)
 10100  	if err != nil {
 10101  		return nil, err
 10102  	}
 10103  	req.Header = reqHeaders
 10104  	googleapi.Expand(req.URL, map[string]string{
 10105  		"parent": c.parent,
 10106  	})
 10107  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10108  }
 10109  
 10110  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.list" call.
 10111  // Any non-2xx status code is an error. Response headers are in either
 10112  // *ListArtifactsResponse.ServerResponse.Header or (if a response was returned
 10113  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10114  // check whether the returned error was because http.StatusNotModified was
 10115  // returned.
 10116  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListArtifactsResponse, error) {
 10117  	gensupport.SetOptions(c.urlParams_, opts...)
 10118  	res, err := c.doRequest("json")
 10119  	if res != nil && res.StatusCode == http.StatusNotModified {
 10120  		if res.Body != nil {
 10121  			res.Body.Close()
 10122  		}
 10123  		return nil, gensupport.WrapError(&googleapi.Error{
 10124  			Code:   res.StatusCode,
 10125  			Header: res.Header,
 10126  		})
 10127  	}
 10128  	if err != nil {
 10129  		return nil, err
 10130  	}
 10131  	defer googleapi.CloseBody(res)
 10132  	if err := googleapi.CheckResponse(res); err != nil {
 10133  		return nil, gensupport.WrapError(err)
 10134  	}
 10135  	ret := &ListArtifactsResponse{
 10136  		ServerResponse: googleapi.ServerResponse{
 10137  			Header:         res.Header,
 10138  			HTTPStatusCode: res.StatusCode,
 10139  		},
 10140  	}
 10141  	target := &ret
 10142  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10143  		return nil, err
 10144  	}
 10145  	return ret, nil
 10146  }
 10147  
 10148  // Pages invokes f for each page of results.
 10149  // A non-nil error returned from f will halt the iteration.
 10150  // The provided context supersedes any context provided to the Context method.
 10151  func (c *ProjectsLocationsApisVersionsSpecsArtifactsListCall) Pages(ctx context.Context, f func(*ListArtifactsResponse) error) error {
 10152  	c.ctx_ = ctx
 10153  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10154  	for {
 10155  		x, err := c.Do()
 10156  		if err != nil {
 10157  			return err
 10158  		}
 10159  		if err := f(x); err != nil {
 10160  			return err
 10161  		}
 10162  		if x.NextPageToken == "" {
 10163  			return nil
 10164  		}
 10165  		c.PageToken(x.NextPageToken)
 10166  	}
 10167  }
 10168  
 10169  type ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall struct {
 10170  	s          *Service
 10171  	name       string
 10172  	artifact   *Artifact
 10173  	urlParams_ gensupport.URLParams
 10174  	ctx_       context.Context
 10175  	header_    http.Header
 10176  }
 10177  
 10178  // ReplaceArtifact: Used to replace a specified artifact.
 10179  //
 10180  // - name: Resource name.
 10181  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) ReplaceArtifact(name string, artifact *Artifact) *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall {
 10182  	c := &ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10183  	c.name = name
 10184  	c.artifact = artifact
 10185  	return c
 10186  }
 10187  
 10188  // Fields allows partial responses to be retrieved. See
 10189  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10190  // details.
 10191  func (c *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall {
 10192  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10193  	return c
 10194  }
 10195  
 10196  // Context sets the context to be used in this call's Do method.
 10197  func (c *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall {
 10198  	c.ctx_ = ctx
 10199  	return c
 10200  }
 10201  
 10202  // Header returns a http.Header that can be modified by the caller to add
 10203  // headers to the request.
 10204  func (c *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall) Header() http.Header {
 10205  	if c.header_ == nil {
 10206  		c.header_ = make(http.Header)
 10207  	}
 10208  	return c.header_
 10209  }
 10210  
 10211  func (c *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall) doRequest(alt string) (*http.Response, error) {
 10212  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10213  	var body io.Reader = nil
 10214  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
 10215  	if err != nil {
 10216  		return nil, err
 10217  	}
 10218  	c.urlParams_.Set("alt", alt)
 10219  	c.urlParams_.Set("prettyPrint", "false")
 10220  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10221  	urls += "?" + c.urlParams_.Encode()
 10222  	req, err := http.NewRequest("PUT", urls, body)
 10223  	if err != nil {
 10224  		return nil, err
 10225  	}
 10226  	req.Header = reqHeaders
 10227  	googleapi.Expand(req.URL, map[string]string{
 10228  		"name": c.name,
 10229  	})
 10230  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10231  }
 10232  
 10233  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.replaceArtifact" call.
 10234  // Any non-2xx status code is an error. Response headers are in either
 10235  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
 10236  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10237  // whether the returned error was because http.StatusNotModified was returned.
 10238  func (c *ProjectsLocationsApisVersionsSpecsArtifactsReplaceArtifactCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
 10239  	gensupport.SetOptions(c.urlParams_, opts...)
 10240  	res, err := c.doRequest("json")
 10241  	if res != nil && res.StatusCode == http.StatusNotModified {
 10242  		if res.Body != nil {
 10243  			res.Body.Close()
 10244  		}
 10245  		return nil, gensupport.WrapError(&googleapi.Error{
 10246  			Code:   res.StatusCode,
 10247  			Header: res.Header,
 10248  		})
 10249  	}
 10250  	if err != nil {
 10251  		return nil, err
 10252  	}
 10253  	defer googleapi.CloseBody(res)
 10254  	if err := googleapi.CheckResponse(res); err != nil {
 10255  		return nil, gensupport.WrapError(err)
 10256  	}
 10257  	ret := &Artifact{
 10258  		ServerResponse: googleapi.ServerResponse{
 10259  			Header:         res.Header,
 10260  			HTTPStatusCode: res.StatusCode,
 10261  		},
 10262  	}
 10263  	target := &ret
 10264  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10265  		return nil, err
 10266  	}
 10267  	return ret, nil
 10268  }
 10269  
 10270  type ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall struct {
 10271  	s                   *Service
 10272  	resource            string
 10273  	setiampolicyrequest *SetIamPolicyRequest
 10274  	urlParams_          gensupport.URLParams
 10275  	ctx_                context.Context
 10276  	header_             http.Header
 10277  }
 10278  
 10279  // SetIamPolicy: Sets the access control policy on the specified resource.
 10280  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 10281  // and `PERMISSION_DENIED` errors.
 10282  //
 10283  //   - resource: REQUIRED: The resource for which the policy is being specified.
 10284  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10285  //     for the appropriate value for this field.
 10286  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall {
 10287  	c := &ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10288  	c.resource = resource
 10289  	c.setiampolicyrequest = setiampolicyrequest
 10290  	return c
 10291  }
 10292  
 10293  // Fields allows partial responses to be retrieved. See
 10294  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10295  // details.
 10296  func (c *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall {
 10297  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10298  	return c
 10299  }
 10300  
 10301  // Context sets the context to be used in this call's Do method.
 10302  func (c *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall {
 10303  	c.ctx_ = ctx
 10304  	return c
 10305  }
 10306  
 10307  // Header returns a http.Header that can be modified by the caller to add
 10308  // headers to the request.
 10309  func (c *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall) Header() http.Header {
 10310  	if c.header_ == nil {
 10311  		c.header_ = make(http.Header)
 10312  	}
 10313  	return c.header_
 10314  }
 10315  
 10316  func (c *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10317  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10318  	var body io.Reader = nil
 10319  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 10320  	if err != nil {
 10321  		return nil, err
 10322  	}
 10323  	c.urlParams_.Set("alt", alt)
 10324  	c.urlParams_.Set("prettyPrint", "false")
 10325  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 10326  	urls += "?" + c.urlParams_.Encode()
 10327  	req, err := http.NewRequest("POST", urls, body)
 10328  	if err != nil {
 10329  		return nil, err
 10330  	}
 10331  	req.Header = reqHeaders
 10332  	googleapi.Expand(req.URL, map[string]string{
 10333  		"resource": c.resource,
 10334  	})
 10335  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10336  }
 10337  
 10338  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.setIamPolicy" call.
 10339  // Any non-2xx status code is an error. Response headers are in either
 10340  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10341  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10342  // whether the returned error was because http.StatusNotModified was returned.
 10343  func (c *ProjectsLocationsApisVersionsSpecsArtifactsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10344  	gensupport.SetOptions(c.urlParams_, opts...)
 10345  	res, err := c.doRequest("json")
 10346  	if res != nil && res.StatusCode == http.StatusNotModified {
 10347  		if res.Body != nil {
 10348  			res.Body.Close()
 10349  		}
 10350  		return nil, gensupport.WrapError(&googleapi.Error{
 10351  			Code:   res.StatusCode,
 10352  			Header: res.Header,
 10353  		})
 10354  	}
 10355  	if err != nil {
 10356  		return nil, err
 10357  	}
 10358  	defer googleapi.CloseBody(res)
 10359  	if err := googleapi.CheckResponse(res); err != nil {
 10360  		return nil, gensupport.WrapError(err)
 10361  	}
 10362  	ret := &Policy{
 10363  		ServerResponse: googleapi.ServerResponse{
 10364  			Header:         res.Header,
 10365  			HTTPStatusCode: res.StatusCode,
 10366  		},
 10367  	}
 10368  	target := &ret
 10369  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10370  		return nil, err
 10371  	}
 10372  	return ret, nil
 10373  }
 10374  
 10375  type ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall struct {
 10376  	s                         *Service
 10377  	resource                  string
 10378  	testiampermissionsrequest *TestIamPermissionsRequest
 10379  	urlParams_                gensupport.URLParams
 10380  	ctx_                      context.Context
 10381  	header_                   http.Header
 10382  }
 10383  
 10384  // TestIamPermissions: Returns permissions that a caller has on the specified
 10385  // resource. If the resource does not exist, this will return an empty set of
 10386  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 10387  // used for building permission-aware UIs and command-line tools, not for
 10388  // authorization checking. This operation may "fail open" without warning.
 10389  //
 10390  //   - resource: REQUIRED: The resource for which the policy detail is being
 10391  //     requested. See Resource names
 10392  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 10393  //     value for this field.
 10394  func (r *ProjectsLocationsApisVersionsSpecsArtifactsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall {
 10395  	c := &ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10396  	c.resource = resource
 10397  	c.testiampermissionsrequest = testiampermissionsrequest
 10398  	return c
 10399  }
 10400  
 10401  // Fields allows partial responses to be retrieved. See
 10402  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10403  // details.
 10404  func (c *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall {
 10405  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10406  	return c
 10407  }
 10408  
 10409  // Context sets the context to be used in this call's Do method.
 10410  func (c *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall {
 10411  	c.ctx_ = ctx
 10412  	return c
 10413  }
 10414  
 10415  // Header returns a http.Header that can be modified by the caller to add
 10416  // headers to the request.
 10417  func (c *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall) Header() http.Header {
 10418  	if c.header_ == nil {
 10419  		c.header_ = make(http.Header)
 10420  	}
 10421  	return c.header_
 10422  }
 10423  
 10424  func (c *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 10425  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10426  	var body io.Reader = nil
 10427  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 10428  	if err != nil {
 10429  		return nil, err
 10430  	}
 10431  	c.urlParams_.Set("alt", alt)
 10432  	c.urlParams_.Set("prettyPrint", "false")
 10433  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 10434  	urls += "?" + c.urlParams_.Encode()
 10435  	req, err := http.NewRequest("POST", urls, body)
 10436  	if err != nil {
 10437  		return nil, err
 10438  	}
 10439  	req.Header = reqHeaders
 10440  	googleapi.Expand(req.URL, map[string]string{
 10441  		"resource": c.resource,
 10442  	})
 10443  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10444  }
 10445  
 10446  // Do executes the "apigeeregistry.projects.locations.apis.versions.specs.artifacts.testIamPermissions" call.
 10447  // Any non-2xx status code is an error. Response headers are in either
 10448  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 10449  // returned at all) in error.(*googleapi.Error).Header. Use
 10450  // googleapi.IsNotModified to check whether the returned error was because
 10451  // http.StatusNotModified was returned.
 10452  func (c *ProjectsLocationsApisVersionsSpecsArtifactsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 10453  	gensupport.SetOptions(c.urlParams_, opts...)
 10454  	res, err := c.doRequest("json")
 10455  	if res != nil && res.StatusCode == http.StatusNotModified {
 10456  		if res.Body != nil {
 10457  			res.Body.Close()
 10458  		}
 10459  		return nil, gensupport.WrapError(&googleapi.Error{
 10460  			Code:   res.StatusCode,
 10461  			Header: res.Header,
 10462  		})
 10463  	}
 10464  	if err != nil {
 10465  		return nil, err
 10466  	}
 10467  	defer googleapi.CloseBody(res)
 10468  	if err := googleapi.CheckResponse(res); err != nil {
 10469  		return nil, gensupport.WrapError(err)
 10470  	}
 10471  	ret := &TestIamPermissionsResponse{
 10472  		ServerResponse: googleapi.ServerResponse{
 10473  			Header:         res.Header,
 10474  			HTTPStatusCode: res.StatusCode,
 10475  		},
 10476  	}
 10477  	target := &ret
 10478  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10479  		return nil, err
 10480  	}
 10481  	return ret, nil
 10482  }
 10483  
 10484  type ProjectsLocationsArtifactsCreateCall struct {
 10485  	s          *Service
 10486  	parent     string
 10487  	artifact   *Artifact
 10488  	urlParams_ gensupport.URLParams
 10489  	ctx_       context.Context
 10490  	header_    http.Header
 10491  }
 10492  
 10493  // Create: Creates a specified artifact.
 10494  //
 10495  //   - parent: The parent, which owns this collection of artifacts. Format:
 10496  //     `{parent}`.
 10497  func (r *ProjectsLocationsArtifactsService) Create(parent string, artifact *Artifact) *ProjectsLocationsArtifactsCreateCall {
 10498  	c := &ProjectsLocationsArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10499  	c.parent = parent
 10500  	c.artifact = artifact
 10501  	return c
 10502  }
 10503  
 10504  // ArtifactId sets the optional parameter "artifactId": Required. The ID to use
 10505  // for the artifact, which will become the final component of the artifact's
 10506  // resource name. This value should be 4-63 characters, and valid characters
 10507  // are /a-z-/. Following AIP-162, IDs must not have the form of a UUID.
 10508  func (c *ProjectsLocationsArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsArtifactsCreateCall {
 10509  	c.urlParams_.Set("artifactId", artifactId)
 10510  	return c
 10511  }
 10512  
 10513  // Fields allows partial responses to be retrieved. See
 10514  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10515  // details.
 10516  func (c *ProjectsLocationsArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsCreateCall {
 10517  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10518  	return c
 10519  }
 10520  
 10521  // Context sets the context to be used in this call's Do method.
 10522  func (c *ProjectsLocationsArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsArtifactsCreateCall {
 10523  	c.ctx_ = ctx
 10524  	return c
 10525  }
 10526  
 10527  // Header returns a http.Header that can be modified by the caller to add
 10528  // headers to the request.
 10529  func (c *ProjectsLocationsArtifactsCreateCall) Header() http.Header {
 10530  	if c.header_ == nil {
 10531  		c.header_ = make(http.Header)
 10532  	}
 10533  	return c.header_
 10534  }
 10535  
 10536  func (c *ProjectsLocationsArtifactsCreateCall) doRequest(alt string) (*http.Response, error) {
 10537  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10538  	var body io.Reader = nil
 10539  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
 10540  	if err != nil {
 10541  		return nil, err
 10542  	}
 10543  	c.urlParams_.Set("alt", alt)
 10544  	c.urlParams_.Set("prettyPrint", "false")
 10545  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
 10546  	urls += "?" + c.urlParams_.Encode()
 10547  	req, err := http.NewRequest("POST", urls, body)
 10548  	if err != nil {
 10549  		return nil, err
 10550  	}
 10551  	req.Header = reqHeaders
 10552  	googleapi.Expand(req.URL, map[string]string{
 10553  		"parent": c.parent,
 10554  	})
 10555  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10556  }
 10557  
 10558  // Do executes the "apigeeregistry.projects.locations.artifacts.create" call.
 10559  // Any non-2xx status code is an error. Response headers are in either
 10560  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
 10561  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10562  // whether the returned error was because http.StatusNotModified was returned.
 10563  func (c *ProjectsLocationsArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
 10564  	gensupport.SetOptions(c.urlParams_, opts...)
 10565  	res, err := c.doRequest("json")
 10566  	if res != nil && res.StatusCode == http.StatusNotModified {
 10567  		if res.Body != nil {
 10568  			res.Body.Close()
 10569  		}
 10570  		return nil, gensupport.WrapError(&googleapi.Error{
 10571  			Code:   res.StatusCode,
 10572  			Header: res.Header,
 10573  		})
 10574  	}
 10575  	if err != nil {
 10576  		return nil, err
 10577  	}
 10578  	defer googleapi.CloseBody(res)
 10579  	if err := googleapi.CheckResponse(res); err != nil {
 10580  		return nil, gensupport.WrapError(err)
 10581  	}
 10582  	ret := &Artifact{
 10583  		ServerResponse: googleapi.ServerResponse{
 10584  			Header:         res.Header,
 10585  			HTTPStatusCode: res.StatusCode,
 10586  		},
 10587  	}
 10588  	target := &ret
 10589  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10590  		return nil, err
 10591  	}
 10592  	return ret, nil
 10593  }
 10594  
 10595  type ProjectsLocationsArtifactsDeleteCall struct {
 10596  	s          *Service
 10597  	name       string
 10598  	urlParams_ gensupport.URLParams
 10599  	ctx_       context.Context
 10600  	header_    http.Header
 10601  }
 10602  
 10603  // Delete: Removes a specified artifact.
 10604  //
 10605  // - name: The name of the artifact to delete. Format: `{parent}/artifacts/*`.
 10606  func (r *ProjectsLocationsArtifactsService) Delete(name string) *ProjectsLocationsArtifactsDeleteCall {
 10607  	c := &ProjectsLocationsArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10608  	c.name = name
 10609  	return c
 10610  }
 10611  
 10612  // Fields allows partial responses to be retrieved. See
 10613  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10614  // details.
 10615  func (c *ProjectsLocationsArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsDeleteCall {
 10616  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10617  	return c
 10618  }
 10619  
 10620  // Context sets the context to be used in this call's Do method.
 10621  func (c *ProjectsLocationsArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsArtifactsDeleteCall {
 10622  	c.ctx_ = ctx
 10623  	return c
 10624  }
 10625  
 10626  // Header returns a http.Header that can be modified by the caller to add
 10627  // headers to the request.
 10628  func (c *ProjectsLocationsArtifactsDeleteCall) Header() http.Header {
 10629  	if c.header_ == nil {
 10630  		c.header_ = make(http.Header)
 10631  	}
 10632  	return c.header_
 10633  }
 10634  
 10635  func (c *ProjectsLocationsArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10636  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10637  	var body io.Reader = nil
 10638  	c.urlParams_.Set("alt", alt)
 10639  	c.urlParams_.Set("prettyPrint", "false")
 10640  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10641  	urls += "?" + c.urlParams_.Encode()
 10642  	req, err := http.NewRequest("DELETE", urls, body)
 10643  	if err != nil {
 10644  		return nil, err
 10645  	}
 10646  	req.Header = reqHeaders
 10647  	googleapi.Expand(req.URL, map[string]string{
 10648  		"name": c.name,
 10649  	})
 10650  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10651  }
 10652  
 10653  // Do executes the "apigeeregistry.projects.locations.artifacts.delete" call.
 10654  // Any non-2xx status code is an error. Response headers are in either
 10655  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10656  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10657  // whether the returned error was because http.StatusNotModified was returned.
 10658  func (c *ProjectsLocationsArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10659  	gensupport.SetOptions(c.urlParams_, opts...)
 10660  	res, err := c.doRequest("json")
 10661  	if res != nil && res.StatusCode == http.StatusNotModified {
 10662  		if res.Body != nil {
 10663  			res.Body.Close()
 10664  		}
 10665  		return nil, gensupport.WrapError(&googleapi.Error{
 10666  			Code:   res.StatusCode,
 10667  			Header: res.Header,
 10668  		})
 10669  	}
 10670  	if err != nil {
 10671  		return nil, err
 10672  	}
 10673  	defer googleapi.CloseBody(res)
 10674  	if err := googleapi.CheckResponse(res); err != nil {
 10675  		return nil, gensupport.WrapError(err)
 10676  	}
 10677  	ret := &Empty{
 10678  		ServerResponse: googleapi.ServerResponse{
 10679  			Header:         res.Header,
 10680  			HTTPStatusCode: res.StatusCode,
 10681  		},
 10682  	}
 10683  	target := &ret
 10684  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10685  		return nil, err
 10686  	}
 10687  	return ret, nil
 10688  }
 10689  
 10690  type ProjectsLocationsArtifactsGetCall struct {
 10691  	s            *Service
 10692  	name         string
 10693  	urlParams_   gensupport.URLParams
 10694  	ifNoneMatch_ string
 10695  	ctx_         context.Context
 10696  	header_      http.Header
 10697  }
 10698  
 10699  // Get: Returns a specified artifact.
 10700  //
 10701  // - name: The name of the artifact to retrieve. Format: `{parent}/artifacts/*`.
 10702  func (r *ProjectsLocationsArtifactsService) Get(name string) *ProjectsLocationsArtifactsGetCall {
 10703  	c := &ProjectsLocationsArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10704  	c.name = name
 10705  	return c
 10706  }
 10707  
 10708  // Fields allows partial responses to be retrieved. See
 10709  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10710  // details.
 10711  func (c *ProjectsLocationsArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsGetCall {
 10712  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10713  	return c
 10714  }
 10715  
 10716  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10717  // object's ETag matches the given value. This is useful for getting updates
 10718  // only after the object has changed since the last request.
 10719  func (c *ProjectsLocationsArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsArtifactsGetCall {
 10720  	c.ifNoneMatch_ = entityTag
 10721  	return c
 10722  }
 10723  
 10724  // Context sets the context to be used in this call's Do method.
 10725  func (c *ProjectsLocationsArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsArtifactsGetCall {
 10726  	c.ctx_ = ctx
 10727  	return c
 10728  }
 10729  
 10730  // Header returns a http.Header that can be modified by the caller to add
 10731  // headers to the request.
 10732  func (c *ProjectsLocationsArtifactsGetCall) Header() http.Header {
 10733  	if c.header_ == nil {
 10734  		c.header_ = make(http.Header)
 10735  	}
 10736  	return c.header_
 10737  }
 10738  
 10739  func (c *ProjectsLocationsArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
 10740  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10741  	if c.ifNoneMatch_ != "" {
 10742  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10743  	}
 10744  	var body io.Reader = nil
 10745  	c.urlParams_.Set("alt", alt)
 10746  	c.urlParams_.Set("prettyPrint", "false")
 10747  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10748  	urls += "?" + c.urlParams_.Encode()
 10749  	req, err := http.NewRequest("GET", urls, body)
 10750  	if err != nil {
 10751  		return nil, err
 10752  	}
 10753  	req.Header = reqHeaders
 10754  	googleapi.Expand(req.URL, map[string]string{
 10755  		"name": c.name,
 10756  	})
 10757  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10758  }
 10759  
 10760  // Do executes the "apigeeregistry.projects.locations.artifacts.get" call.
 10761  // Any non-2xx status code is an error. Response headers are in either
 10762  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
 10763  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10764  // whether the returned error was because http.StatusNotModified was returned.
 10765  func (c *ProjectsLocationsArtifactsGetCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
 10766  	gensupport.SetOptions(c.urlParams_, opts...)
 10767  	res, err := c.doRequest("json")
 10768  	if res != nil && res.StatusCode == http.StatusNotModified {
 10769  		if res.Body != nil {
 10770  			res.Body.Close()
 10771  		}
 10772  		return nil, gensupport.WrapError(&googleapi.Error{
 10773  			Code:   res.StatusCode,
 10774  			Header: res.Header,
 10775  		})
 10776  	}
 10777  	if err != nil {
 10778  		return nil, err
 10779  	}
 10780  	defer googleapi.CloseBody(res)
 10781  	if err := googleapi.CheckResponse(res); err != nil {
 10782  		return nil, gensupport.WrapError(err)
 10783  	}
 10784  	ret := &Artifact{
 10785  		ServerResponse: googleapi.ServerResponse{
 10786  			Header:         res.Header,
 10787  			HTTPStatusCode: res.StatusCode,
 10788  		},
 10789  	}
 10790  	target := &ret
 10791  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10792  		return nil, err
 10793  	}
 10794  	return ret, nil
 10795  }
 10796  
 10797  type ProjectsLocationsArtifactsGetContentsCall struct {
 10798  	s            *Service
 10799  	name         string
 10800  	urlParams_   gensupport.URLParams
 10801  	ifNoneMatch_ string
 10802  	ctx_         context.Context
 10803  	header_      http.Header
 10804  }
 10805  
 10806  // GetContents: Returns the contents of a specified artifact. If artifacts are
 10807  // stored with GZip compression, the default behavior is to return the artifact
 10808  // uncompressed (the mime_type response field indicates the exact format
 10809  // returned).
 10810  //
 10811  //   - name: The name of the artifact whose contents should be retrieved. Format:
 10812  //     `{parent}/artifacts/*`.
 10813  func (r *ProjectsLocationsArtifactsService) GetContents(name string) *ProjectsLocationsArtifactsGetContentsCall {
 10814  	c := &ProjectsLocationsArtifactsGetContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10815  	c.name = name
 10816  	return c
 10817  }
 10818  
 10819  // Fields allows partial responses to be retrieved. See
 10820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10821  // details.
 10822  func (c *ProjectsLocationsArtifactsGetContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsGetContentsCall {
 10823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10824  	return c
 10825  }
 10826  
 10827  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10828  // object's ETag matches the given value. This is useful for getting updates
 10829  // only after the object has changed since the last request.
 10830  func (c *ProjectsLocationsArtifactsGetContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsArtifactsGetContentsCall {
 10831  	c.ifNoneMatch_ = entityTag
 10832  	return c
 10833  }
 10834  
 10835  // Context sets the context to be used in this call's Do method.
 10836  func (c *ProjectsLocationsArtifactsGetContentsCall) Context(ctx context.Context) *ProjectsLocationsArtifactsGetContentsCall {
 10837  	c.ctx_ = ctx
 10838  	return c
 10839  }
 10840  
 10841  // Header returns a http.Header that can be modified by the caller to add
 10842  // headers to the request.
 10843  func (c *ProjectsLocationsArtifactsGetContentsCall) Header() http.Header {
 10844  	if c.header_ == nil {
 10845  		c.header_ = make(http.Header)
 10846  	}
 10847  	return c.header_
 10848  }
 10849  
 10850  func (c *ProjectsLocationsArtifactsGetContentsCall) doRequest(alt string) (*http.Response, error) {
 10851  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10852  	if c.ifNoneMatch_ != "" {
 10853  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10854  	}
 10855  	var body io.Reader = nil
 10856  	c.urlParams_.Set("alt", alt)
 10857  	c.urlParams_.Set("prettyPrint", "false")
 10858  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getContents")
 10859  	urls += "?" + c.urlParams_.Encode()
 10860  	req, err := http.NewRequest("GET", urls, body)
 10861  	if err != nil {
 10862  		return nil, err
 10863  	}
 10864  	req.Header = reqHeaders
 10865  	googleapi.Expand(req.URL, map[string]string{
 10866  		"name": c.name,
 10867  	})
 10868  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10869  }
 10870  
 10871  // Do executes the "apigeeregistry.projects.locations.artifacts.getContents" call.
 10872  // Any non-2xx status code is an error. Response headers are in either
 10873  // *HttpBody.ServerResponse.Header or (if a response was returned at all) in
 10874  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10875  // whether the returned error was because http.StatusNotModified was returned.
 10876  func (c *ProjectsLocationsArtifactsGetContentsCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) {
 10877  	gensupport.SetOptions(c.urlParams_, opts...)
 10878  	res, err := c.doRequest("json")
 10879  	if res != nil && res.StatusCode == http.StatusNotModified {
 10880  		if res.Body != nil {
 10881  			res.Body.Close()
 10882  		}
 10883  		return nil, gensupport.WrapError(&googleapi.Error{
 10884  			Code:   res.StatusCode,
 10885  			Header: res.Header,
 10886  		})
 10887  	}
 10888  	if err != nil {
 10889  		return nil, err
 10890  	}
 10891  	defer googleapi.CloseBody(res)
 10892  	if err := googleapi.CheckResponse(res); err != nil {
 10893  		return nil, gensupport.WrapError(err)
 10894  	}
 10895  	ret := &HttpBody{
 10896  		ServerResponse: googleapi.ServerResponse{
 10897  			Header:         res.Header,
 10898  			HTTPStatusCode: res.StatusCode,
 10899  		},
 10900  	}
 10901  	target := &ret
 10902  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10903  		return nil, err
 10904  	}
 10905  	return ret, nil
 10906  }
 10907  
 10908  type ProjectsLocationsArtifactsGetIamPolicyCall struct {
 10909  	s            *Service
 10910  	resource     string
 10911  	urlParams_   gensupport.URLParams
 10912  	ifNoneMatch_ string
 10913  	ctx_         context.Context
 10914  	header_      http.Header
 10915  }
 10916  
 10917  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 10918  // empty policy if the resource exists and does not have a policy set.
 10919  //
 10920  //   - resource: REQUIRED: The resource for which the policy is being requested.
 10921  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10922  //     for the appropriate value for this field.
 10923  func (r *ProjectsLocationsArtifactsService) GetIamPolicy(resource string) *ProjectsLocationsArtifactsGetIamPolicyCall {
 10924  	c := &ProjectsLocationsArtifactsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10925  	c.resource = resource
 10926  	return c
 10927  }
 10928  
 10929  // OptionsRequestedPolicyVersion sets the optional parameter
 10930  // "options.requestedPolicyVersion": The maximum policy version that will be
 10931  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 10932  // an invalid value will be rejected. Requests for policies with any
 10933  // conditional role bindings must specify version 3. Policies with no
 10934  // conditional role bindings may specify any valid value or leave the field
 10935  // unset. The policy in the response might use the policy version that you
 10936  // specified, or it might use a lower policy version. For example, if you
 10937  // specify version 3, but the policy has no conditional role bindings, the
 10938  // response uses version 1. To learn which resources support conditions in
 10939  // their IAM policies, see the IAM documentation
 10940  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 10941  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsArtifactsGetIamPolicyCall {
 10942  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 10943  	return c
 10944  }
 10945  
 10946  // Fields allows partial responses to be retrieved. See
 10947  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10948  // details.
 10949  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsGetIamPolicyCall {
 10950  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10951  	return c
 10952  }
 10953  
 10954  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10955  // object's ETag matches the given value. This is useful for getting updates
 10956  // only after the object has changed since the last request.
 10957  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsArtifactsGetIamPolicyCall {
 10958  	c.ifNoneMatch_ = entityTag
 10959  	return c
 10960  }
 10961  
 10962  // Context sets the context to be used in this call's Do method.
 10963  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsArtifactsGetIamPolicyCall {
 10964  	c.ctx_ = ctx
 10965  	return c
 10966  }
 10967  
 10968  // Header returns a http.Header that can be modified by the caller to add
 10969  // headers to the request.
 10970  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) Header() http.Header {
 10971  	if c.header_ == nil {
 10972  		c.header_ = make(http.Header)
 10973  	}
 10974  	return c.header_
 10975  }
 10976  
 10977  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10978  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10979  	if c.ifNoneMatch_ != "" {
 10980  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10981  	}
 10982  	var body io.Reader = nil
 10983  	c.urlParams_.Set("alt", alt)
 10984  	c.urlParams_.Set("prettyPrint", "false")
 10985  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 10986  	urls += "?" + c.urlParams_.Encode()
 10987  	req, err := http.NewRequest("GET", urls, body)
 10988  	if err != nil {
 10989  		return nil, err
 10990  	}
 10991  	req.Header = reqHeaders
 10992  	googleapi.Expand(req.URL, map[string]string{
 10993  		"resource": c.resource,
 10994  	})
 10995  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10996  }
 10997  
 10998  // Do executes the "apigeeregistry.projects.locations.artifacts.getIamPolicy" call.
 10999  // Any non-2xx status code is an error. Response headers are in either
 11000  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11001  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11002  // whether the returned error was because http.StatusNotModified was returned.
 11003  func (c *ProjectsLocationsArtifactsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11004  	gensupport.SetOptions(c.urlParams_, opts...)
 11005  	res, err := c.doRequest("json")
 11006  	if res != nil && res.StatusCode == http.StatusNotModified {
 11007  		if res.Body != nil {
 11008  			res.Body.Close()
 11009  		}
 11010  		return nil, gensupport.WrapError(&googleapi.Error{
 11011  			Code:   res.StatusCode,
 11012  			Header: res.Header,
 11013  		})
 11014  	}
 11015  	if err != nil {
 11016  		return nil, err
 11017  	}
 11018  	defer googleapi.CloseBody(res)
 11019  	if err := googleapi.CheckResponse(res); err != nil {
 11020  		return nil, gensupport.WrapError(err)
 11021  	}
 11022  	ret := &Policy{
 11023  		ServerResponse: googleapi.ServerResponse{
 11024  			Header:         res.Header,
 11025  			HTTPStatusCode: res.StatusCode,
 11026  		},
 11027  	}
 11028  	target := &ret
 11029  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11030  		return nil, err
 11031  	}
 11032  	return ret, nil
 11033  }
 11034  
 11035  type ProjectsLocationsArtifactsListCall struct {
 11036  	s            *Service
 11037  	parent       string
 11038  	urlParams_   gensupport.URLParams
 11039  	ifNoneMatch_ string
 11040  	ctx_         context.Context
 11041  	header_      http.Header
 11042  }
 11043  
 11044  // List: Returns matching artifacts.
 11045  //
 11046  //   - parent: The parent, which owns this collection of artifacts. Format:
 11047  //     `{parent}`.
 11048  func (r *ProjectsLocationsArtifactsService) List(parent string) *ProjectsLocationsArtifactsListCall {
 11049  	c := &ProjectsLocationsArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11050  	c.parent = parent
 11051  	return c
 11052  }
 11053  
 11054  // Filter sets the optional parameter "filter": An expression that can be used
 11055  // to filter the list. Filters use the Common Expression Language and can refer
 11056  // to all message fields except contents.
 11057  func (c *ProjectsLocationsArtifactsListCall) Filter(filter string) *ProjectsLocationsArtifactsListCall {
 11058  	c.urlParams_.Set("filter", filter)
 11059  	return c
 11060  }
 11061  
 11062  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
 11063  // fields, e.g. "foo,bar" Fields can be sorted in descending order using the
 11064  // "desc" identifier, e.g. "foo desc,bar"
 11065  func (c *ProjectsLocationsArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsArtifactsListCall {
 11066  	c.urlParams_.Set("orderBy", orderBy)
 11067  	return c
 11068  }
 11069  
 11070  // PageSize sets the optional parameter "pageSize": The maximum number of
 11071  // artifacts to return. The service may return fewer than this value. If
 11072  // unspecified, at most 50 values will be returned. The maximum is 1000; values
 11073  // above 1000 will be coerced to 1000.
 11074  func (c *ProjectsLocationsArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsArtifactsListCall {
 11075  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11076  	return c
 11077  }
 11078  
 11079  // PageToken sets the optional parameter "pageToken": A page token, received
 11080  // from a previous `ListArtifacts` call. Provide this to retrieve the
 11081  // subsequent page. When paginating, all other parameters provided to
 11082  // `ListArtifacts` must match the call that provided the page token.
 11083  func (c *ProjectsLocationsArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsArtifactsListCall {
 11084  	c.urlParams_.Set("pageToken", pageToken)
 11085  	return c
 11086  }
 11087  
 11088  // Fields allows partial responses to be retrieved. See
 11089  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11090  // details.
 11091  func (c *ProjectsLocationsArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsListCall {
 11092  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11093  	return c
 11094  }
 11095  
 11096  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11097  // object's ETag matches the given value. This is useful for getting updates
 11098  // only after the object has changed since the last request.
 11099  func (c *ProjectsLocationsArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsArtifactsListCall {
 11100  	c.ifNoneMatch_ = entityTag
 11101  	return c
 11102  }
 11103  
 11104  // Context sets the context to be used in this call's Do method.
 11105  func (c *ProjectsLocationsArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsArtifactsListCall {
 11106  	c.ctx_ = ctx
 11107  	return c
 11108  }
 11109  
 11110  // Header returns a http.Header that can be modified by the caller to add
 11111  // headers to the request.
 11112  func (c *ProjectsLocationsArtifactsListCall) Header() http.Header {
 11113  	if c.header_ == nil {
 11114  		c.header_ = make(http.Header)
 11115  	}
 11116  	return c.header_
 11117  }
 11118  
 11119  func (c *ProjectsLocationsArtifactsListCall) doRequest(alt string) (*http.Response, error) {
 11120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11121  	if c.ifNoneMatch_ != "" {
 11122  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11123  	}
 11124  	var body io.Reader = nil
 11125  	c.urlParams_.Set("alt", alt)
 11126  	c.urlParams_.Set("prettyPrint", "false")
 11127  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts")
 11128  	urls += "?" + c.urlParams_.Encode()
 11129  	req, err := http.NewRequest("GET", urls, body)
 11130  	if err != nil {
 11131  		return nil, err
 11132  	}
 11133  	req.Header = reqHeaders
 11134  	googleapi.Expand(req.URL, map[string]string{
 11135  		"parent": c.parent,
 11136  	})
 11137  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11138  }
 11139  
 11140  // Do executes the "apigeeregistry.projects.locations.artifacts.list" call.
 11141  // Any non-2xx status code is an error. Response headers are in either
 11142  // *ListArtifactsResponse.ServerResponse.Header or (if a response was returned
 11143  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11144  // check whether the returned error was because http.StatusNotModified was
 11145  // returned.
 11146  func (c *ProjectsLocationsArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListArtifactsResponse, error) {
 11147  	gensupport.SetOptions(c.urlParams_, opts...)
 11148  	res, err := c.doRequest("json")
 11149  	if res != nil && res.StatusCode == http.StatusNotModified {
 11150  		if res.Body != nil {
 11151  			res.Body.Close()
 11152  		}
 11153  		return nil, gensupport.WrapError(&googleapi.Error{
 11154  			Code:   res.StatusCode,
 11155  			Header: res.Header,
 11156  		})
 11157  	}
 11158  	if err != nil {
 11159  		return nil, err
 11160  	}
 11161  	defer googleapi.CloseBody(res)
 11162  	if err := googleapi.CheckResponse(res); err != nil {
 11163  		return nil, gensupport.WrapError(err)
 11164  	}
 11165  	ret := &ListArtifactsResponse{
 11166  		ServerResponse: googleapi.ServerResponse{
 11167  			Header:         res.Header,
 11168  			HTTPStatusCode: res.StatusCode,
 11169  		},
 11170  	}
 11171  	target := &ret
 11172  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11173  		return nil, err
 11174  	}
 11175  	return ret, nil
 11176  }
 11177  
 11178  // Pages invokes f for each page of results.
 11179  // A non-nil error returned from f will halt the iteration.
 11180  // The provided context supersedes any context provided to the Context method.
 11181  func (c *ProjectsLocationsArtifactsListCall) Pages(ctx context.Context, f func(*ListArtifactsResponse) error) error {
 11182  	c.ctx_ = ctx
 11183  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11184  	for {
 11185  		x, err := c.Do()
 11186  		if err != nil {
 11187  			return err
 11188  		}
 11189  		if err := f(x); err != nil {
 11190  			return err
 11191  		}
 11192  		if x.NextPageToken == "" {
 11193  			return nil
 11194  		}
 11195  		c.PageToken(x.NextPageToken)
 11196  	}
 11197  }
 11198  
 11199  type ProjectsLocationsArtifactsReplaceArtifactCall struct {
 11200  	s          *Service
 11201  	name       string
 11202  	artifact   *Artifact
 11203  	urlParams_ gensupport.URLParams
 11204  	ctx_       context.Context
 11205  	header_    http.Header
 11206  }
 11207  
 11208  // ReplaceArtifact: Used to replace a specified artifact.
 11209  //
 11210  // - name: Resource name.
 11211  func (r *ProjectsLocationsArtifactsService) ReplaceArtifact(name string, artifact *Artifact) *ProjectsLocationsArtifactsReplaceArtifactCall {
 11212  	c := &ProjectsLocationsArtifactsReplaceArtifactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11213  	c.name = name
 11214  	c.artifact = artifact
 11215  	return c
 11216  }
 11217  
 11218  // Fields allows partial responses to be retrieved. See
 11219  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11220  // details.
 11221  func (c *ProjectsLocationsArtifactsReplaceArtifactCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsReplaceArtifactCall {
 11222  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11223  	return c
 11224  }
 11225  
 11226  // Context sets the context to be used in this call's Do method.
 11227  func (c *ProjectsLocationsArtifactsReplaceArtifactCall) Context(ctx context.Context) *ProjectsLocationsArtifactsReplaceArtifactCall {
 11228  	c.ctx_ = ctx
 11229  	return c
 11230  }
 11231  
 11232  // Header returns a http.Header that can be modified by the caller to add
 11233  // headers to the request.
 11234  func (c *ProjectsLocationsArtifactsReplaceArtifactCall) Header() http.Header {
 11235  	if c.header_ == nil {
 11236  		c.header_ = make(http.Header)
 11237  	}
 11238  	return c.header_
 11239  }
 11240  
 11241  func (c *ProjectsLocationsArtifactsReplaceArtifactCall) doRequest(alt string) (*http.Response, error) {
 11242  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11243  	var body io.Reader = nil
 11244  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.artifact)
 11245  	if err != nil {
 11246  		return nil, err
 11247  	}
 11248  	c.urlParams_.Set("alt", alt)
 11249  	c.urlParams_.Set("prettyPrint", "false")
 11250  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11251  	urls += "?" + c.urlParams_.Encode()
 11252  	req, err := http.NewRequest("PUT", urls, body)
 11253  	if err != nil {
 11254  		return nil, err
 11255  	}
 11256  	req.Header = reqHeaders
 11257  	googleapi.Expand(req.URL, map[string]string{
 11258  		"name": c.name,
 11259  	})
 11260  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11261  }
 11262  
 11263  // Do executes the "apigeeregistry.projects.locations.artifacts.replaceArtifact" call.
 11264  // Any non-2xx status code is an error. Response headers are in either
 11265  // *Artifact.ServerResponse.Header or (if a response was returned at all) in
 11266  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11267  // whether the returned error was because http.StatusNotModified was returned.
 11268  func (c *ProjectsLocationsArtifactsReplaceArtifactCall) Do(opts ...googleapi.CallOption) (*Artifact, error) {
 11269  	gensupport.SetOptions(c.urlParams_, opts...)
 11270  	res, err := c.doRequest("json")
 11271  	if res != nil && res.StatusCode == http.StatusNotModified {
 11272  		if res.Body != nil {
 11273  			res.Body.Close()
 11274  		}
 11275  		return nil, gensupport.WrapError(&googleapi.Error{
 11276  			Code:   res.StatusCode,
 11277  			Header: res.Header,
 11278  		})
 11279  	}
 11280  	if err != nil {
 11281  		return nil, err
 11282  	}
 11283  	defer googleapi.CloseBody(res)
 11284  	if err := googleapi.CheckResponse(res); err != nil {
 11285  		return nil, gensupport.WrapError(err)
 11286  	}
 11287  	ret := &Artifact{
 11288  		ServerResponse: googleapi.ServerResponse{
 11289  			Header:         res.Header,
 11290  			HTTPStatusCode: res.StatusCode,
 11291  		},
 11292  	}
 11293  	target := &ret
 11294  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11295  		return nil, err
 11296  	}
 11297  	return ret, nil
 11298  }
 11299  
 11300  type ProjectsLocationsArtifactsSetIamPolicyCall struct {
 11301  	s                   *Service
 11302  	resource            string
 11303  	setiampolicyrequest *SetIamPolicyRequest
 11304  	urlParams_          gensupport.URLParams
 11305  	ctx_                context.Context
 11306  	header_             http.Header
 11307  }
 11308  
 11309  // SetIamPolicy: Sets the access control policy on the specified resource.
 11310  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 11311  // and `PERMISSION_DENIED` errors.
 11312  //
 11313  //   - resource: REQUIRED: The resource for which the policy is being specified.
 11314  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11315  //     for the appropriate value for this field.
 11316  func (r *ProjectsLocationsArtifactsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsArtifactsSetIamPolicyCall {
 11317  	c := &ProjectsLocationsArtifactsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11318  	c.resource = resource
 11319  	c.setiampolicyrequest = setiampolicyrequest
 11320  	return c
 11321  }
 11322  
 11323  // Fields allows partial responses to be retrieved. See
 11324  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11325  // details.
 11326  func (c *ProjectsLocationsArtifactsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsSetIamPolicyCall {
 11327  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11328  	return c
 11329  }
 11330  
 11331  // Context sets the context to be used in this call's Do method.
 11332  func (c *ProjectsLocationsArtifactsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsArtifactsSetIamPolicyCall {
 11333  	c.ctx_ = ctx
 11334  	return c
 11335  }
 11336  
 11337  // Header returns a http.Header that can be modified by the caller to add
 11338  // headers to the request.
 11339  func (c *ProjectsLocationsArtifactsSetIamPolicyCall) Header() http.Header {
 11340  	if c.header_ == nil {
 11341  		c.header_ = make(http.Header)
 11342  	}
 11343  	return c.header_
 11344  }
 11345  
 11346  func (c *ProjectsLocationsArtifactsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11347  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11348  	var body io.Reader = nil
 11349  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11350  	if err != nil {
 11351  		return nil, err
 11352  	}
 11353  	c.urlParams_.Set("alt", alt)
 11354  	c.urlParams_.Set("prettyPrint", "false")
 11355  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 11356  	urls += "?" + c.urlParams_.Encode()
 11357  	req, err := http.NewRequest("POST", urls, body)
 11358  	if err != nil {
 11359  		return nil, err
 11360  	}
 11361  	req.Header = reqHeaders
 11362  	googleapi.Expand(req.URL, map[string]string{
 11363  		"resource": c.resource,
 11364  	})
 11365  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11366  }
 11367  
 11368  // Do executes the "apigeeregistry.projects.locations.artifacts.setIamPolicy" call.
 11369  // Any non-2xx status code is an error. Response headers are in either
 11370  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11371  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11372  // whether the returned error was because http.StatusNotModified was returned.
 11373  func (c *ProjectsLocationsArtifactsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11374  	gensupport.SetOptions(c.urlParams_, opts...)
 11375  	res, err := c.doRequest("json")
 11376  	if res != nil && res.StatusCode == http.StatusNotModified {
 11377  		if res.Body != nil {
 11378  			res.Body.Close()
 11379  		}
 11380  		return nil, gensupport.WrapError(&googleapi.Error{
 11381  			Code:   res.StatusCode,
 11382  			Header: res.Header,
 11383  		})
 11384  	}
 11385  	if err != nil {
 11386  		return nil, err
 11387  	}
 11388  	defer googleapi.CloseBody(res)
 11389  	if err := googleapi.CheckResponse(res); err != nil {
 11390  		return nil, gensupport.WrapError(err)
 11391  	}
 11392  	ret := &Policy{
 11393  		ServerResponse: googleapi.ServerResponse{
 11394  			Header:         res.Header,
 11395  			HTTPStatusCode: res.StatusCode,
 11396  		},
 11397  	}
 11398  	target := &ret
 11399  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11400  		return nil, err
 11401  	}
 11402  	return ret, nil
 11403  }
 11404  
 11405  type ProjectsLocationsArtifactsTestIamPermissionsCall struct {
 11406  	s                         *Service
 11407  	resource                  string
 11408  	testiampermissionsrequest *TestIamPermissionsRequest
 11409  	urlParams_                gensupport.URLParams
 11410  	ctx_                      context.Context
 11411  	header_                   http.Header
 11412  }
 11413  
 11414  // TestIamPermissions: Returns permissions that a caller has on the specified
 11415  // resource. If the resource does not exist, this will return an empty set of
 11416  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 11417  // used for building permission-aware UIs and command-line tools, not for
 11418  // authorization checking. This operation may "fail open" without warning.
 11419  //
 11420  //   - resource: REQUIRED: The resource for which the policy detail is being
 11421  //     requested. See Resource names
 11422  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 11423  //     value for this field.
 11424  func (r *ProjectsLocationsArtifactsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsArtifactsTestIamPermissionsCall {
 11425  	c := &ProjectsLocationsArtifactsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11426  	c.resource = resource
 11427  	c.testiampermissionsrequest = testiampermissionsrequest
 11428  	return c
 11429  }
 11430  
 11431  // Fields allows partial responses to be retrieved. See
 11432  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11433  // details.
 11434  func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsArtifactsTestIamPermissionsCall {
 11435  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11436  	return c
 11437  }
 11438  
 11439  // Context sets the context to be used in this call's Do method.
 11440  func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsArtifactsTestIamPermissionsCall {
 11441  	c.ctx_ = ctx
 11442  	return c
 11443  }
 11444  
 11445  // Header returns a http.Header that can be modified by the caller to add
 11446  // headers to the request.
 11447  func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) Header() http.Header {
 11448  	if c.header_ == nil {
 11449  		c.header_ = make(http.Header)
 11450  	}
 11451  	return c.header_
 11452  }
 11453  
 11454  func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11455  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11456  	var body io.Reader = nil
 11457  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11458  	if err != nil {
 11459  		return nil, err
 11460  	}
 11461  	c.urlParams_.Set("alt", alt)
 11462  	c.urlParams_.Set("prettyPrint", "false")
 11463  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 11464  	urls += "?" + c.urlParams_.Encode()
 11465  	req, err := http.NewRequest("POST", urls, body)
 11466  	if err != nil {
 11467  		return nil, err
 11468  	}
 11469  	req.Header = reqHeaders
 11470  	googleapi.Expand(req.URL, map[string]string{
 11471  		"resource": c.resource,
 11472  	})
 11473  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11474  }
 11475  
 11476  // Do executes the "apigeeregistry.projects.locations.artifacts.testIamPermissions" call.
 11477  // Any non-2xx status code is an error. Response headers are in either
 11478  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11479  // returned at all) in error.(*googleapi.Error).Header. Use
 11480  // googleapi.IsNotModified to check whether the returned error was because
 11481  // http.StatusNotModified was returned.
 11482  func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11483  	gensupport.SetOptions(c.urlParams_, opts...)
 11484  	res, err := c.doRequest("json")
 11485  	if res != nil && res.StatusCode == http.StatusNotModified {
 11486  		if res.Body != nil {
 11487  			res.Body.Close()
 11488  		}
 11489  		return nil, gensupport.WrapError(&googleapi.Error{
 11490  			Code:   res.StatusCode,
 11491  			Header: res.Header,
 11492  		})
 11493  	}
 11494  	if err != nil {
 11495  		return nil, err
 11496  	}
 11497  	defer googleapi.CloseBody(res)
 11498  	if err := googleapi.CheckResponse(res); err != nil {
 11499  		return nil, gensupport.WrapError(err)
 11500  	}
 11501  	ret := &TestIamPermissionsResponse{
 11502  		ServerResponse: googleapi.ServerResponse{
 11503  			Header:         res.Header,
 11504  			HTTPStatusCode: res.StatusCode,
 11505  		},
 11506  	}
 11507  	target := &ret
 11508  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11509  		return nil, err
 11510  	}
 11511  	return ret, nil
 11512  }
 11513  
 11514  type ProjectsLocationsDocumentsGetIamPolicyCall struct {
 11515  	s            *Service
 11516  	resource     string
 11517  	urlParams_   gensupport.URLParams
 11518  	ifNoneMatch_ string
 11519  	ctx_         context.Context
 11520  	header_      http.Header
 11521  }
 11522  
 11523  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 11524  // empty policy if the resource exists and does not have a policy set.
 11525  //
 11526  //   - resource: REQUIRED: The resource for which the policy is being requested.
 11527  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11528  //     for the appropriate value for this field.
 11529  func (r *ProjectsLocationsDocumentsService) GetIamPolicy(resource string) *ProjectsLocationsDocumentsGetIamPolicyCall {
 11530  	c := &ProjectsLocationsDocumentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11531  	c.resource = resource
 11532  	return c
 11533  }
 11534  
 11535  // OptionsRequestedPolicyVersion sets the optional parameter
 11536  // "options.requestedPolicyVersion": The maximum policy version that will be
 11537  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 11538  // an invalid value will be rejected. Requests for policies with any
 11539  // conditional role bindings must specify version 3. Policies with no
 11540  // conditional role bindings may specify any valid value or leave the field
 11541  // unset. The policy in the response might use the policy version that you
 11542  // specified, or it might use a lower policy version. For example, if you
 11543  // specify version 3, but the policy has no conditional role bindings, the
 11544  // response uses version 1. To learn which resources support conditions in
 11545  // their IAM policies, see the IAM documentation
 11546  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 11547  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDocumentsGetIamPolicyCall {
 11548  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 11549  	return c
 11550  }
 11551  
 11552  // Fields allows partial responses to be retrieved. See
 11553  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11554  // details.
 11555  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsGetIamPolicyCall {
 11556  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11557  	return c
 11558  }
 11559  
 11560  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11561  // object's ETag matches the given value. This is useful for getting updates
 11562  // only after the object has changed since the last request.
 11563  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDocumentsGetIamPolicyCall {
 11564  	c.ifNoneMatch_ = entityTag
 11565  	return c
 11566  }
 11567  
 11568  // Context sets the context to be used in this call's Do method.
 11569  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDocumentsGetIamPolicyCall {
 11570  	c.ctx_ = ctx
 11571  	return c
 11572  }
 11573  
 11574  // Header returns a http.Header that can be modified by the caller to add
 11575  // headers to the request.
 11576  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) Header() http.Header {
 11577  	if c.header_ == nil {
 11578  		c.header_ = make(http.Header)
 11579  	}
 11580  	return c.header_
 11581  }
 11582  
 11583  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11584  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11585  	if c.ifNoneMatch_ != "" {
 11586  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11587  	}
 11588  	var body io.Reader = nil
 11589  	c.urlParams_.Set("alt", alt)
 11590  	c.urlParams_.Set("prettyPrint", "false")
 11591  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 11592  	urls += "?" + c.urlParams_.Encode()
 11593  	req, err := http.NewRequest("GET", urls, body)
 11594  	if err != nil {
 11595  		return nil, err
 11596  	}
 11597  	req.Header = reqHeaders
 11598  	googleapi.Expand(req.URL, map[string]string{
 11599  		"resource": c.resource,
 11600  	})
 11601  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11602  }
 11603  
 11604  // Do executes the "apigeeregistry.projects.locations.documents.getIamPolicy" call.
 11605  // Any non-2xx status code is an error. Response headers are in either
 11606  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11607  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11608  // whether the returned error was because http.StatusNotModified was returned.
 11609  func (c *ProjectsLocationsDocumentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11610  	gensupport.SetOptions(c.urlParams_, opts...)
 11611  	res, err := c.doRequest("json")
 11612  	if res != nil && res.StatusCode == http.StatusNotModified {
 11613  		if res.Body != nil {
 11614  			res.Body.Close()
 11615  		}
 11616  		return nil, gensupport.WrapError(&googleapi.Error{
 11617  			Code:   res.StatusCode,
 11618  			Header: res.Header,
 11619  		})
 11620  	}
 11621  	if err != nil {
 11622  		return nil, err
 11623  	}
 11624  	defer googleapi.CloseBody(res)
 11625  	if err := googleapi.CheckResponse(res); err != nil {
 11626  		return nil, gensupport.WrapError(err)
 11627  	}
 11628  	ret := &Policy{
 11629  		ServerResponse: googleapi.ServerResponse{
 11630  			Header:         res.Header,
 11631  			HTTPStatusCode: res.StatusCode,
 11632  		},
 11633  	}
 11634  	target := &ret
 11635  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11636  		return nil, err
 11637  	}
 11638  	return ret, nil
 11639  }
 11640  
 11641  type ProjectsLocationsDocumentsSetIamPolicyCall struct {
 11642  	s                   *Service
 11643  	resource            string
 11644  	setiampolicyrequest *SetIamPolicyRequest
 11645  	urlParams_          gensupport.URLParams
 11646  	ctx_                context.Context
 11647  	header_             http.Header
 11648  }
 11649  
 11650  // SetIamPolicy: Sets the access control policy on the specified resource.
 11651  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 11652  // and `PERMISSION_DENIED` errors.
 11653  //
 11654  //   - resource: REQUIRED: The resource for which the policy is being specified.
 11655  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11656  //     for the appropriate value for this field.
 11657  func (r *ProjectsLocationsDocumentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDocumentsSetIamPolicyCall {
 11658  	c := &ProjectsLocationsDocumentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11659  	c.resource = resource
 11660  	c.setiampolicyrequest = setiampolicyrequest
 11661  	return c
 11662  }
 11663  
 11664  // Fields allows partial responses to be retrieved. See
 11665  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11666  // details.
 11667  func (c *ProjectsLocationsDocumentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsSetIamPolicyCall {
 11668  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11669  	return c
 11670  }
 11671  
 11672  // Context sets the context to be used in this call's Do method.
 11673  func (c *ProjectsLocationsDocumentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDocumentsSetIamPolicyCall {
 11674  	c.ctx_ = ctx
 11675  	return c
 11676  }
 11677  
 11678  // Header returns a http.Header that can be modified by the caller to add
 11679  // headers to the request.
 11680  func (c *ProjectsLocationsDocumentsSetIamPolicyCall) Header() http.Header {
 11681  	if c.header_ == nil {
 11682  		c.header_ = make(http.Header)
 11683  	}
 11684  	return c.header_
 11685  }
 11686  
 11687  func (c *ProjectsLocationsDocumentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11689  	var body io.Reader = nil
 11690  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11691  	if err != nil {
 11692  		return nil, err
 11693  	}
 11694  	c.urlParams_.Set("alt", alt)
 11695  	c.urlParams_.Set("prettyPrint", "false")
 11696  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 11697  	urls += "?" + c.urlParams_.Encode()
 11698  	req, err := http.NewRequest("POST", urls, body)
 11699  	if err != nil {
 11700  		return nil, err
 11701  	}
 11702  	req.Header = reqHeaders
 11703  	googleapi.Expand(req.URL, map[string]string{
 11704  		"resource": c.resource,
 11705  	})
 11706  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11707  }
 11708  
 11709  // Do executes the "apigeeregistry.projects.locations.documents.setIamPolicy" call.
 11710  // Any non-2xx status code is an error. Response headers are in either
 11711  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11712  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11713  // whether the returned error was because http.StatusNotModified was returned.
 11714  func (c *ProjectsLocationsDocumentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11715  	gensupport.SetOptions(c.urlParams_, opts...)
 11716  	res, err := c.doRequest("json")
 11717  	if res != nil && res.StatusCode == http.StatusNotModified {
 11718  		if res.Body != nil {
 11719  			res.Body.Close()
 11720  		}
 11721  		return nil, gensupport.WrapError(&googleapi.Error{
 11722  			Code:   res.StatusCode,
 11723  			Header: res.Header,
 11724  		})
 11725  	}
 11726  	if err != nil {
 11727  		return nil, err
 11728  	}
 11729  	defer googleapi.CloseBody(res)
 11730  	if err := googleapi.CheckResponse(res); err != nil {
 11731  		return nil, gensupport.WrapError(err)
 11732  	}
 11733  	ret := &Policy{
 11734  		ServerResponse: googleapi.ServerResponse{
 11735  			Header:         res.Header,
 11736  			HTTPStatusCode: res.StatusCode,
 11737  		},
 11738  	}
 11739  	target := &ret
 11740  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11741  		return nil, err
 11742  	}
 11743  	return ret, nil
 11744  }
 11745  
 11746  type ProjectsLocationsDocumentsTestIamPermissionsCall struct {
 11747  	s                         *Service
 11748  	resource                  string
 11749  	testiampermissionsrequest *TestIamPermissionsRequest
 11750  	urlParams_                gensupport.URLParams
 11751  	ctx_                      context.Context
 11752  	header_                   http.Header
 11753  }
 11754  
 11755  // TestIamPermissions: Returns permissions that a caller has on the specified
 11756  // resource. If the resource does not exist, this will return an empty set of
 11757  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 11758  // used for building permission-aware UIs and command-line tools, not for
 11759  // authorization checking. This operation may "fail open" without warning.
 11760  //
 11761  //   - resource: REQUIRED: The resource for which the policy detail is being
 11762  //     requested. See Resource names
 11763  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 11764  //     value for this field.
 11765  func (r *ProjectsLocationsDocumentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDocumentsTestIamPermissionsCall {
 11766  	c := &ProjectsLocationsDocumentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11767  	c.resource = resource
 11768  	c.testiampermissionsrequest = testiampermissionsrequest
 11769  	return c
 11770  }
 11771  
 11772  // Fields allows partial responses to be retrieved. See
 11773  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11774  // details.
 11775  func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsTestIamPermissionsCall {
 11776  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11777  	return c
 11778  }
 11779  
 11780  // Context sets the context to be used in this call's Do method.
 11781  func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDocumentsTestIamPermissionsCall {
 11782  	c.ctx_ = ctx
 11783  	return c
 11784  }
 11785  
 11786  // Header returns a http.Header that can be modified by the caller to add
 11787  // headers to the request.
 11788  func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) Header() http.Header {
 11789  	if c.header_ == nil {
 11790  		c.header_ = make(http.Header)
 11791  	}
 11792  	return c.header_
 11793  }
 11794  
 11795  func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11796  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11797  	var body io.Reader = nil
 11798  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11799  	if err != nil {
 11800  		return nil, err
 11801  	}
 11802  	c.urlParams_.Set("alt", alt)
 11803  	c.urlParams_.Set("prettyPrint", "false")
 11804  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 11805  	urls += "?" + c.urlParams_.Encode()
 11806  	req, err := http.NewRequest("POST", urls, body)
 11807  	if err != nil {
 11808  		return nil, err
 11809  	}
 11810  	req.Header = reqHeaders
 11811  	googleapi.Expand(req.URL, map[string]string{
 11812  		"resource": c.resource,
 11813  	})
 11814  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11815  }
 11816  
 11817  // Do executes the "apigeeregistry.projects.locations.documents.testIamPermissions" call.
 11818  // Any non-2xx status code is an error. Response headers are in either
 11819  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11820  // returned at all) in error.(*googleapi.Error).Header. Use
 11821  // googleapi.IsNotModified to check whether the returned error was because
 11822  // http.StatusNotModified was returned.
 11823  func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11824  	gensupport.SetOptions(c.urlParams_, opts...)
 11825  	res, err := c.doRequest("json")
 11826  	if res != nil && res.StatusCode == http.StatusNotModified {
 11827  		if res.Body != nil {
 11828  			res.Body.Close()
 11829  		}
 11830  		return nil, gensupport.WrapError(&googleapi.Error{
 11831  			Code:   res.StatusCode,
 11832  			Header: res.Header,
 11833  		})
 11834  	}
 11835  	if err != nil {
 11836  		return nil, err
 11837  	}
 11838  	defer googleapi.CloseBody(res)
 11839  	if err := googleapi.CheckResponse(res); err != nil {
 11840  		return nil, gensupport.WrapError(err)
 11841  	}
 11842  	ret := &TestIamPermissionsResponse{
 11843  		ServerResponse: googleapi.ServerResponse{
 11844  			Header:         res.Header,
 11845  			HTTPStatusCode: res.StatusCode,
 11846  		},
 11847  	}
 11848  	target := &ret
 11849  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11850  		return nil, err
 11851  	}
 11852  	return ret, nil
 11853  }
 11854  
 11855  type ProjectsLocationsInstancesCreateCall struct {
 11856  	s          *Service
 11857  	parent     string
 11858  	instance   *Instance
 11859  	urlParams_ gensupport.URLParams
 11860  	ctx_       context.Context
 11861  	header_    http.Header
 11862  }
 11863  
 11864  // Create: Provisions instance resources for the Registry.
 11865  //
 11866  //   - parent: Parent resource of the Instance, of the form:
 11867  //     `projects/*/locations/*`.
 11868  func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
 11869  	c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11870  	c.parent = parent
 11871  	c.instance = instance
 11872  	return c
 11873  }
 11874  
 11875  // InstanceId sets the optional parameter "instanceId": Required. Identifier to
 11876  // assign to the Instance. Must be unique within scope of the parent resource.
 11877  func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
 11878  	c.urlParams_.Set("instanceId", instanceId)
 11879  	return c
 11880  }
 11881  
 11882  // Fields allows partial responses to be retrieved. See
 11883  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11884  // details.
 11885  func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
 11886  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11887  	return c
 11888  }
 11889  
 11890  // Context sets the context to be used in this call's Do method.
 11891  func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
 11892  	c.ctx_ = ctx
 11893  	return c
 11894  }
 11895  
 11896  // Header returns a http.Header that can be modified by the caller to add
 11897  // headers to the request.
 11898  func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
 11899  	if c.header_ == nil {
 11900  		c.header_ = make(http.Header)
 11901  	}
 11902  	return c.header_
 11903  }
 11904  
 11905  func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
 11906  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11907  	var body io.Reader = nil
 11908  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
 11909  	if err != nil {
 11910  		return nil, err
 11911  	}
 11912  	c.urlParams_.Set("alt", alt)
 11913  	c.urlParams_.Set("prettyPrint", "false")
 11914  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
 11915  	urls += "?" + c.urlParams_.Encode()
 11916  	req, err := http.NewRequest("POST", urls, body)
 11917  	if err != nil {
 11918  		return nil, err
 11919  	}
 11920  	req.Header = reqHeaders
 11921  	googleapi.Expand(req.URL, map[string]string{
 11922  		"parent": c.parent,
 11923  	})
 11924  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11925  }
 11926  
 11927  // Do executes the "apigeeregistry.projects.locations.instances.create" call.
 11928  // Any non-2xx status code is an error. Response headers are in either
 11929  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11930  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11931  // whether the returned error was because http.StatusNotModified was returned.
 11932  func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11933  	gensupport.SetOptions(c.urlParams_, opts...)
 11934  	res, err := c.doRequest("json")
 11935  	if res != nil && res.StatusCode == http.StatusNotModified {
 11936  		if res.Body != nil {
 11937  			res.Body.Close()
 11938  		}
 11939  		return nil, gensupport.WrapError(&googleapi.Error{
 11940  			Code:   res.StatusCode,
 11941  			Header: res.Header,
 11942  		})
 11943  	}
 11944  	if err != nil {
 11945  		return nil, err
 11946  	}
 11947  	defer googleapi.CloseBody(res)
 11948  	if err := googleapi.CheckResponse(res); err != nil {
 11949  		return nil, gensupport.WrapError(err)
 11950  	}
 11951  	ret := &Operation{
 11952  		ServerResponse: googleapi.ServerResponse{
 11953  			Header:         res.Header,
 11954  			HTTPStatusCode: res.StatusCode,
 11955  		},
 11956  	}
 11957  	target := &ret
 11958  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11959  		return nil, err
 11960  	}
 11961  	return ret, nil
 11962  }
 11963  
 11964  type ProjectsLocationsInstancesDeleteCall struct {
 11965  	s          *Service
 11966  	name       string
 11967  	urlParams_ gensupport.URLParams
 11968  	ctx_       context.Context
 11969  	header_    http.Header
 11970  }
 11971  
 11972  // Delete: Deletes the Registry instance.
 11973  //
 11974  //   - name: The name of the Instance to delete. Format:
 11975  //     `projects/*/locations/*/instances/*`.
 11976  func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
 11977  	c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11978  	c.name = name
 11979  	return c
 11980  }
 11981  
 11982  // Fields allows partial responses to be retrieved. See
 11983  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11984  // details.
 11985  func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
 11986  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11987  	return c
 11988  }
 11989  
 11990  // Context sets the context to be used in this call's Do method.
 11991  func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
 11992  	c.ctx_ = ctx
 11993  	return c
 11994  }
 11995  
 11996  // Header returns a http.Header that can be modified by the caller to add
 11997  // headers to the request.
 11998  func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
 11999  	if c.header_ == nil {
 12000  		c.header_ = make(http.Header)
 12001  	}
 12002  	return c.header_
 12003  }
 12004  
 12005  func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
 12006  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12007  	var body io.Reader = nil
 12008  	c.urlParams_.Set("alt", alt)
 12009  	c.urlParams_.Set("prettyPrint", "false")
 12010  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12011  	urls += "?" + c.urlParams_.Encode()
 12012  	req, err := http.NewRequest("DELETE", urls, body)
 12013  	if err != nil {
 12014  		return nil, err
 12015  	}
 12016  	req.Header = reqHeaders
 12017  	googleapi.Expand(req.URL, map[string]string{
 12018  		"name": c.name,
 12019  	})
 12020  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12021  }
 12022  
 12023  // Do executes the "apigeeregistry.projects.locations.instances.delete" call.
 12024  // Any non-2xx status code is an error. Response headers are in either
 12025  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12026  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12027  // whether the returned error was because http.StatusNotModified was returned.
 12028  func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12029  	gensupport.SetOptions(c.urlParams_, opts...)
 12030  	res, err := c.doRequest("json")
 12031  	if res != nil && res.StatusCode == http.StatusNotModified {
 12032  		if res.Body != nil {
 12033  			res.Body.Close()
 12034  		}
 12035  		return nil, gensupport.WrapError(&googleapi.Error{
 12036  			Code:   res.StatusCode,
 12037  			Header: res.Header,
 12038  		})
 12039  	}
 12040  	if err != nil {
 12041  		return nil, err
 12042  	}
 12043  	defer googleapi.CloseBody(res)
 12044  	if err := googleapi.CheckResponse(res); err != nil {
 12045  		return nil, gensupport.WrapError(err)
 12046  	}
 12047  	ret := &Operation{
 12048  		ServerResponse: googleapi.ServerResponse{
 12049  			Header:         res.Header,
 12050  			HTTPStatusCode: res.StatusCode,
 12051  		},
 12052  	}
 12053  	target := &ret
 12054  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12055  		return nil, err
 12056  	}
 12057  	return ret, nil
 12058  }
 12059  
 12060  type ProjectsLocationsInstancesGetCall struct {
 12061  	s            *Service
 12062  	name         string
 12063  	urlParams_   gensupport.URLParams
 12064  	ifNoneMatch_ string
 12065  	ctx_         context.Context
 12066  	header_      http.Header
 12067  }
 12068  
 12069  // Get: Gets details of a single Instance.
 12070  //
 12071  //   - name: The name of the Instance to retrieve. Format:
 12072  //     `projects/*/locations/*/instances/*`.
 12073  func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
 12074  	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12075  	c.name = name
 12076  	return c
 12077  }
 12078  
 12079  // Fields allows partial responses to be retrieved. See
 12080  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12081  // details.
 12082  func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
 12083  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12084  	return c
 12085  }
 12086  
 12087  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12088  // object's ETag matches the given value. This is useful for getting updates
 12089  // only after the object has changed since the last request.
 12090  func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
 12091  	c.ifNoneMatch_ = entityTag
 12092  	return c
 12093  }
 12094  
 12095  // Context sets the context to be used in this call's Do method.
 12096  func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
 12097  	c.ctx_ = ctx
 12098  	return c
 12099  }
 12100  
 12101  // Header returns a http.Header that can be modified by the caller to add
 12102  // headers to the request.
 12103  func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
 12104  	if c.header_ == nil {
 12105  		c.header_ = make(http.Header)
 12106  	}
 12107  	return c.header_
 12108  }
 12109  
 12110  func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
 12111  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12112  	if c.ifNoneMatch_ != "" {
 12113  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12114  	}
 12115  	var body io.Reader = nil
 12116  	c.urlParams_.Set("alt", alt)
 12117  	c.urlParams_.Set("prettyPrint", "false")
 12118  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12119  	urls += "?" + c.urlParams_.Encode()
 12120  	req, err := http.NewRequest("GET", urls, body)
 12121  	if err != nil {
 12122  		return nil, err
 12123  	}
 12124  	req.Header = reqHeaders
 12125  	googleapi.Expand(req.URL, map[string]string{
 12126  		"name": c.name,
 12127  	})
 12128  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12129  }
 12130  
 12131  // Do executes the "apigeeregistry.projects.locations.instances.get" call.
 12132  // Any non-2xx status code is an error. Response headers are in either
 12133  // *Instance.ServerResponse.Header or (if a response was returned at all) in
 12134  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12135  // whether the returned error was because http.StatusNotModified was returned.
 12136  func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
 12137  	gensupport.SetOptions(c.urlParams_, opts...)
 12138  	res, err := c.doRequest("json")
 12139  	if res != nil && res.StatusCode == http.StatusNotModified {
 12140  		if res.Body != nil {
 12141  			res.Body.Close()
 12142  		}
 12143  		return nil, gensupport.WrapError(&googleapi.Error{
 12144  			Code:   res.StatusCode,
 12145  			Header: res.Header,
 12146  		})
 12147  	}
 12148  	if err != nil {
 12149  		return nil, err
 12150  	}
 12151  	defer googleapi.CloseBody(res)
 12152  	if err := googleapi.CheckResponse(res); err != nil {
 12153  		return nil, gensupport.WrapError(err)
 12154  	}
 12155  	ret := &Instance{
 12156  		ServerResponse: googleapi.ServerResponse{
 12157  			Header:         res.Header,
 12158  			HTTPStatusCode: res.StatusCode,
 12159  		},
 12160  	}
 12161  	target := &ret
 12162  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12163  		return nil, err
 12164  	}
 12165  	return ret, nil
 12166  }
 12167  
 12168  type ProjectsLocationsInstancesGetIamPolicyCall struct {
 12169  	s            *Service
 12170  	resource     string
 12171  	urlParams_   gensupport.URLParams
 12172  	ifNoneMatch_ string
 12173  	ctx_         context.Context
 12174  	header_      http.Header
 12175  }
 12176  
 12177  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 12178  // empty policy if the resource exists and does not have a policy set.
 12179  //
 12180  //   - resource: REQUIRED: The resource for which the policy is being requested.
 12181  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12182  //     for the appropriate value for this field.
 12183  func (r *ProjectsLocationsInstancesService) GetIamPolicy(resource string) *ProjectsLocationsInstancesGetIamPolicyCall {
 12184  	c := &ProjectsLocationsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12185  	c.resource = resource
 12186  	return c
 12187  }
 12188  
 12189  // OptionsRequestedPolicyVersion sets the optional parameter
 12190  // "options.requestedPolicyVersion": The maximum policy version that will be
 12191  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 12192  // an invalid value will be rejected. Requests for policies with any
 12193  // conditional role bindings must specify version 3. Policies with no
 12194  // conditional role bindings may specify any valid value or leave the field
 12195  // unset. The policy in the response might use the policy version that you
 12196  // specified, or it might use a lower policy version. For example, if you
 12197  // specify version 3, but the policy has no conditional role bindings, the
 12198  // response uses version 1. To learn which resources support conditions in
 12199  // their IAM policies, see the IAM documentation
 12200  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 12201  func (c *ProjectsLocationsInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesGetIamPolicyCall {
 12202  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 12203  	return c
 12204  }
 12205  
 12206  // Fields allows partial responses to be retrieved. See
 12207  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12208  // details.
 12209  func (c *ProjectsLocationsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetIamPolicyCall {
 12210  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12211  	return c
 12212  }
 12213  
 12214  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12215  // object's ETag matches the given value. This is useful for getting updates
 12216  // only after the object has changed since the last request.
 12217  func (c *ProjectsLocationsInstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetIamPolicyCall {
 12218  	c.ifNoneMatch_ = entityTag
 12219  	return c
 12220  }
 12221  
 12222  // Context sets the context to be used in this call's Do method.
 12223  func (c *ProjectsLocationsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetIamPolicyCall {
 12224  	c.ctx_ = ctx
 12225  	return c
 12226  }
 12227  
 12228  // Header returns a http.Header that can be modified by the caller to add
 12229  // headers to the request.
 12230  func (c *ProjectsLocationsInstancesGetIamPolicyCall) Header() http.Header {
 12231  	if c.header_ == nil {
 12232  		c.header_ = make(http.Header)
 12233  	}
 12234  	return c.header_
 12235  }
 12236  
 12237  func (c *ProjectsLocationsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 12238  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12239  	if c.ifNoneMatch_ != "" {
 12240  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12241  	}
 12242  	var body io.Reader = nil
 12243  	c.urlParams_.Set("alt", alt)
 12244  	c.urlParams_.Set("prettyPrint", "false")
 12245  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 12246  	urls += "?" + c.urlParams_.Encode()
 12247  	req, err := http.NewRequest("GET", urls, body)
 12248  	if err != nil {
 12249  		return nil, err
 12250  	}
 12251  	req.Header = reqHeaders
 12252  	googleapi.Expand(req.URL, map[string]string{
 12253  		"resource": c.resource,
 12254  	})
 12255  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12256  }
 12257  
 12258  // Do executes the "apigeeregistry.projects.locations.instances.getIamPolicy" call.
 12259  // Any non-2xx status code is an error. Response headers are in either
 12260  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 12261  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12262  // whether the returned error was because http.StatusNotModified was returned.
 12263  func (c *ProjectsLocationsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 12264  	gensupport.SetOptions(c.urlParams_, opts...)
 12265  	res, err := c.doRequest("json")
 12266  	if res != nil && res.StatusCode == http.StatusNotModified {
 12267  		if res.Body != nil {
 12268  			res.Body.Close()
 12269  		}
 12270  		return nil, gensupport.WrapError(&googleapi.Error{
 12271  			Code:   res.StatusCode,
 12272  			Header: res.Header,
 12273  		})
 12274  	}
 12275  	if err != nil {
 12276  		return nil, err
 12277  	}
 12278  	defer googleapi.CloseBody(res)
 12279  	if err := googleapi.CheckResponse(res); err != nil {
 12280  		return nil, gensupport.WrapError(err)
 12281  	}
 12282  	ret := &Policy{
 12283  		ServerResponse: googleapi.ServerResponse{
 12284  			Header:         res.Header,
 12285  			HTTPStatusCode: res.StatusCode,
 12286  		},
 12287  	}
 12288  	target := &ret
 12289  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12290  		return nil, err
 12291  	}
 12292  	return ret, nil
 12293  }
 12294  
 12295  type ProjectsLocationsInstancesSetIamPolicyCall struct {
 12296  	s                   *Service
 12297  	resource            string
 12298  	setiampolicyrequest *SetIamPolicyRequest
 12299  	urlParams_          gensupport.URLParams
 12300  	ctx_                context.Context
 12301  	header_             http.Header
 12302  }
 12303  
 12304  // SetIamPolicy: Sets the access control policy on the specified resource.
 12305  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 12306  // and `PERMISSION_DENIED` errors.
 12307  //
 12308  //   - resource: REQUIRED: The resource for which the policy is being specified.
 12309  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12310  //     for the appropriate value for this field.
 12311  func (r *ProjectsLocationsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsInstancesSetIamPolicyCall {
 12312  	c := &ProjectsLocationsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12313  	c.resource = resource
 12314  	c.setiampolicyrequest = setiampolicyrequest
 12315  	return c
 12316  }
 12317  
 12318  // Fields allows partial responses to be retrieved. See
 12319  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12320  // details.
 12321  func (c *ProjectsLocationsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetIamPolicyCall {
 12322  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12323  	return c
 12324  }
 12325  
 12326  // Context sets the context to be used in this call's Do method.
 12327  func (c *ProjectsLocationsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetIamPolicyCall {
 12328  	c.ctx_ = ctx
 12329  	return c
 12330  }
 12331  
 12332  // Header returns a http.Header that can be modified by the caller to add
 12333  // headers to the request.
 12334  func (c *ProjectsLocationsInstancesSetIamPolicyCall) Header() http.Header {
 12335  	if c.header_ == nil {
 12336  		c.header_ = make(http.Header)
 12337  	}
 12338  	return c.header_
 12339  }
 12340  
 12341  func (c *ProjectsLocationsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 12342  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12343  	var body io.Reader = nil
 12344  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 12345  	if err != nil {
 12346  		return nil, err
 12347  	}
 12348  	c.urlParams_.Set("alt", alt)
 12349  	c.urlParams_.Set("prettyPrint", "false")
 12350  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 12351  	urls += "?" + c.urlParams_.Encode()
 12352  	req, err := http.NewRequest("POST", urls, body)
 12353  	if err != nil {
 12354  		return nil, err
 12355  	}
 12356  	req.Header = reqHeaders
 12357  	googleapi.Expand(req.URL, map[string]string{
 12358  		"resource": c.resource,
 12359  	})
 12360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12361  }
 12362  
 12363  // Do executes the "apigeeregistry.projects.locations.instances.setIamPolicy" call.
 12364  // Any non-2xx status code is an error. Response headers are in either
 12365  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 12366  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12367  // whether the returned error was because http.StatusNotModified was returned.
 12368  func (c *ProjectsLocationsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 12369  	gensupport.SetOptions(c.urlParams_, opts...)
 12370  	res, err := c.doRequest("json")
 12371  	if res != nil && res.StatusCode == http.StatusNotModified {
 12372  		if res.Body != nil {
 12373  			res.Body.Close()
 12374  		}
 12375  		return nil, gensupport.WrapError(&googleapi.Error{
 12376  			Code:   res.StatusCode,
 12377  			Header: res.Header,
 12378  		})
 12379  	}
 12380  	if err != nil {
 12381  		return nil, err
 12382  	}
 12383  	defer googleapi.CloseBody(res)
 12384  	if err := googleapi.CheckResponse(res); err != nil {
 12385  		return nil, gensupport.WrapError(err)
 12386  	}
 12387  	ret := &Policy{
 12388  		ServerResponse: googleapi.ServerResponse{
 12389  			Header:         res.Header,
 12390  			HTTPStatusCode: res.StatusCode,
 12391  		},
 12392  	}
 12393  	target := &ret
 12394  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12395  		return nil, err
 12396  	}
 12397  	return ret, nil
 12398  }
 12399  
 12400  type ProjectsLocationsInstancesTestIamPermissionsCall struct {
 12401  	s                         *Service
 12402  	resource                  string
 12403  	testiampermissionsrequest *TestIamPermissionsRequest
 12404  	urlParams_                gensupport.URLParams
 12405  	ctx_                      context.Context
 12406  	header_                   http.Header
 12407  }
 12408  
 12409  // TestIamPermissions: Returns permissions that a caller has on the specified
 12410  // resource. If the resource does not exist, this will return an empty set of
 12411  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 12412  // used for building permission-aware UIs and command-line tools, not for
 12413  // authorization checking. This operation may "fail open" without warning.
 12414  //
 12415  //   - resource: REQUIRED: The resource for which the policy detail is being
 12416  //     requested. See Resource names
 12417  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 12418  //     value for this field.
 12419  func (r *ProjectsLocationsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsInstancesTestIamPermissionsCall {
 12420  	c := &ProjectsLocationsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12421  	c.resource = resource
 12422  	c.testiampermissionsrequest = testiampermissionsrequest
 12423  	return c
 12424  }
 12425  
 12426  // Fields allows partial responses to be retrieved. See
 12427  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12428  // details.
 12429  func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesTestIamPermissionsCall {
 12430  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12431  	return c
 12432  }
 12433  
 12434  // Context sets the context to be used in this call's Do method.
 12435  func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsInstancesTestIamPermissionsCall {
 12436  	c.ctx_ = ctx
 12437  	return c
 12438  }
 12439  
 12440  // Header returns a http.Header that can be modified by the caller to add
 12441  // headers to the request.
 12442  func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Header() http.Header {
 12443  	if c.header_ == nil {
 12444  		c.header_ = make(http.Header)
 12445  	}
 12446  	return c.header_
 12447  }
 12448  
 12449  func (c *ProjectsLocationsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 12450  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12451  	var body io.Reader = nil
 12452  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 12453  	if err != nil {
 12454  		return nil, err
 12455  	}
 12456  	c.urlParams_.Set("alt", alt)
 12457  	c.urlParams_.Set("prettyPrint", "false")
 12458  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 12459  	urls += "?" + c.urlParams_.Encode()
 12460  	req, err := http.NewRequest("POST", urls, body)
 12461  	if err != nil {
 12462  		return nil, err
 12463  	}
 12464  	req.Header = reqHeaders
 12465  	googleapi.Expand(req.URL, map[string]string{
 12466  		"resource": c.resource,
 12467  	})
 12468  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12469  }
 12470  
 12471  // Do executes the "apigeeregistry.projects.locations.instances.testIamPermissions" call.
 12472  // Any non-2xx status code is an error. Response headers are in either
 12473  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 12474  // returned at all) in error.(*googleapi.Error).Header. Use
 12475  // googleapi.IsNotModified to check whether the returned error was because
 12476  // http.StatusNotModified was returned.
 12477  func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 12478  	gensupport.SetOptions(c.urlParams_, opts...)
 12479  	res, err := c.doRequest("json")
 12480  	if res != nil && res.StatusCode == http.StatusNotModified {
 12481  		if res.Body != nil {
 12482  			res.Body.Close()
 12483  		}
 12484  		return nil, gensupport.WrapError(&googleapi.Error{
 12485  			Code:   res.StatusCode,
 12486  			Header: res.Header,
 12487  		})
 12488  	}
 12489  	if err != nil {
 12490  		return nil, err
 12491  	}
 12492  	defer googleapi.CloseBody(res)
 12493  	if err := googleapi.CheckResponse(res); err != nil {
 12494  		return nil, gensupport.WrapError(err)
 12495  	}
 12496  	ret := &TestIamPermissionsResponse{
 12497  		ServerResponse: googleapi.ServerResponse{
 12498  			Header:         res.Header,
 12499  			HTTPStatusCode: res.StatusCode,
 12500  		},
 12501  	}
 12502  	target := &ret
 12503  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12504  		return nil, err
 12505  	}
 12506  	return ret, nil
 12507  }
 12508  
 12509  type ProjectsLocationsOperationsCancelCall struct {
 12510  	s                      *Service
 12511  	name                   string
 12512  	canceloperationrequest *CancelOperationRequest
 12513  	urlParams_             gensupport.URLParams
 12514  	ctx_                   context.Context
 12515  	header_                http.Header
 12516  }
 12517  
 12518  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 12519  // server makes a best effort to cancel the operation, but success is not
 12520  // guaranteed. If the server doesn't support this method, it returns
 12521  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 12522  // other methods to check whether the cancellation succeeded or whether the
 12523  // operation completed despite cancellation. On successful cancellation, the
 12524  // operation is not deleted; instead, it becomes an operation with an
 12525  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 12526  // `Code.CANCELLED`.
 12527  //
 12528  // - name: The name of the operation resource to be cancelled.
 12529  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
 12530  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12531  	c.name = name
 12532  	c.canceloperationrequest = canceloperationrequest
 12533  	return c
 12534  }
 12535  
 12536  // Fields allows partial responses to be retrieved. See
 12537  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12538  // details.
 12539  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
 12540  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12541  	return c
 12542  }
 12543  
 12544  // Context sets the context to be used in this call's Do method.
 12545  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
 12546  	c.ctx_ = ctx
 12547  	return c
 12548  }
 12549  
 12550  // Header returns a http.Header that can be modified by the caller to add
 12551  // headers to the request.
 12552  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
 12553  	if c.header_ == nil {
 12554  		c.header_ = make(http.Header)
 12555  	}
 12556  	return c.header_
 12557  }
 12558  
 12559  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 12560  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12561  	var body io.Reader = nil
 12562  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 12563  	if err != nil {
 12564  		return nil, err
 12565  	}
 12566  	c.urlParams_.Set("alt", alt)
 12567  	c.urlParams_.Set("prettyPrint", "false")
 12568  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 12569  	urls += "?" + c.urlParams_.Encode()
 12570  	req, err := http.NewRequest("POST", urls, body)
 12571  	if err != nil {
 12572  		return nil, err
 12573  	}
 12574  	req.Header = reqHeaders
 12575  	googleapi.Expand(req.URL, map[string]string{
 12576  		"name": c.name,
 12577  	})
 12578  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12579  }
 12580  
 12581  // Do executes the "apigeeregistry.projects.locations.operations.cancel" call.
 12582  // Any non-2xx status code is an error. Response headers are in either
 12583  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12584  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12585  // whether the returned error was because http.StatusNotModified was returned.
 12586  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12587  	gensupport.SetOptions(c.urlParams_, opts...)
 12588  	res, err := c.doRequest("json")
 12589  	if res != nil && res.StatusCode == http.StatusNotModified {
 12590  		if res.Body != nil {
 12591  			res.Body.Close()
 12592  		}
 12593  		return nil, gensupport.WrapError(&googleapi.Error{
 12594  			Code:   res.StatusCode,
 12595  			Header: res.Header,
 12596  		})
 12597  	}
 12598  	if err != nil {
 12599  		return nil, err
 12600  	}
 12601  	defer googleapi.CloseBody(res)
 12602  	if err := googleapi.CheckResponse(res); err != nil {
 12603  		return nil, gensupport.WrapError(err)
 12604  	}
 12605  	ret := &Empty{
 12606  		ServerResponse: googleapi.ServerResponse{
 12607  			Header:         res.Header,
 12608  			HTTPStatusCode: res.StatusCode,
 12609  		},
 12610  	}
 12611  	target := &ret
 12612  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12613  		return nil, err
 12614  	}
 12615  	return ret, nil
 12616  }
 12617  
 12618  type ProjectsLocationsOperationsDeleteCall struct {
 12619  	s          *Service
 12620  	name       string
 12621  	urlParams_ gensupport.URLParams
 12622  	ctx_       context.Context
 12623  	header_    http.Header
 12624  }
 12625  
 12626  // Delete: Deletes a long-running operation. This method indicates that the
 12627  // client is no longer interested in the operation result. It does not cancel
 12628  // the operation. If the server doesn't support this method, it returns
 12629  // `google.rpc.Code.UNIMPLEMENTED`.
 12630  //
 12631  // - name: The name of the operation resource to be deleted.
 12632  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
 12633  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12634  	c.name = name
 12635  	return c
 12636  }
 12637  
 12638  // Fields allows partial responses to be retrieved. See
 12639  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12640  // details.
 12641  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
 12642  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12643  	return c
 12644  }
 12645  
 12646  // Context sets the context to be used in this call's Do method.
 12647  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
 12648  	c.ctx_ = ctx
 12649  	return c
 12650  }
 12651  
 12652  // Header returns a http.Header that can be modified by the caller to add
 12653  // headers to the request.
 12654  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
 12655  	if c.header_ == nil {
 12656  		c.header_ = make(http.Header)
 12657  	}
 12658  	return c.header_
 12659  }
 12660  
 12661  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 12662  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12663  	var body io.Reader = nil
 12664  	c.urlParams_.Set("alt", alt)
 12665  	c.urlParams_.Set("prettyPrint", "false")
 12666  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12667  	urls += "?" + c.urlParams_.Encode()
 12668  	req, err := http.NewRequest("DELETE", urls, body)
 12669  	if err != nil {
 12670  		return nil, err
 12671  	}
 12672  	req.Header = reqHeaders
 12673  	googleapi.Expand(req.URL, map[string]string{
 12674  		"name": c.name,
 12675  	})
 12676  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12677  }
 12678  
 12679  // Do executes the "apigeeregistry.projects.locations.operations.delete" call.
 12680  // Any non-2xx status code is an error. Response headers are in either
 12681  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12682  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12683  // whether the returned error was because http.StatusNotModified was returned.
 12684  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12685  	gensupport.SetOptions(c.urlParams_, opts...)
 12686  	res, err := c.doRequest("json")
 12687  	if res != nil && res.StatusCode == http.StatusNotModified {
 12688  		if res.Body != nil {
 12689  			res.Body.Close()
 12690  		}
 12691  		return nil, gensupport.WrapError(&googleapi.Error{
 12692  			Code:   res.StatusCode,
 12693  			Header: res.Header,
 12694  		})
 12695  	}
 12696  	if err != nil {
 12697  		return nil, err
 12698  	}
 12699  	defer googleapi.CloseBody(res)
 12700  	if err := googleapi.CheckResponse(res); err != nil {
 12701  		return nil, gensupport.WrapError(err)
 12702  	}
 12703  	ret := &Empty{
 12704  		ServerResponse: googleapi.ServerResponse{
 12705  			Header:         res.Header,
 12706  			HTTPStatusCode: res.StatusCode,
 12707  		},
 12708  	}
 12709  	target := &ret
 12710  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12711  		return nil, err
 12712  	}
 12713  	return ret, nil
 12714  }
 12715  
 12716  type ProjectsLocationsOperationsGetCall struct {
 12717  	s            *Service
 12718  	name         string
 12719  	urlParams_   gensupport.URLParams
 12720  	ifNoneMatch_ string
 12721  	ctx_         context.Context
 12722  	header_      http.Header
 12723  }
 12724  
 12725  // Get: Gets the latest state of a long-running operation. Clients can use this
 12726  // method to poll the operation result at intervals as recommended by the API
 12727  // service.
 12728  //
 12729  // - name: The name of the operation resource.
 12730  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
 12731  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12732  	c.name = name
 12733  	return c
 12734  }
 12735  
 12736  // Fields allows partial responses to be retrieved. See
 12737  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12738  // details.
 12739  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
 12740  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12741  	return c
 12742  }
 12743  
 12744  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12745  // object's ETag matches the given value. This is useful for getting updates
 12746  // only after the object has changed since the last request.
 12747  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
 12748  	c.ifNoneMatch_ = entityTag
 12749  	return c
 12750  }
 12751  
 12752  // Context sets the context to be used in this call's Do method.
 12753  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
 12754  	c.ctx_ = ctx
 12755  	return c
 12756  }
 12757  
 12758  // Header returns a http.Header that can be modified by the caller to add
 12759  // headers to the request.
 12760  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
 12761  	if c.header_ == nil {
 12762  		c.header_ = make(http.Header)
 12763  	}
 12764  	return c.header_
 12765  }
 12766  
 12767  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 12768  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12769  	if c.ifNoneMatch_ != "" {
 12770  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12771  	}
 12772  	var body io.Reader = nil
 12773  	c.urlParams_.Set("alt", alt)
 12774  	c.urlParams_.Set("prettyPrint", "false")
 12775  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12776  	urls += "?" + c.urlParams_.Encode()
 12777  	req, err := http.NewRequest("GET", urls, body)
 12778  	if err != nil {
 12779  		return nil, err
 12780  	}
 12781  	req.Header = reqHeaders
 12782  	googleapi.Expand(req.URL, map[string]string{
 12783  		"name": c.name,
 12784  	})
 12785  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12786  }
 12787  
 12788  // Do executes the "apigeeregistry.projects.locations.operations.get" call.
 12789  // Any non-2xx status code is an error. Response headers are in either
 12790  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12791  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12792  // whether the returned error was because http.StatusNotModified was returned.
 12793  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12794  	gensupport.SetOptions(c.urlParams_, opts...)
 12795  	res, err := c.doRequest("json")
 12796  	if res != nil && res.StatusCode == http.StatusNotModified {
 12797  		if res.Body != nil {
 12798  			res.Body.Close()
 12799  		}
 12800  		return nil, gensupport.WrapError(&googleapi.Error{
 12801  			Code:   res.StatusCode,
 12802  			Header: res.Header,
 12803  		})
 12804  	}
 12805  	if err != nil {
 12806  		return nil, err
 12807  	}
 12808  	defer googleapi.CloseBody(res)
 12809  	if err := googleapi.CheckResponse(res); err != nil {
 12810  		return nil, gensupport.WrapError(err)
 12811  	}
 12812  	ret := &Operation{
 12813  		ServerResponse: googleapi.ServerResponse{
 12814  			Header:         res.Header,
 12815  			HTTPStatusCode: res.StatusCode,
 12816  		},
 12817  	}
 12818  	target := &ret
 12819  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12820  		return nil, err
 12821  	}
 12822  	return ret, nil
 12823  }
 12824  
 12825  type ProjectsLocationsOperationsListCall struct {
 12826  	s            *Service
 12827  	name         string
 12828  	urlParams_   gensupport.URLParams
 12829  	ifNoneMatch_ string
 12830  	ctx_         context.Context
 12831  	header_      http.Header
 12832  }
 12833  
 12834  // List: Lists operations that match the specified filter in the request. If
 12835  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 12836  //
 12837  // - name: The name of the operation's parent resource.
 12838  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
 12839  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12840  	c.name = name
 12841  	return c
 12842  }
 12843  
 12844  // Filter sets the optional parameter "filter": The standard list filter.
 12845  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
 12846  	c.urlParams_.Set("filter", filter)
 12847  	return c
 12848  }
 12849  
 12850  // PageSize sets the optional parameter "pageSize": The standard list page
 12851  // size.
 12852  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
 12853  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12854  	return c
 12855  }
 12856  
 12857  // PageToken sets the optional parameter "pageToken": The standard list page
 12858  // token.
 12859  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
 12860  	c.urlParams_.Set("pageToken", pageToken)
 12861  	return c
 12862  }
 12863  
 12864  // Fields allows partial responses to be retrieved. See
 12865  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12866  // details.
 12867  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
 12868  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12869  	return c
 12870  }
 12871  
 12872  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12873  // object's ETag matches the given value. This is useful for getting updates
 12874  // only after the object has changed since the last request.
 12875  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
 12876  	c.ifNoneMatch_ = entityTag
 12877  	return c
 12878  }
 12879  
 12880  // Context sets the context to be used in this call's Do method.
 12881  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
 12882  	c.ctx_ = ctx
 12883  	return c
 12884  }
 12885  
 12886  // Header returns a http.Header that can be modified by the caller to add
 12887  // headers to the request.
 12888  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
 12889  	if c.header_ == nil {
 12890  		c.header_ = make(http.Header)
 12891  	}
 12892  	return c.header_
 12893  }
 12894  
 12895  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 12896  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12897  	if c.ifNoneMatch_ != "" {
 12898  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12899  	}
 12900  	var body io.Reader = nil
 12901  	c.urlParams_.Set("alt", alt)
 12902  	c.urlParams_.Set("prettyPrint", "false")
 12903  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
 12904  	urls += "?" + c.urlParams_.Encode()
 12905  	req, err := http.NewRequest("GET", urls, body)
 12906  	if err != nil {
 12907  		return nil, err
 12908  	}
 12909  	req.Header = reqHeaders
 12910  	googleapi.Expand(req.URL, map[string]string{
 12911  		"name": c.name,
 12912  	})
 12913  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12914  }
 12915  
 12916  // Do executes the "apigeeregistry.projects.locations.operations.list" call.
 12917  // Any non-2xx status code is an error. Response headers are in either
 12918  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 12919  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12920  // check whether the returned error was because http.StatusNotModified was
 12921  // returned.
 12922  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 12923  	gensupport.SetOptions(c.urlParams_, opts...)
 12924  	res, err := c.doRequest("json")
 12925  	if res != nil && res.StatusCode == http.StatusNotModified {
 12926  		if res.Body != nil {
 12927  			res.Body.Close()
 12928  		}
 12929  		return nil, gensupport.WrapError(&googleapi.Error{
 12930  			Code:   res.StatusCode,
 12931  			Header: res.Header,
 12932  		})
 12933  	}
 12934  	if err != nil {
 12935  		return nil, err
 12936  	}
 12937  	defer googleapi.CloseBody(res)
 12938  	if err := googleapi.CheckResponse(res); err != nil {
 12939  		return nil, gensupport.WrapError(err)
 12940  	}
 12941  	ret := &ListOperationsResponse{
 12942  		ServerResponse: googleapi.ServerResponse{
 12943  			Header:         res.Header,
 12944  			HTTPStatusCode: res.StatusCode,
 12945  		},
 12946  	}
 12947  	target := &ret
 12948  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12949  		return nil, err
 12950  	}
 12951  	return ret, nil
 12952  }
 12953  
 12954  // Pages invokes f for each page of results.
 12955  // A non-nil error returned from f will halt the iteration.
 12956  // The provided context supersedes any context provided to the Context method.
 12957  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 12958  	c.ctx_ = ctx
 12959  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12960  	for {
 12961  		x, err := c.Do()
 12962  		if err != nil {
 12963  			return err
 12964  		}
 12965  		if err := f(x); err != nil {
 12966  			return err
 12967  		}
 12968  		if x.NextPageToken == "" {
 12969  			return nil
 12970  		}
 12971  		c.PageToken(x.NextPageToken)
 12972  	}
 12973  }
 12974  
 12975  type ProjectsLocationsRuntimeGetIamPolicyCall struct {
 12976  	s            *Service
 12977  	resource     string
 12978  	urlParams_   gensupport.URLParams
 12979  	ifNoneMatch_ string
 12980  	ctx_         context.Context
 12981  	header_      http.Header
 12982  }
 12983  
 12984  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 12985  // empty policy if the resource exists and does not have a policy set.
 12986  //
 12987  //   - resource: REQUIRED: The resource for which the policy is being requested.
 12988  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12989  //     for the appropriate value for this field.
 12990  func (r *ProjectsLocationsRuntimeService) GetIamPolicy(resource string) *ProjectsLocationsRuntimeGetIamPolicyCall {
 12991  	c := &ProjectsLocationsRuntimeGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12992  	c.resource = resource
 12993  	return c
 12994  }
 12995  
 12996  // OptionsRequestedPolicyVersion sets the optional parameter
 12997  // "options.requestedPolicyVersion": The maximum policy version that will be
 12998  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 12999  // an invalid value will be rejected. Requests for policies with any
 13000  // conditional role bindings must specify version 3. Policies with no
 13001  // conditional role bindings may specify any valid value or leave the field
 13002  // unset. The policy in the response might use the policy version that you
 13003  // specified, or it might use a lower policy version. For example, if you
 13004  // specify version 3, but the policy has no conditional role bindings, the
 13005  // response uses version 1. To learn which resources support conditions in
 13006  // their IAM policies, see the IAM documentation
 13007  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 13008  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRuntimeGetIamPolicyCall {
 13009  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 13010  	return c
 13011  }
 13012  
 13013  // Fields allows partial responses to be retrieved. See
 13014  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13015  // details.
 13016  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeGetIamPolicyCall {
 13017  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13018  	return c
 13019  }
 13020  
 13021  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13022  // object's ETag matches the given value. This is useful for getting updates
 13023  // only after the object has changed since the last request.
 13024  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeGetIamPolicyCall {
 13025  	c.ifNoneMatch_ = entityTag
 13026  	return c
 13027  }
 13028  
 13029  // Context sets the context to be used in this call's Do method.
 13030  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRuntimeGetIamPolicyCall {
 13031  	c.ctx_ = ctx
 13032  	return c
 13033  }
 13034  
 13035  // Header returns a http.Header that can be modified by the caller to add
 13036  // headers to the request.
 13037  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) Header() http.Header {
 13038  	if c.header_ == nil {
 13039  		c.header_ = make(http.Header)
 13040  	}
 13041  	return c.header_
 13042  }
 13043  
 13044  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 13045  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13046  	if c.ifNoneMatch_ != "" {
 13047  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13048  	}
 13049  	var body io.Reader = nil
 13050  	c.urlParams_.Set("alt", alt)
 13051  	c.urlParams_.Set("prettyPrint", "false")
 13052  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 13053  	urls += "?" + c.urlParams_.Encode()
 13054  	req, err := http.NewRequest("GET", urls, body)
 13055  	if err != nil {
 13056  		return nil, err
 13057  	}
 13058  	req.Header = reqHeaders
 13059  	googleapi.Expand(req.URL, map[string]string{
 13060  		"resource": c.resource,
 13061  	})
 13062  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13063  }
 13064  
 13065  // Do executes the "apigeeregistry.projects.locations.runtime.getIamPolicy" call.
 13066  // Any non-2xx status code is an error. Response headers are in either
 13067  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 13068  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13069  // whether the returned error was because http.StatusNotModified was returned.
 13070  func (c *ProjectsLocationsRuntimeGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 13071  	gensupport.SetOptions(c.urlParams_, opts...)
 13072  	res, err := c.doRequest("json")
 13073  	if res != nil && res.StatusCode == http.StatusNotModified {
 13074  		if res.Body != nil {
 13075  			res.Body.Close()
 13076  		}
 13077  		return nil, gensupport.WrapError(&googleapi.Error{
 13078  			Code:   res.StatusCode,
 13079  			Header: res.Header,
 13080  		})
 13081  	}
 13082  	if err != nil {
 13083  		return nil, err
 13084  	}
 13085  	defer googleapi.CloseBody(res)
 13086  	if err := googleapi.CheckResponse(res); err != nil {
 13087  		return nil, gensupport.WrapError(err)
 13088  	}
 13089  	ret := &Policy{
 13090  		ServerResponse: googleapi.ServerResponse{
 13091  			Header:         res.Header,
 13092  			HTTPStatusCode: res.StatusCode,
 13093  		},
 13094  	}
 13095  	target := &ret
 13096  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13097  		return nil, err
 13098  	}
 13099  	return ret, nil
 13100  }
 13101  
 13102  type ProjectsLocationsRuntimeSetIamPolicyCall struct {
 13103  	s                   *Service
 13104  	resource            string
 13105  	setiampolicyrequest *SetIamPolicyRequest
 13106  	urlParams_          gensupport.URLParams
 13107  	ctx_                context.Context
 13108  	header_             http.Header
 13109  }
 13110  
 13111  // SetIamPolicy: Sets the access control policy on the specified resource.
 13112  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 13113  // and `PERMISSION_DENIED` errors.
 13114  //
 13115  //   - resource: REQUIRED: The resource for which the policy is being specified.
 13116  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 13117  //     for the appropriate value for this field.
 13118  func (r *ProjectsLocationsRuntimeService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRuntimeSetIamPolicyCall {
 13119  	c := &ProjectsLocationsRuntimeSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13120  	c.resource = resource
 13121  	c.setiampolicyrequest = setiampolicyrequest
 13122  	return c
 13123  }
 13124  
 13125  // Fields allows partial responses to be retrieved. See
 13126  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13127  // details.
 13128  func (c *ProjectsLocationsRuntimeSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeSetIamPolicyCall {
 13129  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13130  	return c
 13131  }
 13132  
 13133  // Context sets the context to be used in this call's Do method.
 13134  func (c *ProjectsLocationsRuntimeSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRuntimeSetIamPolicyCall {
 13135  	c.ctx_ = ctx
 13136  	return c
 13137  }
 13138  
 13139  // Header returns a http.Header that can be modified by the caller to add
 13140  // headers to the request.
 13141  func (c *ProjectsLocationsRuntimeSetIamPolicyCall) Header() http.Header {
 13142  	if c.header_ == nil {
 13143  		c.header_ = make(http.Header)
 13144  	}
 13145  	return c.header_
 13146  }
 13147  
 13148  func (c *ProjectsLocationsRuntimeSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 13149  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13150  	var body io.Reader = nil
 13151  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 13152  	if err != nil {
 13153  		return nil, err
 13154  	}
 13155  	c.urlParams_.Set("alt", alt)
 13156  	c.urlParams_.Set("prettyPrint", "false")
 13157  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 13158  	urls += "?" + c.urlParams_.Encode()
 13159  	req, err := http.NewRequest("POST", urls, body)
 13160  	if err != nil {
 13161  		return nil, err
 13162  	}
 13163  	req.Header = reqHeaders
 13164  	googleapi.Expand(req.URL, map[string]string{
 13165  		"resource": c.resource,
 13166  	})
 13167  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13168  }
 13169  
 13170  // Do executes the "apigeeregistry.projects.locations.runtime.setIamPolicy" call.
 13171  // Any non-2xx status code is an error. Response headers are in either
 13172  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 13173  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13174  // whether the returned error was because http.StatusNotModified was returned.
 13175  func (c *ProjectsLocationsRuntimeSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 13176  	gensupport.SetOptions(c.urlParams_, opts...)
 13177  	res, err := c.doRequest("json")
 13178  	if res != nil && res.StatusCode == http.StatusNotModified {
 13179  		if res.Body != nil {
 13180  			res.Body.Close()
 13181  		}
 13182  		return nil, gensupport.WrapError(&googleapi.Error{
 13183  			Code:   res.StatusCode,
 13184  			Header: res.Header,
 13185  		})
 13186  	}
 13187  	if err != nil {
 13188  		return nil, err
 13189  	}
 13190  	defer googleapi.CloseBody(res)
 13191  	if err := googleapi.CheckResponse(res); err != nil {
 13192  		return nil, gensupport.WrapError(err)
 13193  	}
 13194  	ret := &Policy{
 13195  		ServerResponse: googleapi.ServerResponse{
 13196  			Header:         res.Header,
 13197  			HTTPStatusCode: res.StatusCode,
 13198  		},
 13199  	}
 13200  	target := &ret
 13201  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13202  		return nil, err
 13203  	}
 13204  	return ret, nil
 13205  }
 13206  
 13207  type ProjectsLocationsRuntimeTestIamPermissionsCall struct {
 13208  	s                         *Service
 13209  	resource                  string
 13210  	testiampermissionsrequest *TestIamPermissionsRequest
 13211  	urlParams_                gensupport.URLParams
 13212  	ctx_                      context.Context
 13213  	header_                   http.Header
 13214  }
 13215  
 13216  // TestIamPermissions: Returns permissions that a caller has on the specified
 13217  // resource. If the resource does not exist, this will return an empty set of
 13218  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 13219  // used for building permission-aware UIs and command-line tools, not for
 13220  // authorization checking. This operation may "fail open" without warning.
 13221  //
 13222  //   - resource: REQUIRED: The resource for which the policy detail is being
 13223  //     requested. See Resource names
 13224  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 13225  //     value for this field.
 13226  func (r *ProjectsLocationsRuntimeService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRuntimeTestIamPermissionsCall {
 13227  	c := &ProjectsLocationsRuntimeTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13228  	c.resource = resource
 13229  	c.testiampermissionsrequest = testiampermissionsrequest
 13230  	return c
 13231  }
 13232  
 13233  // Fields allows partial responses to be retrieved. See
 13234  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13235  // details.
 13236  func (c *ProjectsLocationsRuntimeTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeTestIamPermissionsCall {
 13237  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13238  	return c
 13239  }
 13240  
 13241  // Context sets the context to be used in this call's Do method.
 13242  func (c *ProjectsLocationsRuntimeTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRuntimeTestIamPermissionsCall {
 13243  	c.ctx_ = ctx
 13244  	return c
 13245  }
 13246  
 13247  // Header returns a http.Header that can be modified by the caller to add
 13248  // headers to the request.
 13249  func (c *ProjectsLocationsRuntimeTestIamPermissionsCall) Header() http.Header {
 13250  	if c.header_ == nil {
 13251  		c.header_ = make(http.Header)
 13252  	}
 13253  	return c.header_
 13254  }
 13255  
 13256  func (c *ProjectsLocationsRuntimeTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 13257  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13258  	var body io.Reader = nil
 13259  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 13260  	if err != nil {
 13261  		return nil, err
 13262  	}
 13263  	c.urlParams_.Set("alt", alt)
 13264  	c.urlParams_.Set("prettyPrint", "false")
 13265  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 13266  	urls += "?" + c.urlParams_.Encode()
 13267  	req, err := http.NewRequest("POST", urls, body)
 13268  	if err != nil {
 13269  		return nil, err
 13270  	}
 13271  	req.Header = reqHeaders
 13272  	googleapi.Expand(req.URL, map[string]string{
 13273  		"resource": c.resource,
 13274  	})
 13275  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13276  }
 13277  
 13278  // Do executes the "apigeeregistry.projects.locations.runtime.testIamPermissions" call.
 13279  // Any non-2xx status code is an error. Response headers are in either
 13280  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 13281  // returned at all) in error.(*googleapi.Error).Header. Use
 13282  // googleapi.IsNotModified to check whether the returned error was because
 13283  // http.StatusNotModified was returned.
 13284  func (c *ProjectsLocationsRuntimeTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 13285  	gensupport.SetOptions(c.urlParams_, opts...)
 13286  	res, err := c.doRequest("json")
 13287  	if res != nil && res.StatusCode == http.StatusNotModified {
 13288  		if res.Body != nil {
 13289  			res.Body.Close()
 13290  		}
 13291  		return nil, gensupport.WrapError(&googleapi.Error{
 13292  			Code:   res.StatusCode,
 13293  			Header: res.Header,
 13294  		})
 13295  	}
 13296  	if err != nil {
 13297  		return nil, err
 13298  	}
 13299  	defer googleapi.CloseBody(res)
 13300  	if err := googleapi.CheckResponse(res); err != nil {
 13301  		return nil, gensupport.WrapError(err)
 13302  	}
 13303  	ret := &TestIamPermissionsResponse{
 13304  		ServerResponse: googleapi.ServerResponse{
 13305  			Header:         res.Header,
 13306  			HTTPStatusCode: res.StatusCode,
 13307  		},
 13308  	}
 13309  	target := &ret
 13310  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13311  		return nil, err
 13312  	}
 13313  	return ret, nil
 13314  }
 13315  

View as plain text