...

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

Documentation: google.golang.org/api/artifactregistry/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 artifactregistry provides access to the Artifact Registry API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/artifacts/docs/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/artifactregistry/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	artifactregistryService, err := artifactregistry.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  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	artifactregistryService, err := artifactregistry.NewService(ctx, option.WithScopes(artifactregistry.CloudPlatformReadOnlyScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	artifactregistryService, err := artifactregistry.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	artifactregistryService, err := artifactregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package artifactregistry // import "google.golang.org/api/artifactregistry/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "artifactregistry:v1"
    95  const apiName = "artifactregistry"
    96  const apiVersion = "v1"
    97  const basePath = "https://artifactregistry.googleapis.com/"
    98  const basePathTemplate = "https://artifactregistry.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://artifactregistry.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// See, edit, configure, and delete your Google Cloud data and see the email
   104  	// address for your Google Account.
   105  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   106  
   107  	// View your data across Google Cloud services and see the email address of
   108  	// your Google Account
   109  	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
   110  )
   111  
   112  // NewService creates a new Service.
   113  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   114  	scopesOption := internaloption.WithDefaultScopes(
   115  		"https://www.googleapis.com/auth/cloud-platform",
   116  		"https://www.googleapis.com/auth/cloud-platform.read-only",
   117  	)
   118  	// NOTE: prepend, so we don't override user-specified scopes.
   119  	opts = append([]option.ClientOption{scopesOption}, opts...)
   120  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   121  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   122  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   123  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   124  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	s, err := New(client)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	if endpoint != "" {
   133  		s.BasePath = endpoint
   134  	}
   135  	return s, nil
   136  }
   137  
   138  // New creates a new Service. It uses the provided http.Client for requests.
   139  //
   140  // Deprecated: please use NewService instead.
   141  // To provide a custom HTTP client, use option.WithHTTPClient.
   142  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   143  func New(client *http.Client) (*Service, error) {
   144  	if client == nil {
   145  		return nil, errors.New("client is nil")
   146  	}
   147  	s := &Service{client: client, BasePath: basePath}
   148  	s.Projects = NewProjectsService(s)
   149  	return s, nil
   150  }
   151  
   152  type Service struct {
   153  	client    *http.Client
   154  	BasePath  string // API endpoint base URL
   155  	UserAgent string // optional additional User-Agent fragment
   156  
   157  	Projects *ProjectsService
   158  }
   159  
   160  func (s *Service) userAgent() string {
   161  	if s.UserAgent == "" {
   162  		return googleapi.UserAgent
   163  	}
   164  	return googleapi.UserAgent + " " + s.UserAgent
   165  }
   166  
   167  func NewProjectsService(s *Service) *ProjectsService {
   168  	rs := &ProjectsService{s: s}
   169  	rs.Locations = NewProjectsLocationsService(s)
   170  	return rs
   171  }
   172  
   173  type ProjectsService struct {
   174  	s *Service
   175  
   176  	Locations *ProjectsLocationsService
   177  }
   178  
   179  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   180  	rs := &ProjectsLocationsService{s: s}
   181  	rs.Operations = NewProjectsLocationsOperationsService(s)
   182  	rs.Repositories = NewProjectsLocationsRepositoriesService(s)
   183  	return rs
   184  }
   185  
   186  type ProjectsLocationsService struct {
   187  	s *Service
   188  
   189  	Operations *ProjectsLocationsOperationsService
   190  
   191  	Repositories *ProjectsLocationsRepositoriesService
   192  }
   193  
   194  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   195  	rs := &ProjectsLocationsOperationsService{s: s}
   196  	return rs
   197  }
   198  
   199  type ProjectsLocationsOperationsService struct {
   200  	s *Service
   201  }
   202  
   203  func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepositoriesService {
   204  	rs := &ProjectsLocationsRepositoriesService{s: s}
   205  	rs.AptArtifacts = NewProjectsLocationsRepositoriesAptArtifactsService(s)
   206  	rs.DockerImages = NewProjectsLocationsRepositoriesDockerImagesService(s)
   207  	rs.Files = NewProjectsLocationsRepositoriesFilesService(s)
   208  	rs.GenericArtifacts = NewProjectsLocationsRepositoriesGenericArtifactsService(s)
   209  	rs.GoModules = NewProjectsLocationsRepositoriesGoModulesService(s)
   210  	rs.GoogetArtifacts = NewProjectsLocationsRepositoriesGoogetArtifactsService(s)
   211  	rs.KfpArtifacts = NewProjectsLocationsRepositoriesKfpArtifactsService(s)
   212  	rs.MavenArtifacts = NewProjectsLocationsRepositoriesMavenArtifactsService(s)
   213  	rs.NpmPackages = NewProjectsLocationsRepositoriesNpmPackagesService(s)
   214  	rs.Packages = NewProjectsLocationsRepositoriesPackagesService(s)
   215  	rs.PythonPackages = NewProjectsLocationsRepositoriesPythonPackagesService(s)
   216  	rs.YumArtifacts = NewProjectsLocationsRepositoriesYumArtifactsService(s)
   217  	return rs
   218  }
   219  
   220  type ProjectsLocationsRepositoriesService struct {
   221  	s *Service
   222  
   223  	AptArtifacts *ProjectsLocationsRepositoriesAptArtifactsService
   224  
   225  	DockerImages *ProjectsLocationsRepositoriesDockerImagesService
   226  
   227  	Files *ProjectsLocationsRepositoriesFilesService
   228  
   229  	GenericArtifacts *ProjectsLocationsRepositoriesGenericArtifactsService
   230  
   231  	GoModules *ProjectsLocationsRepositoriesGoModulesService
   232  
   233  	GoogetArtifacts *ProjectsLocationsRepositoriesGoogetArtifactsService
   234  
   235  	KfpArtifacts *ProjectsLocationsRepositoriesKfpArtifactsService
   236  
   237  	MavenArtifacts *ProjectsLocationsRepositoriesMavenArtifactsService
   238  
   239  	NpmPackages *ProjectsLocationsRepositoriesNpmPackagesService
   240  
   241  	Packages *ProjectsLocationsRepositoriesPackagesService
   242  
   243  	PythonPackages *ProjectsLocationsRepositoriesPythonPackagesService
   244  
   245  	YumArtifacts *ProjectsLocationsRepositoriesYumArtifactsService
   246  }
   247  
   248  func NewProjectsLocationsRepositoriesAptArtifactsService(s *Service) *ProjectsLocationsRepositoriesAptArtifactsService {
   249  	rs := &ProjectsLocationsRepositoriesAptArtifactsService{s: s}
   250  	return rs
   251  }
   252  
   253  type ProjectsLocationsRepositoriesAptArtifactsService struct {
   254  	s *Service
   255  }
   256  
   257  func NewProjectsLocationsRepositoriesDockerImagesService(s *Service) *ProjectsLocationsRepositoriesDockerImagesService {
   258  	rs := &ProjectsLocationsRepositoriesDockerImagesService{s: s}
   259  	return rs
   260  }
   261  
   262  type ProjectsLocationsRepositoriesDockerImagesService struct {
   263  	s *Service
   264  }
   265  
   266  func NewProjectsLocationsRepositoriesFilesService(s *Service) *ProjectsLocationsRepositoriesFilesService {
   267  	rs := &ProjectsLocationsRepositoriesFilesService{s: s}
   268  	return rs
   269  }
   270  
   271  type ProjectsLocationsRepositoriesFilesService struct {
   272  	s *Service
   273  }
   274  
   275  func NewProjectsLocationsRepositoriesGenericArtifactsService(s *Service) *ProjectsLocationsRepositoriesGenericArtifactsService {
   276  	rs := &ProjectsLocationsRepositoriesGenericArtifactsService{s: s}
   277  	return rs
   278  }
   279  
   280  type ProjectsLocationsRepositoriesGenericArtifactsService struct {
   281  	s *Service
   282  }
   283  
   284  func NewProjectsLocationsRepositoriesGoModulesService(s *Service) *ProjectsLocationsRepositoriesGoModulesService {
   285  	rs := &ProjectsLocationsRepositoriesGoModulesService{s: s}
   286  	return rs
   287  }
   288  
   289  type ProjectsLocationsRepositoriesGoModulesService struct {
   290  	s *Service
   291  }
   292  
   293  func NewProjectsLocationsRepositoriesGoogetArtifactsService(s *Service) *ProjectsLocationsRepositoriesGoogetArtifactsService {
   294  	rs := &ProjectsLocationsRepositoriesGoogetArtifactsService{s: s}
   295  	return rs
   296  }
   297  
   298  type ProjectsLocationsRepositoriesGoogetArtifactsService struct {
   299  	s *Service
   300  }
   301  
   302  func NewProjectsLocationsRepositoriesKfpArtifactsService(s *Service) *ProjectsLocationsRepositoriesKfpArtifactsService {
   303  	rs := &ProjectsLocationsRepositoriesKfpArtifactsService{s: s}
   304  	return rs
   305  }
   306  
   307  type ProjectsLocationsRepositoriesKfpArtifactsService struct {
   308  	s *Service
   309  }
   310  
   311  func NewProjectsLocationsRepositoriesMavenArtifactsService(s *Service) *ProjectsLocationsRepositoriesMavenArtifactsService {
   312  	rs := &ProjectsLocationsRepositoriesMavenArtifactsService{s: s}
   313  	return rs
   314  }
   315  
   316  type ProjectsLocationsRepositoriesMavenArtifactsService struct {
   317  	s *Service
   318  }
   319  
   320  func NewProjectsLocationsRepositoriesNpmPackagesService(s *Service) *ProjectsLocationsRepositoriesNpmPackagesService {
   321  	rs := &ProjectsLocationsRepositoriesNpmPackagesService{s: s}
   322  	return rs
   323  }
   324  
   325  type ProjectsLocationsRepositoriesNpmPackagesService struct {
   326  	s *Service
   327  }
   328  
   329  func NewProjectsLocationsRepositoriesPackagesService(s *Service) *ProjectsLocationsRepositoriesPackagesService {
   330  	rs := &ProjectsLocationsRepositoriesPackagesService{s: s}
   331  	rs.Tags = NewProjectsLocationsRepositoriesPackagesTagsService(s)
   332  	rs.Versions = NewProjectsLocationsRepositoriesPackagesVersionsService(s)
   333  	return rs
   334  }
   335  
   336  type ProjectsLocationsRepositoriesPackagesService struct {
   337  	s *Service
   338  
   339  	Tags *ProjectsLocationsRepositoriesPackagesTagsService
   340  
   341  	Versions *ProjectsLocationsRepositoriesPackagesVersionsService
   342  }
   343  
   344  func NewProjectsLocationsRepositoriesPackagesTagsService(s *Service) *ProjectsLocationsRepositoriesPackagesTagsService {
   345  	rs := &ProjectsLocationsRepositoriesPackagesTagsService{s: s}
   346  	return rs
   347  }
   348  
   349  type ProjectsLocationsRepositoriesPackagesTagsService struct {
   350  	s *Service
   351  }
   352  
   353  func NewProjectsLocationsRepositoriesPackagesVersionsService(s *Service) *ProjectsLocationsRepositoriesPackagesVersionsService {
   354  	rs := &ProjectsLocationsRepositoriesPackagesVersionsService{s: s}
   355  	return rs
   356  }
   357  
   358  type ProjectsLocationsRepositoriesPackagesVersionsService struct {
   359  	s *Service
   360  }
   361  
   362  func NewProjectsLocationsRepositoriesPythonPackagesService(s *Service) *ProjectsLocationsRepositoriesPythonPackagesService {
   363  	rs := &ProjectsLocationsRepositoriesPythonPackagesService{s: s}
   364  	return rs
   365  }
   366  
   367  type ProjectsLocationsRepositoriesPythonPackagesService struct {
   368  	s *Service
   369  }
   370  
   371  func NewProjectsLocationsRepositoriesYumArtifactsService(s *Service) *ProjectsLocationsRepositoriesYumArtifactsService {
   372  	rs := &ProjectsLocationsRepositoriesYumArtifactsService{s: s}
   373  	return rs
   374  }
   375  
   376  type ProjectsLocationsRepositoriesYumArtifactsService struct {
   377  	s *Service
   378  }
   379  
   380  // AptArtifact: A detailed representation of an Apt artifact. Information in
   381  // the record is derived from the archive's control file. See
   382  // https://www.debian.org/doc/debian-policy/ch-controlfields.html
   383  type AptArtifact struct {
   384  	// Architecture: Output only. Operating system architecture of the artifact.
   385  	Architecture string `json:"architecture,omitempty"`
   386  	// Component: Output only. Repository component of the artifact.
   387  	Component string `json:"component,omitempty"`
   388  	// ControlFile: Output only. Contents of the artifact's control metadata file.
   389  	ControlFile string `json:"controlFile,omitempty"`
   390  	// Name: Output only. The Artifact Registry resource name of the artifact.
   391  	Name string `json:"name,omitempty"`
   392  	// PackageName: Output only. The Apt package name of the artifact.
   393  	PackageName string `json:"packageName,omitempty"`
   394  	// PackageType: Output only. An artifact is a binary or source package.
   395  	//
   396  	// Possible values:
   397  	//   "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified.
   398  	//   "BINARY" - Binary package.
   399  	//   "SOURCE" - Source package.
   400  	PackageType string `json:"packageType,omitempty"`
   401  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   402  	// unconditionally include in API requests. By default, fields with empty or
   403  	// default values are omitted from API requests. See
   404  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   405  	// details.
   406  	ForceSendFields []string `json:"-"`
   407  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   408  	// requests with the JSON null value. By default, fields with empty values are
   409  	// omitted from API requests. See
   410  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   411  	NullFields []string `json:"-"`
   412  }
   413  
   414  func (s *AptArtifact) MarshalJSON() ([]byte, error) {
   415  	type NoMethod AptArtifact
   416  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   417  }
   418  
   419  // AptRepository: Configuration for an Apt remote repository.
   420  type AptRepository struct {
   421  	// CustomRepository: Customer-specified remote repository.
   422  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository `json:"customRepository,omitempty"`
   423  	// PublicRepository: One of the publicly available Apt repositories supported
   424  	// by Artifact Registry.
   425  	PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository `json:"publicRepository,omitempty"`
   426  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
   427  	// unconditionally include in API requests. By default, fields with empty or
   428  	// default values are omitted from API requests. See
   429  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   430  	// details.
   431  	ForceSendFields []string `json:"-"`
   432  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
   433  	// API requests with the JSON null value. By default, fields with empty values
   434  	// are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   436  	NullFields []string `json:"-"`
   437  }
   438  
   439  func (s *AptRepository) MarshalJSON() ([]byte, error) {
   440  	type NoMethod AptRepository
   441  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   442  }
   443  
   444  // BatchDeleteVersionsMetadata: The metadata of an LRO from deleting multiple
   445  // versions.
   446  type BatchDeleteVersionsMetadata struct {
   447  	// FailedVersions: The versions the operation failed to delete.
   448  	FailedVersions []string `json:"failedVersions,omitempty"`
   449  	// ForceSendFields is a list of field names (e.g. "FailedVersions") to
   450  	// unconditionally include in API requests. By default, fields with empty or
   451  	// default values are omitted from API requests. See
   452  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   453  	// details.
   454  	ForceSendFields []string `json:"-"`
   455  	// NullFields is a list of field names (e.g. "FailedVersions") to include in
   456  	// API requests with the JSON null value. By default, fields with empty values
   457  	// are omitted from API requests. See
   458  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   459  	NullFields []string `json:"-"`
   460  }
   461  
   462  func (s *BatchDeleteVersionsMetadata) MarshalJSON() ([]byte, error) {
   463  	type NoMethod BatchDeleteVersionsMetadata
   464  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   465  }
   466  
   467  // BatchDeleteVersionsRequest: The request to delete multiple versions across a
   468  // repository.
   469  type BatchDeleteVersionsRequest struct {
   470  	// Names: Required. The names of the versions to delete. A maximum of 10000
   471  	// versions can be deleted in a batch.
   472  	Names []string `json:"names,omitempty"`
   473  	// ValidateOnly: If true, the request is performed without deleting data,
   474  	// following AIP-163.
   475  	ValidateOnly bool `json:"validateOnly,omitempty"`
   476  	// ForceSendFields is a list of field names (e.g. "Names") to unconditionally
   477  	// include in API requests. By default, fields with empty or default values are
   478  	// omitted from API requests. See
   479  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   480  	// details.
   481  	ForceSendFields []string `json:"-"`
   482  	// NullFields is a list of field names (e.g. "Names") to include in API
   483  	// requests with the JSON null value. By default, fields with empty values are
   484  	// omitted from API requests. See
   485  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   486  	NullFields []string `json:"-"`
   487  }
   488  
   489  func (s *BatchDeleteVersionsRequest) MarshalJSON() ([]byte, error) {
   490  	type NoMethod BatchDeleteVersionsRequest
   491  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   492  }
   493  
   494  // Binding: Associates `members`, or principals, with a `role`.
   495  type Binding struct {
   496  	// Condition: The condition that is associated with this binding. If the
   497  	// condition evaluates to `true`, then this binding applies to the current
   498  	// request. If the condition evaluates to `false`, then this binding does not
   499  	// apply to the current request. However, a different role binding might grant
   500  	// the same role to one or more of the principals in this binding. To learn
   501  	// which resources support conditions in their IAM policies, see the IAM
   502  	// documentation
   503  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   504  	Condition *Expr `json:"condition,omitempty"`
   505  	// Members: Specifies the principals requesting access for a Google Cloud
   506  	// resource. `members` can have the following values: * `allUsers`: A special
   507  	// identifier that represents anyone who is on the internet; with or without a
   508  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   509  	// represents anyone who is authenticated with a Google account or a service
   510  	// account. Does not include identities that come from external identity
   511  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   512  	// address that represents a specific Google account. For example,
   513  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   514  	// represents a Google service account. For example,
   515  	// `my-other-app@appspot.gserviceaccount.com`. *
   516  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   517  	// identifier for a Kubernetes service account
   518  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   519  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   520  	// `group:{emailid}`: An email address that represents a Google group. For
   521  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   522  	// (primary) that represents all the users of that domain. For example,
   523  	// `google.com` or `example.com`. *
   524  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   525  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   526  	// pool. *
   527  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   528  	// group/{group_id}`: All workforce identities in a group. *
   529  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   530  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   531  	// a specific attribute value. *
   532  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   533  	// *`: All identities in a workforce identity pool. *
   534  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   535  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   536  	// identity in a workload identity pool. *
   537  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   538  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   539  	// group. *
   540  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   541  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   542  	// `: All identities in a workload identity pool with a certain attribute. *
   543  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   544  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   545  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   546  	// unique identifier) representing a user that has been recently deleted. For
   547  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   548  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   549  	// retains the role in the binding. *
   550  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   551  	// unique identifier) representing a service account that has been recently
   552  	// deleted. For example,
   553  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   554  	// service account is undeleted, this value reverts to
   555  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   556  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   557  	// address (plus unique identifier) representing a Google group that has been
   558  	// recently deleted. For example,
   559  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   560  	// this value reverts to `group:{emailid}` and the recovered group retains the
   561  	// role in the binding. *
   562  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   563  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   564  	// workforce identity pool. For example,
   565  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   566  	// ol-id/subject/my-subject-attribute-value`.
   567  	Members []string `json:"members,omitempty"`
   568  	// Role: Role that is assigned to the list of `members`, or principals. For
   569  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   570  	// of the IAM roles and permissions, see the IAM documentation
   571  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   572  	// available pre-defined roles, see here
   573  	// (https://cloud.google.com/iam/docs/understanding-roles).
   574  	Role string `json:"role,omitempty"`
   575  	// ForceSendFields is a list of field names (e.g. "Condition") to
   576  	// unconditionally include in API requests. By default, fields with empty or
   577  	// default values are omitted from API requests. See
   578  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   579  	// details.
   580  	ForceSendFields []string `json:"-"`
   581  	// NullFields is a list of field names (e.g. "Condition") to include in API
   582  	// requests with the JSON null value. By default, fields with empty values are
   583  	// omitted from API requests. See
   584  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   585  	NullFields []string `json:"-"`
   586  }
   587  
   588  func (s *Binding) MarshalJSON() ([]byte, error) {
   589  	type NoMethod Binding
   590  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   591  }
   592  
   593  // CleanupPolicy: Artifact policy configuration for repository cleanup
   594  // policies.
   595  type CleanupPolicy struct {
   596  	// Action: Policy action.
   597  	//
   598  	// Possible values:
   599  	//   "ACTION_UNSPECIFIED" - Action not specified.
   600  	//   "DELETE" - Delete action.
   601  	//   "KEEP" - Keep action.
   602  	Action string `json:"action,omitempty"`
   603  	// Condition: Policy condition for matching versions.
   604  	Condition *CleanupPolicyCondition `json:"condition,omitempty"`
   605  	// Id: The user-provided ID of the cleanup policy.
   606  	Id string `json:"id,omitempty"`
   607  	// MostRecentVersions: Policy condition for retaining a minimum number of
   608  	// versions. May only be specified with a Keep action.
   609  	MostRecentVersions *CleanupPolicyMostRecentVersions `json:"mostRecentVersions,omitempty"`
   610  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
   611  	// include in API requests. By default, fields with empty or default values are
   612  	// omitted from API requests. See
   613  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   614  	// details.
   615  	ForceSendFields []string `json:"-"`
   616  	// NullFields is a list of field names (e.g. "Action") to include in API
   617  	// requests with the JSON null value. By default, fields with empty values are
   618  	// omitted from API requests. See
   619  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   620  	NullFields []string `json:"-"`
   621  }
   622  
   623  func (s *CleanupPolicy) MarshalJSON() ([]byte, error) {
   624  	type NoMethod CleanupPolicy
   625  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   626  }
   627  
   628  // CleanupPolicyCondition: CleanupPolicyCondition is a set of conditions
   629  // attached to a CleanupPolicy. If multiple entries are set, all must be
   630  // satisfied for the condition to be satisfied.
   631  type CleanupPolicyCondition struct {
   632  	// NewerThan: Match versions newer than a duration.
   633  	NewerThan string `json:"newerThan,omitempty"`
   634  	// OlderThan: Match versions older than a duration.
   635  	OlderThan string `json:"olderThan,omitempty"`
   636  	// PackageNamePrefixes: Match versions by package prefix. Applied on any prefix
   637  	// match.
   638  	PackageNamePrefixes []string `json:"packageNamePrefixes,omitempty"`
   639  	// TagPrefixes: Match versions by tag prefix. Applied on any prefix match.
   640  	TagPrefixes []string `json:"tagPrefixes,omitempty"`
   641  	// TagState: Match versions by tag status.
   642  	//
   643  	// Possible values:
   644  	//   "TAG_STATE_UNSPECIFIED" - Tag status not specified.
   645  	//   "TAGGED" - Applies to tagged versions only.
   646  	//   "UNTAGGED" - Applies to untagged versions only.
   647  	//   "ANY" - Applies to all versions.
   648  	TagState string `json:"tagState,omitempty"`
   649  	// VersionNamePrefixes: Match versions by version name prefix. Applied on any
   650  	// prefix match.
   651  	VersionNamePrefixes []string `json:"versionNamePrefixes,omitempty"`
   652  	// ForceSendFields is a list of field names (e.g. "NewerThan") to
   653  	// unconditionally include in API requests. By default, fields with empty or
   654  	// default values are omitted from API requests. See
   655  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   656  	// details.
   657  	ForceSendFields []string `json:"-"`
   658  	// NullFields is a list of field names (e.g. "NewerThan") to include in API
   659  	// requests with the JSON null value. By default, fields with empty values are
   660  	// omitted from API requests. See
   661  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   662  	NullFields []string `json:"-"`
   663  }
   664  
   665  func (s *CleanupPolicyCondition) MarshalJSON() ([]byte, error) {
   666  	type NoMethod CleanupPolicyCondition
   667  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   668  }
   669  
   670  // CleanupPolicyMostRecentVersions: CleanupPolicyMostRecentVersions is an
   671  // alternate condition of a CleanupPolicy for retaining a minimum number of
   672  // versions.
   673  type CleanupPolicyMostRecentVersions struct {
   674  	// KeepCount: Minimum number of versions to keep.
   675  	KeepCount int64 `json:"keepCount,omitempty"`
   676  	// PackageNamePrefixes: List of package name prefixes that will apply this
   677  	// rule.
   678  	PackageNamePrefixes []string `json:"packageNamePrefixes,omitempty"`
   679  	// ForceSendFields is a list of field names (e.g. "KeepCount") to
   680  	// unconditionally include in API requests. By default, fields with empty or
   681  	// default values are omitted from API requests. See
   682  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   683  	// details.
   684  	ForceSendFields []string `json:"-"`
   685  	// NullFields is a list of field names (e.g. "KeepCount") to include in API
   686  	// requests with the JSON null value. By default, fields with empty values are
   687  	// omitted from API requests. See
   688  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   689  	NullFields []string `json:"-"`
   690  }
   691  
   692  func (s *CleanupPolicyMostRecentVersions) MarshalJSON() ([]byte, error) {
   693  	type NoMethod CleanupPolicyMostRecentVersions
   694  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   695  }
   696  
   697  // DockerImage: DockerImage represents a docker artifact. The following fields
   698  // are returned as untyped metadata in the Version resource, using camelcase
   699  // keys (i.e. metadata.imageSizeBytes): * imageSizeBytes * mediaType *
   700  // buildTime
   701  type DockerImage struct {
   702  	// BuildTime: The time this image was built. This field is returned as the
   703  	// 'metadata.buildTime' field in the Version resource. The build time is
   704  	// returned to the client as an RFC 3339 string, which can be easily used with
   705  	// the JavaScript Date constructor.
   706  	BuildTime string `json:"buildTime,omitempty"`
   707  	// ImageSizeBytes: Calculated size of the image. This field is returned as the
   708  	// 'metadata.imageSizeBytes' field in the Version resource.
   709  	ImageSizeBytes int64 `json:"imageSizeBytes,omitempty,string"`
   710  	// MediaType: Media type of this image, e.g.
   711  	// "application/vnd.docker.distribution.manifest.v2+json". This field is
   712  	// returned as the 'metadata.mediaType' field in the Version resource.
   713  	MediaType string `json:"mediaType,omitempty"`
   714  	// Name: Required. registry_location, project_id, repository_name and image id
   715  	// forms a unique image name:`projects//locations//repository//dockerImages/`.
   716  	// For example,
   717  	// "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages
   718  	// /
   719  	// nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
   720  	// ", where "us-west4" is the registry_location, "test-project" is the
   721  	// project_id, "test-repo" is the repository_name and
   722  	// "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7c
   723  	// f" is the image's digest.
   724  	Name string `json:"name,omitempty"`
   725  	// Tags: Tags attached to this image.
   726  	Tags []string `json:"tags,omitempty"`
   727  	// UpdateTime: Output only. The time when the docker image was last updated.
   728  	UpdateTime string `json:"updateTime,omitempty"`
   729  	// UploadTime: Time the image was uploaded.
   730  	UploadTime string `json:"uploadTime,omitempty"`
   731  	// Uri: Required. URL to access the image. Example:
   732  	// us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be
   733  	// 1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
   734  	Uri string `json:"uri,omitempty"`
   735  
   736  	// ServerResponse contains the HTTP response code and headers from the server.
   737  	googleapi.ServerResponse `json:"-"`
   738  	// ForceSendFields is a list of field names (e.g. "BuildTime") to
   739  	// unconditionally include in API requests. By default, fields with empty or
   740  	// default values are omitted from API requests. See
   741  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   742  	// details.
   743  	ForceSendFields []string `json:"-"`
   744  	// NullFields is a list of field names (e.g. "BuildTime") to include in API
   745  	// requests with the JSON null value. By default, fields with empty values are
   746  	// omitted from API requests. See
   747  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   748  	NullFields []string `json:"-"`
   749  }
   750  
   751  func (s *DockerImage) MarshalJSON() ([]byte, error) {
   752  	type NoMethod DockerImage
   753  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   754  }
   755  
   756  // DockerRepository: Configuration for a Docker remote repository.
   757  type DockerRepository struct {
   758  	// CustomRepository: Customer-specified remote repository.
   759  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository `json:"customRepository,omitempty"`
   760  	// PublicRepository: One of the publicly available Docker repositories
   761  	// supported by Artifact Registry.
   762  	//
   763  	// Possible values:
   764  	//   "PUBLIC_REPOSITORY_UNSPECIFIED" - Unspecified repository.
   765  	//   "DOCKER_HUB" - Docker Hub.
   766  	PublicRepository string `json:"publicRepository,omitempty"`
   767  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
   768  	// unconditionally include in API requests. By default, fields with empty or
   769  	// default values are omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   771  	// details.
   772  	ForceSendFields []string `json:"-"`
   773  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
   774  	// API requests with the JSON null value. By default, fields with empty values
   775  	// are omitted from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   777  	NullFields []string `json:"-"`
   778  }
   779  
   780  func (s *DockerRepository) MarshalJSON() ([]byte, error) {
   781  	type NoMethod DockerRepository
   782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   783  }
   784  
   785  // DockerRepositoryConfig: DockerRepositoryConfig is docker related repository
   786  // details. Provides additional configuration details for repositories of the
   787  // docker format type.
   788  type DockerRepositoryConfig struct {
   789  	// ImmutableTags: The repository which enabled this flag prevents all tags from
   790  	// being modified, moved or deleted. This does not prevent tags from being
   791  	// created.
   792  	ImmutableTags bool `json:"immutableTags,omitempty"`
   793  	// ForceSendFields is a list of field names (e.g. "ImmutableTags") to
   794  	// unconditionally include in API requests. By default, fields with empty or
   795  	// default values are omitted from API requests. See
   796  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   797  	// details.
   798  	ForceSendFields []string `json:"-"`
   799  	// NullFields is a list of field names (e.g. "ImmutableTags") to include in API
   800  	// requests with the JSON null value. By default, fields with empty values are
   801  	// omitted from API requests. See
   802  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   803  	NullFields []string `json:"-"`
   804  }
   805  
   806  func (s *DockerRepositoryConfig) MarshalJSON() ([]byte, error) {
   807  	type NoMethod DockerRepositoryConfig
   808  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   809  }
   810  
   811  // DownloadFileResponse: The response to download a file.
   812  type DownloadFileResponse struct {
   813  	// ServerResponse contains the HTTP response code and headers from the server.
   814  	googleapi.ServerResponse `json:"-"`
   815  }
   816  
   817  // Empty: A generic empty message that you can re-use to avoid defining
   818  // duplicated empty messages in your APIs. A typical example is to use it as
   819  // the request or the response type of an API method. For instance: service Foo
   820  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   821  type Empty struct {
   822  	// ServerResponse contains the HTTP response code and headers from the server.
   823  	googleapi.ServerResponse `json:"-"`
   824  }
   825  
   826  // Expr: Represents a textual expression in the Common Expression Language
   827  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   828  // of CEL are documented at https://github.com/google/cel-spec. Example
   829  // (Comparison): title: "Summary size limit" description: "Determines if a
   830  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   831  // Example (Equality): title: "Requestor is owner" description: "Determines if
   832  // requestor is the document owner" expression: "document.owner ==
   833  // request.auth.claims.email" Example (Logic): title: "Public documents"
   834  // description: "Determine whether the document should be publicly visible"
   835  // expression: "document.type != 'private' && document.type != 'internal'"
   836  // Example (Data Manipulation): title: "Notification string" description:
   837  // "Create a notification string with a timestamp." expression: "'New message
   838  // received at ' + string(document.create_time)" The exact variables and
   839  // functions that may be referenced within an expression are determined by the
   840  // service that evaluates it. See the service documentation for additional
   841  // information.
   842  type Expr struct {
   843  	// Description: Optional. Description of the expression. This is a longer text
   844  	// which describes the expression, e.g. when hovered over it in a UI.
   845  	Description string `json:"description,omitempty"`
   846  	// Expression: Textual representation of an expression in Common Expression
   847  	// Language syntax.
   848  	Expression string `json:"expression,omitempty"`
   849  	// Location: Optional. String indicating the location of the expression for
   850  	// error reporting, e.g. a file name and a position in the file.
   851  	Location string `json:"location,omitempty"`
   852  	// Title: Optional. Title for the expression, i.e. a short string describing
   853  	// its purpose. This can be used e.g. in UIs which allow to enter the
   854  	// expression.
   855  	Title string `json:"title,omitempty"`
   856  	// ForceSendFields is a list of field names (e.g. "Description") to
   857  	// unconditionally include in API requests. By default, fields with empty or
   858  	// default values are omitted from API requests. See
   859  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   860  	// details.
   861  	ForceSendFields []string `json:"-"`
   862  	// NullFields is a list of field names (e.g. "Description") to include in API
   863  	// requests with the JSON null value. By default, fields with empty values are
   864  	// omitted from API requests. See
   865  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   866  	NullFields []string `json:"-"`
   867  }
   868  
   869  func (s *Expr) MarshalJSON() ([]byte, error) {
   870  	type NoMethod Expr
   871  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   872  }
   873  
   874  // GenericArtifact: GenericArtifact represents a generic artifact
   875  type GenericArtifact struct {
   876  	// CreateTime: Output only. The time when the Generic module is created.
   877  	CreateTime string `json:"createTime,omitempty"`
   878  	// Name: Resource name of the generic artifact. project, location, repository,
   879  	// package_id and version_id create a unique generic artifact. i.e.
   880  	// "projects/test-project/locations/us-west4/repositories/test-repo/
   881  	// genericArtifacts/package_id:version_id"
   882  	Name string `json:"name,omitempty"`
   883  	// UpdateTime: Output only. The time when the Generic module is updated.
   884  	UpdateTime string `json:"updateTime,omitempty"`
   885  	// Version: The version of the generic artifact.
   886  	Version string `json:"version,omitempty"`
   887  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   888  	// unconditionally include in API requests. By default, fields with empty or
   889  	// default values are omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   891  	// details.
   892  	ForceSendFields []string `json:"-"`
   893  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   894  	// requests with the JSON null value. By default, fields with empty values are
   895  	// omitted from API requests. See
   896  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   897  	NullFields []string `json:"-"`
   898  }
   899  
   900  func (s *GenericArtifact) MarshalJSON() ([]byte, error) {
   901  	type NoMethod GenericArtifact
   902  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   903  }
   904  
   905  // GoModule: GoModule represents a Go module.
   906  type GoModule struct {
   907  	// CreateTime: Output only. The time when the Go module is created.
   908  	CreateTime string `json:"createTime,omitempty"`
   909  	// Name: The resource name of a Go module.
   910  	Name string `json:"name,omitempty"`
   911  	// UpdateTime: Output only. The time when the Go module is updated.
   912  	UpdateTime string `json:"updateTime,omitempty"`
   913  	// Version: The version of the Go module. Must be a valid canonical version as
   914  	// defined in https://go.dev/ref/mod#glos-canonical-version.
   915  	Version string `json:"version,omitempty"`
   916  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   917  	// unconditionally include in API requests. By default, fields with empty or
   918  	// default values are omitted from API requests. See
   919  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   920  	// details.
   921  	ForceSendFields []string `json:"-"`
   922  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   923  	// requests with the JSON null value. By default, fields with empty values are
   924  	// omitted from API requests. See
   925  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   926  	NullFields []string `json:"-"`
   927  }
   928  
   929  func (s *GoModule) MarshalJSON() ([]byte, error) {
   930  	type NoMethod GoModule
   931  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   932  }
   933  
   934  // GoogetArtifact: A detailed representation of a GooGet artifact.
   935  type GoogetArtifact struct {
   936  	// Architecture: Output only. Operating system architecture of the artifact.
   937  	Architecture string `json:"architecture,omitempty"`
   938  	// Name: Output only. The Artifact Registry resource name of the artifact.
   939  	Name string `json:"name,omitempty"`
   940  	// PackageName: Output only. The GooGet package name of the artifact.
   941  	PackageName string `json:"packageName,omitempty"`
   942  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   943  	// unconditionally include in API requests. By default, fields with empty or
   944  	// default values are omitted from API requests. See
   945  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   946  	// details.
   947  	ForceSendFields []string `json:"-"`
   948  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   949  	// requests with the JSON null value. By default, fields with empty values are
   950  	// omitted from API requests. See
   951  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   952  	NullFields []string `json:"-"`
   953  }
   954  
   955  func (s *GoogetArtifact) MarshalJSON() ([]byte, error) {
   956  	type NoMethod GoogetArtifact
   957  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   958  }
   959  
   960  // GoogleDevtoolsArtifactregistryV1File: Files store content that is
   961  // potentially associated with Packages or Versions.
   962  type GoogleDevtoolsArtifactregistryV1File struct {
   963  	// CreateTime: Output only. The time when the File was created.
   964  	CreateTime string `json:"createTime,omitempty"`
   965  	// FetchTime: Output only. The time when the last attempt to refresh the file's
   966  	// data was made. Only set when the repository is remote.
   967  	FetchTime string `json:"fetchTime,omitempty"`
   968  	// Hashes: The hashes of the file content.
   969  	Hashes []*Hash `json:"hashes,omitempty"`
   970  	// Name: The name of the file, for example:
   971  	// `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.
   972  	// If the file ID part contains slashes, they are escaped.
   973  	Name string `json:"name,omitempty"`
   974  	// Owner: The name of the Package or Version that owns this file, if any.
   975  	Owner string `json:"owner,omitempty"`
   976  	// SizeBytes: The size of the File in bytes.
   977  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   978  	// UpdateTime: Output only. The time when the File was last updated.
   979  	UpdateTime string `json:"updateTime,omitempty"`
   980  
   981  	// ServerResponse contains the HTTP response code and headers from the server.
   982  	googleapi.ServerResponse `json:"-"`
   983  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   984  	// unconditionally include in API requests. By default, fields with empty or
   985  	// default values are omitted from API requests. See
   986  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   987  	// details.
   988  	ForceSendFields []string `json:"-"`
   989  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   990  	// requests with the JSON null value. By default, fields with empty values are
   991  	// omitted from API requests. See
   992  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   993  	NullFields []string `json:"-"`
   994  }
   995  
   996  func (s *GoogleDevtoolsArtifactregistryV1File) MarshalJSON() ([]byte, error) {
   997  	type NoMethod GoogleDevtoolsArtifactregistryV1File
   998  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   999  }
  1000  
  1001  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepo
  1002  // sitory: Customer-specified publicly available remote repository.
  1003  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository struct {
  1004  	// Uri: An http/https uri reference to the upstream remote repository, for ex:
  1005  	// "https://my.apt.registry/".
  1006  	Uri string `json:"uri,omitempty"`
  1007  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1008  	// include in API requests. By default, fields with empty or default values are
  1009  	// omitted from API requests. See
  1010  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1011  	// details.
  1012  	ForceSendFields []string `json:"-"`
  1013  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1014  	// with the JSON null value. By default, fields with empty values are omitted
  1015  	// from API requests. See
  1016  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1017  	NullFields []string `json:"-"`
  1018  }
  1019  
  1020  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1021  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository
  1022  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1023  }
  1024  
  1025  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepo
  1026  // sitory: Publicly available Apt repositories constructed from a common
  1027  // repository base and a custom repository path.
  1028  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository struct {
  1029  	// RepositoryBase: A common public repository base for Apt.
  1030  	//
  1031  	// Possible values:
  1032  	//   "REPOSITORY_BASE_UNSPECIFIED" - Unspecified repository base.
  1033  	//   "DEBIAN" - Debian.
  1034  	//   "UBUNTU" - Ubuntu LTS/Pro.
  1035  	//   "DEBIAN_SNAPSHOT" - Archived Debian.
  1036  	RepositoryBase string `json:"repositoryBase,omitempty"`
  1037  	// RepositoryPath: A custom field to define a path to a specific repository
  1038  	// from the base.
  1039  	RepositoryPath string `json:"repositoryPath,omitempty"`
  1040  	// ForceSendFields is a list of field names (e.g. "RepositoryBase") to
  1041  	// unconditionally include in API requests. By default, fields with empty or
  1042  	// default values are omitted from API requests. See
  1043  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1044  	// details.
  1045  	ForceSendFields []string `json:"-"`
  1046  	// NullFields is a list of field names (e.g. "RepositoryBase") to include in
  1047  	// API requests with the JSON null value. By default, fields with empty values
  1048  	// are omitted from API requests. See
  1049  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1050  	NullFields []string `json:"-"`
  1051  }
  1052  
  1053  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository) MarshalJSON() ([]byte, error) {
  1054  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository
  1055  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1056  }
  1057  
  1058  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomR
  1059  // epository: Customer-specified publicly available remote repository.
  1060  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository struct {
  1061  	// Uri: An http/https uri reference to the custom remote repository, for ex:
  1062  	// "https://registry-1.docker.io".
  1063  	Uri string `json:"uri,omitempty"`
  1064  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1065  	// include in API requests. By default, fields with empty or default values are
  1066  	// omitted from API requests. See
  1067  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1068  	// details.
  1069  	ForceSendFields []string `json:"-"`
  1070  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1071  	// with the JSON null value. By default, fields with empty values are omitted
  1072  	// from API requests. See
  1073  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1074  	NullFields []string `json:"-"`
  1075  }
  1076  
  1077  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1078  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository
  1079  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1080  }
  1081  
  1082  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRe
  1083  // pository: Customer-specified publicly available remote repository.
  1084  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository struct {
  1085  	// Uri: An http/https uri reference to the upstream remote repository, for ex:
  1086  	// "https://my.maven.registry/".
  1087  	Uri string `json:"uri,omitempty"`
  1088  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1089  	// include in API requests. By default, fields with empty or default values are
  1090  	// omitted from API requests. See
  1091  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1092  	// details.
  1093  	ForceSendFields []string `json:"-"`
  1094  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1095  	// with the JSON null value. By default, fields with empty values are omitted
  1096  	// from API requests. See
  1097  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1098  	NullFields []string `json:"-"`
  1099  }
  1100  
  1101  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1102  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository
  1103  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1104  }
  1105  
  1106  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepo
  1107  // sitory: Customer-specified publicly available remote repository.
  1108  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository struct {
  1109  	// Uri: An http/https uri reference to the upstream remote repository, for ex:
  1110  	// "https://my.npm.registry/".
  1111  	Uri string `json:"uri,omitempty"`
  1112  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1113  	// include in API requests. By default, fields with empty or default values are
  1114  	// omitted from API requests. See
  1115  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1116  	// details.
  1117  	ForceSendFields []string `json:"-"`
  1118  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1119  	// with the JSON null value. By default, fields with empty values are omitted
  1120  	// from API requests. See
  1121  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1122  	NullFields []string `json:"-"`
  1123  }
  1124  
  1125  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1126  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository
  1127  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1128  }
  1129  
  1130  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomR
  1131  // epository: Customer-specified publicly available remote repository.
  1132  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository struct {
  1133  	// Uri: An http/https uri reference to the upstream remote repository, for ex:
  1134  	// "https://my.python.registry/".
  1135  	Uri string `json:"uri,omitempty"`
  1136  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1137  	// include in API requests. By default, fields with empty or default values are
  1138  	// omitted from API requests. See
  1139  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1140  	// details.
  1141  	ForceSendFields []string `json:"-"`
  1142  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1143  	// with the JSON null value. By default, fields with empty values are omitted
  1144  	// from API requests. See
  1145  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1146  	NullFields []string `json:"-"`
  1147  }
  1148  
  1149  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1150  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository
  1151  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1152  }
  1153  
  1154  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepo
  1155  // sitory: Customer-specified publicly available remote repository.
  1156  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository struct {
  1157  	// Uri: An http/https uri reference to the upstream remote repository, for ex:
  1158  	// "https://my.yum.registry/".
  1159  	Uri string `json:"uri,omitempty"`
  1160  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1161  	// include in API requests. By default, fields with empty or default values are
  1162  	// omitted from API requests. See
  1163  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1164  	// details.
  1165  	ForceSendFields []string `json:"-"`
  1166  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1167  	// with the JSON null value. By default, fields with empty values are omitted
  1168  	// from API requests. See
  1169  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1170  	NullFields []string `json:"-"`
  1171  }
  1172  
  1173  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository) MarshalJSON() ([]byte, error) {
  1174  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository
  1175  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1176  }
  1177  
  1178  // GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepo
  1179  // sitory: Publicly available Yum repositories constructed from a common
  1180  // repository base and a custom repository path.
  1181  type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository struct {
  1182  	// RepositoryBase: A common public repository base for Yum.
  1183  	//
  1184  	// Possible values:
  1185  	//   "REPOSITORY_BASE_UNSPECIFIED" - Unspecified repository base.
  1186  	//   "CENTOS" - CentOS.
  1187  	//   "CENTOS_DEBUG" - CentOS Debug.
  1188  	//   "CENTOS_VAULT" - CentOS Vault.
  1189  	//   "CENTOS_STREAM" - CentOS Stream.
  1190  	//   "ROCKY" - Rocky.
  1191  	//   "EPEL" - Fedora Extra Packages for Enterprise Linux (EPEL).
  1192  	RepositoryBase string `json:"repositoryBase,omitempty"`
  1193  	// RepositoryPath: A custom field to define a path to a specific repository
  1194  	// from the base.
  1195  	RepositoryPath string `json:"repositoryPath,omitempty"`
  1196  	// ForceSendFields is a list of field names (e.g. "RepositoryBase") to
  1197  	// unconditionally include in API requests. By default, fields with empty or
  1198  	// default values are omitted from API requests. See
  1199  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1200  	// details.
  1201  	ForceSendFields []string `json:"-"`
  1202  	// NullFields is a list of field names (e.g. "RepositoryBase") to include in
  1203  	// API requests with the JSON null value. By default, fields with empty values
  1204  	// are omitted from API requests. See
  1205  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1206  	NullFields []string `json:"-"`
  1207  }
  1208  
  1209  func (s *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository) MarshalJSON() ([]byte, error) {
  1210  	type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository
  1211  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1212  }
  1213  
  1214  // Hash: A hash of file content.
  1215  type Hash struct {
  1216  	// Type: The algorithm used to compute the hash value.
  1217  	//
  1218  	// Possible values:
  1219  	//   "HASH_TYPE_UNSPECIFIED" - Unspecified.
  1220  	//   "SHA256" - SHA256 hash.
  1221  	//   "MD5" - MD5 hash.
  1222  	Type string `json:"type,omitempty"`
  1223  	// Value: The hash value.
  1224  	Value string `json:"value,omitempty"`
  1225  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
  1226  	// include in API requests. By default, fields with empty or default values are
  1227  	// omitted from API requests. See
  1228  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1229  	// details.
  1230  	ForceSendFields []string `json:"-"`
  1231  	// NullFields is a list of field names (e.g. "Type") to include in API requests
  1232  	// with the JSON null value. By default, fields with empty values are omitted
  1233  	// from API requests. See
  1234  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1235  	NullFields []string `json:"-"`
  1236  }
  1237  
  1238  func (s *Hash) MarshalJSON() ([]byte, error) {
  1239  	type NoMethod Hash
  1240  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1241  }
  1242  
  1243  // ImportAptArtifactsErrorInfo: Error information explaining why a package was
  1244  // not imported.
  1245  type ImportAptArtifactsErrorInfo struct {
  1246  	// Error: The detailed error status.
  1247  	Error *Status `json:"error,omitempty"`
  1248  	// GcsSource: Google Cloud Storage location requested.
  1249  	GcsSource *ImportAptArtifactsGcsSource `json:"gcsSource,omitempty"`
  1250  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
  1251  	// include in API requests. By default, fields with empty or default values are
  1252  	// omitted from API requests. See
  1253  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1254  	// details.
  1255  	ForceSendFields []string `json:"-"`
  1256  	// NullFields is a list of field names (e.g. "Error") to include in API
  1257  	// requests with the JSON null value. By default, fields with empty values are
  1258  	// omitted from API requests. See
  1259  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1260  	NullFields []string `json:"-"`
  1261  }
  1262  
  1263  func (s *ImportAptArtifactsErrorInfo) MarshalJSON() ([]byte, error) {
  1264  	type NoMethod ImportAptArtifactsErrorInfo
  1265  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1266  }
  1267  
  1268  // ImportAptArtifactsGcsSource: Google Cloud Storage location where the
  1269  // artifacts currently reside.
  1270  type ImportAptArtifactsGcsSource struct {
  1271  	// Uris: Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
  1272  	Uris []string `json:"uris,omitempty"`
  1273  	// UseWildcards: Supports URI wildcards for matching multiple objects from a
  1274  	// single URI.
  1275  	UseWildcards bool `json:"useWildcards,omitempty"`
  1276  	// ForceSendFields is a list of field names (e.g. "Uris") to unconditionally
  1277  	// include in API requests. By default, fields with empty or default values are
  1278  	// omitted from API requests. See
  1279  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1280  	// details.
  1281  	ForceSendFields []string `json:"-"`
  1282  	// NullFields is a list of field names (e.g. "Uris") to include in API requests
  1283  	// with the JSON null value. By default, fields with empty values are omitted
  1284  	// from API requests. See
  1285  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1286  	NullFields []string `json:"-"`
  1287  }
  1288  
  1289  func (s *ImportAptArtifactsGcsSource) MarshalJSON() ([]byte, error) {
  1290  	type NoMethod ImportAptArtifactsGcsSource
  1291  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1292  }
  1293  
  1294  // ImportAptArtifactsMetadata: The operation metadata for importing artifacts.
  1295  type ImportAptArtifactsMetadata struct {
  1296  }
  1297  
  1298  // ImportAptArtifactsRequest: The request to import new apt artifacts.
  1299  type ImportAptArtifactsRequest struct {
  1300  	// GcsSource: Google Cloud Storage location where input content is located.
  1301  	GcsSource *ImportAptArtifactsGcsSource `json:"gcsSource,omitempty"`
  1302  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
  1303  	// unconditionally include in API requests. By default, fields with empty or
  1304  	// default values are omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1306  	// details.
  1307  	ForceSendFields []string `json:"-"`
  1308  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
  1309  	// requests with the JSON null value. By default, fields with empty values are
  1310  	// omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1312  	NullFields []string `json:"-"`
  1313  }
  1314  
  1315  func (s *ImportAptArtifactsRequest) MarshalJSON() ([]byte, error) {
  1316  	type NoMethod ImportAptArtifactsRequest
  1317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1318  }
  1319  
  1320  // ImportAptArtifactsResponse: The response message from importing APT
  1321  // artifacts.
  1322  type ImportAptArtifactsResponse struct {
  1323  	// AptArtifacts: The Apt artifacts imported.
  1324  	AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"`
  1325  	// Errors: Detailed error info for packages that were not imported.
  1326  	Errors []*ImportAptArtifactsErrorInfo `json:"errors,omitempty"`
  1327  	// ForceSendFields is a list of field names (e.g. "AptArtifacts") to
  1328  	// unconditionally include in API requests. By default, fields with empty or
  1329  	// default values are omitted from API requests. See
  1330  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1331  	// details.
  1332  	ForceSendFields []string `json:"-"`
  1333  	// NullFields is a list of field names (e.g. "AptArtifacts") to include in API
  1334  	// requests with the JSON null value. By default, fields with empty values are
  1335  	// omitted from API requests. See
  1336  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1337  	NullFields []string `json:"-"`
  1338  }
  1339  
  1340  func (s *ImportAptArtifactsResponse) MarshalJSON() ([]byte, error) {
  1341  	type NoMethod ImportAptArtifactsResponse
  1342  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1343  }
  1344  
  1345  // ImportGoogetArtifactsErrorInfo: Error information explaining why a package
  1346  // was not imported.
  1347  type ImportGoogetArtifactsErrorInfo struct {
  1348  	// Error: The detailed error status.
  1349  	Error *Status `json:"error,omitempty"`
  1350  	// GcsSource: Google Cloud Storage location requested.
  1351  	GcsSource *ImportGoogetArtifactsGcsSource `json:"gcsSource,omitempty"`
  1352  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
  1353  	// include in API requests. By default, fields with empty or default values are
  1354  	// omitted from API requests. See
  1355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1356  	// details.
  1357  	ForceSendFields []string `json:"-"`
  1358  	// NullFields is a list of field names (e.g. "Error") to include in API
  1359  	// requests with the JSON null value. By default, fields with empty values are
  1360  	// omitted from API requests. See
  1361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1362  	NullFields []string `json:"-"`
  1363  }
  1364  
  1365  func (s *ImportGoogetArtifactsErrorInfo) MarshalJSON() ([]byte, error) {
  1366  	type NoMethod ImportGoogetArtifactsErrorInfo
  1367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1368  }
  1369  
  1370  // ImportGoogetArtifactsGcsSource: Google Cloud Storage location where the
  1371  // artifacts currently reside.
  1372  type ImportGoogetArtifactsGcsSource struct {
  1373  	// Uris: Cloud Storage paths URI (e.g., `gs://my_bucket/my_object`).
  1374  	Uris []string `json:"uris,omitempty"`
  1375  	// UseWildcards: Supports URI wildcards for matching multiple objects from a
  1376  	// single URI.
  1377  	UseWildcards bool `json:"useWildcards,omitempty"`
  1378  	// ForceSendFields is a list of field names (e.g. "Uris") to unconditionally
  1379  	// include in API requests. By default, fields with empty or default values are
  1380  	// omitted from API requests. See
  1381  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1382  	// details.
  1383  	ForceSendFields []string `json:"-"`
  1384  	// NullFields is a list of field names (e.g. "Uris") to include in API requests
  1385  	// with the JSON null value. By default, fields with empty values are omitted
  1386  	// from API requests. See
  1387  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1388  	NullFields []string `json:"-"`
  1389  }
  1390  
  1391  func (s *ImportGoogetArtifactsGcsSource) MarshalJSON() ([]byte, error) {
  1392  	type NoMethod ImportGoogetArtifactsGcsSource
  1393  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1394  }
  1395  
  1396  // ImportGoogetArtifactsMetadata: The operation metadata for importing
  1397  // artifacts.
  1398  type ImportGoogetArtifactsMetadata struct {
  1399  }
  1400  
  1401  // ImportGoogetArtifactsRequest: The request to import new googet artifacts.
  1402  type ImportGoogetArtifactsRequest struct {
  1403  	// GcsSource: Google Cloud Storage location where input content is located.
  1404  	GcsSource *ImportGoogetArtifactsGcsSource `json:"gcsSource,omitempty"`
  1405  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
  1406  	// unconditionally include in API requests. By default, fields with empty or
  1407  	// default values are omitted from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1409  	// details.
  1410  	ForceSendFields []string `json:"-"`
  1411  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
  1412  	// requests with the JSON null value. By default, fields with empty values are
  1413  	// omitted from API requests. See
  1414  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1415  	NullFields []string `json:"-"`
  1416  }
  1417  
  1418  func (s *ImportGoogetArtifactsRequest) MarshalJSON() ([]byte, error) {
  1419  	type NoMethod ImportGoogetArtifactsRequest
  1420  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1421  }
  1422  
  1423  // ImportGoogetArtifactsResponse: The response message from importing
  1424  // artifacts.
  1425  type ImportGoogetArtifactsResponse struct {
  1426  	// Errors: Detailed error info for packages that were not imported.
  1427  	Errors []*ImportGoogetArtifactsErrorInfo `json:"errors,omitempty"`
  1428  	// GoogetArtifacts: The GooGet artifacts updated.
  1429  	GoogetArtifacts []*GoogetArtifact `json:"googetArtifacts,omitempty"`
  1430  	// ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
  1431  	// include in API requests. By default, fields with empty or default values are
  1432  	// omitted from API requests. See
  1433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1434  	// details.
  1435  	ForceSendFields []string `json:"-"`
  1436  	// NullFields is a list of field names (e.g. "Errors") to include in API
  1437  	// requests with the JSON null value. By default, fields with empty values are
  1438  	// omitted from API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1440  	NullFields []string `json:"-"`
  1441  }
  1442  
  1443  func (s *ImportGoogetArtifactsResponse) MarshalJSON() ([]byte, error) {
  1444  	type NoMethod ImportGoogetArtifactsResponse
  1445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1446  }
  1447  
  1448  // ImportYumArtifactsErrorInfo: Error information explaining why a package was
  1449  // not imported.
  1450  type ImportYumArtifactsErrorInfo struct {
  1451  	// Error: The detailed error status.
  1452  	Error *Status `json:"error,omitempty"`
  1453  	// GcsSource: Google Cloud Storage location requested.
  1454  	GcsSource *ImportYumArtifactsGcsSource `json:"gcsSource,omitempty"`
  1455  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
  1456  	// include in API requests. By default, fields with empty or default values are
  1457  	// omitted from API requests. See
  1458  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1459  	// details.
  1460  	ForceSendFields []string `json:"-"`
  1461  	// NullFields is a list of field names (e.g. "Error") to include in API
  1462  	// requests with the JSON null value. By default, fields with empty values are
  1463  	// omitted from API requests. See
  1464  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1465  	NullFields []string `json:"-"`
  1466  }
  1467  
  1468  func (s *ImportYumArtifactsErrorInfo) MarshalJSON() ([]byte, error) {
  1469  	type NoMethod ImportYumArtifactsErrorInfo
  1470  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1471  }
  1472  
  1473  // ImportYumArtifactsGcsSource: Google Cloud Storage location where the
  1474  // artifacts currently reside.
  1475  type ImportYumArtifactsGcsSource struct {
  1476  	// Uris: Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
  1477  	Uris []string `json:"uris,omitempty"`
  1478  	// UseWildcards: Supports URI wildcards for matching multiple objects from a
  1479  	// single URI.
  1480  	UseWildcards bool `json:"useWildcards,omitempty"`
  1481  	// ForceSendFields is a list of field names (e.g. "Uris") to unconditionally
  1482  	// include in API requests. By default, fields with empty or default values are
  1483  	// omitted from API requests. See
  1484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1485  	// details.
  1486  	ForceSendFields []string `json:"-"`
  1487  	// NullFields is a list of field names (e.g. "Uris") to include in API requests
  1488  	// with the JSON null value. By default, fields with empty values are omitted
  1489  	// from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1491  	NullFields []string `json:"-"`
  1492  }
  1493  
  1494  func (s *ImportYumArtifactsGcsSource) MarshalJSON() ([]byte, error) {
  1495  	type NoMethod ImportYumArtifactsGcsSource
  1496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1497  }
  1498  
  1499  // ImportYumArtifactsMetadata: The operation metadata for importing artifacts.
  1500  type ImportYumArtifactsMetadata struct {
  1501  }
  1502  
  1503  // ImportYumArtifactsRequest: The request to import new yum artifacts.
  1504  type ImportYumArtifactsRequest struct {
  1505  	// GcsSource: Google Cloud Storage location where input content is located.
  1506  	GcsSource *ImportYumArtifactsGcsSource `json:"gcsSource,omitempty"`
  1507  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
  1508  	// unconditionally include in API requests. By default, fields with empty or
  1509  	// default values are omitted from API requests. See
  1510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1511  	// details.
  1512  	ForceSendFields []string `json:"-"`
  1513  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
  1514  	// requests with the JSON null value. By default, fields with empty values are
  1515  	// omitted from API requests. See
  1516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1517  	NullFields []string `json:"-"`
  1518  }
  1519  
  1520  func (s *ImportYumArtifactsRequest) MarshalJSON() ([]byte, error) {
  1521  	type NoMethod ImportYumArtifactsRequest
  1522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1523  }
  1524  
  1525  // ImportYumArtifactsResponse: The response message from importing YUM
  1526  // artifacts.
  1527  type ImportYumArtifactsResponse struct {
  1528  	// Errors: Detailed error info for packages that were not imported.
  1529  	Errors []*ImportYumArtifactsErrorInfo `json:"errors,omitempty"`
  1530  	// YumArtifacts: The yum artifacts imported.
  1531  	YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"`
  1532  	// ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
  1533  	// include in API requests. By default, fields with empty or default values are
  1534  	// omitted from API requests. See
  1535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1536  	// details.
  1537  	ForceSendFields []string `json:"-"`
  1538  	// NullFields is a list of field names (e.g. "Errors") to include in API
  1539  	// requests with the JSON null value. By default, fields with empty values are
  1540  	// omitted from API requests. See
  1541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1542  	NullFields []string `json:"-"`
  1543  }
  1544  
  1545  func (s *ImportYumArtifactsResponse) MarshalJSON() ([]byte, error) {
  1546  	type NoMethod ImportYumArtifactsResponse
  1547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1548  }
  1549  
  1550  // KfpArtifact: A detailed representation of a KFP artifact.
  1551  type KfpArtifact struct {
  1552  	// Name: Output only. Resource name of the KFP artifact. Since users don't
  1553  	// directly interact with this resource, the name will be derived from the
  1554  	// associated version. For example, when version =
  1555  	// ".../versions/sha256:abcdef...", the name will be
  1556  	// ".../kfpArtifacts/sha256:abcdef...".
  1557  	Name string `json:"name,omitempty"`
  1558  	// Version: The version associated with the KFP artifact. Must follow the
  1559  	// Semantic Versioning standard.
  1560  	Version string `json:"version,omitempty"`
  1561  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1562  	// include in API requests. By default, fields with empty or default values are
  1563  	// omitted from API requests. See
  1564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1565  	// details.
  1566  	ForceSendFields []string `json:"-"`
  1567  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1568  	// with the JSON null value. By default, fields with empty values are omitted
  1569  	// from API requests. See
  1570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1571  	NullFields []string `json:"-"`
  1572  }
  1573  
  1574  func (s *KfpArtifact) MarshalJSON() ([]byte, error) {
  1575  	type NoMethod KfpArtifact
  1576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1577  }
  1578  
  1579  // ListDockerImagesResponse: The response from listing docker images.
  1580  type ListDockerImagesResponse struct {
  1581  	// DockerImages: The docker images returned.
  1582  	DockerImages []*DockerImage `json:"dockerImages,omitempty"`
  1583  	// NextPageToken: The token to retrieve the next page of artifacts, or empty if
  1584  	// there are no more artifacts to return.
  1585  	NextPageToken string `json:"nextPageToken,omitempty"`
  1586  
  1587  	// ServerResponse contains the HTTP response code and headers from the server.
  1588  	googleapi.ServerResponse `json:"-"`
  1589  	// ForceSendFields is a list of field names (e.g. "DockerImages") to
  1590  	// unconditionally include in API requests. By default, fields with empty or
  1591  	// default values are omitted from API requests. See
  1592  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1593  	// details.
  1594  	ForceSendFields []string `json:"-"`
  1595  	// NullFields is a list of field names (e.g. "DockerImages") to include in API
  1596  	// requests with the JSON null value. By default, fields with empty values are
  1597  	// omitted from API requests. See
  1598  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1599  	NullFields []string `json:"-"`
  1600  }
  1601  
  1602  func (s *ListDockerImagesResponse) MarshalJSON() ([]byte, error) {
  1603  	type NoMethod ListDockerImagesResponse
  1604  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1605  }
  1606  
  1607  // ListFilesResponse: The response from listing files.
  1608  type ListFilesResponse struct {
  1609  	// Files: The files returned.
  1610  	Files []*GoogleDevtoolsArtifactregistryV1File `json:"files,omitempty"`
  1611  	// NextPageToken: The token to retrieve the next page of files, or empty if
  1612  	// there are no more files to return.
  1613  	NextPageToken string `json:"nextPageToken,omitempty"`
  1614  
  1615  	// ServerResponse contains the HTTP response code and headers from the server.
  1616  	googleapi.ServerResponse `json:"-"`
  1617  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
  1618  	// include in API requests. By default, fields with empty or default values are
  1619  	// omitted from API requests. See
  1620  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1621  	// details.
  1622  	ForceSendFields []string `json:"-"`
  1623  	// NullFields is a list of field names (e.g. "Files") to include in API
  1624  	// requests with the JSON null value. By default, fields with empty values are
  1625  	// omitted from API requests. See
  1626  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1627  	NullFields []string `json:"-"`
  1628  }
  1629  
  1630  func (s *ListFilesResponse) MarshalJSON() ([]byte, error) {
  1631  	type NoMethod ListFilesResponse
  1632  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1633  }
  1634  
  1635  // ListLocationsResponse: The response message for Locations.ListLocations.
  1636  type ListLocationsResponse struct {
  1637  	// Locations: A list of locations that matches the specified filter in the
  1638  	// request.
  1639  	Locations []*Location `json:"locations,omitempty"`
  1640  	// NextPageToken: The standard List next-page token.
  1641  	NextPageToken string `json:"nextPageToken,omitempty"`
  1642  
  1643  	// ServerResponse contains the HTTP response code and headers from the server.
  1644  	googleapi.ServerResponse `json:"-"`
  1645  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1646  	// unconditionally include in API requests. By default, fields with empty or
  1647  	// default values are omitted from API requests. See
  1648  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1649  	// details.
  1650  	ForceSendFields []string `json:"-"`
  1651  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1652  	// requests with the JSON null value. By default, fields with empty values are
  1653  	// omitted from API requests. See
  1654  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1655  	NullFields []string `json:"-"`
  1656  }
  1657  
  1658  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1659  	type NoMethod ListLocationsResponse
  1660  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1661  }
  1662  
  1663  // ListMavenArtifactsResponse: The response from listing maven artifacts.
  1664  type ListMavenArtifactsResponse struct {
  1665  	// MavenArtifacts: The maven artifacts returned.
  1666  	MavenArtifacts []*MavenArtifact `json:"mavenArtifacts,omitempty"`
  1667  	// NextPageToken: The token to retrieve the next page of artifacts, or empty if
  1668  	// there are no more artifacts to return.
  1669  	NextPageToken string `json:"nextPageToken,omitempty"`
  1670  
  1671  	// ServerResponse contains the HTTP response code and headers from the server.
  1672  	googleapi.ServerResponse `json:"-"`
  1673  	// ForceSendFields is a list of field names (e.g. "MavenArtifacts") to
  1674  	// unconditionally include in API requests. By default, fields with empty or
  1675  	// default values are omitted from API requests. See
  1676  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1677  	// details.
  1678  	ForceSendFields []string `json:"-"`
  1679  	// NullFields is a list of field names (e.g. "MavenArtifacts") to include in
  1680  	// API requests with the JSON null value. By default, fields with empty values
  1681  	// are omitted from API requests. See
  1682  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1683  	NullFields []string `json:"-"`
  1684  }
  1685  
  1686  func (s *ListMavenArtifactsResponse) MarshalJSON() ([]byte, error) {
  1687  	type NoMethod ListMavenArtifactsResponse
  1688  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1689  }
  1690  
  1691  // ListNpmPackagesResponse: The response from listing npm packages.
  1692  type ListNpmPackagesResponse struct {
  1693  	// NextPageToken: The token to retrieve the next page of artifacts, or empty if
  1694  	// there are no more artifacts to return.
  1695  	NextPageToken string `json:"nextPageToken,omitempty"`
  1696  	// NpmPackages: The npm packages returned.
  1697  	NpmPackages []*NpmPackage `json:"npmPackages,omitempty"`
  1698  
  1699  	// ServerResponse contains the HTTP response code and headers from the server.
  1700  	googleapi.ServerResponse `json:"-"`
  1701  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1702  	// unconditionally include in API requests. By default, fields with empty or
  1703  	// default values are omitted from API requests. See
  1704  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1705  	// details.
  1706  	ForceSendFields []string `json:"-"`
  1707  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1708  	// requests with the JSON null value. By default, fields with empty values are
  1709  	// omitted from API requests. See
  1710  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1711  	NullFields []string `json:"-"`
  1712  }
  1713  
  1714  func (s *ListNpmPackagesResponse) MarshalJSON() ([]byte, error) {
  1715  	type NoMethod ListNpmPackagesResponse
  1716  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1717  }
  1718  
  1719  // ListPackagesResponse: The response from listing packages.
  1720  type ListPackagesResponse struct {
  1721  	// NextPageToken: The token to retrieve the next page of packages, or empty if
  1722  	// there are no more packages to return.
  1723  	NextPageToken string `json:"nextPageToken,omitempty"`
  1724  	// Packages: The packages returned.
  1725  	Packages []*Package `json:"packages,omitempty"`
  1726  
  1727  	// ServerResponse contains the HTTP response code and headers from the server.
  1728  	googleapi.ServerResponse `json:"-"`
  1729  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1730  	// unconditionally include in API requests. By default, fields with empty or
  1731  	// default values are omitted from API requests. See
  1732  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1733  	// details.
  1734  	ForceSendFields []string `json:"-"`
  1735  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1736  	// requests with the JSON null value. By default, fields with empty values are
  1737  	// omitted from API requests. See
  1738  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1739  	NullFields []string `json:"-"`
  1740  }
  1741  
  1742  func (s *ListPackagesResponse) MarshalJSON() ([]byte, error) {
  1743  	type NoMethod ListPackagesResponse
  1744  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1745  }
  1746  
  1747  // ListPythonPackagesResponse: The response from listing python packages.
  1748  type ListPythonPackagesResponse struct {
  1749  	// NextPageToken: The token to retrieve the next page of artifacts, or empty if
  1750  	// there are no more artifacts to return.
  1751  	NextPageToken string `json:"nextPageToken,omitempty"`
  1752  	// PythonPackages: The python packages returned.
  1753  	PythonPackages []*PythonPackage `json:"pythonPackages,omitempty"`
  1754  
  1755  	// ServerResponse contains the HTTP response code and headers from the server.
  1756  	googleapi.ServerResponse `json:"-"`
  1757  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1758  	// unconditionally include in API requests. By default, fields with empty or
  1759  	// default values are omitted from API requests. See
  1760  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1761  	// details.
  1762  	ForceSendFields []string `json:"-"`
  1763  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1764  	// requests with the JSON null value. By default, fields with empty values are
  1765  	// omitted from API requests. See
  1766  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1767  	NullFields []string `json:"-"`
  1768  }
  1769  
  1770  func (s *ListPythonPackagesResponse) MarshalJSON() ([]byte, error) {
  1771  	type NoMethod ListPythonPackagesResponse
  1772  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1773  }
  1774  
  1775  // ListRepositoriesResponse: The response from listing repositories.
  1776  type ListRepositoriesResponse struct {
  1777  	// NextPageToken: The token to retrieve the next page of repositories, or empty
  1778  	// if there are no more repositories to return.
  1779  	NextPageToken string `json:"nextPageToken,omitempty"`
  1780  	// Repositories: The repositories returned.
  1781  	Repositories []*Repository `json:"repositories,omitempty"`
  1782  
  1783  	// ServerResponse contains the HTTP response code and headers from the server.
  1784  	googleapi.ServerResponse `json:"-"`
  1785  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1786  	// unconditionally include in API requests. By default, fields with empty or
  1787  	// default values are omitted from API requests. See
  1788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1789  	// details.
  1790  	ForceSendFields []string `json:"-"`
  1791  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1792  	// requests with the JSON null value. By default, fields with empty values are
  1793  	// omitted from API requests. See
  1794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1795  	NullFields []string `json:"-"`
  1796  }
  1797  
  1798  func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) {
  1799  	type NoMethod ListRepositoriesResponse
  1800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1801  }
  1802  
  1803  // ListTagsResponse: The response from listing tags.
  1804  type ListTagsResponse struct {
  1805  	// NextPageToken: The token to retrieve the next page of tags, or empty if
  1806  	// there are no more tags to return.
  1807  	NextPageToken string `json:"nextPageToken,omitempty"`
  1808  	// Tags: The tags returned.
  1809  	Tags []*Tag `json:"tags,omitempty"`
  1810  
  1811  	// ServerResponse contains the HTTP response code and headers from the server.
  1812  	googleapi.ServerResponse `json:"-"`
  1813  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1814  	// unconditionally include in API requests. By default, fields with empty or
  1815  	// default values are omitted from API requests. See
  1816  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1817  	// details.
  1818  	ForceSendFields []string `json:"-"`
  1819  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1820  	// requests with the JSON null value. By default, fields with empty values are
  1821  	// omitted from API requests. See
  1822  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1823  	NullFields []string `json:"-"`
  1824  }
  1825  
  1826  func (s *ListTagsResponse) MarshalJSON() ([]byte, error) {
  1827  	type NoMethod ListTagsResponse
  1828  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1829  }
  1830  
  1831  // ListVersionsResponse: The response from listing versions.
  1832  type ListVersionsResponse struct {
  1833  	// NextPageToken: The token to retrieve the next page of versions, or empty if
  1834  	// there are no more versions to return.
  1835  	NextPageToken string `json:"nextPageToken,omitempty"`
  1836  	// Versions: The versions returned.
  1837  	Versions []*Version `json:"versions,omitempty"`
  1838  
  1839  	// ServerResponse contains the HTTP response code and headers from the server.
  1840  	googleapi.ServerResponse `json:"-"`
  1841  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1842  	// unconditionally include in API requests. By default, fields with empty or
  1843  	// default values are omitted from API requests. See
  1844  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1845  	// details.
  1846  	ForceSendFields []string `json:"-"`
  1847  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1848  	// requests with the JSON null value. By default, fields with empty values are
  1849  	// omitted from API requests. See
  1850  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1851  	NullFields []string `json:"-"`
  1852  }
  1853  
  1854  func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
  1855  	type NoMethod ListVersionsResponse
  1856  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1857  }
  1858  
  1859  // Location: A resource that represents a Google Cloud location.
  1860  type Location struct {
  1861  	// DisplayName: The friendly name for this location, typically a nearby city
  1862  	// name. For example, "Tokyo".
  1863  	DisplayName string `json:"displayName,omitempty"`
  1864  	// Labels: Cross-service attributes for the location. For example
  1865  	// {"cloud.googleapis.com/region": "us-east1"}
  1866  	Labels map[string]string `json:"labels,omitempty"`
  1867  	// LocationId: The canonical id for this location. For example: "us-east1".
  1868  	LocationId string `json:"locationId,omitempty"`
  1869  	// Metadata: Service-specific metadata. For example the available capacity at
  1870  	// the given location.
  1871  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1872  	// Name: Resource name for the location, which may vary between
  1873  	// implementations. For example:
  1874  	// "projects/example-project/locations/us-east1"
  1875  	Name string `json:"name,omitempty"`
  1876  
  1877  	// ServerResponse contains the HTTP response code and headers from the server.
  1878  	googleapi.ServerResponse `json:"-"`
  1879  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1880  	// unconditionally include in API requests. By default, fields with empty or
  1881  	// default values are omitted from API requests. See
  1882  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1883  	// details.
  1884  	ForceSendFields []string `json:"-"`
  1885  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1886  	// requests with the JSON null value. By default, fields with empty values are
  1887  	// omitted from API requests. See
  1888  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1889  	NullFields []string `json:"-"`
  1890  }
  1891  
  1892  func (s *Location) MarshalJSON() ([]byte, error) {
  1893  	type NoMethod Location
  1894  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1895  }
  1896  
  1897  // MavenArtifact: MavenArtifact represents a maven artifact.
  1898  type MavenArtifact struct {
  1899  	// ArtifactId: Artifact ID for the artifact.
  1900  	ArtifactId string `json:"artifactId,omitempty"`
  1901  	// CreateTime: Output only. Time the artifact was created.
  1902  	CreateTime string `json:"createTime,omitempty"`
  1903  	// GroupId: Group ID for the artifact. Example: com.google.guava
  1904  	GroupId string `json:"groupId,omitempty"`
  1905  	// Name: Required. registry_location, project_id, repository_name and
  1906  	// maven_artifact forms a unique artifact For example,
  1907  	// "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifac
  1908  	// ts/ com.google.guava:guava:31.0-jre", where "us-west4" is the
  1909  	// registry_location, "test-project" is the project_id, "test-repo" is the
  1910  	// repository_name and "com.google.guava:guava:31.0-jre" is the maven artifact.
  1911  	Name string `json:"name,omitempty"`
  1912  	// PomUri: Required. URL to access the pom file of the artifact. Example:
  1913  	// us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/gua
  1914  	// va-31.0.pom
  1915  	PomUri string `json:"pomUri,omitempty"`
  1916  	// UpdateTime: Output only. Time the artifact was updated.
  1917  	UpdateTime string `json:"updateTime,omitempty"`
  1918  	// Version: Version of this artifact.
  1919  	Version string `json:"version,omitempty"`
  1920  
  1921  	// ServerResponse contains the HTTP response code and headers from the server.
  1922  	googleapi.ServerResponse `json:"-"`
  1923  	// ForceSendFields is a list of field names (e.g. "ArtifactId") to
  1924  	// unconditionally include in API requests. By default, fields with empty or
  1925  	// default values are omitted from API requests. See
  1926  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1927  	// details.
  1928  	ForceSendFields []string `json:"-"`
  1929  	// NullFields is a list of field names (e.g. "ArtifactId") to include in API
  1930  	// requests with the JSON null value. By default, fields with empty values are
  1931  	// omitted from API requests. See
  1932  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1933  	NullFields []string `json:"-"`
  1934  }
  1935  
  1936  func (s *MavenArtifact) MarshalJSON() ([]byte, error) {
  1937  	type NoMethod MavenArtifact
  1938  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1939  }
  1940  
  1941  // MavenRepository: Configuration for a Maven remote repository.
  1942  type MavenRepository struct {
  1943  	// CustomRepository: Customer-specified remote repository.
  1944  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository `json:"customRepository,omitempty"`
  1945  	// PublicRepository: One of the publicly available Maven repositories supported
  1946  	// by Artifact Registry.
  1947  	//
  1948  	// Possible values:
  1949  	//   "PUBLIC_REPOSITORY_UNSPECIFIED" - Unspecified repository.
  1950  	//   "MAVEN_CENTRAL" - Maven Central.
  1951  	PublicRepository string `json:"publicRepository,omitempty"`
  1952  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
  1953  	// unconditionally include in API requests. By default, fields with empty or
  1954  	// default values are omitted from API requests. See
  1955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1956  	// details.
  1957  	ForceSendFields []string `json:"-"`
  1958  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
  1959  	// API requests with the JSON null value. By default, fields with empty values
  1960  	// are omitted from API requests. See
  1961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1962  	NullFields []string `json:"-"`
  1963  }
  1964  
  1965  func (s *MavenRepository) MarshalJSON() ([]byte, error) {
  1966  	type NoMethod MavenRepository
  1967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1968  }
  1969  
  1970  // MavenRepositoryConfig: MavenRepositoryConfig is maven related repository
  1971  // details. Provides additional configuration details for repositories of the
  1972  // maven format type.
  1973  type MavenRepositoryConfig struct {
  1974  	// AllowSnapshotOverwrites: The repository with this flag will allow publishing
  1975  	// the same snapshot versions.
  1976  	AllowSnapshotOverwrites bool `json:"allowSnapshotOverwrites,omitempty"`
  1977  	// VersionPolicy: Version policy defines the versions that the registry will
  1978  	// accept.
  1979  	//
  1980  	// Possible values:
  1981  	//   "VERSION_POLICY_UNSPECIFIED" - VERSION_POLICY_UNSPECIFIED - the version
  1982  	// policy is not defined. When the version policy is not defined, no validation
  1983  	// is performed for the versions.
  1984  	//   "RELEASE" - RELEASE - repository will accept only Release versions.
  1985  	//   "SNAPSHOT" - SNAPSHOT - repository will accept only Snapshot versions.
  1986  	VersionPolicy string `json:"versionPolicy,omitempty"`
  1987  	// ForceSendFields is a list of field names (e.g. "AllowSnapshotOverwrites") to
  1988  	// unconditionally include in API requests. By default, fields with empty or
  1989  	// default values are omitted from API requests. See
  1990  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1991  	// details.
  1992  	ForceSendFields []string `json:"-"`
  1993  	// NullFields is a list of field names (e.g. "AllowSnapshotOverwrites") to
  1994  	// include in API requests with the JSON null value. By default, fields with
  1995  	// empty values are omitted from API requests. See
  1996  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1997  	NullFields []string `json:"-"`
  1998  }
  1999  
  2000  func (s *MavenRepositoryConfig) MarshalJSON() ([]byte, error) {
  2001  	type NoMethod MavenRepositoryConfig
  2002  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2003  }
  2004  
  2005  // NpmPackage: NpmPackage represents an npm artifact.
  2006  type NpmPackage struct {
  2007  	// CreateTime: Output only. Time the package was created.
  2008  	CreateTime string `json:"createTime,omitempty"`
  2009  	// Name: Required. registry_location, project_id, repository_name and
  2010  	// npm_package forms a unique package For example,
  2011  	// "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/
  2012  	//  npm_test:1.0.0", where "us-west4" is the registry_location, "test-project"
  2013  	// is the project_id, "test-repo" is the repository_name and npm_test:1.0.0" is
  2014  	// the npm package.
  2015  	Name string `json:"name,omitempty"`
  2016  	// PackageName: Package for the artifact.
  2017  	PackageName string `json:"packageName,omitempty"`
  2018  	// Tags: Tags attached to this package.
  2019  	Tags []string `json:"tags,omitempty"`
  2020  	// UpdateTime: Output only. Time the package was updated.
  2021  	UpdateTime string `json:"updateTime,omitempty"`
  2022  	// Version: Version of this package.
  2023  	Version string `json:"version,omitempty"`
  2024  
  2025  	// ServerResponse contains the HTTP response code and headers from the server.
  2026  	googleapi.ServerResponse `json:"-"`
  2027  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2028  	// unconditionally include in API requests. By default, fields with empty or
  2029  	// default values are omitted from API requests. See
  2030  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2031  	// details.
  2032  	ForceSendFields []string `json:"-"`
  2033  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2034  	// requests with the JSON null value. By default, fields with empty values are
  2035  	// omitted from API requests. See
  2036  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2037  	NullFields []string `json:"-"`
  2038  }
  2039  
  2040  func (s *NpmPackage) MarshalJSON() ([]byte, error) {
  2041  	type NoMethod NpmPackage
  2042  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2043  }
  2044  
  2045  // NpmRepository: Configuration for a Npm remote repository.
  2046  type NpmRepository struct {
  2047  	// CustomRepository: Customer-specified remote repository.
  2048  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository `json:"customRepository,omitempty"`
  2049  	// PublicRepository: One of the publicly available Npm repositories supported
  2050  	// by Artifact Registry.
  2051  	//
  2052  	// Possible values:
  2053  	//   "PUBLIC_REPOSITORY_UNSPECIFIED" - Unspecified repository.
  2054  	//   "NPMJS" - npmjs.
  2055  	PublicRepository string `json:"publicRepository,omitempty"`
  2056  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
  2057  	// unconditionally include in API requests. By default, fields with empty or
  2058  	// default values are omitted from API requests. See
  2059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2060  	// details.
  2061  	ForceSendFields []string `json:"-"`
  2062  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
  2063  	// API requests with the JSON null value. By default, fields with empty values
  2064  	// are omitted from API requests. See
  2065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2066  	NullFields []string `json:"-"`
  2067  }
  2068  
  2069  func (s *NpmRepository) MarshalJSON() ([]byte, error) {
  2070  	type NoMethod NpmRepository
  2071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2072  }
  2073  
  2074  // Operation: This resource represents a long-running operation that is the
  2075  // result of a network API call.
  2076  type Operation struct {
  2077  	// Done: If the value is `false`, it means the operation is still in progress.
  2078  	// If `true`, the operation is completed, and either `error` or `response` is
  2079  	// available.
  2080  	Done bool `json:"done,omitempty"`
  2081  	// Error: The error result of the operation in case of failure or cancellation.
  2082  	Error *Status `json:"error,omitempty"`
  2083  	// Metadata: Service-specific metadata associated with the operation. It
  2084  	// typically contains progress information and common metadata such as create
  2085  	// time. Some services might not provide such metadata. Any method that returns
  2086  	// a long-running operation should document the metadata type, if any.
  2087  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2088  	// Name: The server-assigned name, which is only unique within the same service
  2089  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2090  	// should be a resource name ending with `operations/{unique_id}`.
  2091  	Name string `json:"name,omitempty"`
  2092  	// Response: The normal, successful response of the operation. If the original
  2093  	// method returns no data on success, such as `Delete`, the response is
  2094  	// `google.protobuf.Empty`. If the original method is standard
  2095  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2096  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2097  	// original method name. For example, if the original method name is
  2098  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2099  	Response googleapi.RawMessage `json:"response,omitempty"`
  2100  
  2101  	// ServerResponse contains the HTTP response code and headers from the server.
  2102  	googleapi.ServerResponse `json:"-"`
  2103  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2104  	// include in API requests. By default, fields with empty or default values are
  2105  	// omitted from API requests. See
  2106  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2107  	// details.
  2108  	ForceSendFields []string `json:"-"`
  2109  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2110  	// with the JSON null value. By default, fields with empty values are omitted
  2111  	// from API requests. See
  2112  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2113  	NullFields []string `json:"-"`
  2114  }
  2115  
  2116  func (s *Operation) MarshalJSON() ([]byte, error) {
  2117  	type NoMethod Operation
  2118  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2119  }
  2120  
  2121  // OperationMetadata: Metadata type for longrunning-operations, currently
  2122  // empty.
  2123  type OperationMetadata struct {
  2124  }
  2125  
  2126  // Package: Packages are named collections of versions.
  2127  type Package struct {
  2128  	// Annotations: Optional. Client specified annotations.
  2129  	Annotations map[string]string `json:"annotations,omitempty"`
  2130  	// CreateTime: The time when the package was created.
  2131  	CreateTime string `json:"createTime,omitempty"`
  2132  	// DisplayName: The display name of the package.
  2133  	DisplayName string `json:"displayName,omitempty"`
  2134  	// Name: The name of the package, for example:
  2135  	// `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the
  2136  	// package ID part contains slashes, the slashes are escaped.
  2137  	Name string `json:"name,omitempty"`
  2138  	// UpdateTime: The time when the package was last updated. This includes
  2139  	// publishing a new version of the package.
  2140  	UpdateTime string `json:"updateTime,omitempty"`
  2141  
  2142  	// ServerResponse contains the HTTP response code and headers from the server.
  2143  	googleapi.ServerResponse `json:"-"`
  2144  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  2145  	// unconditionally include in API requests. By default, fields with empty or
  2146  	// default values are omitted from API requests. See
  2147  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2148  	// details.
  2149  	ForceSendFields []string `json:"-"`
  2150  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  2151  	// requests with the JSON null value. By default, fields with empty values are
  2152  	// omitted from API requests. See
  2153  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2154  	NullFields []string `json:"-"`
  2155  }
  2156  
  2157  func (s *Package) MarshalJSON() ([]byte, error) {
  2158  	type NoMethod Package
  2159  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2160  }
  2161  
  2162  // Policy: An Identity and Access Management (IAM) policy, which specifies
  2163  // access controls for Google Cloud resources. A `Policy` is a collection of
  2164  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  2165  // single `role`. Principals can be user accounts, service accounts, Google
  2166  // groups, and domains (such as G Suite). A `role` is a named list of
  2167  // permissions; each `role` can be an IAM predefined role or a user-created
  2168  // custom role. For some types of Google Cloud resources, a `binding` can also
  2169  // specify a `condition`, which is a logical expression that allows access to a
  2170  // resource only if the expression evaluates to `true`. A condition can add
  2171  // constraints based on attributes of the request, the resource, or both. To
  2172  // learn which resources support conditions in their IAM policies, see the IAM
  2173  // documentation
  2174  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  2175  // example:** ``` { "bindings": [ { "role":
  2176  // "roles/resourcemanager.organizationAdmin", "members": [
  2177  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  2178  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  2179  // "roles/resourcemanager.organizationViewer", "members": [
  2180  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2181  // "description": "Does not grant access after Sep 2020", "expression":
  2182  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  2183  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  2184  // members: - user:mike@example.com - group:admins@example.com -
  2185  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  2186  // role: roles/resourcemanager.organizationAdmin - members: -
  2187  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2188  // condition: title: expirable access description: Does not grant access after
  2189  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2190  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2191  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2192  type Policy struct {
  2193  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2194  	// Optionally, may specify a `condition` that determines how and when the
  2195  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2196  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2197  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2198  	// principal counts towards these limits. For example, if the `bindings` grant
  2199  	// 50 different roles to `user:alice@example.com`, and not to any other
  2200  	// principal, then you can add another 1,450 principals to the `bindings` in
  2201  	// the `Policy`.
  2202  	Bindings []*Binding `json:"bindings,omitempty"`
  2203  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2204  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2205  	// strongly suggested that systems make use of the `etag` in the
  2206  	// read-modify-write cycle to perform policy updates in order to avoid race
  2207  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2208  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2209  	// ensure that their change will be applied to the same version of the policy.
  2210  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2211  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2212  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2213  	// the conditions in the version `3` policy are lost.
  2214  	Etag string `json:"etag,omitempty"`
  2215  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2216  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2217  	// affects conditional role bindings must specify version `3`. This requirement
  2218  	// applies to the following operations: * Getting a policy that includes a
  2219  	// conditional role binding * Adding a conditional role binding to a policy *
  2220  	// Changing a conditional role binding in a policy * Removing any role binding,
  2221  	// with or without a condition, from a policy that includes conditions
  2222  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2223  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2224  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2225  	// the conditions in the version `3` policy are lost. If a policy does not
  2226  	// include any conditions, operations on that policy may specify any valid
  2227  	// version or leave the field unset. To learn which resources support
  2228  	// conditions in their IAM policies, see the IAM documentation
  2229  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2230  	Version int64 `json:"version,omitempty"`
  2231  
  2232  	// ServerResponse contains the HTTP response code and headers from the server.
  2233  	googleapi.ServerResponse `json:"-"`
  2234  	// ForceSendFields is a list of field names (e.g. "Bindings") to
  2235  	// unconditionally include in API requests. By default, fields with empty or
  2236  	// default values are omitted from API requests. See
  2237  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2238  	// details.
  2239  	ForceSendFields []string `json:"-"`
  2240  	// NullFields is a list of field names (e.g. "Bindings") to include in API
  2241  	// requests with the JSON null value. By default, fields with empty values are
  2242  	// omitted from API requests. See
  2243  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2244  	NullFields []string `json:"-"`
  2245  }
  2246  
  2247  func (s *Policy) MarshalJSON() ([]byte, error) {
  2248  	type NoMethod Policy
  2249  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2250  }
  2251  
  2252  // ProjectSettings: The Artifact Registry settings that apply to a Project.
  2253  type ProjectSettings struct {
  2254  	// LegacyRedirectionState: The redirection state of the legacy repositories in
  2255  	// this project.
  2256  	//
  2257  	// Possible values:
  2258  	//   "REDIRECTION_STATE_UNSPECIFIED" - No redirection status has been set.
  2259  	//   "REDIRECTION_FROM_GCR_IO_DISABLED" - Redirection is disabled.
  2260  	//   "REDIRECTION_FROM_GCR_IO_ENABLED" - Redirection is enabled.
  2261  	//   "REDIRECTION_FROM_GCR_IO_FINALIZED" - Redirection is enabled, and has been
  2262  	// finalized so cannot be reverted.
  2263  	//   "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" - Redirection is enabled and
  2264  	// missing images are copied from GCR
  2265  	LegacyRedirectionState string `json:"legacyRedirectionState,omitempty"`
  2266  	// Name: The name of the project's settings. Always of the form:
  2267  	// projects/{project-id}/projectSettings In update request: never set In
  2268  	// response: always set
  2269  	Name string `json:"name,omitempty"`
  2270  
  2271  	// ServerResponse contains the HTTP response code and headers from the server.
  2272  	googleapi.ServerResponse `json:"-"`
  2273  	// ForceSendFields is a list of field names (e.g. "LegacyRedirectionState") to
  2274  	// unconditionally include in API requests. By default, fields with empty or
  2275  	// default values are omitted from API requests. See
  2276  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2277  	// details.
  2278  	ForceSendFields []string `json:"-"`
  2279  	// NullFields is a list of field names (e.g. "LegacyRedirectionState") to
  2280  	// include in API requests with the JSON null value. By default, fields with
  2281  	// empty values are omitted from API requests. See
  2282  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2283  	NullFields []string `json:"-"`
  2284  }
  2285  
  2286  func (s *ProjectSettings) MarshalJSON() ([]byte, error) {
  2287  	type NoMethod ProjectSettings
  2288  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2289  }
  2290  
  2291  // PythonPackage: PythonPackage represents a python artifact.
  2292  type PythonPackage struct {
  2293  	// CreateTime: Output only. Time the package was created.
  2294  	CreateTime string `json:"createTime,omitempty"`
  2295  	// Name: Required. registry_location, project_id, repository_name and
  2296  	// python_package forms a unique package
  2297  	// name:`projects//locations//repository//pythonPackages/`. For example,
  2298  	// "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackag
  2299  	// es/ python_package:1.0.0", where "us-west4" is the registry_location,
  2300  	// "test-project" is the project_id, "test-repo" is the repository_name and
  2301  	// python_package:1.0.0" is the python package.
  2302  	Name string `json:"name,omitempty"`
  2303  	// PackageName: Package for the artifact.
  2304  	PackageName string `json:"packageName,omitempty"`
  2305  	// UpdateTime: Output only. Time the package was updated.
  2306  	UpdateTime string `json:"updateTime,omitempty"`
  2307  	// Uri: Required. URL to access the package. Example:
  2308  	// us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0
  2309  	// .tar.gz
  2310  	Uri string `json:"uri,omitempty"`
  2311  	// Version: Version of this package.
  2312  	Version string `json:"version,omitempty"`
  2313  
  2314  	// ServerResponse contains the HTTP response code and headers from the server.
  2315  	googleapi.ServerResponse `json:"-"`
  2316  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2317  	// unconditionally include in API requests. By default, fields with empty or
  2318  	// default values are omitted from API requests. See
  2319  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2320  	// details.
  2321  	ForceSendFields []string `json:"-"`
  2322  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2323  	// requests with the JSON null value. By default, fields with empty values are
  2324  	// omitted from API requests. See
  2325  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2326  	NullFields []string `json:"-"`
  2327  }
  2328  
  2329  func (s *PythonPackage) MarshalJSON() ([]byte, error) {
  2330  	type NoMethod PythonPackage
  2331  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2332  }
  2333  
  2334  // PythonRepository: Configuration for a Python remote repository.
  2335  type PythonRepository struct {
  2336  	// CustomRepository: Customer-specified remote repository.
  2337  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository `json:"customRepository,omitempty"`
  2338  	// PublicRepository: One of the publicly available Python repositories
  2339  	// supported by Artifact Registry.
  2340  	//
  2341  	// Possible values:
  2342  	//   "PUBLIC_REPOSITORY_UNSPECIFIED" - Unspecified repository.
  2343  	//   "PYPI" - PyPI.
  2344  	PublicRepository string `json:"publicRepository,omitempty"`
  2345  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
  2346  	// unconditionally include in API requests. By default, fields with empty or
  2347  	// default values are omitted from API requests. See
  2348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2349  	// details.
  2350  	ForceSendFields []string `json:"-"`
  2351  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
  2352  	// API requests with the JSON null value. By default, fields with empty values
  2353  	// are omitted from API requests. See
  2354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2355  	NullFields []string `json:"-"`
  2356  }
  2357  
  2358  func (s *PythonRepository) MarshalJSON() ([]byte, error) {
  2359  	type NoMethod PythonRepository
  2360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2361  }
  2362  
  2363  // RemoteRepositoryConfig: Remote repository configuration.
  2364  type RemoteRepositoryConfig struct {
  2365  	// AptRepository: Specific settings for an Apt remote repository.
  2366  	AptRepository *AptRepository `json:"aptRepository,omitempty"`
  2367  	// Description: The description of the remote source.
  2368  	Description string `json:"description,omitempty"`
  2369  	// DisableUpstreamValidation: Input only. A create/update remote repo option to
  2370  	// avoid making a HEAD/GET request to validate a remote repo and any supplied
  2371  	// upstream credentials.
  2372  	DisableUpstreamValidation bool `json:"disableUpstreamValidation,omitempty"`
  2373  	// DockerRepository: Specific settings for a Docker remote repository.
  2374  	DockerRepository *DockerRepository `json:"dockerRepository,omitempty"`
  2375  	// MavenRepository: Specific settings for a Maven remote repository.
  2376  	MavenRepository *MavenRepository `json:"mavenRepository,omitempty"`
  2377  	// NpmRepository: Specific settings for an Npm remote repository.
  2378  	NpmRepository *NpmRepository `json:"npmRepository,omitempty"`
  2379  	// PythonRepository: Specific settings for a Python remote repository.
  2380  	PythonRepository *PythonRepository `json:"pythonRepository,omitempty"`
  2381  	// UpstreamCredentials: Optional. The credentials used to access the remote
  2382  	// repository.
  2383  	UpstreamCredentials *UpstreamCredentials `json:"upstreamCredentials,omitempty"`
  2384  	// YumRepository: Specific settings for a Yum remote repository.
  2385  	YumRepository *YumRepository `json:"yumRepository,omitempty"`
  2386  	// ForceSendFields is a list of field names (e.g. "AptRepository") to
  2387  	// unconditionally include in API requests. By default, fields with empty or
  2388  	// default values are omitted from API requests. See
  2389  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2390  	// details.
  2391  	ForceSendFields []string `json:"-"`
  2392  	// NullFields is a list of field names (e.g. "AptRepository") to include in API
  2393  	// requests with the JSON null value. By default, fields with empty values are
  2394  	// omitted from API requests. See
  2395  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2396  	NullFields []string `json:"-"`
  2397  }
  2398  
  2399  func (s *RemoteRepositoryConfig) MarshalJSON() ([]byte, error) {
  2400  	type NoMethod RemoteRepositoryConfig
  2401  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2402  }
  2403  
  2404  // Repository: A Repository for storing artifacts with a specific format.
  2405  type Repository struct {
  2406  	// CleanupPolicies: Optional. Cleanup policies for this repository. Cleanup
  2407  	// policies indicate when certain package versions can be automatically
  2408  	// deleted. Map keys are policy IDs supplied by users during policy creation.
  2409  	// They must unique within a repository and be under 128 characters in length.
  2410  	CleanupPolicies map[string]CleanupPolicy `json:"cleanupPolicies,omitempty"`
  2411  	// CleanupPolicyDryRun: Optional. If true, the cleanup pipeline is prevented
  2412  	// from deleting versions in this repository.
  2413  	CleanupPolicyDryRun bool `json:"cleanupPolicyDryRun,omitempty"`
  2414  	// CreateTime: Output only. The time when the repository was created.
  2415  	CreateTime string `json:"createTime,omitempty"`
  2416  	// Description: The user-provided description of the repository.
  2417  	Description string `json:"description,omitempty"`
  2418  	// DisallowUnspecifiedMode: Optional. If this is true, aunspecified repo type
  2419  	// will be treated as error. Is used for new repo types that don't have any
  2420  	// specific fields. Right now is used by AOSS team when creating repos for
  2421  	// customers.
  2422  	DisallowUnspecifiedMode bool `json:"disallowUnspecifiedMode,omitempty"`
  2423  	// DockerConfig: Docker repository config contains repository level
  2424  	// configuration for the repositories of docker type.
  2425  	DockerConfig *DockerRepositoryConfig `json:"dockerConfig,omitempty"`
  2426  	// Format: Optional. The format of packages that are stored in the repository.
  2427  	//
  2428  	// Possible values:
  2429  	//   "FORMAT_UNSPECIFIED" - Unspecified package format.
  2430  	//   "DOCKER" - Docker package format.
  2431  	//   "MAVEN" - Maven package format.
  2432  	//   "NPM" - NPM package format.
  2433  	//   "APT" - APT package format.
  2434  	//   "YUM" - YUM package format.
  2435  	//   "GOOGET" - GooGet package format.
  2436  	//   "PYTHON" - Python package format.
  2437  	//   "KFP" - Kubeflow Pipelines package format.
  2438  	//   "GO" - Go package format.
  2439  	//   "GENERIC" - Generic package format.
  2440  	Format string `json:"format,omitempty"`
  2441  	// KmsKeyName: The Cloud KMS resource name of the customer managed encryption
  2442  	// key that's used to encrypt the contents of the Repository. Has the form:
  2443  	// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
  2444  	// This value may not be changed after the Repository has been created.
  2445  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  2446  	// Labels: Labels with user-defined metadata. This field may contain up to 64
  2447  	// entries. Label keys and values may be no longer than 63 characters. Label
  2448  	// keys must begin with a lowercase letter and may only contain lowercase
  2449  	// letters, numeric characters, underscores, and dashes.
  2450  	Labels map[string]string `json:"labels,omitempty"`
  2451  	// MavenConfig: Maven repository config contains repository level configuration
  2452  	// for the repositories of maven type.
  2453  	MavenConfig *MavenRepositoryConfig `json:"mavenConfig,omitempty"`
  2454  	// Mode: Optional. The mode of the repository.
  2455  	//
  2456  	// Possible values:
  2457  	//   "MODE_UNSPECIFIED" - Unspecified mode.
  2458  	//   "STANDARD_REPOSITORY" - A standard repository storing artifacts.
  2459  	//   "VIRTUAL_REPOSITORY" - A virtual repository to serve artifacts from one or
  2460  	// more sources.
  2461  	//   "REMOTE_REPOSITORY" - A remote repository to serve artifacts from a remote
  2462  	// source.
  2463  	//   "AOSS_REPOSITORY" - An AOSS repository provides artifacts from AOSS
  2464  	// upstreams.
  2465  	Mode string `json:"mode,omitempty"`
  2466  	// Name: The name of the repository, for example:
  2467  	// `projects/p1/locations/us-central1/repositories/repo1`. For each location in
  2468  	// a project, repository names must be unique.
  2469  	Name string `json:"name,omitempty"`
  2470  	// RemoteRepositoryConfig: Configuration specific for a Remote Repository.
  2471  	RemoteRepositoryConfig *RemoteRepositoryConfig `json:"remoteRepositoryConfig,omitempty"`
  2472  	// SatisfiesPzi: Output only. If set, the repository satisfies physical zone
  2473  	// isolation.
  2474  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
  2475  	// SatisfiesPzs: Output only. If set, the repository satisfies physical zone
  2476  	// separation.
  2477  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
  2478  	// SizeBytes: Output only. The size, in bytes, of all artifact storage in this
  2479  	// repository. Repositories that are generally available or in public preview
  2480  	// use this to calculate storage costs.
  2481  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  2482  	// UpdateTime: Output only. The time when the repository was last updated.
  2483  	UpdateTime string `json:"updateTime,omitempty"`
  2484  	// VirtualRepositoryConfig: Configuration specific for a Virtual Repository.
  2485  	VirtualRepositoryConfig *VirtualRepositoryConfig `json:"virtualRepositoryConfig,omitempty"`
  2486  
  2487  	// ServerResponse contains the HTTP response code and headers from the server.
  2488  	googleapi.ServerResponse `json:"-"`
  2489  	// ForceSendFields is a list of field names (e.g. "CleanupPolicies") to
  2490  	// unconditionally include in API requests. By default, fields with empty or
  2491  	// default values are omitted from API requests. See
  2492  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2493  	// details.
  2494  	ForceSendFields []string `json:"-"`
  2495  	// NullFields is a list of field names (e.g. "CleanupPolicies") to include in
  2496  	// API requests with the JSON null value. By default, fields with empty values
  2497  	// are omitted from API requests. See
  2498  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2499  	NullFields []string `json:"-"`
  2500  }
  2501  
  2502  func (s *Repository) MarshalJSON() ([]byte, error) {
  2503  	type NoMethod Repository
  2504  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2505  }
  2506  
  2507  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  2508  type SetIamPolicyRequest struct {
  2509  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  2510  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  2511  	// policy but certain Google Cloud services (such as Projects) might reject
  2512  	// them.
  2513  	Policy *Policy `json:"policy,omitempty"`
  2514  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  2515  	// include in API requests. By default, fields with empty or default values are
  2516  	// omitted from API requests. See
  2517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2518  	// details.
  2519  	ForceSendFields []string `json:"-"`
  2520  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2521  	// requests with the JSON null value. By default, fields with empty values are
  2522  	// omitted from API requests. See
  2523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2524  	NullFields []string `json:"-"`
  2525  }
  2526  
  2527  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2528  	type NoMethod SetIamPolicyRequest
  2529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2530  }
  2531  
  2532  // Status: The `Status` type defines a logical error model that is suitable for
  2533  // different programming environments, including REST APIs and RPC APIs. It is
  2534  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2535  // pieces of data: error code, error message, and error details. You can find
  2536  // out more about this error model and how to work with it in the API Design
  2537  // Guide (https://cloud.google.com/apis/design/errors).
  2538  type Status struct {
  2539  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2540  	Code int64 `json:"code,omitempty"`
  2541  	// Details: A list of messages that carry the error details. There is a common
  2542  	// set of message types for APIs to use.
  2543  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2544  	// Message: A developer-facing error message, which should be in English. Any
  2545  	// user-facing error message should be localized and sent in the
  2546  	// google.rpc.Status.details field, or localized by the client.
  2547  	Message string `json:"message,omitempty"`
  2548  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2549  	// include in API requests. By default, fields with empty or default values are
  2550  	// omitted from API requests. See
  2551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2552  	// details.
  2553  	ForceSendFields []string `json:"-"`
  2554  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2555  	// with the JSON null value. By default, fields with empty values are omitted
  2556  	// from API requests. See
  2557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2558  	NullFields []string `json:"-"`
  2559  }
  2560  
  2561  func (s *Status) MarshalJSON() ([]byte, error) {
  2562  	type NoMethod Status
  2563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2564  }
  2565  
  2566  // Tag: Tags point to a version and represent an alternative name that can be
  2567  // used to access the version.
  2568  type Tag struct {
  2569  	// Name: The name of the tag, for example:
  2570  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1
  2571  	// ". If the package part contains slashes, the slashes are escaped. The tag
  2572  	// part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be
  2573  	// URL encoded.
  2574  	Name string `json:"name,omitempty"`
  2575  	// Version: The name of the version the tag refers to, for example:
  2576  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
  2577  	// sha256:5243811" If the package or version ID parts contain slashes, the
  2578  	// slashes are escaped.
  2579  	Version string `json:"version,omitempty"`
  2580  
  2581  	// ServerResponse contains the HTTP response code and headers from the server.
  2582  	googleapi.ServerResponse `json:"-"`
  2583  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2584  	// include in API requests. By default, fields with empty or default values are
  2585  	// omitted from API requests. See
  2586  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2587  	// details.
  2588  	ForceSendFields []string `json:"-"`
  2589  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2590  	// with the JSON null value. By default, fields with empty values are omitted
  2591  	// from API requests. See
  2592  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2593  	NullFields []string `json:"-"`
  2594  }
  2595  
  2596  func (s *Tag) MarshalJSON() ([]byte, error) {
  2597  	type NoMethod Tag
  2598  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2599  }
  2600  
  2601  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  2602  type TestIamPermissionsRequest struct {
  2603  	// Permissions: The set of permissions to check for the `resource`. Permissions
  2604  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  2605  	// information see IAM Overview
  2606  	// (https://cloud.google.com/iam/docs/overview#permissions).
  2607  	Permissions []string `json:"permissions,omitempty"`
  2608  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2609  	// unconditionally include in API requests. By default, fields with empty or
  2610  	// default values are omitted from API requests. See
  2611  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2612  	// details.
  2613  	ForceSendFields []string `json:"-"`
  2614  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2615  	// requests with the JSON null value. By default, fields with empty values are
  2616  	// omitted from API requests. See
  2617  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2618  	NullFields []string `json:"-"`
  2619  }
  2620  
  2621  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2622  	type NoMethod TestIamPermissionsRequest
  2623  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2624  }
  2625  
  2626  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2627  // method.
  2628  type TestIamPermissionsResponse struct {
  2629  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  2630  	// caller is allowed.
  2631  	Permissions []string `json:"permissions,omitempty"`
  2632  
  2633  	// ServerResponse contains the HTTP response code and headers from the server.
  2634  	googleapi.ServerResponse `json:"-"`
  2635  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2636  	// unconditionally include in API requests. By default, fields with empty or
  2637  	// default values are omitted from API requests. See
  2638  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2639  	// details.
  2640  	ForceSendFields []string `json:"-"`
  2641  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2642  	// requests with the JSON null value. By default, fields with empty values are
  2643  	// omitted from API requests. See
  2644  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2645  	NullFields []string `json:"-"`
  2646  }
  2647  
  2648  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2649  	type NoMethod TestIamPermissionsResponse
  2650  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2651  }
  2652  
  2653  // UploadAptArtifactMediaResponse: The response to upload an artifact.
  2654  type UploadAptArtifactMediaResponse struct {
  2655  	// Operation: Operation to be returned to the user.
  2656  	Operation *Operation `json:"operation,omitempty"`
  2657  
  2658  	// ServerResponse contains the HTTP response code and headers from the server.
  2659  	googleapi.ServerResponse `json:"-"`
  2660  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2661  	// unconditionally include in API requests. By default, fields with empty or
  2662  	// default values are omitted from API requests. See
  2663  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2664  	// details.
  2665  	ForceSendFields []string `json:"-"`
  2666  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2667  	// requests with the JSON null value. By default, fields with empty values are
  2668  	// omitted from API requests. See
  2669  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2670  	NullFields []string `json:"-"`
  2671  }
  2672  
  2673  func (s *UploadAptArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  2674  	type NoMethod UploadAptArtifactMediaResponse
  2675  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2676  }
  2677  
  2678  // UploadAptArtifactMetadata: The operation metadata for uploading artifacts.
  2679  type UploadAptArtifactMetadata struct {
  2680  }
  2681  
  2682  // UploadAptArtifactRequest: The request to upload an artifact.
  2683  type UploadAptArtifactRequest struct {
  2684  }
  2685  
  2686  // UploadAptArtifactResponse: The response of the completed artifact upload
  2687  // operation. This response is contained in the Operation and available to
  2688  // users.
  2689  type UploadAptArtifactResponse struct {
  2690  	// AptArtifacts: The Apt artifacts updated.
  2691  	AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"`
  2692  	// ForceSendFields is a list of field names (e.g. "AptArtifacts") to
  2693  	// unconditionally include in API requests. By default, fields with empty or
  2694  	// default values are omitted from API requests. See
  2695  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2696  	// details.
  2697  	ForceSendFields []string `json:"-"`
  2698  	// NullFields is a list of field names (e.g. "AptArtifacts") to include in API
  2699  	// requests with the JSON null value. By default, fields with empty values are
  2700  	// omitted from API requests. See
  2701  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2702  	NullFields []string `json:"-"`
  2703  }
  2704  
  2705  func (s *UploadAptArtifactResponse) MarshalJSON() ([]byte, error) {
  2706  	type NoMethod UploadAptArtifactResponse
  2707  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2708  }
  2709  
  2710  // UploadGenericArtifactMediaResponse: The response to upload a generic
  2711  // artifact.
  2712  type UploadGenericArtifactMediaResponse struct {
  2713  	// Operation: Operation that will be returned to the user.
  2714  	Operation *Operation `json:"operation,omitempty"`
  2715  
  2716  	// ServerResponse contains the HTTP response code and headers from the server.
  2717  	googleapi.ServerResponse `json:"-"`
  2718  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2719  	// unconditionally include in API requests. By default, fields with empty or
  2720  	// default values are omitted from API requests. See
  2721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2722  	// details.
  2723  	ForceSendFields []string `json:"-"`
  2724  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2725  	// requests with the JSON null value. By default, fields with empty values are
  2726  	// omitted from API requests. See
  2727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2728  	NullFields []string `json:"-"`
  2729  }
  2730  
  2731  func (s *UploadGenericArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  2732  	type NoMethod UploadGenericArtifactMediaResponse
  2733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2734  }
  2735  
  2736  // UploadGenericArtifactMetadata: The operation metadata for uploading generic
  2737  // artifacts.
  2738  type UploadGenericArtifactMetadata struct {
  2739  }
  2740  
  2741  // UploadGenericArtifactRequest: The request to upload a generic artifact. The
  2742  // created GenericArtifact will have the resource name
  2743  // {parent}/genericArtifacts/package_id:version_id. The created file will have
  2744  // the resource name {parent}/files/package_id:version_id:filename.
  2745  type UploadGenericArtifactRequest struct {
  2746  	// Filename: The name of the file of the generic artifact to be uploaded. E.g.
  2747  	// "example-file.zip" The filename should only include letters, numbers, and
  2748  	// url safe characters, i.e. [a-zA-Z0-9-_.~@].
  2749  	Filename string `json:"filename,omitempty"`
  2750  	// Name: Deprecated. Use package_id, version_id and filename instead. The
  2751  	// resource name of the generic artifact. E.g.
  2752  	// "projects/math/locations/us/repositories/operations/genericArtifacts/addition
  2753  	// /1.0.0/add.py"
  2754  	Name string `json:"name,omitempty"`
  2755  	// PackageId: The ID of the package of the generic artifact. If the package
  2756  	// does not exist, a new package will be created. E.g. "pkg-1" The package_id
  2757  	// must start with a letter, end with a letter or number, only contain letters,
  2758  	// numbers, hyphens and periods i.e. [a-z0-9-.], and cannot exceed 256
  2759  	// characters.
  2760  	PackageId string `json:"packageId,omitempty"`
  2761  	// VersionId: The ID of the version of the generic artifact. If the version
  2762  	// does not exist, a new version will be created. E.g."1.0.0" The version_id
  2763  	// must start and end with a letter or number, can only contain lowercase
  2764  	// letters, numbers, hyphens and periods, i.e. [a-z0-9-.] and cannot exceed a
  2765  	// total of 128 characters. While "latest" is a well-known name for the latest
  2766  	// version of a package, it is not yet supported and is reserved for future
  2767  	// use. Creating a version called "latest" is not allowed.
  2768  	VersionId string `json:"versionId,omitempty"`
  2769  	// ForceSendFields is a list of field names (e.g. "Filename") to
  2770  	// unconditionally include in API requests. By default, fields with empty or
  2771  	// default values are omitted from API requests. See
  2772  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2773  	// details.
  2774  	ForceSendFields []string `json:"-"`
  2775  	// NullFields is a list of field names (e.g. "Filename") to include in API
  2776  	// requests with the JSON null value. By default, fields with empty values are
  2777  	// omitted from API requests. See
  2778  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2779  	NullFields []string `json:"-"`
  2780  }
  2781  
  2782  func (s *UploadGenericArtifactRequest) MarshalJSON() ([]byte, error) {
  2783  	type NoMethod UploadGenericArtifactRequest
  2784  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2785  }
  2786  
  2787  // UploadGoModuleMediaResponse: The response to upload a Go module.
  2788  type UploadGoModuleMediaResponse struct {
  2789  	// Operation: Operation to be returned to the user.
  2790  	Operation *Operation `json:"operation,omitempty"`
  2791  
  2792  	// ServerResponse contains the HTTP response code and headers from the server.
  2793  	googleapi.ServerResponse `json:"-"`
  2794  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2795  	// unconditionally include in API requests. By default, fields with empty or
  2796  	// default values are omitted from API requests. See
  2797  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2798  	// details.
  2799  	ForceSendFields []string `json:"-"`
  2800  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2801  	// requests with the JSON null value. By default, fields with empty values are
  2802  	// omitted from API requests. See
  2803  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2804  	NullFields []string `json:"-"`
  2805  }
  2806  
  2807  func (s *UploadGoModuleMediaResponse) MarshalJSON() ([]byte, error) {
  2808  	type NoMethod UploadGoModuleMediaResponse
  2809  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2810  }
  2811  
  2812  // UploadGoModuleMetadata: The operation metadata for uploading go modules.
  2813  type UploadGoModuleMetadata struct {
  2814  }
  2815  
  2816  // UploadGoModuleRequest: The request to upload a Go module.
  2817  type UploadGoModuleRequest struct {
  2818  }
  2819  
  2820  // UploadGoogetArtifactMediaResponse: The response to upload an artifact.
  2821  type UploadGoogetArtifactMediaResponse struct {
  2822  	// Operation: Operation to be returned to the user.
  2823  	Operation *Operation `json:"operation,omitempty"`
  2824  
  2825  	// ServerResponse contains the HTTP response code and headers from the server.
  2826  	googleapi.ServerResponse `json:"-"`
  2827  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2828  	// unconditionally include in API requests. By default, fields with empty or
  2829  	// default values are omitted from API requests. See
  2830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2831  	// details.
  2832  	ForceSendFields []string `json:"-"`
  2833  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2834  	// requests with the JSON null value. By default, fields with empty values are
  2835  	// omitted from API requests. See
  2836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2837  	NullFields []string `json:"-"`
  2838  }
  2839  
  2840  func (s *UploadGoogetArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  2841  	type NoMethod UploadGoogetArtifactMediaResponse
  2842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2843  }
  2844  
  2845  // UploadGoogetArtifactMetadata: The operation metadata for uploading
  2846  // artifacts.
  2847  type UploadGoogetArtifactMetadata struct {
  2848  }
  2849  
  2850  // UploadGoogetArtifactRequest: The request to upload an artifact.
  2851  type UploadGoogetArtifactRequest struct {
  2852  }
  2853  
  2854  // UploadGoogetArtifactResponse: The response of the completed artifact upload
  2855  // operation. This response is contained in the Operation and available to
  2856  // users.
  2857  type UploadGoogetArtifactResponse struct {
  2858  	// GoogetArtifacts: The GooGet artifacts updated.
  2859  	GoogetArtifacts []*GoogetArtifact `json:"googetArtifacts,omitempty"`
  2860  	// ForceSendFields is a list of field names (e.g. "GoogetArtifacts") to
  2861  	// unconditionally include in API requests. By default, fields with empty or
  2862  	// default values are omitted from API requests. See
  2863  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2864  	// details.
  2865  	ForceSendFields []string `json:"-"`
  2866  	// NullFields is a list of field names (e.g. "GoogetArtifacts") to include in
  2867  	// API requests with the JSON null value. By default, fields with empty values
  2868  	// are omitted from API requests. See
  2869  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2870  	NullFields []string `json:"-"`
  2871  }
  2872  
  2873  func (s *UploadGoogetArtifactResponse) MarshalJSON() ([]byte, error) {
  2874  	type NoMethod UploadGoogetArtifactResponse
  2875  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2876  }
  2877  
  2878  // UploadKfpArtifactMediaResponse: The response to upload an artifact.
  2879  type UploadKfpArtifactMediaResponse struct {
  2880  	// Operation: Operation that will be returned to the user.
  2881  	Operation *Operation `json:"operation,omitempty"`
  2882  
  2883  	// ServerResponse contains the HTTP response code and headers from the server.
  2884  	googleapi.ServerResponse `json:"-"`
  2885  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2886  	// unconditionally include in API requests. By default, fields with empty or
  2887  	// default values are omitted from API requests. See
  2888  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2889  	// details.
  2890  	ForceSendFields []string `json:"-"`
  2891  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2892  	// requests with the JSON null value. By default, fields with empty values are
  2893  	// omitted from API requests. See
  2894  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2895  	NullFields []string `json:"-"`
  2896  }
  2897  
  2898  func (s *UploadKfpArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  2899  	type NoMethod UploadKfpArtifactMediaResponse
  2900  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2901  }
  2902  
  2903  // UploadKfpArtifactMetadata: The operation metadata for uploading KFP
  2904  // artifacts.
  2905  type UploadKfpArtifactMetadata struct {
  2906  }
  2907  
  2908  // UploadKfpArtifactRequest: The request to upload an artifact.
  2909  type UploadKfpArtifactRequest struct {
  2910  	// Description: Description of the package version.
  2911  	Description string `json:"description,omitempty"`
  2912  	// Tags: Tags to be created with the version.
  2913  	Tags []string `json:"tags,omitempty"`
  2914  	// ForceSendFields is a list of field names (e.g. "Description") to
  2915  	// unconditionally include in API requests. By default, fields with empty or
  2916  	// default values are omitted from API requests. See
  2917  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2918  	// details.
  2919  	ForceSendFields []string `json:"-"`
  2920  	// NullFields is a list of field names (e.g. "Description") to include in API
  2921  	// requests with the JSON null value. By default, fields with empty values are
  2922  	// omitted from API requests. See
  2923  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2924  	NullFields []string `json:"-"`
  2925  }
  2926  
  2927  func (s *UploadKfpArtifactRequest) MarshalJSON() ([]byte, error) {
  2928  	type NoMethod UploadKfpArtifactRequest
  2929  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2930  }
  2931  
  2932  // UploadYumArtifactMediaResponse: The response to upload an artifact.
  2933  type UploadYumArtifactMediaResponse struct {
  2934  	// Operation: Operation to be returned to the user.
  2935  	Operation *Operation `json:"operation,omitempty"`
  2936  
  2937  	// ServerResponse contains the HTTP response code and headers from the server.
  2938  	googleapi.ServerResponse `json:"-"`
  2939  	// ForceSendFields is a list of field names (e.g. "Operation") to
  2940  	// unconditionally include in API requests. By default, fields with empty or
  2941  	// default values are omitted from API requests. See
  2942  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2943  	// details.
  2944  	ForceSendFields []string `json:"-"`
  2945  	// NullFields is a list of field names (e.g. "Operation") to include in API
  2946  	// requests with the JSON null value. By default, fields with empty values are
  2947  	// omitted from API requests. See
  2948  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2949  	NullFields []string `json:"-"`
  2950  }
  2951  
  2952  func (s *UploadYumArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  2953  	type NoMethod UploadYumArtifactMediaResponse
  2954  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2955  }
  2956  
  2957  // UploadYumArtifactMetadata: The operation metadata for uploading artifacts.
  2958  type UploadYumArtifactMetadata struct {
  2959  }
  2960  
  2961  // UploadYumArtifactRequest: The request to upload an artifact.
  2962  type UploadYumArtifactRequest struct {
  2963  }
  2964  
  2965  // UploadYumArtifactResponse: The response of the completed artifact upload
  2966  // operation. This response is contained in the Operation and available to
  2967  // users.
  2968  type UploadYumArtifactResponse struct {
  2969  	// YumArtifacts: The Yum artifacts updated.
  2970  	YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"`
  2971  	// ForceSendFields is a list of field names (e.g. "YumArtifacts") to
  2972  	// unconditionally include in API requests. By default, fields with empty or
  2973  	// default values are omitted from API requests. See
  2974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2975  	// details.
  2976  	ForceSendFields []string `json:"-"`
  2977  	// NullFields is a list of field names (e.g. "YumArtifacts") to include in API
  2978  	// requests with the JSON null value. By default, fields with empty values are
  2979  	// omitted from API requests. See
  2980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2981  	NullFields []string `json:"-"`
  2982  }
  2983  
  2984  func (s *UploadYumArtifactResponse) MarshalJSON() ([]byte, error) {
  2985  	type NoMethod UploadYumArtifactResponse
  2986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2987  }
  2988  
  2989  // UpstreamCredentials: The credentials to access the remote repository.
  2990  type UpstreamCredentials struct {
  2991  	// UsernamePasswordCredentials: Use username and password to access the remote
  2992  	// repository.
  2993  	UsernamePasswordCredentials *UsernamePasswordCredentials `json:"usernamePasswordCredentials,omitempty"`
  2994  	// ForceSendFields is a list of field names (e.g.
  2995  	// "UsernamePasswordCredentials") to unconditionally include in API requests.
  2996  	// By default, fields with empty or default values are omitted from API
  2997  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  2998  	// for more details.
  2999  	ForceSendFields []string `json:"-"`
  3000  	// NullFields is a list of field names (e.g. "UsernamePasswordCredentials") to
  3001  	// include in API requests with the JSON null value. By default, fields with
  3002  	// empty values are omitted from API requests. See
  3003  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3004  	NullFields []string `json:"-"`
  3005  }
  3006  
  3007  func (s *UpstreamCredentials) MarshalJSON() ([]byte, error) {
  3008  	type NoMethod UpstreamCredentials
  3009  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3010  }
  3011  
  3012  // UpstreamPolicy: Artifact policy configuration for the repository contents.
  3013  type UpstreamPolicy struct {
  3014  	// Id: The user-provided ID of the upstream policy.
  3015  	Id string `json:"id,omitempty"`
  3016  	// Priority: Entries with a greater priority value take precedence in the pull
  3017  	// order.
  3018  	Priority int64 `json:"priority,omitempty"`
  3019  	// Repository: A reference to the repository resource, for example:
  3020  	// `projects/p1/locations/us-central1/repositories/repo1`.
  3021  	Repository string `json:"repository,omitempty"`
  3022  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3023  	// include in API requests. By default, fields with empty or default values are
  3024  	// omitted from API requests. See
  3025  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3026  	// details.
  3027  	ForceSendFields []string `json:"-"`
  3028  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3029  	// with the JSON null value. By default, fields with empty values are omitted
  3030  	// from API requests. See
  3031  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3032  	NullFields []string `json:"-"`
  3033  }
  3034  
  3035  func (s *UpstreamPolicy) MarshalJSON() ([]byte, error) {
  3036  	type NoMethod UpstreamPolicy
  3037  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3038  }
  3039  
  3040  // UsernamePasswordCredentials: Username and password credentials.
  3041  type UsernamePasswordCredentials struct {
  3042  	// PasswordSecretVersion: The Secret Manager key version that holds the
  3043  	// password to access the remote repository. Must be in the format of
  3044  	// `projects/{project}/secrets/{secret}/versions/{version}`.
  3045  	PasswordSecretVersion string `json:"passwordSecretVersion,omitempty"`
  3046  	// Username: The username to access the remote repository.
  3047  	Username string `json:"username,omitempty"`
  3048  	// ForceSendFields is a list of field names (e.g. "PasswordSecretVersion") to
  3049  	// unconditionally include in API requests. By default, fields with empty or
  3050  	// default values are omitted from API requests. See
  3051  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3052  	// details.
  3053  	ForceSendFields []string `json:"-"`
  3054  	// NullFields is a list of field names (e.g. "PasswordSecretVersion") to
  3055  	// include in API requests with the JSON null value. By default, fields with
  3056  	// empty values are omitted from API requests. See
  3057  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3058  	NullFields []string `json:"-"`
  3059  }
  3060  
  3061  func (s *UsernamePasswordCredentials) MarshalJSON() ([]byte, error) {
  3062  	type NoMethod UsernamePasswordCredentials
  3063  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3064  }
  3065  
  3066  // VPCSCConfig: The Artifact Registry VPC SC config that apply to a Project.
  3067  type VPCSCConfig struct {
  3068  	// Name: The name of the project's VPC SC Config. Always of the form:
  3069  	// projects/{projectID}/locations/{location}/vpcscConfig In update request:
  3070  	// never set In response: always set
  3071  	Name string `json:"name,omitempty"`
  3072  	// VpcscPolicy: The project per location VPC SC policy that defines the VPC SC
  3073  	// behavior for the Remote Repository (Allow/Deny).
  3074  	//
  3075  	// Possible values:
  3076  	//   "VPCSC_POLICY_UNSPECIFIED" - VPCSC_POLICY_UNSPECIFIED - the VPS SC policy
  3077  	// is not defined. When VPS SC policy is not defined - the Service will use the
  3078  	// default behavior (VPCSC_DENY).
  3079  	//   "DENY" - VPCSC_DENY - repository will block the requests to the Upstreams
  3080  	// for the Remote Repositories if the resource is in the perimeter.
  3081  	//   "ALLOW" - VPCSC_ALLOW - repository will allow the requests to the
  3082  	// Upstreams for the Remote Repositories if the resource is in the perimeter.
  3083  	VpcscPolicy string `json:"vpcscPolicy,omitempty"`
  3084  
  3085  	// ServerResponse contains the HTTP response code and headers from the server.
  3086  	googleapi.ServerResponse `json:"-"`
  3087  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  3088  	// include in API requests. By default, fields with empty or default values are
  3089  	// omitted from API requests. See
  3090  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3091  	// details.
  3092  	ForceSendFields []string `json:"-"`
  3093  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  3094  	// with the JSON null value. By default, fields with empty values are omitted
  3095  	// from API requests. See
  3096  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3097  	NullFields []string `json:"-"`
  3098  }
  3099  
  3100  func (s *VPCSCConfig) MarshalJSON() ([]byte, error) {
  3101  	type NoMethod VPCSCConfig
  3102  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3103  }
  3104  
  3105  // Version: The body of a version resource. A version resource represents a
  3106  // collection of components, such as files and other data. This may correspond
  3107  // to a version in many package management schemes.
  3108  type Version struct {
  3109  	// CreateTime: The time when the version was created.
  3110  	CreateTime string `json:"createTime,omitempty"`
  3111  	// Description: Optional. Description of the version, as specified in its
  3112  	// metadata.
  3113  	Description string `json:"description,omitempty"`
  3114  	// Metadata: Output only. Repository-specific Metadata stored against this
  3115  	// version. The fields returned are defined by the underlying
  3116  	// repository-specific resource. Currently, the resources could be: DockerImage
  3117  	// MavenArtifact
  3118  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3119  	// Name: The name of the version, for example:
  3120  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
  3121  	// art1". If the package or version ID parts contain slashes, the slashes are
  3122  	// escaped.
  3123  	Name string `json:"name,omitempty"`
  3124  	// RelatedTags: Output only. A list of related tags. Will contain up to 100
  3125  	// tags that reference this version.
  3126  	RelatedTags []*Tag `json:"relatedTags,omitempty"`
  3127  	// UpdateTime: The time when the version was last updated.
  3128  	UpdateTime string `json:"updateTime,omitempty"`
  3129  
  3130  	// ServerResponse contains the HTTP response code and headers from the server.
  3131  	googleapi.ServerResponse `json:"-"`
  3132  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3133  	// unconditionally include in API requests. By default, fields with empty or
  3134  	// default values are omitted from API requests. See
  3135  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3136  	// details.
  3137  	ForceSendFields []string `json:"-"`
  3138  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3139  	// requests with the JSON null value. By default, fields with empty values are
  3140  	// omitted from API requests. See
  3141  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3142  	NullFields []string `json:"-"`
  3143  }
  3144  
  3145  func (s *Version) MarshalJSON() ([]byte, error) {
  3146  	type NoMethod Version
  3147  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3148  }
  3149  
  3150  // VirtualRepositoryConfig: LINT.IfChange Virtual repository configuration.
  3151  type VirtualRepositoryConfig struct {
  3152  	// UpstreamPolicies: Policies that configure the upstream artifacts distributed
  3153  	// by the Virtual Repository. Upstream policies cannot be set on a standard
  3154  	// repository.
  3155  	UpstreamPolicies []*UpstreamPolicy `json:"upstreamPolicies,omitempty"`
  3156  	// ForceSendFields is a list of field names (e.g. "UpstreamPolicies") to
  3157  	// unconditionally include in API requests. By default, fields with empty or
  3158  	// default values are omitted from API requests. See
  3159  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3160  	// details.
  3161  	ForceSendFields []string `json:"-"`
  3162  	// NullFields is a list of field names (e.g. "UpstreamPolicies") to include in
  3163  	// API requests with the JSON null value. By default, fields with empty values
  3164  	// are omitted from API requests. See
  3165  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3166  	NullFields []string `json:"-"`
  3167  }
  3168  
  3169  func (s *VirtualRepositoryConfig) MarshalJSON() ([]byte, error) {
  3170  	type NoMethod VirtualRepositoryConfig
  3171  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3172  }
  3173  
  3174  // YumArtifact: A detailed representation of a Yum artifact.
  3175  type YumArtifact struct {
  3176  	// Architecture: Output only. Operating system architecture of the artifact.
  3177  	Architecture string `json:"architecture,omitempty"`
  3178  	// Name: Output only. The Artifact Registry resource name of the artifact.
  3179  	Name string `json:"name,omitempty"`
  3180  	// PackageName: Output only. The yum package name of the artifact.
  3181  	PackageName string `json:"packageName,omitempty"`
  3182  	// PackageType: Output only. An artifact is a binary or source package.
  3183  	//
  3184  	// Possible values:
  3185  	//   "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified.
  3186  	//   "BINARY" - Binary package (.rpm).
  3187  	//   "SOURCE" - Source package (.srpm).
  3188  	PackageType string `json:"packageType,omitempty"`
  3189  	// ForceSendFields is a list of field names (e.g. "Architecture") to
  3190  	// unconditionally include in API requests. By default, fields with empty or
  3191  	// default values are omitted from API requests. See
  3192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3193  	// details.
  3194  	ForceSendFields []string `json:"-"`
  3195  	// NullFields is a list of field names (e.g. "Architecture") to include in API
  3196  	// requests with the JSON null value. By default, fields with empty values are
  3197  	// omitted from API requests. See
  3198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3199  	NullFields []string `json:"-"`
  3200  }
  3201  
  3202  func (s *YumArtifact) MarshalJSON() ([]byte, error) {
  3203  	type NoMethod YumArtifact
  3204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3205  }
  3206  
  3207  // YumRepository: Configuration for a Yum remote repository.
  3208  type YumRepository struct {
  3209  	// CustomRepository: Customer-specified remote repository.
  3210  	CustomRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository `json:"customRepository,omitempty"`
  3211  	// PublicRepository: One of the publicly available Yum repositories supported
  3212  	// by Artifact Registry.
  3213  	PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository `json:"publicRepository,omitempty"`
  3214  	// ForceSendFields is a list of field names (e.g. "CustomRepository") to
  3215  	// unconditionally include in API requests. By default, fields with empty or
  3216  	// default values are omitted from API requests. See
  3217  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3218  	// details.
  3219  	ForceSendFields []string `json:"-"`
  3220  	// NullFields is a list of field names (e.g. "CustomRepository") to include in
  3221  	// API requests with the JSON null value. By default, fields with empty values
  3222  	// are omitted from API requests. See
  3223  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3224  	NullFields []string `json:"-"`
  3225  }
  3226  
  3227  func (s *YumRepository) MarshalJSON() ([]byte, error) {
  3228  	type NoMethod YumRepository
  3229  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3230  }
  3231  
  3232  type ProjectsGetProjectSettingsCall struct {
  3233  	s            *Service
  3234  	name         string
  3235  	urlParams_   gensupport.URLParams
  3236  	ifNoneMatch_ string
  3237  	ctx_         context.Context
  3238  	header_      http.Header
  3239  }
  3240  
  3241  // GetProjectSettings: Retrieves the Settings for the Project.
  3242  //
  3243  // - name: The name of the projectSettings resource.
  3244  func (r *ProjectsService) GetProjectSettings(name string) *ProjectsGetProjectSettingsCall {
  3245  	c := &ProjectsGetProjectSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3246  	c.name = name
  3247  	return c
  3248  }
  3249  
  3250  // Fields allows partial responses to be retrieved. See
  3251  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3252  // details.
  3253  func (c *ProjectsGetProjectSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetProjectSettingsCall {
  3254  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3255  	return c
  3256  }
  3257  
  3258  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3259  // object's ETag matches the given value. This is useful for getting updates
  3260  // only after the object has changed since the last request.
  3261  func (c *ProjectsGetProjectSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetProjectSettingsCall {
  3262  	c.ifNoneMatch_ = entityTag
  3263  	return c
  3264  }
  3265  
  3266  // Context sets the context to be used in this call's Do method.
  3267  func (c *ProjectsGetProjectSettingsCall) Context(ctx context.Context) *ProjectsGetProjectSettingsCall {
  3268  	c.ctx_ = ctx
  3269  	return c
  3270  }
  3271  
  3272  // Header returns a http.Header that can be modified by the caller to add
  3273  // headers to the request.
  3274  func (c *ProjectsGetProjectSettingsCall) Header() http.Header {
  3275  	if c.header_ == nil {
  3276  		c.header_ = make(http.Header)
  3277  	}
  3278  	return c.header_
  3279  }
  3280  
  3281  func (c *ProjectsGetProjectSettingsCall) doRequest(alt string) (*http.Response, error) {
  3282  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3283  	if c.ifNoneMatch_ != "" {
  3284  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3285  	}
  3286  	var body io.Reader = nil
  3287  	c.urlParams_.Set("alt", alt)
  3288  	c.urlParams_.Set("prettyPrint", "false")
  3289  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3290  	urls += "?" + c.urlParams_.Encode()
  3291  	req, err := http.NewRequest("GET", urls, body)
  3292  	if err != nil {
  3293  		return nil, err
  3294  	}
  3295  	req.Header = reqHeaders
  3296  	googleapi.Expand(req.URL, map[string]string{
  3297  		"name": c.name,
  3298  	})
  3299  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3300  }
  3301  
  3302  // Do executes the "artifactregistry.projects.getProjectSettings" call.
  3303  // Any non-2xx status code is an error. Response headers are in either
  3304  // *ProjectSettings.ServerResponse.Header or (if a response was returned at
  3305  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3306  // check whether the returned error was because http.StatusNotModified was
  3307  // returned.
  3308  func (c *ProjectsGetProjectSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  3309  	gensupport.SetOptions(c.urlParams_, opts...)
  3310  	res, err := c.doRequest("json")
  3311  	if res != nil && res.StatusCode == http.StatusNotModified {
  3312  		if res.Body != nil {
  3313  			res.Body.Close()
  3314  		}
  3315  		return nil, gensupport.WrapError(&googleapi.Error{
  3316  			Code:   res.StatusCode,
  3317  			Header: res.Header,
  3318  		})
  3319  	}
  3320  	if err != nil {
  3321  		return nil, err
  3322  	}
  3323  	defer googleapi.CloseBody(res)
  3324  	if err := googleapi.CheckResponse(res); err != nil {
  3325  		return nil, gensupport.WrapError(err)
  3326  	}
  3327  	ret := &ProjectSettings{
  3328  		ServerResponse: googleapi.ServerResponse{
  3329  			Header:         res.Header,
  3330  			HTTPStatusCode: res.StatusCode,
  3331  		},
  3332  	}
  3333  	target := &ret
  3334  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3335  		return nil, err
  3336  	}
  3337  	return ret, nil
  3338  }
  3339  
  3340  type ProjectsUpdateProjectSettingsCall struct {
  3341  	s               *Service
  3342  	name            string
  3343  	projectsettings *ProjectSettings
  3344  	urlParams_      gensupport.URLParams
  3345  	ctx_            context.Context
  3346  	header_         http.Header
  3347  }
  3348  
  3349  // UpdateProjectSettings: Updates the Settings for the Project.
  3350  //
  3351  //   - name: The name of the project's settings. Always of the form:
  3352  //     projects/{project-id}/projectSettings In update request: never set In
  3353  //     response: always set.
  3354  func (r *ProjectsService) UpdateProjectSettings(name string, projectsettings *ProjectSettings) *ProjectsUpdateProjectSettingsCall {
  3355  	c := &ProjectsUpdateProjectSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3356  	c.name = name
  3357  	c.projectsettings = projectsettings
  3358  	return c
  3359  }
  3360  
  3361  // UpdateMask sets the optional parameter "updateMask": Field mask to support
  3362  // partial updates.
  3363  func (c *ProjectsUpdateProjectSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateProjectSettingsCall {
  3364  	c.urlParams_.Set("updateMask", updateMask)
  3365  	return c
  3366  }
  3367  
  3368  // Fields allows partial responses to be retrieved. See
  3369  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3370  // details.
  3371  func (c *ProjectsUpdateProjectSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateProjectSettingsCall {
  3372  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3373  	return c
  3374  }
  3375  
  3376  // Context sets the context to be used in this call's Do method.
  3377  func (c *ProjectsUpdateProjectSettingsCall) Context(ctx context.Context) *ProjectsUpdateProjectSettingsCall {
  3378  	c.ctx_ = ctx
  3379  	return c
  3380  }
  3381  
  3382  // Header returns a http.Header that can be modified by the caller to add
  3383  // headers to the request.
  3384  func (c *ProjectsUpdateProjectSettingsCall) Header() http.Header {
  3385  	if c.header_ == nil {
  3386  		c.header_ = make(http.Header)
  3387  	}
  3388  	return c.header_
  3389  }
  3390  
  3391  func (c *ProjectsUpdateProjectSettingsCall) doRequest(alt string) (*http.Response, error) {
  3392  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3393  	var body io.Reader = nil
  3394  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsettings)
  3395  	if err != nil {
  3396  		return nil, err
  3397  	}
  3398  	c.urlParams_.Set("alt", alt)
  3399  	c.urlParams_.Set("prettyPrint", "false")
  3400  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3401  	urls += "?" + c.urlParams_.Encode()
  3402  	req, err := http.NewRequest("PATCH", urls, body)
  3403  	if err != nil {
  3404  		return nil, err
  3405  	}
  3406  	req.Header = reqHeaders
  3407  	googleapi.Expand(req.URL, map[string]string{
  3408  		"name": c.name,
  3409  	})
  3410  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3411  }
  3412  
  3413  // Do executes the "artifactregistry.projects.updateProjectSettings" call.
  3414  // Any non-2xx status code is an error. Response headers are in either
  3415  // *ProjectSettings.ServerResponse.Header or (if a response was returned at
  3416  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3417  // check whether the returned error was because http.StatusNotModified was
  3418  // returned.
  3419  func (c *ProjectsUpdateProjectSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  3420  	gensupport.SetOptions(c.urlParams_, opts...)
  3421  	res, err := c.doRequest("json")
  3422  	if res != nil && res.StatusCode == http.StatusNotModified {
  3423  		if res.Body != nil {
  3424  			res.Body.Close()
  3425  		}
  3426  		return nil, gensupport.WrapError(&googleapi.Error{
  3427  			Code:   res.StatusCode,
  3428  			Header: res.Header,
  3429  		})
  3430  	}
  3431  	if err != nil {
  3432  		return nil, err
  3433  	}
  3434  	defer googleapi.CloseBody(res)
  3435  	if err := googleapi.CheckResponse(res); err != nil {
  3436  		return nil, gensupport.WrapError(err)
  3437  	}
  3438  	ret := &ProjectSettings{
  3439  		ServerResponse: googleapi.ServerResponse{
  3440  			Header:         res.Header,
  3441  			HTTPStatusCode: res.StatusCode,
  3442  		},
  3443  	}
  3444  	target := &ret
  3445  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3446  		return nil, err
  3447  	}
  3448  	return ret, nil
  3449  }
  3450  
  3451  type ProjectsLocationsGetCall struct {
  3452  	s            *Service
  3453  	name         string
  3454  	urlParams_   gensupport.URLParams
  3455  	ifNoneMatch_ string
  3456  	ctx_         context.Context
  3457  	header_      http.Header
  3458  }
  3459  
  3460  // Get: Gets information about a location.
  3461  //
  3462  // - name: Resource name for the location.
  3463  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3464  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3465  	c.name = name
  3466  	return c
  3467  }
  3468  
  3469  // Fields allows partial responses to be retrieved. See
  3470  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3471  // details.
  3472  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3473  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3474  	return c
  3475  }
  3476  
  3477  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3478  // object's ETag matches the given value. This is useful for getting updates
  3479  // only after the object has changed since the last request.
  3480  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3481  	c.ifNoneMatch_ = entityTag
  3482  	return c
  3483  }
  3484  
  3485  // Context sets the context to be used in this call's Do method.
  3486  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3487  	c.ctx_ = ctx
  3488  	return c
  3489  }
  3490  
  3491  // Header returns a http.Header that can be modified by the caller to add
  3492  // headers to the request.
  3493  func (c *ProjectsLocationsGetCall) Header() http.Header {
  3494  	if c.header_ == nil {
  3495  		c.header_ = make(http.Header)
  3496  	}
  3497  	return c.header_
  3498  }
  3499  
  3500  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3501  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3502  	if c.ifNoneMatch_ != "" {
  3503  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3504  	}
  3505  	var body io.Reader = nil
  3506  	c.urlParams_.Set("alt", alt)
  3507  	c.urlParams_.Set("prettyPrint", "false")
  3508  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3509  	urls += "?" + c.urlParams_.Encode()
  3510  	req, err := http.NewRequest("GET", urls, body)
  3511  	if err != nil {
  3512  		return nil, err
  3513  	}
  3514  	req.Header = reqHeaders
  3515  	googleapi.Expand(req.URL, map[string]string{
  3516  		"name": c.name,
  3517  	})
  3518  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3519  }
  3520  
  3521  // Do executes the "artifactregistry.projects.locations.get" call.
  3522  // Any non-2xx status code is an error. Response headers are in either
  3523  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3524  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3525  // whether the returned error was because http.StatusNotModified was returned.
  3526  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3527  	gensupport.SetOptions(c.urlParams_, opts...)
  3528  	res, err := c.doRequest("json")
  3529  	if res != nil && res.StatusCode == http.StatusNotModified {
  3530  		if res.Body != nil {
  3531  			res.Body.Close()
  3532  		}
  3533  		return nil, gensupport.WrapError(&googleapi.Error{
  3534  			Code:   res.StatusCode,
  3535  			Header: res.Header,
  3536  		})
  3537  	}
  3538  	if err != nil {
  3539  		return nil, err
  3540  	}
  3541  	defer googleapi.CloseBody(res)
  3542  	if err := googleapi.CheckResponse(res); err != nil {
  3543  		return nil, gensupport.WrapError(err)
  3544  	}
  3545  	ret := &Location{
  3546  		ServerResponse: googleapi.ServerResponse{
  3547  			Header:         res.Header,
  3548  			HTTPStatusCode: res.StatusCode,
  3549  		},
  3550  	}
  3551  	target := &ret
  3552  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3553  		return nil, err
  3554  	}
  3555  	return ret, nil
  3556  }
  3557  
  3558  type ProjectsLocationsGetVpcscConfigCall struct {
  3559  	s            *Service
  3560  	name         string
  3561  	urlParams_   gensupport.URLParams
  3562  	ifNoneMatch_ string
  3563  	ctx_         context.Context
  3564  	header_      http.Header
  3565  }
  3566  
  3567  // GetVpcscConfig: Retrieves the VPCSC Config for the Project.
  3568  //
  3569  // - name: The name of the VPCSCConfig resource.
  3570  func (r *ProjectsLocationsService) GetVpcscConfig(name string) *ProjectsLocationsGetVpcscConfigCall {
  3571  	c := &ProjectsLocationsGetVpcscConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3572  	c.name = name
  3573  	return c
  3574  }
  3575  
  3576  // Fields allows partial responses to be retrieved. See
  3577  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3578  // details.
  3579  func (c *ProjectsLocationsGetVpcscConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetVpcscConfigCall {
  3580  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3581  	return c
  3582  }
  3583  
  3584  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3585  // object's ETag matches the given value. This is useful for getting updates
  3586  // only after the object has changed since the last request.
  3587  func (c *ProjectsLocationsGetVpcscConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetVpcscConfigCall {
  3588  	c.ifNoneMatch_ = entityTag
  3589  	return c
  3590  }
  3591  
  3592  // Context sets the context to be used in this call's Do method.
  3593  func (c *ProjectsLocationsGetVpcscConfigCall) Context(ctx context.Context) *ProjectsLocationsGetVpcscConfigCall {
  3594  	c.ctx_ = ctx
  3595  	return c
  3596  }
  3597  
  3598  // Header returns a http.Header that can be modified by the caller to add
  3599  // headers to the request.
  3600  func (c *ProjectsLocationsGetVpcscConfigCall) Header() http.Header {
  3601  	if c.header_ == nil {
  3602  		c.header_ = make(http.Header)
  3603  	}
  3604  	return c.header_
  3605  }
  3606  
  3607  func (c *ProjectsLocationsGetVpcscConfigCall) doRequest(alt string) (*http.Response, error) {
  3608  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3609  	if c.ifNoneMatch_ != "" {
  3610  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3611  	}
  3612  	var body io.Reader = nil
  3613  	c.urlParams_.Set("alt", alt)
  3614  	c.urlParams_.Set("prettyPrint", "false")
  3615  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3616  	urls += "?" + c.urlParams_.Encode()
  3617  	req, err := http.NewRequest("GET", urls, body)
  3618  	if err != nil {
  3619  		return nil, err
  3620  	}
  3621  	req.Header = reqHeaders
  3622  	googleapi.Expand(req.URL, map[string]string{
  3623  		"name": c.name,
  3624  	})
  3625  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3626  }
  3627  
  3628  // Do executes the "artifactregistry.projects.locations.getVpcscConfig" call.
  3629  // Any non-2xx status code is an error. Response headers are in either
  3630  // *VPCSCConfig.ServerResponse.Header or (if a response was returned at all) in
  3631  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3632  // whether the returned error was because http.StatusNotModified was returned.
  3633  func (c *ProjectsLocationsGetVpcscConfigCall) Do(opts ...googleapi.CallOption) (*VPCSCConfig, error) {
  3634  	gensupport.SetOptions(c.urlParams_, opts...)
  3635  	res, err := c.doRequest("json")
  3636  	if res != nil && res.StatusCode == http.StatusNotModified {
  3637  		if res.Body != nil {
  3638  			res.Body.Close()
  3639  		}
  3640  		return nil, gensupport.WrapError(&googleapi.Error{
  3641  			Code:   res.StatusCode,
  3642  			Header: res.Header,
  3643  		})
  3644  	}
  3645  	if err != nil {
  3646  		return nil, err
  3647  	}
  3648  	defer googleapi.CloseBody(res)
  3649  	if err := googleapi.CheckResponse(res); err != nil {
  3650  		return nil, gensupport.WrapError(err)
  3651  	}
  3652  	ret := &VPCSCConfig{
  3653  		ServerResponse: googleapi.ServerResponse{
  3654  			Header:         res.Header,
  3655  			HTTPStatusCode: res.StatusCode,
  3656  		},
  3657  	}
  3658  	target := &ret
  3659  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3660  		return nil, err
  3661  	}
  3662  	return ret, nil
  3663  }
  3664  
  3665  type ProjectsLocationsListCall struct {
  3666  	s            *Service
  3667  	name         string
  3668  	urlParams_   gensupport.URLParams
  3669  	ifNoneMatch_ string
  3670  	ctx_         context.Context
  3671  	header_      http.Header
  3672  }
  3673  
  3674  // List: Lists information about the supported locations for this service.
  3675  //
  3676  // - name: The resource that owns the locations collection, if applicable.
  3677  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3678  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3679  	c.name = name
  3680  	return c
  3681  }
  3682  
  3683  // Filter sets the optional parameter "filter": A filter to narrow down results
  3684  // to a preferred subset. The filtering language accepts strings like
  3685  // "displayName=tokyo", and is documented in more detail in AIP-160
  3686  // (https://google.aip.dev/160).
  3687  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3688  	c.urlParams_.Set("filter", filter)
  3689  	return c
  3690  }
  3691  
  3692  // PageSize sets the optional parameter "pageSize": The maximum number of
  3693  // results to return. If not set, the service selects a default.
  3694  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3695  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3696  	return c
  3697  }
  3698  
  3699  // PageToken sets the optional parameter "pageToken": A page token received
  3700  // from the `next_page_token` field in the response. Send that page token to
  3701  // receive the subsequent page.
  3702  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3703  	c.urlParams_.Set("pageToken", pageToken)
  3704  	return c
  3705  }
  3706  
  3707  // Fields allows partial responses to be retrieved. See
  3708  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3709  // details.
  3710  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3711  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3712  	return c
  3713  }
  3714  
  3715  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3716  // object's ETag matches the given value. This is useful for getting updates
  3717  // only after the object has changed since the last request.
  3718  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3719  	c.ifNoneMatch_ = entityTag
  3720  	return c
  3721  }
  3722  
  3723  // Context sets the context to be used in this call's Do method.
  3724  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3725  	c.ctx_ = ctx
  3726  	return c
  3727  }
  3728  
  3729  // Header returns a http.Header that can be modified by the caller to add
  3730  // headers to the request.
  3731  func (c *ProjectsLocationsListCall) Header() http.Header {
  3732  	if c.header_ == nil {
  3733  		c.header_ = make(http.Header)
  3734  	}
  3735  	return c.header_
  3736  }
  3737  
  3738  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3739  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3740  	if c.ifNoneMatch_ != "" {
  3741  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3742  	}
  3743  	var body io.Reader = nil
  3744  	c.urlParams_.Set("alt", alt)
  3745  	c.urlParams_.Set("prettyPrint", "false")
  3746  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  3747  	urls += "?" + c.urlParams_.Encode()
  3748  	req, err := http.NewRequest("GET", urls, body)
  3749  	if err != nil {
  3750  		return nil, err
  3751  	}
  3752  	req.Header = reqHeaders
  3753  	googleapi.Expand(req.URL, map[string]string{
  3754  		"name": c.name,
  3755  	})
  3756  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3757  }
  3758  
  3759  // Do executes the "artifactregistry.projects.locations.list" call.
  3760  // Any non-2xx status code is an error. Response headers are in either
  3761  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  3762  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3763  // check whether the returned error was because http.StatusNotModified was
  3764  // returned.
  3765  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3766  	gensupport.SetOptions(c.urlParams_, opts...)
  3767  	res, err := c.doRequest("json")
  3768  	if res != nil && res.StatusCode == http.StatusNotModified {
  3769  		if res.Body != nil {
  3770  			res.Body.Close()
  3771  		}
  3772  		return nil, gensupport.WrapError(&googleapi.Error{
  3773  			Code:   res.StatusCode,
  3774  			Header: res.Header,
  3775  		})
  3776  	}
  3777  	if err != nil {
  3778  		return nil, err
  3779  	}
  3780  	defer googleapi.CloseBody(res)
  3781  	if err := googleapi.CheckResponse(res); err != nil {
  3782  		return nil, gensupport.WrapError(err)
  3783  	}
  3784  	ret := &ListLocationsResponse{
  3785  		ServerResponse: googleapi.ServerResponse{
  3786  			Header:         res.Header,
  3787  			HTTPStatusCode: res.StatusCode,
  3788  		},
  3789  	}
  3790  	target := &ret
  3791  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3792  		return nil, err
  3793  	}
  3794  	return ret, nil
  3795  }
  3796  
  3797  // Pages invokes f for each page of results.
  3798  // A non-nil error returned from f will halt the iteration.
  3799  // The provided context supersedes any context provided to the Context method.
  3800  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3801  	c.ctx_ = ctx
  3802  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3803  	for {
  3804  		x, err := c.Do()
  3805  		if err != nil {
  3806  			return err
  3807  		}
  3808  		if err := f(x); err != nil {
  3809  			return err
  3810  		}
  3811  		if x.NextPageToken == "" {
  3812  			return nil
  3813  		}
  3814  		c.PageToken(x.NextPageToken)
  3815  	}
  3816  }
  3817  
  3818  type ProjectsLocationsUpdateVpcscConfigCall struct {
  3819  	s           *Service
  3820  	name        string
  3821  	vpcscconfig *VPCSCConfig
  3822  	urlParams_  gensupport.URLParams
  3823  	ctx_        context.Context
  3824  	header_     http.Header
  3825  }
  3826  
  3827  // UpdateVpcscConfig: Updates the VPCSC Config for the Project.
  3828  //
  3829  //   - name: The name of the project's VPC SC Config. Always of the form:
  3830  //     projects/{projectID}/locations/{location}/vpcscConfig In update request:
  3831  //     never set In response: always set.
  3832  func (r *ProjectsLocationsService) UpdateVpcscConfig(name string, vpcscconfig *VPCSCConfig) *ProjectsLocationsUpdateVpcscConfigCall {
  3833  	c := &ProjectsLocationsUpdateVpcscConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3834  	c.name = name
  3835  	c.vpcscconfig = vpcscconfig
  3836  	return c
  3837  }
  3838  
  3839  // UpdateMask sets the optional parameter "updateMask": Field mask to support
  3840  // partial updates.
  3841  func (c *ProjectsLocationsUpdateVpcscConfigCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateVpcscConfigCall {
  3842  	c.urlParams_.Set("updateMask", updateMask)
  3843  	return c
  3844  }
  3845  
  3846  // Fields allows partial responses to be retrieved. See
  3847  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3848  // details.
  3849  func (c *ProjectsLocationsUpdateVpcscConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateVpcscConfigCall {
  3850  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3851  	return c
  3852  }
  3853  
  3854  // Context sets the context to be used in this call's Do method.
  3855  func (c *ProjectsLocationsUpdateVpcscConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateVpcscConfigCall {
  3856  	c.ctx_ = ctx
  3857  	return c
  3858  }
  3859  
  3860  // Header returns a http.Header that can be modified by the caller to add
  3861  // headers to the request.
  3862  func (c *ProjectsLocationsUpdateVpcscConfigCall) Header() http.Header {
  3863  	if c.header_ == nil {
  3864  		c.header_ = make(http.Header)
  3865  	}
  3866  	return c.header_
  3867  }
  3868  
  3869  func (c *ProjectsLocationsUpdateVpcscConfigCall) doRequest(alt string) (*http.Response, error) {
  3870  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3871  	var body io.Reader = nil
  3872  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpcscconfig)
  3873  	if err != nil {
  3874  		return nil, err
  3875  	}
  3876  	c.urlParams_.Set("alt", alt)
  3877  	c.urlParams_.Set("prettyPrint", "false")
  3878  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3879  	urls += "?" + c.urlParams_.Encode()
  3880  	req, err := http.NewRequest("PATCH", urls, body)
  3881  	if err != nil {
  3882  		return nil, err
  3883  	}
  3884  	req.Header = reqHeaders
  3885  	googleapi.Expand(req.URL, map[string]string{
  3886  		"name": c.name,
  3887  	})
  3888  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3889  }
  3890  
  3891  // Do executes the "artifactregistry.projects.locations.updateVpcscConfig" call.
  3892  // Any non-2xx status code is an error. Response headers are in either
  3893  // *VPCSCConfig.ServerResponse.Header or (if a response was returned at all) in
  3894  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3895  // whether the returned error was because http.StatusNotModified was returned.
  3896  func (c *ProjectsLocationsUpdateVpcscConfigCall) Do(opts ...googleapi.CallOption) (*VPCSCConfig, error) {
  3897  	gensupport.SetOptions(c.urlParams_, opts...)
  3898  	res, err := c.doRequest("json")
  3899  	if res != nil && res.StatusCode == http.StatusNotModified {
  3900  		if res.Body != nil {
  3901  			res.Body.Close()
  3902  		}
  3903  		return nil, gensupport.WrapError(&googleapi.Error{
  3904  			Code:   res.StatusCode,
  3905  			Header: res.Header,
  3906  		})
  3907  	}
  3908  	if err != nil {
  3909  		return nil, err
  3910  	}
  3911  	defer googleapi.CloseBody(res)
  3912  	if err := googleapi.CheckResponse(res); err != nil {
  3913  		return nil, gensupport.WrapError(err)
  3914  	}
  3915  	ret := &VPCSCConfig{
  3916  		ServerResponse: googleapi.ServerResponse{
  3917  			Header:         res.Header,
  3918  			HTTPStatusCode: res.StatusCode,
  3919  		},
  3920  	}
  3921  	target := &ret
  3922  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3923  		return nil, err
  3924  	}
  3925  	return ret, nil
  3926  }
  3927  
  3928  type ProjectsLocationsOperationsGetCall struct {
  3929  	s            *Service
  3930  	name         string
  3931  	urlParams_   gensupport.URLParams
  3932  	ifNoneMatch_ string
  3933  	ctx_         context.Context
  3934  	header_      http.Header
  3935  }
  3936  
  3937  // Get: Gets the latest state of a long-running operation. Clients can use this
  3938  // method to poll the operation result at intervals as recommended by the API
  3939  // service.
  3940  //
  3941  // - name: The name of the operation resource.
  3942  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  3943  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3944  	c.name = name
  3945  	return c
  3946  }
  3947  
  3948  // Fields allows partial responses to be retrieved. See
  3949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3950  // details.
  3951  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  3952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3953  	return c
  3954  }
  3955  
  3956  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3957  // object's ETag matches the given value. This is useful for getting updates
  3958  // only after the object has changed since the last request.
  3959  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  3960  	c.ifNoneMatch_ = entityTag
  3961  	return c
  3962  }
  3963  
  3964  // Context sets the context to be used in this call's Do method.
  3965  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  3966  	c.ctx_ = ctx
  3967  	return c
  3968  }
  3969  
  3970  // Header returns a http.Header that can be modified by the caller to add
  3971  // headers to the request.
  3972  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  3973  	if c.header_ == nil {
  3974  		c.header_ = make(http.Header)
  3975  	}
  3976  	return c.header_
  3977  }
  3978  
  3979  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3980  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3981  	if c.ifNoneMatch_ != "" {
  3982  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3983  	}
  3984  	var body io.Reader = nil
  3985  	c.urlParams_.Set("alt", alt)
  3986  	c.urlParams_.Set("prettyPrint", "false")
  3987  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3988  	urls += "?" + c.urlParams_.Encode()
  3989  	req, err := http.NewRequest("GET", urls, body)
  3990  	if err != nil {
  3991  		return nil, err
  3992  	}
  3993  	req.Header = reqHeaders
  3994  	googleapi.Expand(req.URL, map[string]string{
  3995  		"name": c.name,
  3996  	})
  3997  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3998  }
  3999  
  4000  // Do executes the "artifactregistry.projects.locations.operations.get" call.
  4001  // Any non-2xx status code is an error. Response headers are in either
  4002  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4003  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4004  // whether the returned error was because http.StatusNotModified was returned.
  4005  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4006  	gensupport.SetOptions(c.urlParams_, opts...)
  4007  	res, err := c.doRequest("json")
  4008  	if res != nil && res.StatusCode == http.StatusNotModified {
  4009  		if res.Body != nil {
  4010  			res.Body.Close()
  4011  		}
  4012  		return nil, gensupport.WrapError(&googleapi.Error{
  4013  			Code:   res.StatusCode,
  4014  			Header: res.Header,
  4015  		})
  4016  	}
  4017  	if err != nil {
  4018  		return nil, err
  4019  	}
  4020  	defer googleapi.CloseBody(res)
  4021  	if err := googleapi.CheckResponse(res); err != nil {
  4022  		return nil, gensupport.WrapError(err)
  4023  	}
  4024  	ret := &Operation{
  4025  		ServerResponse: googleapi.ServerResponse{
  4026  			Header:         res.Header,
  4027  			HTTPStatusCode: res.StatusCode,
  4028  		},
  4029  	}
  4030  	target := &ret
  4031  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4032  		return nil, err
  4033  	}
  4034  	return ret, nil
  4035  }
  4036  
  4037  type ProjectsLocationsRepositoriesCreateCall struct {
  4038  	s          *Service
  4039  	parent     string
  4040  	repository *Repository
  4041  	urlParams_ gensupport.URLParams
  4042  	ctx_       context.Context
  4043  	header_    http.Header
  4044  }
  4045  
  4046  // Create: Creates a repository. The returned Operation will finish once the
  4047  // repository has been created. Its response will be the created Repository.
  4048  //
  4049  //   - parent: The name of the parent resource where the repository will be
  4050  //     created.
  4051  func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall {
  4052  	c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4053  	c.parent = parent
  4054  	c.repository = repository
  4055  	return c
  4056  }
  4057  
  4058  // RepositoryId sets the optional parameter "repositoryId": Required. The
  4059  // repository id to use for this repository.
  4060  func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall {
  4061  	c.urlParams_.Set("repositoryId", repositoryId)
  4062  	return c
  4063  }
  4064  
  4065  // Fields allows partial responses to be retrieved. See
  4066  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4067  // details.
  4068  func (c *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall {
  4069  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4070  	return c
  4071  }
  4072  
  4073  // Context sets the context to be used in this call's Do method.
  4074  func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall {
  4075  	c.ctx_ = ctx
  4076  	return c
  4077  }
  4078  
  4079  // Header returns a http.Header that can be modified by the caller to add
  4080  // headers to the request.
  4081  func (c *ProjectsLocationsRepositoriesCreateCall) Header() http.Header {
  4082  	if c.header_ == nil {
  4083  		c.header_ = make(http.Header)
  4084  	}
  4085  	return c.header_
  4086  }
  4087  
  4088  func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) {
  4089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4090  	var body io.Reader = nil
  4091  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  4092  	if err != nil {
  4093  		return nil, err
  4094  	}
  4095  	c.urlParams_.Set("alt", alt)
  4096  	c.urlParams_.Set("prettyPrint", "false")
  4097  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repositories")
  4098  	urls += "?" + c.urlParams_.Encode()
  4099  	req, err := http.NewRequest("POST", urls, body)
  4100  	if err != nil {
  4101  		return nil, err
  4102  	}
  4103  	req.Header = reqHeaders
  4104  	googleapi.Expand(req.URL, map[string]string{
  4105  		"parent": c.parent,
  4106  	})
  4107  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4108  }
  4109  
  4110  // Do executes the "artifactregistry.projects.locations.repositories.create" call.
  4111  // Any non-2xx status code is an error. Response headers are in either
  4112  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4113  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4114  // whether the returned error was because http.StatusNotModified was returned.
  4115  func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4116  	gensupport.SetOptions(c.urlParams_, opts...)
  4117  	res, err := c.doRequest("json")
  4118  	if res != nil && res.StatusCode == http.StatusNotModified {
  4119  		if res.Body != nil {
  4120  			res.Body.Close()
  4121  		}
  4122  		return nil, gensupport.WrapError(&googleapi.Error{
  4123  			Code:   res.StatusCode,
  4124  			Header: res.Header,
  4125  		})
  4126  	}
  4127  	if err != nil {
  4128  		return nil, err
  4129  	}
  4130  	defer googleapi.CloseBody(res)
  4131  	if err := googleapi.CheckResponse(res); err != nil {
  4132  		return nil, gensupport.WrapError(err)
  4133  	}
  4134  	ret := &Operation{
  4135  		ServerResponse: googleapi.ServerResponse{
  4136  			Header:         res.Header,
  4137  			HTTPStatusCode: res.StatusCode,
  4138  		},
  4139  	}
  4140  	target := &ret
  4141  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4142  		return nil, err
  4143  	}
  4144  	return ret, nil
  4145  }
  4146  
  4147  type ProjectsLocationsRepositoriesDeleteCall struct {
  4148  	s          *Service
  4149  	name       string
  4150  	urlParams_ gensupport.URLParams
  4151  	ctx_       context.Context
  4152  	header_    http.Header
  4153  }
  4154  
  4155  // Delete: Deletes a repository and all of its contents. The returned Operation
  4156  // will finish once the repository has been deleted. It will not have any
  4157  // Operation metadata and will return a google.protobuf.Empty response.
  4158  //
  4159  // - name: The name of the repository to delete.
  4160  func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall {
  4161  	c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4162  	c.name = name
  4163  	return c
  4164  }
  4165  
  4166  // Fields allows partial responses to be retrieved. See
  4167  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4168  // details.
  4169  func (c *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall {
  4170  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4171  	return c
  4172  }
  4173  
  4174  // Context sets the context to be used in this call's Do method.
  4175  func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall {
  4176  	c.ctx_ = ctx
  4177  	return c
  4178  }
  4179  
  4180  // Header returns a http.Header that can be modified by the caller to add
  4181  // headers to the request.
  4182  func (c *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header {
  4183  	if c.header_ == nil {
  4184  		c.header_ = make(http.Header)
  4185  	}
  4186  	return c.header_
  4187  }
  4188  
  4189  func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4190  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4191  	var body io.Reader = nil
  4192  	c.urlParams_.Set("alt", alt)
  4193  	c.urlParams_.Set("prettyPrint", "false")
  4194  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4195  	urls += "?" + c.urlParams_.Encode()
  4196  	req, err := http.NewRequest("DELETE", urls, body)
  4197  	if err != nil {
  4198  		return nil, err
  4199  	}
  4200  	req.Header = reqHeaders
  4201  	googleapi.Expand(req.URL, map[string]string{
  4202  		"name": c.name,
  4203  	})
  4204  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4205  }
  4206  
  4207  // Do executes the "artifactregistry.projects.locations.repositories.delete" call.
  4208  // Any non-2xx status code is an error. Response headers are in either
  4209  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4210  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4211  // whether the returned error was because http.StatusNotModified was returned.
  4212  func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4213  	gensupport.SetOptions(c.urlParams_, opts...)
  4214  	res, err := c.doRequest("json")
  4215  	if res != nil && res.StatusCode == http.StatusNotModified {
  4216  		if res.Body != nil {
  4217  			res.Body.Close()
  4218  		}
  4219  		return nil, gensupport.WrapError(&googleapi.Error{
  4220  			Code:   res.StatusCode,
  4221  			Header: res.Header,
  4222  		})
  4223  	}
  4224  	if err != nil {
  4225  		return nil, err
  4226  	}
  4227  	defer googleapi.CloseBody(res)
  4228  	if err := googleapi.CheckResponse(res); err != nil {
  4229  		return nil, gensupport.WrapError(err)
  4230  	}
  4231  	ret := &Operation{
  4232  		ServerResponse: googleapi.ServerResponse{
  4233  			Header:         res.Header,
  4234  			HTTPStatusCode: res.StatusCode,
  4235  		},
  4236  	}
  4237  	target := &ret
  4238  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4239  		return nil, err
  4240  	}
  4241  	return ret, nil
  4242  }
  4243  
  4244  type ProjectsLocationsRepositoriesGetCall struct {
  4245  	s            *Service
  4246  	name         string
  4247  	urlParams_   gensupport.URLParams
  4248  	ifNoneMatch_ string
  4249  	ctx_         context.Context
  4250  	header_      http.Header
  4251  }
  4252  
  4253  // Get: Gets a repository.
  4254  //
  4255  // - name: The name of the repository to retrieve.
  4256  func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall {
  4257  	c := &ProjectsLocationsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4258  	c.name = name
  4259  	return c
  4260  }
  4261  
  4262  // Fields allows partial responses to be retrieved. See
  4263  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4264  // details.
  4265  func (c *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall {
  4266  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4267  	return c
  4268  }
  4269  
  4270  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4271  // object's ETag matches the given value. This is useful for getting updates
  4272  // only after the object has changed since the last request.
  4273  func (c *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall {
  4274  	c.ifNoneMatch_ = entityTag
  4275  	return c
  4276  }
  4277  
  4278  // Context sets the context to be used in this call's Do method.
  4279  func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall {
  4280  	c.ctx_ = ctx
  4281  	return c
  4282  }
  4283  
  4284  // Header returns a http.Header that can be modified by the caller to add
  4285  // headers to the request.
  4286  func (c *ProjectsLocationsRepositoriesGetCall) Header() http.Header {
  4287  	if c.header_ == nil {
  4288  		c.header_ = make(http.Header)
  4289  	}
  4290  	return c.header_
  4291  }
  4292  
  4293  func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) {
  4294  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4295  	if c.ifNoneMatch_ != "" {
  4296  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4297  	}
  4298  	var body io.Reader = nil
  4299  	c.urlParams_.Set("alt", alt)
  4300  	c.urlParams_.Set("prettyPrint", "false")
  4301  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4302  	urls += "?" + c.urlParams_.Encode()
  4303  	req, err := http.NewRequest("GET", urls, body)
  4304  	if err != nil {
  4305  		return nil, err
  4306  	}
  4307  	req.Header = reqHeaders
  4308  	googleapi.Expand(req.URL, map[string]string{
  4309  		"name": c.name,
  4310  	})
  4311  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4312  }
  4313  
  4314  // Do executes the "artifactregistry.projects.locations.repositories.get" call.
  4315  // Any non-2xx status code is an error. Response headers are in either
  4316  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  4317  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4318  // whether the returned error was because http.StatusNotModified was returned.
  4319  func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  4320  	gensupport.SetOptions(c.urlParams_, opts...)
  4321  	res, err := c.doRequest("json")
  4322  	if res != nil && res.StatusCode == http.StatusNotModified {
  4323  		if res.Body != nil {
  4324  			res.Body.Close()
  4325  		}
  4326  		return nil, gensupport.WrapError(&googleapi.Error{
  4327  			Code:   res.StatusCode,
  4328  			Header: res.Header,
  4329  		})
  4330  	}
  4331  	if err != nil {
  4332  		return nil, err
  4333  	}
  4334  	defer googleapi.CloseBody(res)
  4335  	if err := googleapi.CheckResponse(res); err != nil {
  4336  		return nil, gensupport.WrapError(err)
  4337  	}
  4338  	ret := &Repository{
  4339  		ServerResponse: googleapi.ServerResponse{
  4340  			Header:         res.Header,
  4341  			HTTPStatusCode: res.StatusCode,
  4342  		},
  4343  	}
  4344  	target := &ret
  4345  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4346  		return nil, err
  4347  	}
  4348  	return ret, nil
  4349  }
  4350  
  4351  type ProjectsLocationsRepositoriesGetIamPolicyCall struct {
  4352  	s            *Service
  4353  	resource     string
  4354  	urlParams_   gensupport.URLParams
  4355  	ifNoneMatch_ string
  4356  	ctx_         context.Context
  4357  	header_      http.Header
  4358  }
  4359  
  4360  // GetIamPolicy: Gets the IAM policy for a given resource.
  4361  //
  4362  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4363  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4364  //     for the appropriate value for this field.
  4365  func (r *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  4366  	c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4367  	c.resource = resource
  4368  	return c
  4369  }
  4370  
  4371  // OptionsRequestedPolicyVersion sets the optional parameter
  4372  // "options.requestedPolicyVersion": The maximum policy version that will be
  4373  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4374  // an invalid value will be rejected. Requests for policies with any
  4375  // conditional role bindings must specify version 3. Policies with no
  4376  // conditional role bindings may specify any valid value or leave the field
  4377  // unset. The policy in the response might use the policy version that you
  4378  // specified, or it might use a lower policy version. For example, if you
  4379  // specify version 3, but the policy has no conditional role bindings, the
  4380  // response uses version 1. To learn which resources support conditions in
  4381  // their IAM policies, see the IAM documentation
  4382  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4383  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  4384  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4385  	return c
  4386  }
  4387  
  4388  // Fields allows partial responses to be retrieved. See
  4389  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4390  // details.
  4391  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  4392  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4393  	return c
  4394  }
  4395  
  4396  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4397  // object's ETag matches the given value. This is useful for getting updates
  4398  // only after the object has changed since the last request.
  4399  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  4400  	c.ifNoneMatch_ = entityTag
  4401  	return c
  4402  }
  4403  
  4404  // Context sets the context to be used in this call's Do method.
  4405  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  4406  	c.ctx_ = ctx
  4407  	return c
  4408  }
  4409  
  4410  // Header returns a http.Header that can be modified by the caller to add
  4411  // headers to the request.
  4412  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header {
  4413  	if c.header_ == nil {
  4414  		c.header_ = make(http.Header)
  4415  	}
  4416  	return c.header_
  4417  }
  4418  
  4419  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4420  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4421  	if c.ifNoneMatch_ != "" {
  4422  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4423  	}
  4424  	var body io.Reader = nil
  4425  	c.urlParams_.Set("alt", alt)
  4426  	c.urlParams_.Set("prettyPrint", "false")
  4427  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4428  	urls += "?" + c.urlParams_.Encode()
  4429  	req, err := http.NewRequest("GET", urls, body)
  4430  	if err != nil {
  4431  		return nil, err
  4432  	}
  4433  	req.Header = reqHeaders
  4434  	googleapi.Expand(req.URL, map[string]string{
  4435  		"resource": c.resource,
  4436  	})
  4437  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4438  }
  4439  
  4440  // Do executes the "artifactregistry.projects.locations.repositories.getIamPolicy" call.
  4441  // Any non-2xx status code is an error. Response headers are in either
  4442  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4443  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4444  // whether the returned error was because http.StatusNotModified was returned.
  4445  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4446  	gensupport.SetOptions(c.urlParams_, opts...)
  4447  	res, err := c.doRequest("json")
  4448  	if res != nil && res.StatusCode == http.StatusNotModified {
  4449  		if res.Body != nil {
  4450  			res.Body.Close()
  4451  		}
  4452  		return nil, gensupport.WrapError(&googleapi.Error{
  4453  			Code:   res.StatusCode,
  4454  			Header: res.Header,
  4455  		})
  4456  	}
  4457  	if err != nil {
  4458  		return nil, err
  4459  	}
  4460  	defer googleapi.CloseBody(res)
  4461  	if err := googleapi.CheckResponse(res); err != nil {
  4462  		return nil, gensupport.WrapError(err)
  4463  	}
  4464  	ret := &Policy{
  4465  		ServerResponse: googleapi.ServerResponse{
  4466  			Header:         res.Header,
  4467  			HTTPStatusCode: res.StatusCode,
  4468  		},
  4469  	}
  4470  	target := &ret
  4471  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4472  		return nil, err
  4473  	}
  4474  	return ret, nil
  4475  }
  4476  
  4477  type ProjectsLocationsRepositoriesListCall struct {
  4478  	s            *Service
  4479  	parent       string
  4480  	urlParams_   gensupport.URLParams
  4481  	ifNoneMatch_ string
  4482  	ctx_         context.Context
  4483  	header_      http.Header
  4484  }
  4485  
  4486  // List: Lists repositories.
  4487  //
  4488  // - parent: The name of the parent resource whose repositories will be listed.
  4489  func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall {
  4490  	c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4491  	c.parent = parent
  4492  	return c
  4493  }
  4494  
  4495  // PageSize sets the optional parameter "pageSize": The maximum number of
  4496  // repositories to return. Maximum page size is 1,000.
  4497  func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall {
  4498  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4499  	return c
  4500  }
  4501  
  4502  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4503  // returned from a previous list request, if any.
  4504  func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall {
  4505  	c.urlParams_.Set("pageToken", pageToken)
  4506  	return c
  4507  }
  4508  
  4509  // Fields allows partial responses to be retrieved. See
  4510  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4511  // details.
  4512  func (c *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall {
  4513  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4514  	return c
  4515  }
  4516  
  4517  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4518  // object's ETag matches the given value. This is useful for getting updates
  4519  // only after the object has changed since the last request.
  4520  func (c *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall {
  4521  	c.ifNoneMatch_ = entityTag
  4522  	return c
  4523  }
  4524  
  4525  // Context sets the context to be used in this call's Do method.
  4526  func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall {
  4527  	c.ctx_ = ctx
  4528  	return c
  4529  }
  4530  
  4531  // Header returns a http.Header that can be modified by the caller to add
  4532  // headers to the request.
  4533  func (c *ProjectsLocationsRepositoriesListCall) Header() http.Header {
  4534  	if c.header_ == nil {
  4535  		c.header_ = make(http.Header)
  4536  	}
  4537  	return c.header_
  4538  }
  4539  
  4540  func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) {
  4541  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4542  	if c.ifNoneMatch_ != "" {
  4543  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4544  	}
  4545  	var body io.Reader = nil
  4546  	c.urlParams_.Set("alt", alt)
  4547  	c.urlParams_.Set("prettyPrint", "false")
  4548  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repositories")
  4549  	urls += "?" + c.urlParams_.Encode()
  4550  	req, err := http.NewRequest("GET", urls, body)
  4551  	if err != nil {
  4552  		return nil, err
  4553  	}
  4554  	req.Header = reqHeaders
  4555  	googleapi.Expand(req.URL, map[string]string{
  4556  		"parent": c.parent,
  4557  	})
  4558  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4559  }
  4560  
  4561  // Do executes the "artifactregistry.projects.locations.repositories.list" call.
  4562  // Any non-2xx status code is an error. Response headers are in either
  4563  // *ListRepositoriesResponse.ServerResponse.Header or (if a response was
  4564  // returned at all) in error.(*googleapi.Error).Header. Use
  4565  // googleapi.IsNotModified to check whether the returned error was because
  4566  // http.StatusNotModified was returned.
  4567  func (c *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) {
  4568  	gensupport.SetOptions(c.urlParams_, opts...)
  4569  	res, err := c.doRequest("json")
  4570  	if res != nil && res.StatusCode == http.StatusNotModified {
  4571  		if res.Body != nil {
  4572  			res.Body.Close()
  4573  		}
  4574  		return nil, gensupport.WrapError(&googleapi.Error{
  4575  			Code:   res.StatusCode,
  4576  			Header: res.Header,
  4577  		})
  4578  	}
  4579  	if err != nil {
  4580  		return nil, err
  4581  	}
  4582  	defer googleapi.CloseBody(res)
  4583  	if err := googleapi.CheckResponse(res); err != nil {
  4584  		return nil, gensupport.WrapError(err)
  4585  	}
  4586  	ret := &ListRepositoriesResponse{
  4587  		ServerResponse: googleapi.ServerResponse{
  4588  			Header:         res.Header,
  4589  			HTTPStatusCode: res.StatusCode,
  4590  		},
  4591  	}
  4592  	target := &ret
  4593  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4594  		return nil, err
  4595  	}
  4596  	return ret, nil
  4597  }
  4598  
  4599  // Pages invokes f for each page of results.
  4600  // A non-nil error returned from f will halt the iteration.
  4601  // The provided context supersedes any context provided to the Context method.
  4602  func (c *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error {
  4603  	c.ctx_ = ctx
  4604  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4605  	for {
  4606  		x, err := c.Do()
  4607  		if err != nil {
  4608  			return err
  4609  		}
  4610  		if err := f(x); err != nil {
  4611  			return err
  4612  		}
  4613  		if x.NextPageToken == "" {
  4614  			return nil
  4615  		}
  4616  		c.PageToken(x.NextPageToken)
  4617  	}
  4618  }
  4619  
  4620  type ProjectsLocationsRepositoriesPatchCall struct {
  4621  	s          *Service
  4622  	name       string
  4623  	repository *Repository
  4624  	urlParams_ gensupport.URLParams
  4625  	ctx_       context.Context
  4626  	header_    http.Header
  4627  }
  4628  
  4629  // Patch: Updates a repository.
  4630  //
  4631  //   - name: The name of the repository, for example:
  4632  //     `projects/p1/locations/us-central1/repositories/repo1`. For each location
  4633  //     in a project, repository names must be unique.
  4634  func (r *ProjectsLocationsRepositoriesService) Patch(name string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall {
  4635  	c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4636  	c.name = name
  4637  	c.repository = repository
  4638  	return c
  4639  }
  4640  
  4641  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  4642  // to the resource. For the `FieldMask` definition, see
  4643  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  4644  func (c *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall {
  4645  	c.urlParams_.Set("updateMask", updateMask)
  4646  	return c
  4647  }
  4648  
  4649  // Fields allows partial responses to be retrieved. See
  4650  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4651  // details.
  4652  func (c *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall {
  4653  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4654  	return c
  4655  }
  4656  
  4657  // Context sets the context to be used in this call's Do method.
  4658  func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall {
  4659  	c.ctx_ = ctx
  4660  	return c
  4661  }
  4662  
  4663  // Header returns a http.Header that can be modified by the caller to add
  4664  // headers to the request.
  4665  func (c *ProjectsLocationsRepositoriesPatchCall) Header() http.Header {
  4666  	if c.header_ == nil {
  4667  		c.header_ = make(http.Header)
  4668  	}
  4669  	return c.header_
  4670  }
  4671  
  4672  func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) {
  4673  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4674  	var body io.Reader = nil
  4675  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  4676  	if err != nil {
  4677  		return nil, err
  4678  	}
  4679  	c.urlParams_.Set("alt", alt)
  4680  	c.urlParams_.Set("prettyPrint", "false")
  4681  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4682  	urls += "?" + c.urlParams_.Encode()
  4683  	req, err := http.NewRequest("PATCH", urls, body)
  4684  	if err != nil {
  4685  		return nil, err
  4686  	}
  4687  	req.Header = reqHeaders
  4688  	googleapi.Expand(req.URL, map[string]string{
  4689  		"name": c.name,
  4690  	})
  4691  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4692  }
  4693  
  4694  // Do executes the "artifactregistry.projects.locations.repositories.patch" call.
  4695  // Any non-2xx status code is an error. Response headers are in either
  4696  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  4697  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4698  // whether the returned error was because http.StatusNotModified was returned.
  4699  func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  4700  	gensupport.SetOptions(c.urlParams_, opts...)
  4701  	res, err := c.doRequest("json")
  4702  	if res != nil && res.StatusCode == http.StatusNotModified {
  4703  		if res.Body != nil {
  4704  			res.Body.Close()
  4705  		}
  4706  		return nil, gensupport.WrapError(&googleapi.Error{
  4707  			Code:   res.StatusCode,
  4708  			Header: res.Header,
  4709  		})
  4710  	}
  4711  	if err != nil {
  4712  		return nil, err
  4713  	}
  4714  	defer googleapi.CloseBody(res)
  4715  	if err := googleapi.CheckResponse(res); err != nil {
  4716  		return nil, gensupport.WrapError(err)
  4717  	}
  4718  	ret := &Repository{
  4719  		ServerResponse: googleapi.ServerResponse{
  4720  			Header:         res.Header,
  4721  			HTTPStatusCode: res.StatusCode,
  4722  		},
  4723  	}
  4724  	target := &ret
  4725  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4726  		return nil, err
  4727  	}
  4728  	return ret, nil
  4729  }
  4730  
  4731  type ProjectsLocationsRepositoriesSetIamPolicyCall struct {
  4732  	s                   *Service
  4733  	resource            string
  4734  	setiampolicyrequest *SetIamPolicyRequest
  4735  	urlParams_          gensupport.URLParams
  4736  	ctx_                context.Context
  4737  	header_             http.Header
  4738  }
  4739  
  4740  // SetIamPolicy: Updates the IAM policy for a given resource.
  4741  //
  4742  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4743  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4744  //     for the appropriate value for this field.
  4745  func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  4746  	c := &ProjectsLocationsRepositoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4747  	c.resource = resource
  4748  	c.setiampolicyrequest = setiampolicyrequest
  4749  	return c
  4750  }
  4751  
  4752  // Fields allows partial responses to be retrieved. See
  4753  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4754  // details.
  4755  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  4756  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4757  	return c
  4758  }
  4759  
  4760  // Context sets the context to be used in this call's Do method.
  4761  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  4762  	c.ctx_ = ctx
  4763  	return c
  4764  }
  4765  
  4766  // Header returns a http.Header that can be modified by the caller to add
  4767  // headers to the request.
  4768  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header {
  4769  	if c.header_ == nil {
  4770  		c.header_ = make(http.Header)
  4771  	}
  4772  	return c.header_
  4773  }
  4774  
  4775  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4776  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4777  	var body io.Reader = nil
  4778  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4779  	if err != nil {
  4780  		return nil, err
  4781  	}
  4782  	c.urlParams_.Set("alt", alt)
  4783  	c.urlParams_.Set("prettyPrint", "false")
  4784  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4785  	urls += "?" + c.urlParams_.Encode()
  4786  	req, err := http.NewRequest("POST", urls, body)
  4787  	if err != nil {
  4788  		return nil, err
  4789  	}
  4790  	req.Header = reqHeaders
  4791  	googleapi.Expand(req.URL, map[string]string{
  4792  		"resource": c.resource,
  4793  	})
  4794  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4795  }
  4796  
  4797  // Do executes the "artifactregistry.projects.locations.repositories.setIamPolicy" call.
  4798  // Any non-2xx status code is an error. Response headers are in either
  4799  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4800  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4801  // whether the returned error was because http.StatusNotModified was returned.
  4802  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4803  	gensupport.SetOptions(c.urlParams_, opts...)
  4804  	res, err := c.doRequest("json")
  4805  	if res != nil && res.StatusCode == http.StatusNotModified {
  4806  		if res.Body != nil {
  4807  			res.Body.Close()
  4808  		}
  4809  		return nil, gensupport.WrapError(&googleapi.Error{
  4810  			Code:   res.StatusCode,
  4811  			Header: res.Header,
  4812  		})
  4813  	}
  4814  	if err != nil {
  4815  		return nil, err
  4816  	}
  4817  	defer googleapi.CloseBody(res)
  4818  	if err := googleapi.CheckResponse(res); err != nil {
  4819  		return nil, gensupport.WrapError(err)
  4820  	}
  4821  	ret := &Policy{
  4822  		ServerResponse: googleapi.ServerResponse{
  4823  			Header:         res.Header,
  4824  			HTTPStatusCode: res.StatusCode,
  4825  		},
  4826  	}
  4827  	target := &ret
  4828  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4829  		return nil, err
  4830  	}
  4831  	return ret, nil
  4832  }
  4833  
  4834  type ProjectsLocationsRepositoriesTestIamPermissionsCall struct {
  4835  	s                         *Service
  4836  	resource                  string
  4837  	testiampermissionsrequest *TestIamPermissionsRequest
  4838  	urlParams_                gensupport.URLParams
  4839  	ctx_                      context.Context
  4840  	header_                   http.Header
  4841  }
  4842  
  4843  // TestIamPermissions: Tests if the caller has a list of permissions on a
  4844  // resource.
  4845  //
  4846  //   - resource: REQUIRED: The resource for which the policy detail is being
  4847  //     requested. See Resource names
  4848  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4849  //     value for this field.
  4850  func (r *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  4851  	c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4852  	c.resource = resource
  4853  	c.testiampermissionsrequest = testiampermissionsrequest
  4854  	return c
  4855  }
  4856  
  4857  // Fields allows partial responses to be retrieved. See
  4858  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4859  // details.
  4860  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  4861  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4862  	return c
  4863  }
  4864  
  4865  // Context sets the context to be used in this call's Do method.
  4866  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  4867  	c.ctx_ = ctx
  4868  	return c
  4869  }
  4870  
  4871  // Header returns a http.Header that can be modified by the caller to add
  4872  // headers to the request.
  4873  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header {
  4874  	if c.header_ == nil {
  4875  		c.header_ = make(http.Header)
  4876  	}
  4877  	return c.header_
  4878  }
  4879  
  4880  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4881  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4882  	var body io.Reader = nil
  4883  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4884  	if err != nil {
  4885  		return nil, err
  4886  	}
  4887  	c.urlParams_.Set("alt", alt)
  4888  	c.urlParams_.Set("prettyPrint", "false")
  4889  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4890  	urls += "?" + c.urlParams_.Encode()
  4891  	req, err := http.NewRequest("POST", urls, body)
  4892  	if err != nil {
  4893  		return nil, err
  4894  	}
  4895  	req.Header = reqHeaders
  4896  	googleapi.Expand(req.URL, map[string]string{
  4897  		"resource": c.resource,
  4898  	})
  4899  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4900  }
  4901  
  4902  // Do executes the "artifactregistry.projects.locations.repositories.testIamPermissions" call.
  4903  // Any non-2xx status code is an error. Response headers are in either
  4904  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4905  // returned at all) in error.(*googleapi.Error).Header. Use
  4906  // googleapi.IsNotModified to check whether the returned error was because
  4907  // http.StatusNotModified was returned.
  4908  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4909  	gensupport.SetOptions(c.urlParams_, opts...)
  4910  	res, err := c.doRequest("json")
  4911  	if res != nil && res.StatusCode == http.StatusNotModified {
  4912  		if res.Body != nil {
  4913  			res.Body.Close()
  4914  		}
  4915  		return nil, gensupport.WrapError(&googleapi.Error{
  4916  			Code:   res.StatusCode,
  4917  			Header: res.Header,
  4918  		})
  4919  	}
  4920  	if err != nil {
  4921  		return nil, err
  4922  	}
  4923  	defer googleapi.CloseBody(res)
  4924  	if err := googleapi.CheckResponse(res); err != nil {
  4925  		return nil, gensupport.WrapError(err)
  4926  	}
  4927  	ret := &TestIamPermissionsResponse{
  4928  		ServerResponse: googleapi.ServerResponse{
  4929  			Header:         res.Header,
  4930  			HTTPStatusCode: res.StatusCode,
  4931  		},
  4932  	}
  4933  	target := &ret
  4934  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4935  		return nil, err
  4936  	}
  4937  	return ret, nil
  4938  }
  4939  
  4940  type ProjectsLocationsRepositoriesAptArtifactsImportCall struct {
  4941  	s                         *Service
  4942  	parent                    string
  4943  	importaptartifactsrequest *ImportAptArtifactsRequest
  4944  	urlParams_                gensupport.URLParams
  4945  	ctx_                      context.Context
  4946  	header_                   http.Header
  4947  }
  4948  
  4949  // Import: Imports Apt artifacts. The returned Operation will complete once the
  4950  // resources are imported. Package, Version, and File resources are created
  4951  // based on the imported artifacts. Imported artifacts that conflict with
  4952  // existing resources are ignored.
  4953  //
  4954  //   - parent: The name of the parent resource where the artifacts will be
  4955  //     imported.
  4956  func (r *ProjectsLocationsRepositoriesAptArtifactsService) Import(parent string, importaptartifactsrequest *ImportAptArtifactsRequest) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  4957  	c := &ProjectsLocationsRepositoriesAptArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4958  	c.parent = parent
  4959  	c.importaptartifactsrequest = importaptartifactsrequest
  4960  	return c
  4961  }
  4962  
  4963  // Fields allows partial responses to be retrieved. See
  4964  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4965  // details.
  4966  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  4967  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4968  	return c
  4969  }
  4970  
  4971  // Context sets the context to be used in this call's Do method.
  4972  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  4973  	c.ctx_ = ctx
  4974  	return c
  4975  }
  4976  
  4977  // Header returns a http.Header that can be modified by the caller to add
  4978  // headers to the request.
  4979  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Header() http.Header {
  4980  	if c.header_ == nil {
  4981  		c.header_ = make(http.Header)
  4982  	}
  4983  	return c.header_
  4984  }
  4985  
  4986  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) doRequest(alt string) (*http.Response, error) {
  4987  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4988  	var body io.Reader = nil
  4989  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importaptartifactsrequest)
  4990  	if err != nil {
  4991  		return nil, err
  4992  	}
  4993  	c.urlParams_.Set("alt", alt)
  4994  	c.urlParams_.Set("prettyPrint", "false")
  4995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aptArtifacts:import")
  4996  	urls += "?" + c.urlParams_.Encode()
  4997  	req, err := http.NewRequest("POST", urls, body)
  4998  	if err != nil {
  4999  		return nil, err
  5000  	}
  5001  	req.Header = reqHeaders
  5002  	googleapi.Expand(req.URL, map[string]string{
  5003  		"parent": c.parent,
  5004  	})
  5005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5006  }
  5007  
  5008  // Do executes the "artifactregistry.projects.locations.repositories.aptArtifacts.import" call.
  5009  // Any non-2xx status code is an error. Response headers are in either
  5010  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5011  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5012  // whether the returned error was because http.StatusNotModified was returned.
  5013  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5014  	gensupport.SetOptions(c.urlParams_, opts...)
  5015  	res, err := c.doRequest("json")
  5016  	if res != nil && res.StatusCode == http.StatusNotModified {
  5017  		if res.Body != nil {
  5018  			res.Body.Close()
  5019  		}
  5020  		return nil, gensupport.WrapError(&googleapi.Error{
  5021  			Code:   res.StatusCode,
  5022  			Header: res.Header,
  5023  		})
  5024  	}
  5025  	if err != nil {
  5026  		return nil, err
  5027  	}
  5028  	defer googleapi.CloseBody(res)
  5029  	if err := googleapi.CheckResponse(res); err != nil {
  5030  		return nil, gensupport.WrapError(err)
  5031  	}
  5032  	ret := &Operation{
  5033  		ServerResponse: googleapi.ServerResponse{
  5034  			Header:         res.Header,
  5035  			HTTPStatusCode: res.StatusCode,
  5036  		},
  5037  	}
  5038  	target := &ret
  5039  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5040  		return nil, err
  5041  	}
  5042  	return ret, nil
  5043  }
  5044  
  5045  type ProjectsLocationsRepositoriesAptArtifactsUploadCall struct {
  5046  	s                        *Service
  5047  	parent                   string
  5048  	uploadaptartifactrequest *UploadAptArtifactRequest
  5049  	urlParams_               gensupport.URLParams
  5050  	mediaInfo_               *gensupport.MediaInfo
  5051  	ctx_                     context.Context
  5052  	header_                  http.Header
  5053  }
  5054  
  5055  // Upload: Directly uploads an Apt artifact. The returned Operation will
  5056  // complete once the resources are uploaded. Package, Version, and File
  5057  // resources are created based on the imported artifact. Imported artifacts
  5058  // that conflict with existing resources are ignored.
  5059  //
  5060  //   - parent: The name of the parent resource where the artifacts will be
  5061  //     uploaded.
  5062  func (r *ProjectsLocationsRepositoriesAptArtifactsService) Upload(parent string, uploadaptartifactrequest *UploadAptArtifactRequest) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5063  	c := &ProjectsLocationsRepositoriesAptArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5064  	c.parent = parent
  5065  	c.uploadaptartifactrequest = uploadaptartifactrequest
  5066  	return c
  5067  }
  5068  
  5069  // Media specifies the media to upload in one or more chunks. The chunk size
  5070  // may be controlled by supplying a MediaOption generated by
  5071  // googleapi.ChunkSize. The chunk size defaults to
  5072  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  5073  // request will be determined by sniffing the contents of r, unless a
  5074  // MediaOption generated by googleapi.ContentType is supplied.
  5075  // At most one of Media and ResumableMedia may be set.
  5076  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5077  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  5078  	return c
  5079  }
  5080  
  5081  // ResumableMedia specifies the media to upload in chunks and can be canceled
  5082  // with ctx.
  5083  //
  5084  // Deprecated: use Media instead.
  5085  //
  5086  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  5087  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  5088  // will be auto-detected. The provided ctx will supersede any context
  5089  // previously provided to the Context method.
  5090  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5091  	c.ctx_ = ctx
  5092  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  5093  	return c
  5094  }
  5095  
  5096  // ProgressUpdater provides a callback function that will be called after every
  5097  // chunk. It should be a low-latency function in order to not slow down the
  5098  // upload operation. This should only be called when using ResumableMedia (as
  5099  // opposed to Media).
  5100  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5101  	c.mediaInfo_.SetProgressUpdater(pu)
  5102  	return c
  5103  }
  5104  
  5105  // Fields allows partial responses to be retrieved. See
  5106  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5107  // details.
  5108  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5109  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5110  	return c
  5111  }
  5112  
  5113  // Context sets the context to be used in this call's Do method.
  5114  // This context will supersede any context previously provided to the
  5115  // ResumableMedia method.
  5116  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  5117  	c.ctx_ = ctx
  5118  	return c
  5119  }
  5120  
  5121  // Header returns a http.Header that can be modified by the caller to add
  5122  // headers to the request.
  5123  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Header() http.Header {
  5124  	if c.header_ == nil {
  5125  		c.header_ = make(http.Header)
  5126  	}
  5127  	return c.header_
  5128  }
  5129  
  5130  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  5131  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5132  	var body io.Reader = nil
  5133  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadaptartifactrequest)
  5134  	if err != nil {
  5135  		return nil, err
  5136  	}
  5137  	c.urlParams_.Set("alt", alt)
  5138  	c.urlParams_.Set("prettyPrint", "false")
  5139  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aptArtifacts:create")
  5140  	if c.mediaInfo_ != nil {
  5141  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/aptArtifacts:create")
  5142  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  5143  	}
  5144  	if body == nil {
  5145  		body = new(bytes.Buffer)
  5146  		reqHeaders.Set("Content-Type", "application/json")
  5147  	}
  5148  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  5149  	defer cleanup()
  5150  	urls += "?" + c.urlParams_.Encode()
  5151  	req, err := http.NewRequest("POST", urls, body)
  5152  	if err != nil {
  5153  		return nil, err
  5154  	}
  5155  	req.Header = reqHeaders
  5156  	req.GetBody = getBody
  5157  	googleapi.Expand(req.URL, map[string]string{
  5158  		"parent": c.parent,
  5159  	})
  5160  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5161  }
  5162  
  5163  // Do executes the "artifactregistry.projects.locations.repositories.aptArtifacts.upload" call.
  5164  // Any non-2xx status code is an error. Response headers are in either
  5165  // *UploadAptArtifactMediaResponse.ServerResponse.Header or (if a response was
  5166  // returned at all) in error.(*googleapi.Error).Header. Use
  5167  // googleapi.IsNotModified to check whether the returned error was because
  5168  // http.StatusNotModified was returned.
  5169  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadAptArtifactMediaResponse, error) {
  5170  	gensupport.SetOptions(c.urlParams_, opts...)
  5171  	res, err := c.doRequest("json")
  5172  	if res != nil && res.StatusCode == http.StatusNotModified {
  5173  		if res.Body != nil {
  5174  			res.Body.Close()
  5175  		}
  5176  		return nil, gensupport.WrapError(&googleapi.Error{
  5177  			Code:   res.StatusCode,
  5178  			Header: res.Header,
  5179  		})
  5180  	}
  5181  	if err != nil {
  5182  		return nil, err
  5183  	}
  5184  	defer googleapi.CloseBody(res)
  5185  	if err := googleapi.CheckResponse(res); err != nil {
  5186  		return nil, gensupport.WrapError(err)
  5187  	}
  5188  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  5189  	if rx != nil {
  5190  		rx.Client = c.s.client
  5191  		rx.UserAgent = c.s.userAgent()
  5192  		ctx := c.ctx_
  5193  		if ctx == nil {
  5194  			ctx = context.TODO()
  5195  		}
  5196  		res, err = rx.Upload(ctx)
  5197  		if err != nil {
  5198  			return nil, err
  5199  		}
  5200  		defer res.Body.Close()
  5201  		if err := googleapi.CheckResponse(res); err != nil {
  5202  			return nil, gensupport.WrapError(err)
  5203  		}
  5204  	}
  5205  	ret := &UploadAptArtifactMediaResponse{
  5206  		ServerResponse: googleapi.ServerResponse{
  5207  			Header:         res.Header,
  5208  			HTTPStatusCode: res.StatusCode,
  5209  		},
  5210  	}
  5211  	target := &ret
  5212  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5213  		return nil, err
  5214  	}
  5215  	return ret, nil
  5216  }
  5217  
  5218  type ProjectsLocationsRepositoriesDockerImagesGetCall struct {
  5219  	s            *Service
  5220  	name         string
  5221  	urlParams_   gensupport.URLParams
  5222  	ifNoneMatch_ string
  5223  	ctx_         context.Context
  5224  	header_      http.Header
  5225  }
  5226  
  5227  // Get: Gets a docker image.
  5228  //
  5229  // - name: The name of the docker images.
  5230  func (r *ProjectsLocationsRepositoriesDockerImagesService) Get(name string) *ProjectsLocationsRepositoriesDockerImagesGetCall {
  5231  	c := &ProjectsLocationsRepositoriesDockerImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5232  	c.name = name
  5233  	return c
  5234  }
  5235  
  5236  // Fields allows partial responses to be retrieved. See
  5237  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5238  // details.
  5239  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDockerImagesGetCall {
  5240  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5241  	return c
  5242  }
  5243  
  5244  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5245  // object's ETag matches the given value. This is useful for getting updates
  5246  // only after the object has changed since the last request.
  5247  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesDockerImagesGetCall {
  5248  	c.ifNoneMatch_ = entityTag
  5249  	return c
  5250  }
  5251  
  5252  // Context sets the context to be used in this call's Do method.
  5253  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDockerImagesGetCall {
  5254  	c.ctx_ = ctx
  5255  	return c
  5256  }
  5257  
  5258  // Header returns a http.Header that can be modified by the caller to add
  5259  // headers to the request.
  5260  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) Header() http.Header {
  5261  	if c.header_ == nil {
  5262  		c.header_ = make(http.Header)
  5263  	}
  5264  	return c.header_
  5265  }
  5266  
  5267  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) doRequest(alt string) (*http.Response, error) {
  5268  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5269  	if c.ifNoneMatch_ != "" {
  5270  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5271  	}
  5272  	var body io.Reader = nil
  5273  	c.urlParams_.Set("alt", alt)
  5274  	c.urlParams_.Set("prettyPrint", "false")
  5275  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5276  	urls += "?" + c.urlParams_.Encode()
  5277  	req, err := http.NewRequest("GET", urls, body)
  5278  	if err != nil {
  5279  		return nil, err
  5280  	}
  5281  	req.Header = reqHeaders
  5282  	googleapi.Expand(req.URL, map[string]string{
  5283  		"name": c.name,
  5284  	})
  5285  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5286  }
  5287  
  5288  // Do executes the "artifactregistry.projects.locations.repositories.dockerImages.get" call.
  5289  // Any non-2xx status code is an error. Response headers are in either
  5290  // *DockerImage.ServerResponse.Header or (if a response was returned at all) in
  5291  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5292  // whether the returned error was because http.StatusNotModified was returned.
  5293  func (c *ProjectsLocationsRepositoriesDockerImagesGetCall) Do(opts ...googleapi.CallOption) (*DockerImage, error) {
  5294  	gensupport.SetOptions(c.urlParams_, opts...)
  5295  	res, err := c.doRequest("json")
  5296  	if res != nil && res.StatusCode == http.StatusNotModified {
  5297  		if res.Body != nil {
  5298  			res.Body.Close()
  5299  		}
  5300  		return nil, gensupport.WrapError(&googleapi.Error{
  5301  			Code:   res.StatusCode,
  5302  			Header: res.Header,
  5303  		})
  5304  	}
  5305  	if err != nil {
  5306  		return nil, err
  5307  	}
  5308  	defer googleapi.CloseBody(res)
  5309  	if err := googleapi.CheckResponse(res); err != nil {
  5310  		return nil, gensupport.WrapError(err)
  5311  	}
  5312  	ret := &DockerImage{
  5313  		ServerResponse: googleapi.ServerResponse{
  5314  			Header:         res.Header,
  5315  			HTTPStatusCode: res.StatusCode,
  5316  		},
  5317  	}
  5318  	target := &ret
  5319  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5320  		return nil, err
  5321  	}
  5322  	return ret, nil
  5323  }
  5324  
  5325  type ProjectsLocationsRepositoriesDockerImagesListCall struct {
  5326  	s            *Service
  5327  	parent       string
  5328  	urlParams_   gensupport.URLParams
  5329  	ifNoneMatch_ string
  5330  	ctx_         context.Context
  5331  	header_      http.Header
  5332  }
  5333  
  5334  // List: Lists docker images.
  5335  //
  5336  //   - parent: The name of the parent resource whose docker images will be
  5337  //     listed.
  5338  func (r *ProjectsLocationsRepositoriesDockerImagesService) List(parent string) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5339  	c := &ProjectsLocationsRepositoriesDockerImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5340  	c.parent = parent
  5341  	return c
  5342  }
  5343  
  5344  // OrderBy sets the optional parameter "orderBy": The field to order the
  5345  // results by.
  5346  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5347  	c.urlParams_.Set("orderBy", orderBy)
  5348  	return c
  5349  }
  5350  
  5351  // PageSize sets the optional parameter "pageSize": The maximum number of
  5352  // artifacts to return.
  5353  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5354  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5355  	return c
  5356  }
  5357  
  5358  // PageToken sets the optional parameter "pageToken": The next_page_token value
  5359  // returned from a previous list request, if any.
  5360  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5361  	c.urlParams_.Set("pageToken", pageToken)
  5362  	return c
  5363  }
  5364  
  5365  // Fields allows partial responses to be retrieved. See
  5366  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5367  // details.
  5368  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5369  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5370  	return c
  5371  }
  5372  
  5373  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5374  // object's ETag matches the given value. This is useful for getting updates
  5375  // only after the object has changed since the last request.
  5376  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5377  	c.ifNoneMatch_ = entityTag
  5378  	return c
  5379  }
  5380  
  5381  // Context sets the context to be used in this call's Do method.
  5382  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDockerImagesListCall {
  5383  	c.ctx_ = ctx
  5384  	return c
  5385  }
  5386  
  5387  // Header returns a http.Header that can be modified by the caller to add
  5388  // headers to the request.
  5389  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) Header() http.Header {
  5390  	if c.header_ == nil {
  5391  		c.header_ = make(http.Header)
  5392  	}
  5393  	return c.header_
  5394  }
  5395  
  5396  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) doRequest(alt string) (*http.Response, error) {
  5397  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5398  	if c.ifNoneMatch_ != "" {
  5399  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5400  	}
  5401  	var body io.Reader = nil
  5402  	c.urlParams_.Set("alt", alt)
  5403  	c.urlParams_.Set("prettyPrint", "false")
  5404  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dockerImages")
  5405  	urls += "?" + c.urlParams_.Encode()
  5406  	req, err := http.NewRequest("GET", urls, body)
  5407  	if err != nil {
  5408  		return nil, err
  5409  	}
  5410  	req.Header = reqHeaders
  5411  	googleapi.Expand(req.URL, map[string]string{
  5412  		"parent": c.parent,
  5413  	})
  5414  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5415  }
  5416  
  5417  // Do executes the "artifactregistry.projects.locations.repositories.dockerImages.list" call.
  5418  // Any non-2xx status code is an error. Response headers are in either
  5419  // *ListDockerImagesResponse.ServerResponse.Header or (if a response was
  5420  // returned at all) in error.(*googleapi.Error).Header. Use
  5421  // googleapi.IsNotModified to check whether the returned error was because
  5422  // http.StatusNotModified was returned.
  5423  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) Do(opts ...googleapi.CallOption) (*ListDockerImagesResponse, error) {
  5424  	gensupport.SetOptions(c.urlParams_, opts...)
  5425  	res, err := c.doRequest("json")
  5426  	if res != nil && res.StatusCode == http.StatusNotModified {
  5427  		if res.Body != nil {
  5428  			res.Body.Close()
  5429  		}
  5430  		return nil, gensupport.WrapError(&googleapi.Error{
  5431  			Code:   res.StatusCode,
  5432  			Header: res.Header,
  5433  		})
  5434  	}
  5435  	if err != nil {
  5436  		return nil, err
  5437  	}
  5438  	defer googleapi.CloseBody(res)
  5439  	if err := googleapi.CheckResponse(res); err != nil {
  5440  		return nil, gensupport.WrapError(err)
  5441  	}
  5442  	ret := &ListDockerImagesResponse{
  5443  		ServerResponse: googleapi.ServerResponse{
  5444  			Header:         res.Header,
  5445  			HTTPStatusCode: res.StatusCode,
  5446  		},
  5447  	}
  5448  	target := &ret
  5449  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5450  		return nil, err
  5451  	}
  5452  	return ret, nil
  5453  }
  5454  
  5455  // Pages invokes f for each page of results.
  5456  // A non-nil error returned from f will halt the iteration.
  5457  // The provided context supersedes any context provided to the Context method.
  5458  func (c *ProjectsLocationsRepositoriesDockerImagesListCall) Pages(ctx context.Context, f func(*ListDockerImagesResponse) error) error {
  5459  	c.ctx_ = ctx
  5460  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5461  	for {
  5462  		x, err := c.Do()
  5463  		if err != nil {
  5464  			return err
  5465  		}
  5466  		if err := f(x); err != nil {
  5467  			return err
  5468  		}
  5469  		if x.NextPageToken == "" {
  5470  			return nil
  5471  		}
  5472  		c.PageToken(x.NextPageToken)
  5473  	}
  5474  }
  5475  
  5476  type ProjectsLocationsRepositoriesFilesDownloadCall struct {
  5477  	s            *Service
  5478  	name         string
  5479  	urlParams_   gensupport.URLParams
  5480  	ifNoneMatch_ string
  5481  	ctx_         context.Context
  5482  	header_      http.Header
  5483  }
  5484  
  5485  // Download: Download a file.
  5486  //
  5487  // - name: The name of the file to download.
  5488  func (r *ProjectsLocationsRepositoriesFilesService) Download(name string) *ProjectsLocationsRepositoriesFilesDownloadCall {
  5489  	c := &ProjectsLocationsRepositoriesFilesDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5490  	c.name = name
  5491  	return c
  5492  }
  5493  
  5494  // Fields allows partial responses to be retrieved. See
  5495  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5496  // details.
  5497  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesDownloadCall {
  5498  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5499  	return c
  5500  }
  5501  
  5502  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5503  // object's ETag matches the given value. This is useful for getting updates
  5504  // only after the object has changed since the last request.
  5505  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesDownloadCall {
  5506  	c.ifNoneMatch_ = entityTag
  5507  	return c
  5508  }
  5509  
  5510  // Context sets the context to be used in this call's Do and Download methods.
  5511  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesDownloadCall {
  5512  	c.ctx_ = ctx
  5513  	return c
  5514  }
  5515  
  5516  // Header returns a http.Header that can be modified by the caller to add
  5517  // headers to the request.
  5518  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Header() http.Header {
  5519  	if c.header_ == nil {
  5520  		c.header_ = make(http.Header)
  5521  	}
  5522  	return c.header_
  5523  }
  5524  
  5525  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) doRequest(alt string) (*http.Response, error) {
  5526  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5527  	if c.ifNoneMatch_ != "" {
  5528  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5529  	}
  5530  	var body io.Reader = nil
  5531  	c.urlParams_.Set("alt", alt)
  5532  	c.urlParams_.Set("prettyPrint", "false")
  5533  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:download")
  5534  	urls += "?" + c.urlParams_.Encode()
  5535  	req, err := http.NewRequest("GET", urls, body)
  5536  	if err != nil {
  5537  		return nil, err
  5538  	}
  5539  	req.Header = reqHeaders
  5540  	googleapi.Expand(req.URL, map[string]string{
  5541  		"name": c.name,
  5542  	})
  5543  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5544  }
  5545  
  5546  // Download fetches the API endpoint's "media" value, instead of the normal
  5547  // API response value. If the returned error is nil, the Response is guaranteed to
  5548  // have a 2xx status code. Callers must close the Response.Body as usual.
  5549  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  5550  	gensupport.SetOptions(c.urlParams_, opts...)
  5551  	res, err := c.doRequest("media")
  5552  	if err != nil {
  5553  		return nil, err
  5554  	}
  5555  	if err := googleapi.CheckResponse(res); err != nil {
  5556  		res.Body.Close()
  5557  		return nil, gensupport.WrapError(err)
  5558  	}
  5559  	return res, nil
  5560  }
  5561  
  5562  // Do executes the "artifactregistry.projects.locations.repositories.files.download" call.
  5563  // Any non-2xx status code is an error. Response headers are in either
  5564  // *DownloadFileResponse.ServerResponse.Header or (if a response was returned
  5565  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5566  // check whether the returned error was because http.StatusNotModified was
  5567  // returned.
  5568  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadFileResponse, error) {
  5569  	gensupport.SetOptions(c.urlParams_, opts...)
  5570  	res, err := c.doRequest("json")
  5571  	if res != nil && res.StatusCode == http.StatusNotModified {
  5572  		if res.Body != nil {
  5573  			res.Body.Close()
  5574  		}
  5575  		return nil, gensupport.WrapError(&googleapi.Error{
  5576  			Code:   res.StatusCode,
  5577  			Header: res.Header,
  5578  		})
  5579  	}
  5580  	if err != nil {
  5581  		return nil, err
  5582  	}
  5583  	defer googleapi.CloseBody(res)
  5584  	if err := googleapi.CheckResponse(res); err != nil {
  5585  		return nil, gensupport.WrapError(err)
  5586  	}
  5587  	ret := &DownloadFileResponse{
  5588  		ServerResponse: googleapi.ServerResponse{
  5589  			Header:         res.Header,
  5590  			HTTPStatusCode: res.StatusCode,
  5591  		},
  5592  	}
  5593  	target := &ret
  5594  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5595  		return nil, err
  5596  	}
  5597  	return ret, nil
  5598  }
  5599  
  5600  type ProjectsLocationsRepositoriesFilesGetCall struct {
  5601  	s            *Service
  5602  	name         string
  5603  	urlParams_   gensupport.URLParams
  5604  	ifNoneMatch_ string
  5605  	ctx_         context.Context
  5606  	header_      http.Header
  5607  }
  5608  
  5609  // Get: Gets a file.
  5610  //
  5611  // - name: The name of the file to retrieve.
  5612  func (r *ProjectsLocationsRepositoriesFilesService) Get(name string) *ProjectsLocationsRepositoriesFilesGetCall {
  5613  	c := &ProjectsLocationsRepositoriesFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5614  	c.name = name
  5615  	return c
  5616  }
  5617  
  5618  // Fields allows partial responses to be retrieved. See
  5619  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5620  // details.
  5621  func (c *ProjectsLocationsRepositoriesFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesGetCall {
  5622  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5623  	return c
  5624  }
  5625  
  5626  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5627  // object's ETag matches the given value. This is useful for getting updates
  5628  // only after the object has changed since the last request.
  5629  func (c *ProjectsLocationsRepositoriesFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesGetCall {
  5630  	c.ifNoneMatch_ = entityTag
  5631  	return c
  5632  }
  5633  
  5634  // Context sets the context to be used in this call's Do method.
  5635  func (c *ProjectsLocationsRepositoriesFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesGetCall {
  5636  	c.ctx_ = ctx
  5637  	return c
  5638  }
  5639  
  5640  // Header returns a http.Header that can be modified by the caller to add
  5641  // headers to the request.
  5642  func (c *ProjectsLocationsRepositoriesFilesGetCall) Header() http.Header {
  5643  	if c.header_ == nil {
  5644  		c.header_ = make(http.Header)
  5645  	}
  5646  	return c.header_
  5647  }
  5648  
  5649  func (c *ProjectsLocationsRepositoriesFilesGetCall) doRequest(alt string) (*http.Response, error) {
  5650  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5651  	if c.ifNoneMatch_ != "" {
  5652  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5653  	}
  5654  	var body io.Reader = nil
  5655  	c.urlParams_.Set("alt", alt)
  5656  	c.urlParams_.Set("prettyPrint", "false")
  5657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5658  	urls += "?" + c.urlParams_.Encode()
  5659  	req, err := http.NewRequest("GET", urls, body)
  5660  	if err != nil {
  5661  		return nil, err
  5662  	}
  5663  	req.Header = reqHeaders
  5664  	googleapi.Expand(req.URL, map[string]string{
  5665  		"name": c.name,
  5666  	})
  5667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5668  }
  5669  
  5670  // Do executes the "artifactregistry.projects.locations.repositories.files.get" call.
  5671  // Any non-2xx status code is an error. Response headers are in either
  5672  // *GoogleDevtoolsArtifactregistryV1File.ServerResponse.Header or (if a
  5673  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5674  // googleapi.IsNotModified to check whether the returned error was because
  5675  // http.StatusNotModified was returned.
  5676  func (c *ProjectsLocationsRepositoriesFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsArtifactregistryV1File, error) {
  5677  	gensupport.SetOptions(c.urlParams_, opts...)
  5678  	res, err := c.doRequest("json")
  5679  	if res != nil && res.StatusCode == http.StatusNotModified {
  5680  		if res.Body != nil {
  5681  			res.Body.Close()
  5682  		}
  5683  		return nil, gensupport.WrapError(&googleapi.Error{
  5684  			Code:   res.StatusCode,
  5685  			Header: res.Header,
  5686  		})
  5687  	}
  5688  	if err != nil {
  5689  		return nil, err
  5690  	}
  5691  	defer googleapi.CloseBody(res)
  5692  	if err := googleapi.CheckResponse(res); err != nil {
  5693  		return nil, gensupport.WrapError(err)
  5694  	}
  5695  	ret := &GoogleDevtoolsArtifactregistryV1File{
  5696  		ServerResponse: googleapi.ServerResponse{
  5697  			Header:         res.Header,
  5698  			HTTPStatusCode: res.StatusCode,
  5699  		},
  5700  	}
  5701  	target := &ret
  5702  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5703  		return nil, err
  5704  	}
  5705  	return ret, nil
  5706  }
  5707  
  5708  type ProjectsLocationsRepositoriesFilesListCall struct {
  5709  	s            *Service
  5710  	parent       string
  5711  	urlParams_   gensupport.URLParams
  5712  	ifNoneMatch_ string
  5713  	ctx_         context.Context
  5714  	header_      http.Header
  5715  }
  5716  
  5717  // List: Lists files.
  5718  //
  5719  //   - parent: The name of the repository whose files will be listed. For
  5720  //     example: "projects/p1/locations/us-central1/repositories/repo1.
  5721  func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall {
  5722  	c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5723  	c.parent = parent
  5724  	return c
  5725  }
  5726  
  5727  // Filter sets the optional parameter "filter": An expression for filtering the
  5728  // results of the request. Filter rules are case insensitive. The fields
  5729  // eligible for filtering are: * `name` * `owner` An example of using a filter:
  5730  // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"
  5731  // --> Files with an ID starting with "a/b/". *
  5732  // `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve
  5733  // rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`.
  5734  func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall {
  5735  	c.urlParams_.Set("filter", filter)
  5736  	return c
  5737  }
  5738  
  5739  // OrderBy sets the optional parameter "orderBy": The field to order the
  5740  // results by.
  5741  func (c *ProjectsLocationsRepositoriesFilesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesFilesListCall {
  5742  	c.urlParams_.Set("orderBy", orderBy)
  5743  	return c
  5744  }
  5745  
  5746  // PageSize sets the optional parameter "pageSize": The maximum number of files
  5747  // to return.
  5748  func (c *ProjectsLocationsRepositoriesFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFilesListCall {
  5749  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5750  	return c
  5751  }
  5752  
  5753  // PageToken sets the optional parameter "pageToken": The next_page_token value
  5754  // returned from a previous list request, if any.
  5755  func (c *ProjectsLocationsRepositoriesFilesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFilesListCall {
  5756  	c.urlParams_.Set("pageToken", pageToken)
  5757  	return c
  5758  }
  5759  
  5760  // Fields allows partial responses to be retrieved. See
  5761  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5762  // details.
  5763  func (c *ProjectsLocationsRepositoriesFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesListCall {
  5764  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5765  	return c
  5766  }
  5767  
  5768  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5769  // object's ETag matches the given value. This is useful for getting updates
  5770  // only after the object has changed since the last request.
  5771  func (c *ProjectsLocationsRepositoriesFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesListCall {
  5772  	c.ifNoneMatch_ = entityTag
  5773  	return c
  5774  }
  5775  
  5776  // Context sets the context to be used in this call's Do method.
  5777  func (c *ProjectsLocationsRepositoriesFilesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesListCall {
  5778  	c.ctx_ = ctx
  5779  	return c
  5780  }
  5781  
  5782  // Header returns a http.Header that can be modified by the caller to add
  5783  // headers to the request.
  5784  func (c *ProjectsLocationsRepositoriesFilesListCall) Header() http.Header {
  5785  	if c.header_ == nil {
  5786  		c.header_ = make(http.Header)
  5787  	}
  5788  	return c.header_
  5789  }
  5790  
  5791  func (c *ProjectsLocationsRepositoriesFilesListCall) doRequest(alt string) (*http.Response, error) {
  5792  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5793  	if c.ifNoneMatch_ != "" {
  5794  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5795  	}
  5796  	var body io.Reader = nil
  5797  	c.urlParams_.Set("alt", alt)
  5798  	c.urlParams_.Set("prettyPrint", "false")
  5799  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/files")
  5800  	urls += "?" + c.urlParams_.Encode()
  5801  	req, err := http.NewRequest("GET", urls, body)
  5802  	if err != nil {
  5803  		return nil, err
  5804  	}
  5805  	req.Header = reqHeaders
  5806  	googleapi.Expand(req.URL, map[string]string{
  5807  		"parent": c.parent,
  5808  	})
  5809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5810  }
  5811  
  5812  // Do executes the "artifactregistry.projects.locations.repositories.files.list" call.
  5813  // Any non-2xx status code is an error. Response headers are in either
  5814  // *ListFilesResponse.ServerResponse.Header or (if a response was returned at
  5815  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5816  // check whether the returned error was because http.StatusNotModified was
  5817  // returned.
  5818  func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOption) (*ListFilesResponse, error) {
  5819  	gensupport.SetOptions(c.urlParams_, opts...)
  5820  	res, err := c.doRequest("json")
  5821  	if res != nil && res.StatusCode == http.StatusNotModified {
  5822  		if res.Body != nil {
  5823  			res.Body.Close()
  5824  		}
  5825  		return nil, gensupport.WrapError(&googleapi.Error{
  5826  			Code:   res.StatusCode,
  5827  			Header: res.Header,
  5828  		})
  5829  	}
  5830  	if err != nil {
  5831  		return nil, err
  5832  	}
  5833  	defer googleapi.CloseBody(res)
  5834  	if err := googleapi.CheckResponse(res); err != nil {
  5835  		return nil, gensupport.WrapError(err)
  5836  	}
  5837  	ret := &ListFilesResponse{
  5838  		ServerResponse: googleapi.ServerResponse{
  5839  			Header:         res.Header,
  5840  			HTTPStatusCode: res.StatusCode,
  5841  		},
  5842  	}
  5843  	target := &ret
  5844  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5845  		return nil, err
  5846  	}
  5847  	return ret, nil
  5848  }
  5849  
  5850  // Pages invokes f for each page of results.
  5851  // A non-nil error returned from f will halt the iteration.
  5852  // The provided context supersedes any context provided to the Context method.
  5853  func (c *ProjectsLocationsRepositoriesFilesListCall) Pages(ctx context.Context, f func(*ListFilesResponse) error) error {
  5854  	c.ctx_ = ctx
  5855  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5856  	for {
  5857  		x, err := c.Do()
  5858  		if err != nil {
  5859  			return err
  5860  		}
  5861  		if err := f(x); err != nil {
  5862  			return err
  5863  		}
  5864  		if x.NextPageToken == "" {
  5865  			return nil
  5866  		}
  5867  		c.PageToken(x.NextPageToken)
  5868  	}
  5869  }
  5870  
  5871  type ProjectsLocationsRepositoriesGenericArtifactsUploadCall struct {
  5872  	s                            *Service
  5873  	parent                       string
  5874  	uploadgenericartifactrequest *UploadGenericArtifactRequest
  5875  	urlParams_                   gensupport.URLParams
  5876  	mediaInfo_                   *gensupport.MediaInfo
  5877  	ctx_                         context.Context
  5878  	header_                      http.Header
  5879  }
  5880  
  5881  // Upload: Directly uploads a Generic artifact. The returned Operation will
  5882  // complete once the resources are uploaded. Package, Version, and File
  5883  // resources are created based on the uploaded artifact. Uploaded artifacts
  5884  // that conflict with existing resources will raise an ALREADY_EXISTS error.
  5885  //
  5886  //   - parent: The resource name of the repository where the generic artifact
  5887  //     will be uploaded.
  5888  func (r *ProjectsLocationsRepositoriesGenericArtifactsService) Upload(parent string, uploadgenericartifactrequest *UploadGenericArtifactRequest) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5889  	c := &ProjectsLocationsRepositoriesGenericArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5890  	c.parent = parent
  5891  	c.uploadgenericartifactrequest = uploadgenericartifactrequest
  5892  	return c
  5893  }
  5894  
  5895  // Media specifies the media to upload in one or more chunks. The chunk size
  5896  // may be controlled by supplying a MediaOption generated by
  5897  // googleapi.ChunkSize. The chunk size defaults to
  5898  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  5899  // request will be determined by sniffing the contents of r, unless a
  5900  // MediaOption generated by googleapi.ContentType is supplied.
  5901  // At most one of Media and ResumableMedia may be set.
  5902  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5903  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  5904  	return c
  5905  }
  5906  
  5907  // ResumableMedia specifies the media to upload in chunks and can be canceled
  5908  // with ctx.
  5909  //
  5910  // Deprecated: use Media instead.
  5911  //
  5912  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  5913  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  5914  // will be auto-detected. The provided ctx will supersede any context
  5915  // previously provided to the Context method.
  5916  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5917  	c.ctx_ = ctx
  5918  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  5919  	return c
  5920  }
  5921  
  5922  // ProgressUpdater provides a callback function that will be called after every
  5923  // chunk. It should be a low-latency function in order to not slow down the
  5924  // upload operation. This should only be called when using ResumableMedia (as
  5925  // opposed to Media).
  5926  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5927  	c.mediaInfo_.SetProgressUpdater(pu)
  5928  	return c
  5929  }
  5930  
  5931  // Fields allows partial responses to be retrieved. See
  5932  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5933  // details.
  5934  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5935  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5936  	return c
  5937  }
  5938  
  5939  // Context sets the context to be used in this call's Do method.
  5940  // This context will supersede any context previously provided to the
  5941  // ResumableMedia method.
  5942  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGenericArtifactsUploadCall {
  5943  	c.ctx_ = ctx
  5944  	return c
  5945  }
  5946  
  5947  // Header returns a http.Header that can be modified by the caller to add
  5948  // headers to the request.
  5949  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) Header() http.Header {
  5950  	if c.header_ == nil {
  5951  		c.header_ = make(http.Header)
  5952  	}
  5953  	return c.header_
  5954  }
  5955  
  5956  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  5957  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5958  	var body io.Reader = nil
  5959  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadgenericartifactrequest)
  5960  	if err != nil {
  5961  		return nil, err
  5962  	}
  5963  	c.urlParams_.Set("alt", alt)
  5964  	c.urlParams_.Set("prettyPrint", "false")
  5965  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/genericArtifacts:create")
  5966  	if c.mediaInfo_ != nil {
  5967  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/genericArtifacts:create")
  5968  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  5969  	}
  5970  	if body == nil {
  5971  		body = new(bytes.Buffer)
  5972  		reqHeaders.Set("Content-Type", "application/json")
  5973  	}
  5974  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  5975  	defer cleanup()
  5976  	urls += "?" + c.urlParams_.Encode()
  5977  	req, err := http.NewRequest("POST", urls, body)
  5978  	if err != nil {
  5979  		return nil, err
  5980  	}
  5981  	req.Header = reqHeaders
  5982  	req.GetBody = getBody
  5983  	googleapi.Expand(req.URL, map[string]string{
  5984  		"parent": c.parent,
  5985  	})
  5986  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5987  }
  5988  
  5989  // Do executes the "artifactregistry.projects.locations.repositories.genericArtifacts.upload" call.
  5990  // Any non-2xx status code is an error. Response headers are in either
  5991  // *UploadGenericArtifactMediaResponse.ServerResponse.Header or (if a response
  5992  // was returned at all) in error.(*googleapi.Error).Header. Use
  5993  // googleapi.IsNotModified to check whether the returned error was because
  5994  // http.StatusNotModified was returned.
  5995  func (c *ProjectsLocationsRepositoriesGenericArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadGenericArtifactMediaResponse, error) {
  5996  	gensupport.SetOptions(c.urlParams_, opts...)
  5997  	res, err := c.doRequest("json")
  5998  	if res != nil && res.StatusCode == http.StatusNotModified {
  5999  		if res.Body != nil {
  6000  			res.Body.Close()
  6001  		}
  6002  		return nil, gensupport.WrapError(&googleapi.Error{
  6003  			Code:   res.StatusCode,
  6004  			Header: res.Header,
  6005  		})
  6006  	}
  6007  	if err != nil {
  6008  		return nil, err
  6009  	}
  6010  	defer googleapi.CloseBody(res)
  6011  	if err := googleapi.CheckResponse(res); err != nil {
  6012  		return nil, gensupport.WrapError(err)
  6013  	}
  6014  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  6015  	if rx != nil {
  6016  		rx.Client = c.s.client
  6017  		rx.UserAgent = c.s.userAgent()
  6018  		ctx := c.ctx_
  6019  		if ctx == nil {
  6020  			ctx = context.TODO()
  6021  		}
  6022  		res, err = rx.Upload(ctx)
  6023  		if err != nil {
  6024  			return nil, err
  6025  		}
  6026  		defer res.Body.Close()
  6027  		if err := googleapi.CheckResponse(res); err != nil {
  6028  			return nil, gensupport.WrapError(err)
  6029  		}
  6030  	}
  6031  	ret := &UploadGenericArtifactMediaResponse{
  6032  		ServerResponse: googleapi.ServerResponse{
  6033  			Header:         res.Header,
  6034  			HTTPStatusCode: res.StatusCode,
  6035  		},
  6036  	}
  6037  	target := &ret
  6038  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6039  		return nil, err
  6040  	}
  6041  	return ret, nil
  6042  }
  6043  
  6044  type ProjectsLocationsRepositoriesGoModulesUploadCall struct {
  6045  	s                     *Service
  6046  	parent                string
  6047  	uploadgomodulerequest *UploadGoModuleRequest
  6048  	urlParams_            gensupport.URLParams
  6049  	mediaInfo_            *gensupport.MediaInfo
  6050  	ctx_                  context.Context
  6051  	header_               http.Header
  6052  }
  6053  
  6054  // Upload: Directly uploads a Go module. The returned Operation will complete
  6055  // once the Go module is uploaded. Package, Version, and File resources are
  6056  // created based on the uploaded Go module.
  6057  //
  6058  //   - parent: The resource name of the repository where the Go module will be
  6059  //     uploaded.
  6060  func (r *ProjectsLocationsRepositoriesGoModulesService) Upload(parent string, uploadgomodulerequest *UploadGoModuleRequest) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6061  	c := &ProjectsLocationsRepositoriesGoModulesUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6062  	c.parent = parent
  6063  	c.uploadgomodulerequest = uploadgomodulerequest
  6064  	return c
  6065  }
  6066  
  6067  // Media specifies the media to upload in one or more chunks. The chunk size
  6068  // may be controlled by supplying a MediaOption generated by
  6069  // googleapi.ChunkSize. The chunk size defaults to
  6070  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  6071  // request will be determined by sniffing the contents of r, unless a
  6072  // MediaOption generated by googleapi.ContentType is supplied.
  6073  // At most one of Media and ResumableMedia may be set.
  6074  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6075  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  6076  	return c
  6077  }
  6078  
  6079  // ResumableMedia specifies the media to upload in chunks and can be canceled
  6080  // with ctx.
  6081  //
  6082  // Deprecated: use Media instead.
  6083  //
  6084  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  6085  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  6086  // will be auto-detected. The provided ctx will supersede any context
  6087  // previously provided to the Context method.
  6088  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6089  	c.ctx_ = ctx
  6090  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  6091  	return c
  6092  }
  6093  
  6094  // ProgressUpdater provides a callback function that will be called after every
  6095  // chunk. It should be a low-latency function in order to not slow down the
  6096  // upload operation. This should only be called when using ResumableMedia (as
  6097  // opposed to Media).
  6098  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6099  	c.mediaInfo_.SetProgressUpdater(pu)
  6100  	return c
  6101  }
  6102  
  6103  // Fields allows partial responses to be retrieved. See
  6104  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6105  // details.
  6106  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6107  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6108  	return c
  6109  }
  6110  
  6111  // Context sets the context to be used in this call's Do method.
  6112  // This context will supersede any context previously provided to the
  6113  // ResumableMedia method.
  6114  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGoModulesUploadCall {
  6115  	c.ctx_ = ctx
  6116  	return c
  6117  }
  6118  
  6119  // Header returns a http.Header that can be modified by the caller to add
  6120  // headers to the request.
  6121  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) Header() http.Header {
  6122  	if c.header_ == nil {
  6123  		c.header_ = make(http.Header)
  6124  	}
  6125  	return c.header_
  6126  }
  6127  
  6128  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) doRequest(alt string) (*http.Response, error) {
  6129  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6130  	var body io.Reader = nil
  6131  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadgomodulerequest)
  6132  	if err != nil {
  6133  		return nil, err
  6134  	}
  6135  	c.urlParams_.Set("alt", alt)
  6136  	c.urlParams_.Set("prettyPrint", "false")
  6137  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/goModules:create")
  6138  	if c.mediaInfo_ != nil {
  6139  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/goModules:create")
  6140  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  6141  	}
  6142  	if body == nil {
  6143  		body = new(bytes.Buffer)
  6144  		reqHeaders.Set("Content-Type", "application/json")
  6145  	}
  6146  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  6147  	defer cleanup()
  6148  	urls += "?" + c.urlParams_.Encode()
  6149  	req, err := http.NewRequest("POST", urls, body)
  6150  	if err != nil {
  6151  		return nil, err
  6152  	}
  6153  	req.Header = reqHeaders
  6154  	req.GetBody = getBody
  6155  	googleapi.Expand(req.URL, map[string]string{
  6156  		"parent": c.parent,
  6157  	})
  6158  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6159  }
  6160  
  6161  // Do executes the "artifactregistry.projects.locations.repositories.goModules.upload" call.
  6162  // Any non-2xx status code is an error. Response headers are in either
  6163  // *UploadGoModuleMediaResponse.ServerResponse.Header or (if a response was
  6164  // returned at all) in error.(*googleapi.Error).Header. Use
  6165  // googleapi.IsNotModified to check whether the returned error was because
  6166  // http.StatusNotModified was returned.
  6167  func (c *ProjectsLocationsRepositoriesGoModulesUploadCall) Do(opts ...googleapi.CallOption) (*UploadGoModuleMediaResponse, error) {
  6168  	gensupport.SetOptions(c.urlParams_, opts...)
  6169  	res, err := c.doRequest("json")
  6170  	if res != nil && res.StatusCode == http.StatusNotModified {
  6171  		if res.Body != nil {
  6172  			res.Body.Close()
  6173  		}
  6174  		return nil, gensupport.WrapError(&googleapi.Error{
  6175  			Code:   res.StatusCode,
  6176  			Header: res.Header,
  6177  		})
  6178  	}
  6179  	if err != nil {
  6180  		return nil, err
  6181  	}
  6182  	defer googleapi.CloseBody(res)
  6183  	if err := googleapi.CheckResponse(res); err != nil {
  6184  		return nil, gensupport.WrapError(err)
  6185  	}
  6186  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  6187  	if rx != nil {
  6188  		rx.Client = c.s.client
  6189  		rx.UserAgent = c.s.userAgent()
  6190  		ctx := c.ctx_
  6191  		if ctx == nil {
  6192  			ctx = context.TODO()
  6193  		}
  6194  		res, err = rx.Upload(ctx)
  6195  		if err != nil {
  6196  			return nil, err
  6197  		}
  6198  		defer res.Body.Close()
  6199  		if err := googleapi.CheckResponse(res); err != nil {
  6200  			return nil, gensupport.WrapError(err)
  6201  		}
  6202  	}
  6203  	ret := &UploadGoModuleMediaResponse{
  6204  		ServerResponse: googleapi.ServerResponse{
  6205  			Header:         res.Header,
  6206  			HTTPStatusCode: res.StatusCode,
  6207  		},
  6208  	}
  6209  	target := &ret
  6210  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6211  		return nil, err
  6212  	}
  6213  	return ret, nil
  6214  }
  6215  
  6216  type ProjectsLocationsRepositoriesGoogetArtifactsImportCall struct {
  6217  	s                            *Service
  6218  	parent                       string
  6219  	importgoogetartifactsrequest *ImportGoogetArtifactsRequest
  6220  	urlParams_                   gensupport.URLParams
  6221  	ctx_                         context.Context
  6222  	header_                      http.Header
  6223  }
  6224  
  6225  // Import: Imports GooGet artifacts. The returned Operation will complete once
  6226  // the resources are imported. Package, Version, and File resources are created
  6227  // based on the imported artifacts. Imported artifacts that conflict with
  6228  // existing resources are ignored.
  6229  //
  6230  //   - parent: The name of the parent resource where the artifacts will be
  6231  //     imported.
  6232  func (r *ProjectsLocationsRepositoriesGoogetArtifactsService) Import(parent string, importgoogetartifactsrequest *ImportGoogetArtifactsRequest) *ProjectsLocationsRepositoriesGoogetArtifactsImportCall {
  6233  	c := &ProjectsLocationsRepositoriesGoogetArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6234  	c.parent = parent
  6235  	c.importgoogetartifactsrequest = importgoogetartifactsrequest
  6236  	return c
  6237  }
  6238  
  6239  // Fields allows partial responses to be retrieved. See
  6240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6241  // details.
  6242  func (c *ProjectsLocationsRepositoriesGoogetArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGoogetArtifactsImportCall {
  6243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6244  	return c
  6245  }
  6246  
  6247  // Context sets the context to be used in this call's Do method.
  6248  func (c *ProjectsLocationsRepositoriesGoogetArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGoogetArtifactsImportCall {
  6249  	c.ctx_ = ctx
  6250  	return c
  6251  }
  6252  
  6253  // Header returns a http.Header that can be modified by the caller to add
  6254  // headers to the request.
  6255  func (c *ProjectsLocationsRepositoriesGoogetArtifactsImportCall) Header() http.Header {
  6256  	if c.header_ == nil {
  6257  		c.header_ = make(http.Header)
  6258  	}
  6259  	return c.header_
  6260  }
  6261  
  6262  func (c *ProjectsLocationsRepositoriesGoogetArtifactsImportCall) doRequest(alt string) (*http.Response, error) {
  6263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6264  	var body io.Reader = nil
  6265  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importgoogetartifactsrequest)
  6266  	if err != nil {
  6267  		return nil, err
  6268  	}
  6269  	c.urlParams_.Set("alt", alt)
  6270  	c.urlParams_.Set("prettyPrint", "false")
  6271  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/googetArtifacts:import")
  6272  	urls += "?" + c.urlParams_.Encode()
  6273  	req, err := http.NewRequest("POST", urls, body)
  6274  	if err != nil {
  6275  		return nil, err
  6276  	}
  6277  	req.Header = reqHeaders
  6278  	googleapi.Expand(req.URL, map[string]string{
  6279  		"parent": c.parent,
  6280  	})
  6281  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6282  }
  6283  
  6284  // Do executes the "artifactregistry.projects.locations.repositories.googetArtifacts.import" call.
  6285  // Any non-2xx status code is an error. Response headers are in either
  6286  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6287  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6288  // whether the returned error was because http.StatusNotModified was returned.
  6289  func (c *ProjectsLocationsRepositoriesGoogetArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6290  	gensupport.SetOptions(c.urlParams_, opts...)
  6291  	res, err := c.doRequest("json")
  6292  	if res != nil && res.StatusCode == http.StatusNotModified {
  6293  		if res.Body != nil {
  6294  			res.Body.Close()
  6295  		}
  6296  		return nil, gensupport.WrapError(&googleapi.Error{
  6297  			Code:   res.StatusCode,
  6298  			Header: res.Header,
  6299  		})
  6300  	}
  6301  	if err != nil {
  6302  		return nil, err
  6303  	}
  6304  	defer googleapi.CloseBody(res)
  6305  	if err := googleapi.CheckResponse(res); err != nil {
  6306  		return nil, gensupport.WrapError(err)
  6307  	}
  6308  	ret := &Operation{
  6309  		ServerResponse: googleapi.ServerResponse{
  6310  			Header:         res.Header,
  6311  			HTTPStatusCode: res.StatusCode,
  6312  		},
  6313  	}
  6314  	target := &ret
  6315  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6316  		return nil, err
  6317  	}
  6318  	return ret, nil
  6319  }
  6320  
  6321  type ProjectsLocationsRepositoriesGoogetArtifactsUploadCall struct {
  6322  	s                           *Service
  6323  	parent                      string
  6324  	uploadgoogetartifactrequest *UploadGoogetArtifactRequest
  6325  	urlParams_                  gensupport.URLParams
  6326  	mediaInfo_                  *gensupport.MediaInfo
  6327  	ctx_                        context.Context
  6328  	header_                     http.Header
  6329  }
  6330  
  6331  // Upload: Directly uploads a GooGet artifact. The returned Operation will
  6332  // complete once the resources are uploaded. Package, Version, and File
  6333  // resources are created based on the imported artifact. Imported artifacts
  6334  // that conflict with existing resources are ignored.
  6335  //
  6336  //   - parent: The name of the parent resource where the artifacts will be
  6337  //     uploaded.
  6338  func (r *ProjectsLocationsRepositoriesGoogetArtifactsService) Upload(parent string, uploadgoogetartifactrequest *UploadGoogetArtifactRequest) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6339  	c := &ProjectsLocationsRepositoriesGoogetArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6340  	c.parent = parent
  6341  	c.uploadgoogetartifactrequest = uploadgoogetartifactrequest
  6342  	return c
  6343  }
  6344  
  6345  // Media specifies the media to upload in one or more chunks. The chunk size
  6346  // may be controlled by supplying a MediaOption generated by
  6347  // googleapi.ChunkSize. The chunk size defaults to
  6348  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  6349  // request will be determined by sniffing the contents of r, unless a
  6350  // MediaOption generated by googleapi.ContentType is supplied.
  6351  // At most one of Media and ResumableMedia may be set.
  6352  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6353  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  6354  	return c
  6355  }
  6356  
  6357  // ResumableMedia specifies the media to upload in chunks and can be canceled
  6358  // with ctx.
  6359  //
  6360  // Deprecated: use Media instead.
  6361  //
  6362  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  6363  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  6364  // will be auto-detected. The provided ctx will supersede any context
  6365  // previously provided to the Context method.
  6366  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6367  	c.ctx_ = ctx
  6368  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  6369  	return c
  6370  }
  6371  
  6372  // ProgressUpdater provides a callback function that will be called after every
  6373  // chunk. It should be a low-latency function in order to not slow down the
  6374  // upload operation. This should only be called when using ResumableMedia (as
  6375  // opposed to Media).
  6376  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6377  	c.mediaInfo_.SetProgressUpdater(pu)
  6378  	return c
  6379  }
  6380  
  6381  // Fields allows partial responses to be retrieved. See
  6382  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6383  // details.
  6384  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6385  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6386  	return c
  6387  }
  6388  
  6389  // Context sets the context to be used in this call's Do method.
  6390  // This context will supersede any context previously provided to the
  6391  // ResumableMedia method.
  6392  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall {
  6393  	c.ctx_ = ctx
  6394  	return c
  6395  }
  6396  
  6397  // Header returns a http.Header that can be modified by the caller to add
  6398  // headers to the request.
  6399  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Header() http.Header {
  6400  	if c.header_ == nil {
  6401  		c.header_ = make(http.Header)
  6402  	}
  6403  	return c.header_
  6404  }
  6405  
  6406  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  6407  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6408  	var body io.Reader = nil
  6409  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadgoogetartifactrequest)
  6410  	if err != nil {
  6411  		return nil, err
  6412  	}
  6413  	c.urlParams_.Set("alt", alt)
  6414  	c.urlParams_.Set("prettyPrint", "false")
  6415  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/googetArtifacts:create")
  6416  	if c.mediaInfo_ != nil {
  6417  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/googetArtifacts:create")
  6418  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  6419  	}
  6420  	if body == nil {
  6421  		body = new(bytes.Buffer)
  6422  		reqHeaders.Set("Content-Type", "application/json")
  6423  	}
  6424  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  6425  	defer cleanup()
  6426  	urls += "?" + c.urlParams_.Encode()
  6427  	req, err := http.NewRequest("POST", urls, body)
  6428  	if err != nil {
  6429  		return nil, err
  6430  	}
  6431  	req.Header = reqHeaders
  6432  	req.GetBody = getBody
  6433  	googleapi.Expand(req.URL, map[string]string{
  6434  		"parent": c.parent,
  6435  	})
  6436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6437  }
  6438  
  6439  // Do executes the "artifactregistry.projects.locations.repositories.googetArtifacts.upload" call.
  6440  // Any non-2xx status code is an error. Response headers are in either
  6441  // *UploadGoogetArtifactMediaResponse.ServerResponse.Header or (if a response
  6442  // was returned at all) in error.(*googleapi.Error).Header. Use
  6443  // googleapi.IsNotModified to check whether the returned error was because
  6444  // http.StatusNotModified was returned.
  6445  func (c *ProjectsLocationsRepositoriesGoogetArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadGoogetArtifactMediaResponse, error) {
  6446  	gensupport.SetOptions(c.urlParams_, opts...)
  6447  	res, err := c.doRequest("json")
  6448  	if res != nil && res.StatusCode == http.StatusNotModified {
  6449  		if res.Body != nil {
  6450  			res.Body.Close()
  6451  		}
  6452  		return nil, gensupport.WrapError(&googleapi.Error{
  6453  			Code:   res.StatusCode,
  6454  			Header: res.Header,
  6455  		})
  6456  	}
  6457  	if err != nil {
  6458  		return nil, err
  6459  	}
  6460  	defer googleapi.CloseBody(res)
  6461  	if err := googleapi.CheckResponse(res); err != nil {
  6462  		return nil, gensupport.WrapError(err)
  6463  	}
  6464  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  6465  	if rx != nil {
  6466  		rx.Client = c.s.client
  6467  		rx.UserAgent = c.s.userAgent()
  6468  		ctx := c.ctx_
  6469  		if ctx == nil {
  6470  			ctx = context.TODO()
  6471  		}
  6472  		res, err = rx.Upload(ctx)
  6473  		if err != nil {
  6474  			return nil, err
  6475  		}
  6476  		defer res.Body.Close()
  6477  		if err := googleapi.CheckResponse(res); err != nil {
  6478  			return nil, gensupport.WrapError(err)
  6479  		}
  6480  	}
  6481  	ret := &UploadGoogetArtifactMediaResponse{
  6482  		ServerResponse: googleapi.ServerResponse{
  6483  			Header:         res.Header,
  6484  			HTTPStatusCode: res.StatusCode,
  6485  		},
  6486  	}
  6487  	target := &ret
  6488  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6489  		return nil, err
  6490  	}
  6491  	return ret, nil
  6492  }
  6493  
  6494  type ProjectsLocationsRepositoriesKfpArtifactsUploadCall struct {
  6495  	s                        *Service
  6496  	parent                   string
  6497  	uploadkfpartifactrequest *UploadKfpArtifactRequest
  6498  	urlParams_               gensupport.URLParams
  6499  	mediaInfo_               *gensupport.MediaInfo
  6500  	ctx_                     context.Context
  6501  	header_                  http.Header
  6502  }
  6503  
  6504  // Upload: Directly uploads a KFP artifact. The returned Operation will
  6505  // complete once the resource is uploaded. Package, Version, and File resources
  6506  // will be created based on the uploaded artifact. Uploaded artifacts that
  6507  // conflict with existing resources will be overwritten.
  6508  //
  6509  //   - parent: The resource name of the repository where the KFP artifact will be
  6510  //     uploaded.
  6511  func (r *ProjectsLocationsRepositoriesKfpArtifactsService) Upload(parent string, uploadkfpartifactrequest *UploadKfpArtifactRequest) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6512  	c := &ProjectsLocationsRepositoriesKfpArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6513  	c.parent = parent
  6514  	c.uploadkfpartifactrequest = uploadkfpartifactrequest
  6515  	return c
  6516  }
  6517  
  6518  // Media specifies the media to upload in one or more chunks. The chunk size
  6519  // may be controlled by supplying a MediaOption generated by
  6520  // googleapi.ChunkSize. The chunk size defaults to
  6521  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  6522  // request will be determined by sniffing the contents of r, unless a
  6523  // MediaOption generated by googleapi.ContentType is supplied.
  6524  // At most one of Media and ResumableMedia may be set.
  6525  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6526  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  6527  	return c
  6528  }
  6529  
  6530  // ResumableMedia specifies the media to upload in chunks and can be canceled
  6531  // with ctx.
  6532  //
  6533  // Deprecated: use Media instead.
  6534  //
  6535  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  6536  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  6537  // will be auto-detected. The provided ctx will supersede any context
  6538  // previously provided to the Context method.
  6539  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6540  	c.ctx_ = ctx
  6541  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  6542  	return c
  6543  }
  6544  
  6545  // ProgressUpdater provides a callback function that will be called after every
  6546  // chunk. It should be a low-latency function in order to not slow down the
  6547  // upload operation. This should only be called when using ResumableMedia (as
  6548  // opposed to Media).
  6549  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6550  	c.mediaInfo_.SetProgressUpdater(pu)
  6551  	return c
  6552  }
  6553  
  6554  // Fields allows partial responses to be retrieved. See
  6555  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6556  // details.
  6557  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6558  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6559  	return c
  6560  }
  6561  
  6562  // Context sets the context to be used in this call's Do method.
  6563  // This context will supersede any context previously provided to the
  6564  // ResumableMedia method.
  6565  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesKfpArtifactsUploadCall {
  6566  	c.ctx_ = ctx
  6567  	return c
  6568  }
  6569  
  6570  // Header returns a http.Header that can be modified by the caller to add
  6571  // headers to the request.
  6572  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Header() http.Header {
  6573  	if c.header_ == nil {
  6574  		c.header_ = make(http.Header)
  6575  	}
  6576  	return c.header_
  6577  }
  6578  
  6579  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  6580  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6581  	var body io.Reader = nil
  6582  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadkfpartifactrequest)
  6583  	if err != nil {
  6584  		return nil, err
  6585  	}
  6586  	c.urlParams_.Set("alt", alt)
  6587  	c.urlParams_.Set("prettyPrint", "false")
  6588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/kfpArtifacts:create")
  6589  	if c.mediaInfo_ != nil {
  6590  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/kfpArtifacts:create")
  6591  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  6592  	}
  6593  	if body == nil {
  6594  		body = new(bytes.Buffer)
  6595  		reqHeaders.Set("Content-Type", "application/json")
  6596  	}
  6597  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  6598  	defer cleanup()
  6599  	urls += "?" + c.urlParams_.Encode()
  6600  	req, err := http.NewRequest("POST", urls, body)
  6601  	if err != nil {
  6602  		return nil, err
  6603  	}
  6604  	req.Header = reqHeaders
  6605  	req.GetBody = getBody
  6606  	googleapi.Expand(req.URL, map[string]string{
  6607  		"parent": c.parent,
  6608  	})
  6609  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6610  }
  6611  
  6612  // Do executes the "artifactregistry.projects.locations.repositories.kfpArtifacts.upload" call.
  6613  // Any non-2xx status code is an error. Response headers are in either
  6614  // *UploadKfpArtifactMediaResponse.ServerResponse.Header or (if a response was
  6615  // returned at all) in error.(*googleapi.Error).Header. Use
  6616  // googleapi.IsNotModified to check whether the returned error was because
  6617  // http.StatusNotModified was returned.
  6618  func (c *ProjectsLocationsRepositoriesKfpArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadKfpArtifactMediaResponse, error) {
  6619  	gensupport.SetOptions(c.urlParams_, opts...)
  6620  	res, err := c.doRequest("json")
  6621  	if res != nil && res.StatusCode == http.StatusNotModified {
  6622  		if res.Body != nil {
  6623  			res.Body.Close()
  6624  		}
  6625  		return nil, gensupport.WrapError(&googleapi.Error{
  6626  			Code:   res.StatusCode,
  6627  			Header: res.Header,
  6628  		})
  6629  	}
  6630  	if err != nil {
  6631  		return nil, err
  6632  	}
  6633  	defer googleapi.CloseBody(res)
  6634  	if err := googleapi.CheckResponse(res); err != nil {
  6635  		return nil, gensupport.WrapError(err)
  6636  	}
  6637  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  6638  	if rx != nil {
  6639  		rx.Client = c.s.client
  6640  		rx.UserAgent = c.s.userAgent()
  6641  		ctx := c.ctx_
  6642  		if ctx == nil {
  6643  			ctx = context.TODO()
  6644  		}
  6645  		res, err = rx.Upload(ctx)
  6646  		if err != nil {
  6647  			return nil, err
  6648  		}
  6649  		defer res.Body.Close()
  6650  		if err := googleapi.CheckResponse(res); err != nil {
  6651  			return nil, gensupport.WrapError(err)
  6652  		}
  6653  	}
  6654  	ret := &UploadKfpArtifactMediaResponse{
  6655  		ServerResponse: googleapi.ServerResponse{
  6656  			Header:         res.Header,
  6657  			HTTPStatusCode: res.StatusCode,
  6658  		},
  6659  	}
  6660  	target := &ret
  6661  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6662  		return nil, err
  6663  	}
  6664  	return ret, nil
  6665  }
  6666  
  6667  type ProjectsLocationsRepositoriesMavenArtifactsGetCall struct {
  6668  	s            *Service
  6669  	name         string
  6670  	urlParams_   gensupport.URLParams
  6671  	ifNoneMatch_ string
  6672  	ctx_         context.Context
  6673  	header_      http.Header
  6674  }
  6675  
  6676  // Get: Gets a maven artifact.
  6677  //
  6678  // - name: The name of the maven artifact.
  6679  func (r *ProjectsLocationsRepositoriesMavenArtifactsService) Get(name string) *ProjectsLocationsRepositoriesMavenArtifactsGetCall {
  6680  	c := &ProjectsLocationsRepositoriesMavenArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6681  	c.name = name
  6682  	return c
  6683  }
  6684  
  6685  // Fields allows partial responses to be retrieved. See
  6686  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6687  // details.
  6688  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesMavenArtifactsGetCall {
  6689  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6690  	return c
  6691  }
  6692  
  6693  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6694  // object's ETag matches the given value. This is useful for getting updates
  6695  // only after the object has changed since the last request.
  6696  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesMavenArtifactsGetCall {
  6697  	c.ifNoneMatch_ = entityTag
  6698  	return c
  6699  }
  6700  
  6701  // Context sets the context to be used in this call's Do method.
  6702  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesMavenArtifactsGetCall {
  6703  	c.ctx_ = ctx
  6704  	return c
  6705  }
  6706  
  6707  // Header returns a http.Header that can be modified by the caller to add
  6708  // headers to the request.
  6709  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) Header() http.Header {
  6710  	if c.header_ == nil {
  6711  		c.header_ = make(http.Header)
  6712  	}
  6713  	return c.header_
  6714  }
  6715  
  6716  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) doRequest(alt string) (*http.Response, error) {
  6717  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6718  	if c.ifNoneMatch_ != "" {
  6719  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6720  	}
  6721  	var body io.Reader = nil
  6722  	c.urlParams_.Set("alt", alt)
  6723  	c.urlParams_.Set("prettyPrint", "false")
  6724  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6725  	urls += "?" + c.urlParams_.Encode()
  6726  	req, err := http.NewRequest("GET", urls, body)
  6727  	if err != nil {
  6728  		return nil, err
  6729  	}
  6730  	req.Header = reqHeaders
  6731  	googleapi.Expand(req.URL, map[string]string{
  6732  		"name": c.name,
  6733  	})
  6734  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6735  }
  6736  
  6737  // Do executes the "artifactregistry.projects.locations.repositories.mavenArtifacts.get" call.
  6738  // Any non-2xx status code is an error. Response headers are in either
  6739  // *MavenArtifact.ServerResponse.Header or (if a response was returned at all)
  6740  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6741  // whether the returned error was because http.StatusNotModified was returned.
  6742  func (c *ProjectsLocationsRepositoriesMavenArtifactsGetCall) Do(opts ...googleapi.CallOption) (*MavenArtifact, error) {
  6743  	gensupport.SetOptions(c.urlParams_, opts...)
  6744  	res, err := c.doRequest("json")
  6745  	if res != nil && res.StatusCode == http.StatusNotModified {
  6746  		if res.Body != nil {
  6747  			res.Body.Close()
  6748  		}
  6749  		return nil, gensupport.WrapError(&googleapi.Error{
  6750  			Code:   res.StatusCode,
  6751  			Header: res.Header,
  6752  		})
  6753  	}
  6754  	if err != nil {
  6755  		return nil, err
  6756  	}
  6757  	defer googleapi.CloseBody(res)
  6758  	if err := googleapi.CheckResponse(res); err != nil {
  6759  		return nil, gensupport.WrapError(err)
  6760  	}
  6761  	ret := &MavenArtifact{
  6762  		ServerResponse: googleapi.ServerResponse{
  6763  			Header:         res.Header,
  6764  			HTTPStatusCode: res.StatusCode,
  6765  		},
  6766  	}
  6767  	target := &ret
  6768  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6769  		return nil, err
  6770  	}
  6771  	return ret, nil
  6772  }
  6773  
  6774  type ProjectsLocationsRepositoriesMavenArtifactsListCall struct {
  6775  	s            *Service
  6776  	parent       string
  6777  	urlParams_   gensupport.URLParams
  6778  	ifNoneMatch_ string
  6779  	ctx_         context.Context
  6780  	header_      http.Header
  6781  }
  6782  
  6783  // List: Lists maven artifacts.
  6784  //
  6785  //   - parent: The name of the parent resource whose maven artifacts will be
  6786  //     listed.
  6787  func (r *ProjectsLocationsRepositoriesMavenArtifactsService) List(parent string) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6788  	c := &ProjectsLocationsRepositoriesMavenArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6789  	c.parent = parent
  6790  	return c
  6791  }
  6792  
  6793  // PageSize sets the optional parameter "pageSize": The maximum number of
  6794  // artifacts to return.
  6795  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6796  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6797  	return c
  6798  }
  6799  
  6800  // PageToken sets the optional parameter "pageToken": The next_page_token value
  6801  // returned from a previous list request, if any.
  6802  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6803  	c.urlParams_.Set("pageToken", pageToken)
  6804  	return c
  6805  }
  6806  
  6807  // Fields allows partial responses to be retrieved. See
  6808  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6809  // details.
  6810  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6811  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6812  	return c
  6813  }
  6814  
  6815  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6816  // object's ETag matches the given value. This is useful for getting updates
  6817  // only after the object has changed since the last request.
  6818  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6819  	c.ifNoneMatch_ = entityTag
  6820  	return c
  6821  }
  6822  
  6823  // Context sets the context to be used in this call's Do method.
  6824  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesMavenArtifactsListCall {
  6825  	c.ctx_ = ctx
  6826  	return c
  6827  }
  6828  
  6829  // Header returns a http.Header that can be modified by the caller to add
  6830  // headers to the request.
  6831  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) Header() http.Header {
  6832  	if c.header_ == nil {
  6833  		c.header_ = make(http.Header)
  6834  	}
  6835  	return c.header_
  6836  }
  6837  
  6838  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) doRequest(alt string) (*http.Response, error) {
  6839  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6840  	if c.ifNoneMatch_ != "" {
  6841  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6842  	}
  6843  	var body io.Reader = nil
  6844  	c.urlParams_.Set("alt", alt)
  6845  	c.urlParams_.Set("prettyPrint", "false")
  6846  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/mavenArtifacts")
  6847  	urls += "?" + c.urlParams_.Encode()
  6848  	req, err := http.NewRequest("GET", urls, body)
  6849  	if err != nil {
  6850  		return nil, err
  6851  	}
  6852  	req.Header = reqHeaders
  6853  	googleapi.Expand(req.URL, map[string]string{
  6854  		"parent": c.parent,
  6855  	})
  6856  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6857  }
  6858  
  6859  // Do executes the "artifactregistry.projects.locations.repositories.mavenArtifacts.list" call.
  6860  // Any non-2xx status code is an error. Response headers are in either
  6861  // *ListMavenArtifactsResponse.ServerResponse.Header or (if a response was
  6862  // returned at all) in error.(*googleapi.Error).Header. Use
  6863  // googleapi.IsNotModified to check whether the returned error was because
  6864  // http.StatusNotModified was returned.
  6865  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) Do(opts ...googleapi.CallOption) (*ListMavenArtifactsResponse, error) {
  6866  	gensupport.SetOptions(c.urlParams_, opts...)
  6867  	res, err := c.doRequest("json")
  6868  	if res != nil && res.StatusCode == http.StatusNotModified {
  6869  		if res.Body != nil {
  6870  			res.Body.Close()
  6871  		}
  6872  		return nil, gensupport.WrapError(&googleapi.Error{
  6873  			Code:   res.StatusCode,
  6874  			Header: res.Header,
  6875  		})
  6876  	}
  6877  	if err != nil {
  6878  		return nil, err
  6879  	}
  6880  	defer googleapi.CloseBody(res)
  6881  	if err := googleapi.CheckResponse(res); err != nil {
  6882  		return nil, gensupport.WrapError(err)
  6883  	}
  6884  	ret := &ListMavenArtifactsResponse{
  6885  		ServerResponse: googleapi.ServerResponse{
  6886  			Header:         res.Header,
  6887  			HTTPStatusCode: res.StatusCode,
  6888  		},
  6889  	}
  6890  	target := &ret
  6891  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6892  		return nil, err
  6893  	}
  6894  	return ret, nil
  6895  }
  6896  
  6897  // Pages invokes f for each page of results.
  6898  // A non-nil error returned from f will halt the iteration.
  6899  // The provided context supersedes any context provided to the Context method.
  6900  func (c *ProjectsLocationsRepositoriesMavenArtifactsListCall) Pages(ctx context.Context, f func(*ListMavenArtifactsResponse) error) error {
  6901  	c.ctx_ = ctx
  6902  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6903  	for {
  6904  		x, err := c.Do()
  6905  		if err != nil {
  6906  			return err
  6907  		}
  6908  		if err := f(x); err != nil {
  6909  			return err
  6910  		}
  6911  		if x.NextPageToken == "" {
  6912  			return nil
  6913  		}
  6914  		c.PageToken(x.NextPageToken)
  6915  	}
  6916  }
  6917  
  6918  type ProjectsLocationsRepositoriesNpmPackagesGetCall struct {
  6919  	s            *Service
  6920  	name         string
  6921  	urlParams_   gensupport.URLParams
  6922  	ifNoneMatch_ string
  6923  	ctx_         context.Context
  6924  	header_      http.Header
  6925  }
  6926  
  6927  // Get: Gets a npm package.
  6928  //
  6929  // - name: The name of the npm package.
  6930  func (r *ProjectsLocationsRepositoriesNpmPackagesService) Get(name string) *ProjectsLocationsRepositoriesNpmPackagesGetCall {
  6931  	c := &ProjectsLocationsRepositoriesNpmPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6932  	c.name = name
  6933  	return c
  6934  }
  6935  
  6936  // Fields allows partial responses to be retrieved. See
  6937  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6938  // details.
  6939  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesNpmPackagesGetCall {
  6940  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6941  	return c
  6942  }
  6943  
  6944  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6945  // object's ETag matches the given value. This is useful for getting updates
  6946  // only after the object has changed since the last request.
  6947  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesNpmPackagesGetCall {
  6948  	c.ifNoneMatch_ = entityTag
  6949  	return c
  6950  }
  6951  
  6952  // Context sets the context to be used in this call's Do method.
  6953  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesNpmPackagesGetCall {
  6954  	c.ctx_ = ctx
  6955  	return c
  6956  }
  6957  
  6958  // Header returns a http.Header that can be modified by the caller to add
  6959  // headers to the request.
  6960  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) Header() http.Header {
  6961  	if c.header_ == nil {
  6962  		c.header_ = make(http.Header)
  6963  	}
  6964  	return c.header_
  6965  }
  6966  
  6967  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  6968  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6969  	if c.ifNoneMatch_ != "" {
  6970  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6971  	}
  6972  	var body io.Reader = nil
  6973  	c.urlParams_.Set("alt", alt)
  6974  	c.urlParams_.Set("prettyPrint", "false")
  6975  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6976  	urls += "?" + c.urlParams_.Encode()
  6977  	req, err := http.NewRequest("GET", urls, body)
  6978  	if err != nil {
  6979  		return nil, err
  6980  	}
  6981  	req.Header = reqHeaders
  6982  	googleapi.Expand(req.URL, map[string]string{
  6983  		"name": c.name,
  6984  	})
  6985  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6986  }
  6987  
  6988  // Do executes the "artifactregistry.projects.locations.repositories.npmPackages.get" call.
  6989  // Any non-2xx status code is an error. Response headers are in either
  6990  // *NpmPackage.ServerResponse.Header or (if a response was returned at all) in
  6991  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6992  // whether the returned error was because http.StatusNotModified was returned.
  6993  func (c *ProjectsLocationsRepositoriesNpmPackagesGetCall) Do(opts ...googleapi.CallOption) (*NpmPackage, error) {
  6994  	gensupport.SetOptions(c.urlParams_, opts...)
  6995  	res, err := c.doRequest("json")
  6996  	if res != nil && res.StatusCode == http.StatusNotModified {
  6997  		if res.Body != nil {
  6998  			res.Body.Close()
  6999  		}
  7000  		return nil, gensupport.WrapError(&googleapi.Error{
  7001  			Code:   res.StatusCode,
  7002  			Header: res.Header,
  7003  		})
  7004  	}
  7005  	if err != nil {
  7006  		return nil, err
  7007  	}
  7008  	defer googleapi.CloseBody(res)
  7009  	if err := googleapi.CheckResponse(res); err != nil {
  7010  		return nil, gensupport.WrapError(err)
  7011  	}
  7012  	ret := &NpmPackage{
  7013  		ServerResponse: googleapi.ServerResponse{
  7014  			Header:         res.Header,
  7015  			HTTPStatusCode: res.StatusCode,
  7016  		},
  7017  	}
  7018  	target := &ret
  7019  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7020  		return nil, err
  7021  	}
  7022  	return ret, nil
  7023  }
  7024  
  7025  type ProjectsLocationsRepositoriesNpmPackagesListCall struct {
  7026  	s            *Service
  7027  	parent       string
  7028  	urlParams_   gensupport.URLParams
  7029  	ifNoneMatch_ string
  7030  	ctx_         context.Context
  7031  	header_      http.Header
  7032  }
  7033  
  7034  // List: Lists npm packages.
  7035  //
  7036  // - parent: The name of the parent resource whose npm packages will be listed.
  7037  func (r *ProjectsLocationsRepositoriesNpmPackagesService) List(parent string) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7038  	c := &ProjectsLocationsRepositoriesNpmPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7039  	c.parent = parent
  7040  	return c
  7041  }
  7042  
  7043  // PageSize sets the optional parameter "pageSize": The maximum number of
  7044  // artifacts to return.
  7045  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7046  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7047  	return c
  7048  }
  7049  
  7050  // PageToken sets the optional parameter "pageToken": The next_page_token value
  7051  // returned from a previous list request, if any.
  7052  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7053  	c.urlParams_.Set("pageToken", pageToken)
  7054  	return c
  7055  }
  7056  
  7057  // Fields allows partial responses to be retrieved. See
  7058  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7059  // details.
  7060  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7061  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7062  	return c
  7063  }
  7064  
  7065  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7066  // object's ETag matches the given value. This is useful for getting updates
  7067  // only after the object has changed since the last request.
  7068  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7069  	c.ifNoneMatch_ = entityTag
  7070  	return c
  7071  }
  7072  
  7073  // Context sets the context to be used in this call's Do method.
  7074  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesNpmPackagesListCall {
  7075  	c.ctx_ = ctx
  7076  	return c
  7077  }
  7078  
  7079  // Header returns a http.Header that can be modified by the caller to add
  7080  // headers to the request.
  7081  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) Header() http.Header {
  7082  	if c.header_ == nil {
  7083  		c.header_ = make(http.Header)
  7084  	}
  7085  	return c.header_
  7086  }
  7087  
  7088  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) doRequest(alt string) (*http.Response, error) {
  7089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7090  	if c.ifNoneMatch_ != "" {
  7091  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7092  	}
  7093  	var body io.Reader = nil
  7094  	c.urlParams_.Set("alt", alt)
  7095  	c.urlParams_.Set("prettyPrint", "false")
  7096  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/npmPackages")
  7097  	urls += "?" + c.urlParams_.Encode()
  7098  	req, err := http.NewRequest("GET", urls, body)
  7099  	if err != nil {
  7100  		return nil, err
  7101  	}
  7102  	req.Header = reqHeaders
  7103  	googleapi.Expand(req.URL, map[string]string{
  7104  		"parent": c.parent,
  7105  	})
  7106  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7107  }
  7108  
  7109  // Do executes the "artifactregistry.projects.locations.repositories.npmPackages.list" call.
  7110  // Any non-2xx status code is an error. Response headers are in either
  7111  // *ListNpmPackagesResponse.ServerResponse.Header or (if a response was
  7112  // returned at all) in error.(*googleapi.Error).Header. Use
  7113  // googleapi.IsNotModified to check whether the returned error was because
  7114  // http.StatusNotModified was returned.
  7115  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) Do(opts ...googleapi.CallOption) (*ListNpmPackagesResponse, error) {
  7116  	gensupport.SetOptions(c.urlParams_, opts...)
  7117  	res, err := c.doRequest("json")
  7118  	if res != nil && res.StatusCode == http.StatusNotModified {
  7119  		if res.Body != nil {
  7120  			res.Body.Close()
  7121  		}
  7122  		return nil, gensupport.WrapError(&googleapi.Error{
  7123  			Code:   res.StatusCode,
  7124  			Header: res.Header,
  7125  		})
  7126  	}
  7127  	if err != nil {
  7128  		return nil, err
  7129  	}
  7130  	defer googleapi.CloseBody(res)
  7131  	if err := googleapi.CheckResponse(res); err != nil {
  7132  		return nil, gensupport.WrapError(err)
  7133  	}
  7134  	ret := &ListNpmPackagesResponse{
  7135  		ServerResponse: googleapi.ServerResponse{
  7136  			Header:         res.Header,
  7137  			HTTPStatusCode: res.StatusCode,
  7138  		},
  7139  	}
  7140  	target := &ret
  7141  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7142  		return nil, err
  7143  	}
  7144  	return ret, nil
  7145  }
  7146  
  7147  // Pages invokes f for each page of results.
  7148  // A non-nil error returned from f will halt the iteration.
  7149  // The provided context supersedes any context provided to the Context method.
  7150  func (c *ProjectsLocationsRepositoriesNpmPackagesListCall) Pages(ctx context.Context, f func(*ListNpmPackagesResponse) error) error {
  7151  	c.ctx_ = ctx
  7152  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7153  	for {
  7154  		x, err := c.Do()
  7155  		if err != nil {
  7156  			return err
  7157  		}
  7158  		if err := f(x); err != nil {
  7159  			return err
  7160  		}
  7161  		if x.NextPageToken == "" {
  7162  			return nil
  7163  		}
  7164  		c.PageToken(x.NextPageToken)
  7165  	}
  7166  }
  7167  
  7168  type ProjectsLocationsRepositoriesPackagesDeleteCall struct {
  7169  	s          *Service
  7170  	name       string
  7171  	urlParams_ gensupport.URLParams
  7172  	ctx_       context.Context
  7173  	header_    http.Header
  7174  }
  7175  
  7176  // Delete: Deletes a package and all of its versions and tags. The returned
  7177  // operation will complete once the package has been deleted.
  7178  //
  7179  // - name: The name of the package to delete.
  7180  func (r *ProjectsLocationsRepositoriesPackagesService) Delete(name string) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  7181  	c := &ProjectsLocationsRepositoriesPackagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7182  	c.name = name
  7183  	return c
  7184  }
  7185  
  7186  // Fields allows partial responses to be retrieved. See
  7187  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7188  // details.
  7189  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  7190  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7191  	return c
  7192  }
  7193  
  7194  // Context sets the context to be used in this call's Do method.
  7195  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  7196  	c.ctx_ = ctx
  7197  	return c
  7198  }
  7199  
  7200  // Header returns a http.Header that can be modified by the caller to add
  7201  // headers to the request.
  7202  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Header() http.Header {
  7203  	if c.header_ == nil {
  7204  		c.header_ = make(http.Header)
  7205  	}
  7206  	return c.header_
  7207  }
  7208  
  7209  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7210  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7211  	var body io.Reader = nil
  7212  	c.urlParams_.Set("alt", alt)
  7213  	c.urlParams_.Set("prettyPrint", "false")
  7214  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7215  	urls += "?" + c.urlParams_.Encode()
  7216  	req, err := http.NewRequest("DELETE", urls, body)
  7217  	if err != nil {
  7218  		return nil, err
  7219  	}
  7220  	req.Header = reqHeaders
  7221  	googleapi.Expand(req.URL, map[string]string{
  7222  		"name": c.name,
  7223  	})
  7224  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7225  }
  7226  
  7227  // Do executes the "artifactregistry.projects.locations.repositories.packages.delete" call.
  7228  // Any non-2xx status code is an error. Response headers are in either
  7229  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7230  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7231  // whether the returned error was because http.StatusNotModified was returned.
  7232  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7233  	gensupport.SetOptions(c.urlParams_, opts...)
  7234  	res, err := c.doRequest("json")
  7235  	if res != nil && res.StatusCode == http.StatusNotModified {
  7236  		if res.Body != nil {
  7237  			res.Body.Close()
  7238  		}
  7239  		return nil, gensupport.WrapError(&googleapi.Error{
  7240  			Code:   res.StatusCode,
  7241  			Header: res.Header,
  7242  		})
  7243  	}
  7244  	if err != nil {
  7245  		return nil, err
  7246  	}
  7247  	defer googleapi.CloseBody(res)
  7248  	if err := googleapi.CheckResponse(res); err != nil {
  7249  		return nil, gensupport.WrapError(err)
  7250  	}
  7251  	ret := &Operation{
  7252  		ServerResponse: googleapi.ServerResponse{
  7253  			Header:         res.Header,
  7254  			HTTPStatusCode: res.StatusCode,
  7255  		},
  7256  	}
  7257  	target := &ret
  7258  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7259  		return nil, err
  7260  	}
  7261  	return ret, nil
  7262  }
  7263  
  7264  type ProjectsLocationsRepositoriesPackagesGetCall struct {
  7265  	s            *Service
  7266  	name         string
  7267  	urlParams_   gensupport.URLParams
  7268  	ifNoneMatch_ string
  7269  	ctx_         context.Context
  7270  	header_      http.Header
  7271  }
  7272  
  7273  // Get: Gets a package.
  7274  //
  7275  // - name: The name of the package to retrieve.
  7276  func (r *ProjectsLocationsRepositoriesPackagesService) Get(name string) *ProjectsLocationsRepositoriesPackagesGetCall {
  7277  	c := &ProjectsLocationsRepositoriesPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7278  	c.name = name
  7279  	return c
  7280  }
  7281  
  7282  // Fields allows partial responses to be retrieved. See
  7283  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7284  // details.
  7285  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesGetCall {
  7286  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7287  	return c
  7288  }
  7289  
  7290  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7291  // object's ETag matches the given value. This is useful for getting updates
  7292  // only after the object has changed since the last request.
  7293  func (c *ProjectsLocationsRepositoriesPackagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesGetCall {
  7294  	c.ifNoneMatch_ = entityTag
  7295  	return c
  7296  }
  7297  
  7298  // Context sets the context to be used in this call's Do method.
  7299  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesGetCall {
  7300  	c.ctx_ = ctx
  7301  	return c
  7302  }
  7303  
  7304  // Header returns a http.Header that can be modified by the caller to add
  7305  // headers to the request.
  7306  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Header() http.Header {
  7307  	if c.header_ == nil {
  7308  		c.header_ = make(http.Header)
  7309  	}
  7310  	return c.header_
  7311  }
  7312  
  7313  func (c *ProjectsLocationsRepositoriesPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  7314  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7315  	if c.ifNoneMatch_ != "" {
  7316  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7317  	}
  7318  	var body io.Reader = nil
  7319  	c.urlParams_.Set("alt", alt)
  7320  	c.urlParams_.Set("prettyPrint", "false")
  7321  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7322  	urls += "?" + c.urlParams_.Encode()
  7323  	req, err := http.NewRequest("GET", urls, body)
  7324  	if err != nil {
  7325  		return nil, err
  7326  	}
  7327  	req.Header = reqHeaders
  7328  	googleapi.Expand(req.URL, map[string]string{
  7329  		"name": c.name,
  7330  	})
  7331  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7332  }
  7333  
  7334  // Do executes the "artifactregistry.projects.locations.repositories.packages.get" call.
  7335  // Any non-2xx status code is an error. Response headers are in either
  7336  // *Package.ServerResponse.Header or (if a response was returned at all) in
  7337  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7338  // whether the returned error was because http.StatusNotModified was returned.
  7339  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Do(opts ...googleapi.CallOption) (*Package, error) {
  7340  	gensupport.SetOptions(c.urlParams_, opts...)
  7341  	res, err := c.doRequest("json")
  7342  	if res != nil && res.StatusCode == http.StatusNotModified {
  7343  		if res.Body != nil {
  7344  			res.Body.Close()
  7345  		}
  7346  		return nil, gensupport.WrapError(&googleapi.Error{
  7347  			Code:   res.StatusCode,
  7348  			Header: res.Header,
  7349  		})
  7350  	}
  7351  	if err != nil {
  7352  		return nil, err
  7353  	}
  7354  	defer googleapi.CloseBody(res)
  7355  	if err := googleapi.CheckResponse(res); err != nil {
  7356  		return nil, gensupport.WrapError(err)
  7357  	}
  7358  	ret := &Package{
  7359  		ServerResponse: googleapi.ServerResponse{
  7360  			Header:         res.Header,
  7361  			HTTPStatusCode: res.StatusCode,
  7362  		},
  7363  	}
  7364  	target := &ret
  7365  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7366  		return nil, err
  7367  	}
  7368  	return ret, nil
  7369  }
  7370  
  7371  type ProjectsLocationsRepositoriesPackagesListCall struct {
  7372  	s            *Service
  7373  	parent       string
  7374  	urlParams_   gensupport.URLParams
  7375  	ifNoneMatch_ string
  7376  	ctx_         context.Context
  7377  	header_      http.Header
  7378  }
  7379  
  7380  // List: Lists packages.
  7381  //
  7382  // - parent: The name of the parent resource whose packages will be listed.
  7383  func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *ProjectsLocationsRepositoriesPackagesListCall {
  7384  	c := &ProjectsLocationsRepositoriesPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7385  	c.parent = parent
  7386  	return c
  7387  }
  7388  
  7389  // PageSize sets the optional parameter "pageSize": The maximum number of
  7390  // packages to return. Maximum page size is 1,000.
  7391  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall {
  7392  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7393  	return c
  7394  }
  7395  
  7396  // PageToken sets the optional parameter "pageToken": The next_page_token value
  7397  // returned from a previous list request, if any.
  7398  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesListCall {
  7399  	c.urlParams_.Set("pageToken", pageToken)
  7400  	return c
  7401  }
  7402  
  7403  // Fields allows partial responses to be retrieved. See
  7404  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7405  // details.
  7406  func (c *ProjectsLocationsRepositoriesPackagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesListCall {
  7407  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7408  	return c
  7409  }
  7410  
  7411  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7412  // object's ETag matches the given value. This is useful for getting updates
  7413  // only after the object has changed since the last request.
  7414  func (c *ProjectsLocationsRepositoriesPackagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesListCall {
  7415  	c.ifNoneMatch_ = entityTag
  7416  	return c
  7417  }
  7418  
  7419  // Context sets the context to be used in this call's Do method.
  7420  func (c *ProjectsLocationsRepositoriesPackagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesListCall {
  7421  	c.ctx_ = ctx
  7422  	return c
  7423  }
  7424  
  7425  // Header returns a http.Header that can be modified by the caller to add
  7426  // headers to the request.
  7427  func (c *ProjectsLocationsRepositoriesPackagesListCall) Header() http.Header {
  7428  	if c.header_ == nil {
  7429  		c.header_ = make(http.Header)
  7430  	}
  7431  	return c.header_
  7432  }
  7433  
  7434  func (c *ProjectsLocationsRepositoriesPackagesListCall) doRequest(alt string) (*http.Response, error) {
  7435  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7436  	if c.ifNoneMatch_ != "" {
  7437  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7438  	}
  7439  	var body io.Reader = nil
  7440  	c.urlParams_.Set("alt", alt)
  7441  	c.urlParams_.Set("prettyPrint", "false")
  7442  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/packages")
  7443  	urls += "?" + c.urlParams_.Encode()
  7444  	req, err := http.NewRequest("GET", urls, body)
  7445  	if err != nil {
  7446  		return nil, err
  7447  	}
  7448  	req.Header = reqHeaders
  7449  	googleapi.Expand(req.URL, map[string]string{
  7450  		"parent": c.parent,
  7451  	})
  7452  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7453  }
  7454  
  7455  // Do executes the "artifactregistry.projects.locations.repositories.packages.list" call.
  7456  // Any non-2xx status code is an error. Response headers are in either
  7457  // *ListPackagesResponse.ServerResponse.Header or (if a response was returned
  7458  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7459  // check whether the returned error was because http.StatusNotModified was
  7460  // returned.
  7461  func (c *ProjectsLocationsRepositoriesPackagesListCall) Do(opts ...googleapi.CallOption) (*ListPackagesResponse, error) {
  7462  	gensupport.SetOptions(c.urlParams_, opts...)
  7463  	res, err := c.doRequest("json")
  7464  	if res != nil && res.StatusCode == http.StatusNotModified {
  7465  		if res.Body != nil {
  7466  			res.Body.Close()
  7467  		}
  7468  		return nil, gensupport.WrapError(&googleapi.Error{
  7469  			Code:   res.StatusCode,
  7470  			Header: res.Header,
  7471  		})
  7472  	}
  7473  	if err != nil {
  7474  		return nil, err
  7475  	}
  7476  	defer googleapi.CloseBody(res)
  7477  	if err := googleapi.CheckResponse(res); err != nil {
  7478  		return nil, gensupport.WrapError(err)
  7479  	}
  7480  	ret := &ListPackagesResponse{
  7481  		ServerResponse: googleapi.ServerResponse{
  7482  			Header:         res.Header,
  7483  			HTTPStatusCode: res.StatusCode,
  7484  		},
  7485  	}
  7486  	target := &ret
  7487  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7488  		return nil, err
  7489  	}
  7490  	return ret, nil
  7491  }
  7492  
  7493  // Pages invokes f for each page of results.
  7494  // A non-nil error returned from f will halt the iteration.
  7495  // The provided context supersedes any context provided to the Context method.
  7496  func (c *ProjectsLocationsRepositoriesPackagesListCall) Pages(ctx context.Context, f func(*ListPackagesResponse) error) error {
  7497  	c.ctx_ = ctx
  7498  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7499  	for {
  7500  		x, err := c.Do()
  7501  		if err != nil {
  7502  			return err
  7503  		}
  7504  		if err := f(x); err != nil {
  7505  			return err
  7506  		}
  7507  		if x.NextPageToken == "" {
  7508  			return nil
  7509  		}
  7510  		c.PageToken(x.NextPageToken)
  7511  	}
  7512  }
  7513  
  7514  type ProjectsLocationsRepositoriesPackagesPatchCall struct {
  7515  	s          *Service
  7516  	name       string
  7517  	package_   *Package
  7518  	urlParams_ gensupport.URLParams
  7519  	ctx_       context.Context
  7520  	header_    http.Header
  7521  }
  7522  
  7523  // Patch: Updates a package.
  7524  //
  7525  //   - name: The name of the package, for example:
  7526  //     `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If
  7527  //     the package ID part contains slashes, the slashes are escaped.
  7528  func (r *ProjectsLocationsRepositoriesPackagesService) Patch(name string, package_ *Package) *ProjectsLocationsRepositoriesPackagesPatchCall {
  7529  	c := &ProjectsLocationsRepositoriesPackagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7530  	c.name = name
  7531  	c.package_ = package_
  7532  	return c
  7533  }
  7534  
  7535  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  7536  // to the resource. For the `FieldMask` definition, see
  7537  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  7538  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesPatchCall {
  7539  	c.urlParams_.Set("updateMask", updateMask)
  7540  	return c
  7541  }
  7542  
  7543  // Fields allows partial responses to be retrieved. See
  7544  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7545  // details.
  7546  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesPatchCall {
  7547  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7548  	return c
  7549  }
  7550  
  7551  // Context sets the context to be used in this call's Do method.
  7552  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesPatchCall {
  7553  	c.ctx_ = ctx
  7554  	return c
  7555  }
  7556  
  7557  // Header returns a http.Header that can be modified by the caller to add
  7558  // headers to the request.
  7559  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Header() http.Header {
  7560  	if c.header_ == nil {
  7561  		c.header_ = make(http.Header)
  7562  	}
  7563  	return c.header_
  7564  }
  7565  
  7566  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) doRequest(alt string) (*http.Response, error) {
  7567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7568  	var body io.Reader = nil
  7569  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.package_)
  7570  	if err != nil {
  7571  		return nil, err
  7572  	}
  7573  	c.urlParams_.Set("alt", alt)
  7574  	c.urlParams_.Set("prettyPrint", "false")
  7575  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7576  	urls += "?" + c.urlParams_.Encode()
  7577  	req, err := http.NewRequest("PATCH", urls, body)
  7578  	if err != nil {
  7579  		return nil, err
  7580  	}
  7581  	req.Header = reqHeaders
  7582  	googleapi.Expand(req.URL, map[string]string{
  7583  		"name": c.name,
  7584  	})
  7585  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7586  }
  7587  
  7588  // Do executes the "artifactregistry.projects.locations.repositories.packages.patch" call.
  7589  // Any non-2xx status code is an error. Response headers are in either
  7590  // *Package.ServerResponse.Header or (if a response was returned at all) in
  7591  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7592  // whether the returned error was because http.StatusNotModified was returned.
  7593  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Do(opts ...googleapi.CallOption) (*Package, error) {
  7594  	gensupport.SetOptions(c.urlParams_, opts...)
  7595  	res, err := c.doRequest("json")
  7596  	if res != nil && res.StatusCode == http.StatusNotModified {
  7597  		if res.Body != nil {
  7598  			res.Body.Close()
  7599  		}
  7600  		return nil, gensupport.WrapError(&googleapi.Error{
  7601  			Code:   res.StatusCode,
  7602  			Header: res.Header,
  7603  		})
  7604  	}
  7605  	if err != nil {
  7606  		return nil, err
  7607  	}
  7608  	defer googleapi.CloseBody(res)
  7609  	if err := googleapi.CheckResponse(res); err != nil {
  7610  		return nil, gensupport.WrapError(err)
  7611  	}
  7612  	ret := &Package{
  7613  		ServerResponse: googleapi.ServerResponse{
  7614  			Header:         res.Header,
  7615  			HTTPStatusCode: res.StatusCode,
  7616  		},
  7617  	}
  7618  	target := &ret
  7619  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7620  		return nil, err
  7621  	}
  7622  	return ret, nil
  7623  }
  7624  
  7625  type ProjectsLocationsRepositoriesPackagesTagsCreateCall struct {
  7626  	s          *Service
  7627  	parent     string
  7628  	tag        *Tag
  7629  	urlParams_ gensupport.URLParams
  7630  	ctx_       context.Context
  7631  	header_    http.Header
  7632  }
  7633  
  7634  // Create: Creates a tag.
  7635  //
  7636  // - parent: The name of the parent resource where the tag will be created.
  7637  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Create(parent string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  7638  	c := &ProjectsLocationsRepositoriesPackagesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7639  	c.parent = parent
  7640  	c.tag = tag
  7641  	return c
  7642  }
  7643  
  7644  // TagId sets the optional parameter "tagId": The tag id to use for this
  7645  // repository.
  7646  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) TagId(tagId string) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  7647  	c.urlParams_.Set("tagId", tagId)
  7648  	return c
  7649  }
  7650  
  7651  // Fields allows partial responses to be retrieved. See
  7652  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7653  // details.
  7654  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  7655  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7656  	return c
  7657  }
  7658  
  7659  // Context sets the context to be used in this call's Do method.
  7660  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  7661  	c.ctx_ = ctx
  7662  	return c
  7663  }
  7664  
  7665  // Header returns a http.Header that can be modified by the caller to add
  7666  // headers to the request.
  7667  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Header() http.Header {
  7668  	if c.header_ == nil {
  7669  		c.header_ = make(http.Header)
  7670  	}
  7671  	return c.header_
  7672  }
  7673  
  7674  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) doRequest(alt string) (*http.Response, error) {
  7675  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7676  	var body io.Reader = nil
  7677  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  7678  	if err != nil {
  7679  		return nil, err
  7680  	}
  7681  	c.urlParams_.Set("alt", alt)
  7682  	c.urlParams_.Set("prettyPrint", "false")
  7683  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tags")
  7684  	urls += "?" + c.urlParams_.Encode()
  7685  	req, err := http.NewRequest("POST", urls, body)
  7686  	if err != nil {
  7687  		return nil, err
  7688  	}
  7689  	req.Header = reqHeaders
  7690  	googleapi.Expand(req.URL, map[string]string{
  7691  		"parent": c.parent,
  7692  	})
  7693  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7694  }
  7695  
  7696  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.create" call.
  7697  // Any non-2xx status code is an error. Response headers are in either
  7698  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  7699  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7700  // whether the returned error was because http.StatusNotModified was returned.
  7701  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  7702  	gensupport.SetOptions(c.urlParams_, opts...)
  7703  	res, err := c.doRequest("json")
  7704  	if res != nil && res.StatusCode == http.StatusNotModified {
  7705  		if res.Body != nil {
  7706  			res.Body.Close()
  7707  		}
  7708  		return nil, gensupport.WrapError(&googleapi.Error{
  7709  			Code:   res.StatusCode,
  7710  			Header: res.Header,
  7711  		})
  7712  	}
  7713  	if err != nil {
  7714  		return nil, err
  7715  	}
  7716  	defer googleapi.CloseBody(res)
  7717  	if err := googleapi.CheckResponse(res); err != nil {
  7718  		return nil, gensupport.WrapError(err)
  7719  	}
  7720  	ret := &Tag{
  7721  		ServerResponse: googleapi.ServerResponse{
  7722  			Header:         res.Header,
  7723  			HTTPStatusCode: res.StatusCode,
  7724  		},
  7725  	}
  7726  	target := &ret
  7727  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7728  		return nil, err
  7729  	}
  7730  	return ret, nil
  7731  }
  7732  
  7733  type ProjectsLocationsRepositoriesPackagesTagsDeleteCall struct {
  7734  	s          *Service
  7735  	name       string
  7736  	urlParams_ gensupport.URLParams
  7737  	ctx_       context.Context
  7738  	header_    http.Header
  7739  }
  7740  
  7741  // Delete: Deletes a tag.
  7742  //
  7743  // - name: The name of the tag to delete.
  7744  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  7745  	c := &ProjectsLocationsRepositoriesPackagesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7746  	c.name = name
  7747  	return c
  7748  }
  7749  
  7750  // Fields allows partial responses to be retrieved. See
  7751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7752  // details.
  7753  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  7754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7755  	return c
  7756  }
  7757  
  7758  // Context sets the context to be used in this call's Do method.
  7759  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  7760  	c.ctx_ = ctx
  7761  	return c
  7762  }
  7763  
  7764  // Header returns a http.Header that can be modified by the caller to add
  7765  // headers to the request.
  7766  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Header() http.Header {
  7767  	if c.header_ == nil {
  7768  		c.header_ = make(http.Header)
  7769  	}
  7770  	return c.header_
  7771  }
  7772  
  7773  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7774  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7775  	var body io.Reader = nil
  7776  	c.urlParams_.Set("alt", alt)
  7777  	c.urlParams_.Set("prettyPrint", "false")
  7778  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7779  	urls += "?" + c.urlParams_.Encode()
  7780  	req, err := http.NewRequest("DELETE", urls, body)
  7781  	if err != nil {
  7782  		return nil, err
  7783  	}
  7784  	req.Header = reqHeaders
  7785  	googleapi.Expand(req.URL, map[string]string{
  7786  		"name": c.name,
  7787  	})
  7788  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7789  }
  7790  
  7791  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.delete" call.
  7792  // Any non-2xx status code is an error. Response headers are in either
  7793  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7794  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7795  // whether the returned error was because http.StatusNotModified was returned.
  7796  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7797  	gensupport.SetOptions(c.urlParams_, opts...)
  7798  	res, err := c.doRequest("json")
  7799  	if res != nil && res.StatusCode == http.StatusNotModified {
  7800  		if res.Body != nil {
  7801  			res.Body.Close()
  7802  		}
  7803  		return nil, gensupport.WrapError(&googleapi.Error{
  7804  			Code:   res.StatusCode,
  7805  			Header: res.Header,
  7806  		})
  7807  	}
  7808  	if err != nil {
  7809  		return nil, err
  7810  	}
  7811  	defer googleapi.CloseBody(res)
  7812  	if err := googleapi.CheckResponse(res); err != nil {
  7813  		return nil, gensupport.WrapError(err)
  7814  	}
  7815  	ret := &Empty{
  7816  		ServerResponse: googleapi.ServerResponse{
  7817  			Header:         res.Header,
  7818  			HTTPStatusCode: res.StatusCode,
  7819  		},
  7820  	}
  7821  	target := &ret
  7822  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7823  		return nil, err
  7824  	}
  7825  	return ret, nil
  7826  }
  7827  
  7828  type ProjectsLocationsRepositoriesPackagesTagsGetCall struct {
  7829  	s            *Service
  7830  	name         string
  7831  	urlParams_   gensupport.URLParams
  7832  	ifNoneMatch_ string
  7833  	ctx_         context.Context
  7834  	header_      http.Header
  7835  }
  7836  
  7837  // Get: Gets a tag.
  7838  //
  7839  // - name: The name of the tag to retrieve.
  7840  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Get(name string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  7841  	c := &ProjectsLocationsRepositoriesPackagesTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7842  	c.name = name
  7843  	return c
  7844  }
  7845  
  7846  // Fields allows partial responses to be retrieved. See
  7847  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7848  // details.
  7849  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  7850  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7851  	return c
  7852  }
  7853  
  7854  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7855  // object's ETag matches the given value. This is useful for getting updates
  7856  // only after the object has changed since the last request.
  7857  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  7858  	c.ifNoneMatch_ = entityTag
  7859  	return c
  7860  }
  7861  
  7862  // Context sets the context to be used in this call's Do method.
  7863  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  7864  	c.ctx_ = ctx
  7865  	return c
  7866  }
  7867  
  7868  // Header returns a http.Header that can be modified by the caller to add
  7869  // headers to the request.
  7870  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Header() http.Header {
  7871  	if c.header_ == nil {
  7872  		c.header_ = make(http.Header)
  7873  	}
  7874  	return c.header_
  7875  }
  7876  
  7877  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) doRequest(alt string) (*http.Response, error) {
  7878  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7879  	if c.ifNoneMatch_ != "" {
  7880  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7881  	}
  7882  	var body io.Reader = nil
  7883  	c.urlParams_.Set("alt", alt)
  7884  	c.urlParams_.Set("prettyPrint", "false")
  7885  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7886  	urls += "?" + c.urlParams_.Encode()
  7887  	req, err := http.NewRequest("GET", urls, body)
  7888  	if err != nil {
  7889  		return nil, err
  7890  	}
  7891  	req.Header = reqHeaders
  7892  	googleapi.Expand(req.URL, map[string]string{
  7893  		"name": c.name,
  7894  	})
  7895  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7896  }
  7897  
  7898  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.get" call.
  7899  // Any non-2xx status code is an error. Response headers are in either
  7900  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  7901  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7902  // whether the returned error was because http.StatusNotModified was returned.
  7903  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  7904  	gensupport.SetOptions(c.urlParams_, opts...)
  7905  	res, err := c.doRequest("json")
  7906  	if res != nil && res.StatusCode == http.StatusNotModified {
  7907  		if res.Body != nil {
  7908  			res.Body.Close()
  7909  		}
  7910  		return nil, gensupport.WrapError(&googleapi.Error{
  7911  			Code:   res.StatusCode,
  7912  			Header: res.Header,
  7913  		})
  7914  	}
  7915  	if err != nil {
  7916  		return nil, err
  7917  	}
  7918  	defer googleapi.CloseBody(res)
  7919  	if err := googleapi.CheckResponse(res); err != nil {
  7920  		return nil, gensupport.WrapError(err)
  7921  	}
  7922  	ret := &Tag{
  7923  		ServerResponse: googleapi.ServerResponse{
  7924  			Header:         res.Header,
  7925  			HTTPStatusCode: res.StatusCode,
  7926  		},
  7927  	}
  7928  	target := &ret
  7929  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7930  		return nil, err
  7931  	}
  7932  	return ret, nil
  7933  }
  7934  
  7935  type ProjectsLocationsRepositoriesPackagesTagsListCall struct {
  7936  	s            *Service
  7937  	parent       string
  7938  	urlParams_   gensupport.URLParams
  7939  	ifNoneMatch_ string
  7940  	ctx_         context.Context
  7941  	header_      http.Header
  7942  }
  7943  
  7944  // List: Lists tags.
  7945  //
  7946  //   - parent: The name of the parent package whose tags will be listed. For
  7947  //     example:
  7948  //     `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
  7949  func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7950  	c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7951  	c.parent = parent
  7952  	return c
  7953  }
  7954  
  7955  // Filter sets the optional parameter "filter": An expression for filtering the
  7956  // results of the request. Filter rules are case insensitive. The fields
  7957  // eligible for filtering are: * `version` An example of using a filter: *
  7958  // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/
  7959  // versions/1.0" --> Tags that are applied to the version `1.0` in package
  7960  // `pkg1`.
  7961  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7962  	c.urlParams_.Set("filter", filter)
  7963  	return c
  7964  }
  7965  
  7966  // PageSize sets the optional parameter "pageSize": The maximum number of tags
  7967  // to return. Maximum page size is 10,000.
  7968  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7969  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7970  	return c
  7971  }
  7972  
  7973  // PageToken sets the optional parameter "pageToken": The next_page_token value
  7974  // returned from a previous list request, if any.
  7975  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7976  	c.urlParams_.Set("pageToken", pageToken)
  7977  	return c
  7978  }
  7979  
  7980  // Fields allows partial responses to be retrieved. See
  7981  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7982  // details.
  7983  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7984  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7985  	return c
  7986  }
  7987  
  7988  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7989  // object's ETag matches the given value. This is useful for getting updates
  7990  // only after the object has changed since the last request.
  7991  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7992  	c.ifNoneMatch_ = entityTag
  7993  	return c
  7994  }
  7995  
  7996  // Context sets the context to be used in this call's Do method.
  7997  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  7998  	c.ctx_ = ctx
  7999  	return c
  8000  }
  8001  
  8002  // Header returns a http.Header that can be modified by the caller to add
  8003  // headers to the request.
  8004  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Header() http.Header {
  8005  	if c.header_ == nil {
  8006  		c.header_ = make(http.Header)
  8007  	}
  8008  	return c.header_
  8009  }
  8010  
  8011  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) doRequest(alt string) (*http.Response, error) {
  8012  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8013  	if c.ifNoneMatch_ != "" {
  8014  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8015  	}
  8016  	var body io.Reader = nil
  8017  	c.urlParams_.Set("alt", alt)
  8018  	c.urlParams_.Set("prettyPrint", "false")
  8019  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tags")
  8020  	urls += "?" + c.urlParams_.Encode()
  8021  	req, err := http.NewRequest("GET", urls, body)
  8022  	if err != nil {
  8023  		return nil, err
  8024  	}
  8025  	req.Header = reqHeaders
  8026  	googleapi.Expand(req.URL, map[string]string{
  8027  		"parent": c.parent,
  8028  	})
  8029  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8030  }
  8031  
  8032  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.list" call.
  8033  // Any non-2xx status code is an error. Response headers are in either
  8034  // *ListTagsResponse.ServerResponse.Header or (if a response was returned at
  8035  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8036  // check whether the returned error was because http.StatusNotModified was
  8037  // returned.
  8038  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi.CallOption) (*ListTagsResponse, error) {
  8039  	gensupport.SetOptions(c.urlParams_, opts...)
  8040  	res, err := c.doRequest("json")
  8041  	if res != nil && res.StatusCode == http.StatusNotModified {
  8042  		if res.Body != nil {
  8043  			res.Body.Close()
  8044  		}
  8045  		return nil, gensupport.WrapError(&googleapi.Error{
  8046  			Code:   res.StatusCode,
  8047  			Header: res.Header,
  8048  		})
  8049  	}
  8050  	if err != nil {
  8051  		return nil, err
  8052  	}
  8053  	defer googleapi.CloseBody(res)
  8054  	if err := googleapi.CheckResponse(res); err != nil {
  8055  		return nil, gensupport.WrapError(err)
  8056  	}
  8057  	ret := &ListTagsResponse{
  8058  		ServerResponse: googleapi.ServerResponse{
  8059  			Header:         res.Header,
  8060  			HTTPStatusCode: res.StatusCode,
  8061  		},
  8062  	}
  8063  	target := &ret
  8064  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8065  		return nil, err
  8066  	}
  8067  	return ret, nil
  8068  }
  8069  
  8070  // Pages invokes f for each page of results.
  8071  // A non-nil error returned from f will halt the iteration.
  8072  // The provided context supersedes any context provided to the Context method.
  8073  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Pages(ctx context.Context, f func(*ListTagsResponse) error) error {
  8074  	c.ctx_ = ctx
  8075  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8076  	for {
  8077  		x, err := c.Do()
  8078  		if err != nil {
  8079  			return err
  8080  		}
  8081  		if err := f(x); err != nil {
  8082  			return err
  8083  		}
  8084  		if x.NextPageToken == "" {
  8085  			return nil
  8086  		}
  8087  		c.PageToken(x.NextPageToken)
  8088  	}
  8089  }
  8090  
  8091  type ProjectsLocationsRepositoriesPackagesTagsPatchCall struct {
  8092  	s          *Service
  8093  	name       string
  8094  	tag        *Tag
  8095  	urlParams_ gensupport.URLParams
  8096  	ctx_       context.Context
  8097  	header_    http.Header
  8098  }
  8099  
  8100  // Patch: Updates a tag.
  8101  //
  8102  //   - name: The name of the tag, for example:
  8103  //     "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/ta
  8104  //     g1". If the package part contains slashes, the slashes are escaped. The
  8105  //     tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else
  8106  //     must be URL encoded.
  8107  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Patch(name string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  8108  	c := &ProjectsLocationsRepositoriesPackagesTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8109  	c.name = name
  8110  	c.tag = tag
  8111  	return c
  8112  }
  8113  
  8114  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  8115  // to the resource. For the `FieldMask` definition, see
  8116  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  8117  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  8118  	c.urlParams_.Set("updateMask", updateMask)
  8119  	return c
  8120  }
  8121  
  8122  // Fields allows partial responses to be retrieved. See
  8123  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8124  // details.
  8125  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  8126  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8127  	return c
  8128  }
  8129  
  8130  // Context sets the context to be used in this call's Do method.
  8131  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  8132  	c.ctx_ = ctx
  8133  	return c
  8134  }
  8135  
  8136  // Header returns a http.Header that can be modified by the caller to add
  8137  // headers to the request.
  8138  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Header() http.Header {
  8139  	if c.header_ == nil {
  8140  		c.header_ = make(http.Header)
  8141  	}
  8142  	return c.header_
  8143  }
  8144  
  8145  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) doRequest(alt string) (*http.Response, error) {
  8146  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8147  	var body io.Reader = nil
  8148  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  8149  	if err != nil {
  8150  		return nil, err
  8151  	}
  8152  	c.urlParams_.Set("alt", alt)
  8153  	c.urlParams_.Set("prettyPrint", "false")
  8154  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8155  	urls += "?" + c.urlParams_.Encode()
  8156  	req, err := http.NewRequest("PATCH", urls, body)
  8157  	if err != nil {
  8158  		return nil, err
  8159  	}
  8160  	req.Header = reqHeaders
  8161  	googleapi.Expand(req.URL, map[string]string{
  8162  		"name": c.name,
  8163  	})
  8164  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8165  }
  8166  
  8167  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.patch" call.
  8168  // Any non-2xx status code is an error. Response headers are in either
  8169  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  8170  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8171  // whether the returned error was because http.StatusNotModified was returned.
  8172  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  8173  	gensupport.SetOptions(c.urlParams_, opts...)
  8174  	res, err := c.doRequest("json")
  8175  	if res != nil && res.StatusCode == http.StatusNotModified {
  8176  		if res.Body != nil {
  8177  			res.Body.Close()
  8178  		}
  8179  		return nil, gensupport.WrapError(&googleapi.Error{
  8180  			Code:   res.StatusCode,
  8181  			Header: res.Header,
  8182  		})
  8183  	}
  8184  	if err != nil {
  8185  		return nil, err
  8186  	}
  8187  	defer googleapi.CloseBody(res)
  8188  	if err := googleapi.CheckResponse(res); err != nil {
  8189  		return nil, gensupport.WrapError(err)
  8190  	}
  8191  	ret := &Tag{
  8192  		ServerResponse: googleapi.ServerResponse{
  8193  			Header:         res.Header,
  8194  			HTTPStatusCode: res.StatusCode,
  8195  		},
  8196  	}
  8197  	target := &ret
  8198  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8199  		return nil, err
  8200  	}
  8201  	return ret, nil
  8202  }
  8203  
  8204  type ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall struct {
  8205  	s                          *Service
  8206  	parent                     string
  8207  	batchdeleteversionsrequest *BatchDeleteVersionsRequest
  8208  	urlParams_                 gensupport.URLParams
  8209  	ctx_                       context.Context
  8210  	header_                    http.Header
  8211  }
  8212  
  8213  // BatchDelete: Deletes multiple versions across a repository. The returned
  8214  // operation will complete once the versions have been deleted.
  8215  //
  8216  // - parent: The name of the repository holding all requested versions.
  8217  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) BatchDelete(parent string, batchdeleteversionsrequest *BatchDeleteVersionsRequest) *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall {
  8218  	c := &ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8219  	c.parent = parent
  8220  	c.batchdeleteversionsrequest = batchdeleteversionsrequest
  8221  	return c
  8222  }
  8223  
  8224  // Fields allows partial responses to be retrieved. See
  8225  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8226  // details.
  8227  func (c *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall {
  8228  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8229  	return c
  8230  }
  8231  
  8232  // Context sets the context to be used in this call's Do method.
  8233  func (c *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall {
  8234  	c.ctx_ = ctx
  8235  	return c
  8236  }
  8237  
  8238  // Header returns a http.Header that can be modified by the caller to add
  8239  // headers to the request.
  8240  func (c *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall) Header() http.Header {
  8241  	if c.header_ == nil {
  8242  		c.header_ = make(http.Header)
  8243  	}
  8244  	return c.header_
  8245  }
  8246  
  8247  func (c *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
  8248  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8249  	var body io.Reader = nil
  8250  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeleteversionsrequest)
  8251  	if err != nil {
  8252  		return nil, err
  8253  	}
  8254  	c.urlParams_.Set("alt", alt)
  8255  	c.urlParams_.Set("prettyPrint", "false")
  8256  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions:batchDelete")
  8257  	urls += "?" + c.urlParams_.Encode()
  8258  	req, err := http.NewRequest("POST", urls, body)
  8259  	if err != nil {
  8260  		return nil, err
  8261  	}
  8262  	req.Header = reqHeaders
  8263  	googleapi.Expand(req.URL, map[string]string{
  8264  		"parent": c.parent,
  8265  	})
  8266  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8267  }
  8268  
  8269  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.batchDelete" call.
  8270  // Any non-2xx status code is an error. Response headers are in either
  8271  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8272  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8273  // whether the returned error was because http.StatusNotModified was returned.
  8274  func (c *ProjectsLocationsRepositoriesPackagesVersionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8275  	gensupport.SetOptions(c.urlParams_, opts...)
  8276  	res, err := c.doRequest("json")
  8277  	if res != nil && res.StatusCode == http.StatusNotModified {
  8278  		if res.Body != nil {
  8279  			res.Body.Close()
  8280  		}
  8281  		return nil, gensupport.WrapError(&googleapi.Error{
  8282  			Code:   res.StatusCode,
  8283  			Header: res.Header,
  8284  		})
  8285  	}
  8286  	if err != nil {
  8287  		return nil, err
  8288  	}
  8289  	defer googleapi.CloseBody(res)
  8290  	if err := googleapi.CheckResponse(res); err != nil {
  8291  		return nil, gensupport.WrapError(err)
  8292  	}
  8293  	ret := &Operation{
  8294  		ServerResponse: googleapi.ServerResponse{
  8295  			Header:         res.Header,
  8296  			HTTPStatusCode: res.StatusCode,
  8297  		},
  8298  	}
  8299  	target := &ret
  8300  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8301  		return nil, err
  8302  	}
  8303  	return ret, nil
  8304  }
  8305  
  8306  type ProjectsLocationsRepositoriesPackagesVersionsDeleteCall struct {
  8307  	s          *Service
  8308  	name       string
  8309  	urlParams_ gensupport.URLParams
  8310  	ctx_       context.Context
  8311  	header_    http.Header
  8312  }
  8313  
  8314  // Delete: Deletes a version and all of its content. The returned operation
  8315  // will complete once the version has been deleted.
  8316  //
  8317  // - name: The name of the version to delete.
  8318  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  8319  	c := &ProjectsLocationsRepositoriesPackagesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8320  	c.name = name
  8321  	return c
  8322  }
  8323  
  8324  // Force sets the optional parameter "force": By default, a version that is
  8325  // tagged may not be deleted. If force=true, the version and any tags pointing
  8326  // to the version are deleted.
  8327  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Force(force bool) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  8328  	c.urlParams_.Set("force", fmt.Sprint(force))
  8329  	return c
  8330  }
  8331  
  8332  // Fields allows partial responses to be retrieved. See
  8333  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8334  // details.
  8335  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  8336  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8337  	return c
  8338  }
  8339  
  8340  // Context sets the context to be used in this call's Do method.
  8341  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  8342  	c.ctx_ = ctx
  8343  	return c
  8344  }
  8345  
  8346  // Header returns a http.Header that can be modified by the caller to add
  8347  // headers to the request.
  8348  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Header() http.Header {
  8349  	if c.header_ == nil {
  8350  		c.header_ = make(http.Header)
  8351  	}
  8352  	return c.header_
  8353  }
  8354  
  8355  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8356  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8357  	var body io.Reader = nil
  8358  	c.urlParams_.Set("alt", alt)
  8359  	c.urlParams_.Set("prettyPrint", "false")
  8360  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8361  	urls += "?" + c.urlParams_.Encode()
  8362  	req, err := http.NewRequest("DELETE", urls, body)
  8363  	if err != nil {
  8364  		return nil, err
  8365  	}
  8366  	req.Header = reqHeaders
  8367  	googleapi.Expand(req.URL, map[string]string{
  8368  		"name": c.name,
  8369  	})
  8370  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8371  }
  8372  
  8373  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.delete" call.
  8374  // Any non-2xx status code is an error. Response headers are in either
  8375  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8376  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8377  // whether the returned error was because http.StatusNotModified was returned.
  8378  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8379  	gensupport.SetOptions(c.urlParams_, opts...)
  8380  	res, err := c.doRequest("json")
  8381  	if res != nil && res.StatusCode == http.StatusNotModified {
  8382  		if res.Body != nil {
  8383  			res.Body.Close()
  8384  		}
  8385  		return nil, gensupport.WrapError(&googleapi.Error{
  8386  			Code:   res.StatusCode,
  8387  			Header: res.Header,
  8388  		})
  8389  	}
  8390  	if err != nil {
  8391  		return nil, err
  8392  	}
  8393  	defer googleapi.CloseBody(res)
  8394  	if err := googleapi.CheckResponse(res); err != nil {
  8395  		return nil, gensupport.WrapError(err)
  8396  	}
  8397  	ret := &Operation{
  8398  		ServerResponse: googleapi.ServerResponse{
  8399  			Header:         res.Header,
  8400  			HTTPStatusCode: res.StatusCode,
  8401  		},
  8402  	}
  8403  	target := &ret
  8404  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8405  		return nil, err
  8406  	}
  8407  	return ret, nil
  8408  }
  8409  
  8410  type ProjectsLocationsRepositoriesPackagesVersionsGetCall struct {
  8411  	s            *Service
  8412  	name         string
  8413  	urlParams_   gensupport.URLParams
  8414  	ifNoneMatch_ string
  8415  	ctx_         context.Context
  8416  	header_      http.Header
  8417  }
  8418  
  8419  // Get: Gets a version
  8420  //
  8421  // - name: The name of the version to retrieve.
  8422  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Get(name string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  8423  	c := &ProjectsLocationsRepositoriesPackagesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8424  	c.name = name
  8425  	return c
  8426  }
  8427  
  8428  // View sets the optional parameter "view": The view that should be returned in
  8429  // the response.
  8430  //
  8431  // Possible values:
  8432  //
  8433  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  8434  //
  8435  // default to the BASIC view.
  8436  //
  8437  //	"BASIC" - Includes basic information about the version, but not any
  8438  //
  8439  // related tags.
  8440  //
  8441  //	"FULL" - Include everything.
  8442  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  8443  	c.urlParams_.Set("view", view)
  8444  	return c
  8445  }
  8446  
  8447  // Fields allows partial responses to be retrieved. See
  8448  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8449  // details.
  8450  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  8451  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8452  	return c
  8453  }
  8454  
  8455  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8456  // object's ETag matches the given value. This is useful for getting updates
  8457  // only after the object has changed since the last request.
  8458  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  8459  	c.ifNoneMatch_ = entityTag
  8460  	return c
  8461  }
  8462  
  8463  // Context sets the context to be used in this call's Do method.
  8464  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  8465  	c.ctx_ = ctx
  8466  	return c
  8467  }
  8468  
  8469  // Header returns a http.Header that can be modified by the caller to add
  8470  // headers to the request.
  8471  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Header() http.Header {
  8472  	if c.header_ == nil {
  8473  		c.header_ = make(http.Header)
  8474  	}
  8475  	return c.header_
  8476  }
  8477  
  8478  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  8479  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8480  	if c.ifNoneMatch_ != "" {
  8481  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8482  	}
  8483  	var body io.Reader = nil
  8484  	c.urlParams_.Set("alt", alt)
  8485  	c.urlParams_.Set("prettyPrint", "false")
  8486  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8487  	urls += "?" + c.urlParams_.Encode()
  8488  	req, err := http.NewRequest("GET", urls, body)
  8489  	if err != nil {
  8490  		return nil, err
  8491  	}
  8492  	req.Header = reqHeaders
  8493  	googleapi.Expand(req.URL, map[string]string{
  8494  		"name": c.name,
  8495  	})
  8496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8497  }
  8498  
  8499  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.get" call.
  8500  // Any non-2xx status code is an error. Response headers are in either
  8501  // *Version.ServerResponse.Header or (if a response was returned at all) in
  8502  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8503  // whether the returned error was because http.StatusNotModified was returned.
  8504  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  8505  	gensupport.SetOptions(c.urlParams_, opts...)
  8506  	res, err := c.doRequest("json")
  8507  	if res != nil && res.StatusCode == http.StatusNotModified {
  8508  		if res.Body != nil {
  8509  			res.Body.Close()
  8510  		}
  8511  		return nil, gensupport.WrapError(&googleapi.Error{
  8512  			Code:   res.StatusCode,
  8513  			Header: res.Header,
  8514  		})
  8515  	}
  8516  	if err != nil {
  8517  		return nil, err
  8518  	}
  8519  	defer googleapi.CloseBody(res)
  8520  	if err := googleapi.CheckResponse(res); err != nil {
  8521  		return nil, gensupport.WrapError(err)
  8522  	}
  8523  	ret := &Version{
  8524  		ServerResponse: googleapi.ServerResponse{
  8525  			Header:         res.Header,
  8526  			HTTPStatusCode: res.StatusCode,
  8527  		},
  8528  	}
  8529  	target := &ret
  8530  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8531  		return nil, err
  8532  	}
  8533  	return ret, nil
  8534  }
  8535  
  8536  type ProjectsLocationsRepositoriesPackagesVersionsListCall struct {
  8537  	s            *Service
  8538  	parent       string
  8539  	urlParams_   gensupport.URLParams
  8540  	ifNoneMatch_ string
  8541  	ctx_         context.Context
  8542  	header_      http.Header
  8543  }
  8544  
  8545  // List: Lists versions.
  8546  //
  8547  // - parent: The name of the parent resource whose versions will be listed.
  8548  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) List(parent string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8549  	c := &ProjectsLocationsRepositoriesPackagesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8550  	c.parent = parent
  8551  	return c
  8552  }
  8553  
  8554  // OrderBy sets the optional parameter "orderBy": The field to order the
  8555  // results by.
  8556  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8557  	c.urlParams_.Set("orderBy", orderBy)
  8558  	return c
  8559  }
  8560  
  8561  // PageSize sets the optional parameter "pageSize": The maximum number of
  8562  // versions to return. Maximum page size is 1,000.
  8563  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8564  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8565  	return c
  8566  }
  8567  
  8568  // PageToken sets the optional parameter "pageToken": The next_page_token value
  8569  // returned from a previous list request, if any.
  8570  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8571  	c.urlParams_.Set("pageToken", pageToken)
  8572  	return c
  8573  }
  8574  
  8575  // View sets the optional parameter "view": The view that should be returned in
  8576  // the response.
  8577  //
  8578  // Possible values:
  8579  //
  8580  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  8581  //
  8582  // default to the BASIC view.
  8583  //
  8584  //	"BASIC" - Includes basic information about the version, but not any
  8585  //
  8586  // related tags.
  8587  //
  8588  //	"FULL" - Include everything.
  8589  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8590  	c.urlParams_.Set("view", view)
  8591  	return c
  8592  }
  8593  
  8594  // Fields allows partial responses to be retrieved. See
  8595  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8596  // details.
  8597  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8598  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8599  	return c
  8600  }
  8601  
  8602  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8603  // object's ETag matches the given value. This is useful for getting updates
  8604  // only after the object has changed since the last request.
  8605  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8606  	c.ifNoneMatch_ = entityTag
  8607  	return c
  8608  }
  8609  
  8610  // Context sets the context to be used in this call's Do method.
  8611  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  8612  	c.ctx_ = ctx
  8613  	return c
  8614  }
  8615  
  8616  // Header returns a http.Header that can be modified by the caller to add
  8617  // headers to the request.
  8618  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Header() http.Header {
  8619  	if c.header_ == nil {
  8620  		c.header_ = make(http.Header)
  8621  	}
  8622  	return c.header_
  8623  }
  8624  
  8625  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  8626  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8627  	if c.ifNoneMatch_ != "" {
  8628  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8629  	}
  8630  	var body io.Reader = nil
  8631  	c.urlParams_.Set("alt", alt)
  8632  	c.urlParams_.Set("prettyPrint", "false")
  8633  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
  8634  	urls += "?" + c.urlParams_.Encode()
  8635  	req, err := http.NewRequest("GET", urls, body)
  8636  	if err != nil {
  8637  		return nil, err
  8638  	}
  8639  	req.Header = reqHeaders
  8640  	googleapi.Expand(req.URL, map[string]string{
  8641  		"parent": c.parent,
  8642  	})
  8643  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8644  }
  8645  
  8646  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.list" call.
  8647  // Any non-2xx status code is an error. Response headers are in either
  8648  // *ListVersionsResponse.ServerResponse.Header or (if a response was returned
  8649  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8650  // check whether the returned error was because http.StatusNotModified was
  8651  // returned.
  8652  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  8653  	gensupport.SetOptions(c.urlParams_, opts...)
  8654  	res, err := c.doRequest("json")
  8655  	if res != nil && res.StatusCode == http.StatusNotModified {
  8656  		if res.Body != nil {
  8657  			res.Body.Close()
  8658  		}
  8659  		return nil, gensupport.WrapError(&googleapi.Error{
  8660  			Code:   res.StatusCode,
  8661  			Header: res.Header,
  8662  		})
  8663  	}
  8664  	if err != nil {
  8665  		return nil, err
  8666  	}
  8667  	defer googleapi.CloseBody(res)
  8668  	if err := googleapi.CheckResponse(res); err != nil {
  8669  		return nil, gensupport.WrapError(err)
  8670  	}
  8671  	ret := &ListVersionsResponse{
  8672  		ServerResponse: googleapi.ServerResponse{
  8673  			Header:         res.Header,
  8674  			HTTPStatusCode: res.StatusCode,
  8675  		},
  8676  	}
  8677  	target := &ret
  8678  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8679  		return nil, err
  8680  	}
  8681  	return ret, nil
  8682  }
  8683  
  8684  // Pages invokes f for each page of results.
  8685  // A non-nil error returned from f will halt the iteration.
  8686  // The provided context supersedes any context provided to the Context method.
  8687  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  8688  	c.ctx_ = ctx
  8689  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8690  	for {
  8691  		x, err := c.Do()
  8692  		if err != nil {
  8693  			return err
  8694  		}
  8695  		if err := f(x); err != nil {
  8696  			return err
  8697  		}
  8698  		if x.NextPageToken == "" {
  8699  			return nil
  8700  		}
  8701  		c.PageToken(x.NextPageToken)
  8702  	}
  8703  }
  8704  
  8705  type ProjectsLocationsRepositoriesPythonPackagesGetCall struct {
  8706  	s            *Service
  8707  	name         string
  8708  	urlParams_   gensupport.URLParams
  8709  	ifNoneMatch_ string
  8710  	ctx_         context.Context
  8711  	header_      http.Header
  8712  }
  8713  
  8714  // Get: Gets a python package.
  8715  //
  8716  // - name: The name of the python package.
  8717  func (r *ProjectsLocationsRepositoriesPythonPackagesService) Get(name string) *ProjectsLocationsRepositoriesPythonPackagesGetCall {
  8718  	c := &ProjectsLocationsRepositoriesPythonPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8719  	c.name = name
  8720  	return c
  8721  }
  8722  
  8723  // Fields allows partial responses to be retrieved. See
  8724  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8725  // details.
  8726  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPythonPackagesGetCall {
  8727  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8728  	return c
  8729  }
  8730  
  8731  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8732  // object's ETag matches the given value. This is useful for getting updates
  8733  // only after the object has changed since the last request.
  8734  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPythonPackagesGetCall {
  8735  	c.ifNoneMatch_ = entityTag
  8736  	return c
  8737  }
  8738  
  8739  // Context sets the context to be used in this call's Do method.
  8740  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPythonPackagesGetCall {
  8741  	c.ctx_ = ctx
  8742  	return c
  8743  }
  8744  
  8745  // Header returns a http.Header that can be modified by the caller to add
  8746  // headers to the request.
  8747  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) Header() http.Header {
  8748  	if c.header_ == nil {
  8749  		c.header_ = make(http.Header)
  8750  	}
  8751  	return c.header_
  8752  }
  8753  
  8754  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  8755  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8756  	if c.ifNoneMatch_ != "" {
  8757  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8758  	}
  8759  	var body io.Reader = nil
  8760  	c.urlParams_.Set("alt", alt)
  8761  	c.urlParams_.Set("prettyPrint", "false")
  8762  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8763  	urls += "?" + c.urlParams_.Encode()
  8764  	req, err := http.NewRequest("GET", urls, body)
  8765  	if err != nil {
  8766  		return nil, err
  8767  	}
  8768  	req.Header = reqHeaders
  8769  	googleapi.Expand(req.URL, map[string]string{
  8770  		"name": c.name,
  8771  	})
  8772  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8773  }
  8774  
  8775  // Do executes the "artifactregistry.projects.locations.repositories.pythonPackages.get" call.
  8776  // Any non-2xx status code is an error. Response headers are in either
  8777  // *PythonPackage.ServerResponse.Header or (if a response was returned at all)
  8778  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8779  // whether the returned error was because http.StatusNotModified was returned.
  8780  func (c *ProjectsLocationsRepositoriesPythonPackagesGetCall) Do(opts ...googleapi.CallOption) (*PythonPackage, error) {
  8781  	gensupport.SetOptions(c.urlParams_, opts...)
  8782  	res, err := c.doRequest("json")
  8783  	if res != nil && res.StatusCode == http.StatusNotModified {
  8784  		if res.Body != nil {
  8785  			res.Body.Close()
  8786  		}
  8787  		return nil, gensupport.WrapError(&googleapi.Error{
  8788  			Code:   res.StatusCode,
  8789  			Header: res.Header,
  8790  		})
  8791  	}
  8792  	if err != nil {
  8793  		return nil, err
  8794  	}
  8795  	defer googleapi.CloseBody(res)
  8796  	if err := googleapi.CheckResponse(res); err != nil {
  8797  		return nil, gensupport.WrapError(err)
  8798  	}
  8799  	ret := &PythonPackage{
  8800  		ServerResponse: googleapi.ServerResponse{
  8801  			Header:         res.Header,
  8802  			HTTPStatusCode: res.StatusCode,
  8803  		},
  8804  	}
  8805  	target := &ret
  8806  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8807  		return nil, err
  8808  	}
  8809  	return ret, nil
  8810  }
  8811  
  8812  type ProjectsLocationsRepositoriesPythonPackagesListCall struct {
  8813  	s            *Service
  8814  	parent       string
  8815  	urlParams_   gensupport.URLParams
  8816  	ifNoneMatch_ string
  8817  	ctx_         context.Context
  8818  	header_      http.Header
  8819  }
  8820  
  8821  // List: Lists python packages.
  8822  //
  8823  //   - parent: The name of the parent resource whose python packages will be
  8824  //     listed.
  8825  func (r *ProjectsLocationsRepositoriesPythonPackagesService) List(parent string) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8826  	c := &ProjectsLocationsRepositoriesPythonPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8827  	c.parent = parent
  8828  	return c
  8829  }
  8830  
  8831  // PageSize sets the optional parameter "pageSize": The maximum number of
  8832  // artifacts to return.
  8833  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8834  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8835  	return c
  8836  }
  8837  
  8838  // PageToken sets the optional parameter "pageToken": The next_page_token value
  8839  // returned from a previous list request, if any.
  8840  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8841  	c.urlParams_.Set("pageToken", pageToken)
  8842  	return c
  8843  }
  8844  
  8845  // Fields allows partial responses to be retrieved. See
  8846  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8847  // details.
  8848  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8849  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8850  	return c
  8851  }
  8852  
  8853  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8854  // object's ETag matches the given value. This is useful for getting updates
  8855  // only after the object has changed since the last request.
  8856  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8857  	c.ifNoneMatch_ = entityTag
  8858  	return c
  8859  }
  8860  
  8861  // Context sets the context to be used in this call's Do method.
  8862  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPythonPackagesListCall {
  8863  	c.ctx_ = ctx
  8864  	return c
  8865  }
  8866  
  8867  // Header returns a http.Header that can be modified by the caller to add
  8868  // headers to the request.
  8869  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) Header() http.Header {
  8870  	if c.header_ == nil {
  8871  		c.header_ = make(http.Header)
  8872  	}
  8873  	return c.header_
  8874  }
  8875  
  8876  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) doRequest(alt string) (*http.Response, error) {
  8877  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8878  	if c.ifNoneMatch_ != "" {
  8879  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8880  	}
  8881  	var body io.Reader = nil
  8882  	c.urlParams_.Set("alt", alt)
  8883  	c.urlParams_.Set("prettyPrint", "false")
  8884  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pythonPackages")
  8885  	urls += "?" + c.urlParams_.Encode()
  8886  	req, err := http.NewRequest("GET", urls, body)
  8887  	if err != nil {
  8888  		return nil, err
  8889  	}
  8890  	req.Header = reqHeaders
  8891  	googleapi.Expand(req.URL, map[string]string{
  8892  		"parent": c.parent,
  8893  	})
  8894  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8895  }
  8896  
  8897  // Do executes the "artifactregistry.projects.locations.repositories.pythonPackages.list" call.
  8898  // Any non-2xx status code is an error. Response headers are in either
  8899  // *ListPythonPackagesResponse.ServerResponse.Header or (if a response was
  8900  // returned at all) in error.(*googleapi.Error).Header. Use
  8901  // googleapi.IsNotModified to check whether the returned error was because
  8902  // http.StatusNotModified was returned.
  8903  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) Do(opts ...googleapi.CallOption) (*ListPythonPackagesResponse, error) {
  8904  	gensupport.SetOptions(c.urlParams_, opts...)
  8905  	res, err := c.doRequest("json")
  8906  	if res != nil && res.StatusCode == http.StatusNotModified {
  8907  		if res.Body != nil {
  8908  			res.Body.Close()
  8909  		}
  8910  		return nil, gensupport.WrapError(&googleapi.Error{
  8911  			Code:   res.StatusCode,
  8912  			Header: res.Header,
  8913  		})
  8914  	}
  8915  	if err != nil {
  8916  		return nil, err
  8917  	}
  8918  	defer googleapi.CloseBody(res)
  8919  	if err := googleapi.CheckResponse(res); err != nil {
  8920  		return nil, gensupport.WrapError(err)
  8921  	}
  8922  	ret := &ListPythonPackagesResponse{
  8923  		ServerResponse: googleapi.ServerResponse{
  8924  			Header:         res.Header,
  8925  			HTTPStatusCode: res.StatusCode,
  8926  		},
  8927  	}
  8928  	target := &ret
  8929  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8930  		return nil, err
  8931  	}
  8932  	return ret, nil
  8933  }
  8934  
  8935  // Pages invokes f for each page of results.
  8936  // A non-nil error returned from f will halt the iteration.
  8937  // The provided context supersedes any context provided to the Context method.
  8938  func (c *ProjectsLocationsRepositoriesPythonPackagesListCall) Pages(ctx context.Context, f func(*ListPythonPackagesResponse) error) error {
  8939  	c.ctx_ = ctx
  8940  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8941  	for {
  8942  		x, err := c.Do()
  8943  		if err != nil {
  8944  			return err
  8945  		}
  8946  		if err := f(x); err != nil {
  8947  			return err
  8948  		}
  8949  		if x.NextPageToken == "" {
  8950  			return nil
  8951  		}
  8952  		c.PageToken(x.NextPageToken)
  8953  	}
  8954  }
  8955  
  8956  type ProjectsLocationsRepositoriesYumArtifactsImportCall struct {
  8957  	s                         *Service
  8958  	parent                    string
  8959  	importyumartifactsrequest *ImportYumArtifactsRequest
  8960  	urlParams_                gensupport.URLParams
  8961  	ctx_                      context.Context
  8962  	header_                   http.Header
  8963  }
  8964  
  8965  // Import: Imports Yum (RPM) artifacts. The returned Operation will complete
  8966  // once the resources are imported. Package, Version, and File resources are
  8967  // created based on the imported artifacts. Imported artifacts that conflict
  8968  // with existing resources are ignored.
  8969  //
  8970  //   - parent: The name of the parent resource where the artifacts will be
  8971  //     imported.
  8972  func (r *ProjectsLocationsRepositoriesYumArtifactsService) Import(parent string, importyumartifactsrequest *ImportYumArtifactsRequest) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  8973  	c := &ProjectsLocationsRepositoriesYumArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8974  	c.parent = parent
  8975  	c.importyumartifactsrequest = importyumartifactsrequest
  8976  	return c
  8977  }
  8978  
  8979  // Fields allows partial responses to be retrieved. See
  8980  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8981  // details.
  8982  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  8983  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8984  	return c
  8985  }
  8986  
  8987  // Context sets the context to be used in this call's Do method.
  8988  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  8989  	c.ctx_ = ctx
  8990  	return c
  8991  }
  8992  
  8993  // Header returns a http.Header that can be modified by the caller to add
  8994  // headers to the request.
  8995  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Header() http.Header {
  8996  	if c.header_ == nil {
  8997  		c.header_ = make(http.Header)
  8998  	}
  8999  	return c.header_
  9000  }
  9001  
  9002  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) doRequest(alt string) (*http.Response, error) {
  9003  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9004  	var body io.Reader = nil
  9005  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importyumartifactsrequest)
  9006  	if err != nil {
  9007  		return nil, err
  9008  	}
  9009  	c.urlParams_.Set("alt", alt)
  9010  	c.urlParams_.Set("prettyPrint", "false")
  9011  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/yumArtifacts:import")
  9012  	urls += "?" + c.urlParams_.Encode()
  9013  	req, err := http.NewRequest("POST", urls, body)
  9014  	if err != nil {
  9015  		return nil, err
  9016  	}
  9017  	req.Header = reqHeaders
  9018  	googleapi.Expand(req.URL, map[string]string{
  9019  		"parent": c.parent,
  9020  	})
  9021  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9022  }
  9023  
  9024  // Do executes the "artifactregistry.projects.locations.repositories.yumArtifacts.import" call.
  9025  // Any non-2xx status code is an error. Response headers are in either
  9026  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9027  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9028  // whether the returned error was because http.StatusNotModified was returned.
  9029  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9030  	gensupport.SetOptions(c.urlParams_, opts...)
  9031  	res, err := c.doRequest("json")
  9032  	if res != nil && res.StatusCode == http.StatusNotModified {
  9033  		if res.Body != nil {
  9034  			res.Body.Close()
  9035  		}
  9036  		return nil, gensupport.WrapError(&googleapi.Error{
  9037  			Code:   res.StatusCode,
  9038  			Header: res.Header,
  9039  		})
  9040  	}
  9041  	if err != nil {
  9042  		return nil, err
  9043  	}
  9044  	defer googleapi.CloseBody(res)
  9045  	if err := googleapi.CheckResponse(res); err != nil {
  9046  		return nil, gensupport.WrapError(err)
  9047  	}
  9048  	ret := &Operation{
  9049  		ServerResponse: googleapi.ServerResponse{
  9050  			Header:         res.Header,
  9051  			HTTPStatusCode: res.StatusCode,
  9052  		},
  9053  	}
  9054  	target := &ret
  9055  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9056  		return nil, err
  9057  	}
  9058  	return ret, nil
  9059  }
  9060  
  9061  type ProjectsLocationsRepositoriesYumArtifactsUploadCall struct {
  9062  	s                        *Service
  9063  	parent                   string
  9064  	uploadyumartifactrequest *UploadYumArtifactRequest
  9065  	urlParams_               gensupport.URLParams
  9066  	mediaInfo_               *gensupport.MediaInfo
  9067  	ctx_                     context.Context
  9068  	header_                  http.Header
  9069  }
  9070  
  9071  // Upload: Directly uploads a Yum artifact. The returned Operation will
  9072  // complete once the resources are uploaded. Package, Version, and File
  9073  // resources are created based on the imported artifact. Imported artifacts
  9074  // that conflict with existing resources are ignored.
  9075  //
  9076  //   - parent: The name of the parent resource where the artifacts will be
  9077  //     uploaded.
  9078  func (r *ProjectsLocationsRepositoriesYumArtifactsService) Upload(parent string, uploadyumartifactrequest *UploadYumArtifactRequest) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9079  	c := &ProjectsLocationsRepositoriesYumArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9080  	c.parent = parent
  9081  	c.uploadyumartifactrequest = uploadyumartifactrequest
  9082  	return c
  9083  }
  9084  
  9085  // Media specifies the media to upload in one or more chunks. The chunk size
  9086  // may be controlled by supplying a MediaOption generated by
  9087  // googleapi.ChunkSize. The chunk size defaults to
  9088  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  9089  // request will be determined by sniffing the contents of r, unless a
  9090  // MediaOption generated by googleapi.ContentType is supplied.
  9091  // At most one of Media and ResumableMedia may be set.
  9092  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9093  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  9094  	return c
  9095  }
  9096  
  9097  // ResumableMedia specifies the media to upload in chunks and can be canceled
  9098  // with ctx.
  9099  //
  9100  // Deprecated: use Media instead.
  9101  //
  9102  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  9103  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  9104  // will be auto-detected. The provided ctx will supersede any context
  9105  // previously provided to the Context method.
  9106  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9107  	c.ctx_ = ctx
  9108  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  9109  	return c
  9110  }
  9111  
  9112  // ProgressUpdater provides a callback function that will be called after every
  9113  // chunk. It should be a low-latency function in order to not slow down the
  9114  // upload operation. This should only be called when using ResumableMedia (as
  9115  // opposed to Media).
  9116  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9117  	c.mediaInfo_.SetProgressUpdater(pu)
  9118  	return c
  9119  }
  9120  
  9121  // Fields allows partial responses to be retrieved. See
  9122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9123  // details.
  9124  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9126  	return c
  9127  }
  9128  
  9129  // Context sets the context to be used in this call's Do method.
  9130  // This context will supersede any context previously provided to the
  9131  // ResumableMedia method.
  9132  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  9133  	c.ctx_ = ctx
  9134  	return c
  9135  }
  9136  
  9137  // Header returns a http.Header that can be modified by the caller to add
  9138  // headers to the request.
  9139  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Header() http.Header {
  9140  	if c.header_ == nil {
  9141  		c.header_ = make(http.Header)
  9142  	}
  9143  	return c.header_
  9144  }
  9145  
  9146  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  9147  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9148  	var body io.Reader = nil
  9149  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadyumartifactrequest)
  9150  	if err != nil {
  9151  		return nil, err
  9152  	}
  9153  	c.urlParams_.Set("alt", alt)
  9154  	c.urlParams_.Set("prettyPrint", "false")
  9155  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/yumArtifacts:create")
  9156  	if c.mediaInfo_ != nil {
  9157  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/yumArtifacts:create")
  9158  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  9159  	}
  9160  	if body == nil {
  9161  		body = new(bytes.Buffer)
  9162  		reqHeaders.Set("Content-Type", "application/json")
  9163  	}
  9164  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  9165  	defer cleanup()
  9166  	urls += "?" + c.urlParams_.Encode()
  9167  	req, err := http.NewRequest("POST", urls, body)
  9168  	if err != nil {
  9169  		return nil, err
  9170  	}
  9171  	req.Header = reqHeaders
  9172  	req.GetBody = getBody
  9173  	googleapi.Expand(req.URL, map[string]string{
  9174  		"parent": c.parent,
  9175  	})
  9176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9177  }
  9178  
  9179  // Do executes the "artifactregistry.projects.locations.repositories.yumArtifacts.upload" call.
  9180  // Any non-2xx status code is an error. Response headers are in either
  9181  // *UploadYumArtifactMediaResponse.ServerResponse.Header or (if a response was
  9182  // returned at all) in error.(*googleapi.Error).Header. Use
  9183  // googleapi.IsNotModified to check whether the returned error was because
  9184  // http.StatusNotModified was returned.
  9185  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadYumArtifactMediaResponse, error) {
  9186  	gensupport.SetOptions(c.urlParams_, opts...)
  9187  	res, err := c.doRequest("json")
  9188  	if res != nil && res.StatusCode == http.StatusNotModified {
  9189  		if res.Body != nil {
  9190  			res.Body.Close()
  9191  		}
  9192  		return nil, gensupport.WrapError(&googleapi.Error{
  9193  			Code:   res.StatusCode,
  9194  			Header: res.Header,
  9195  		})
  9196  	}
  9197  	if err != nil {
  9198  		return nil, err
  9199  	}
  9200  	defer googleapi.CloseBody(res)
  9201  	if err := googleapi.CheckResponse(res); err != nil {
  9202  		return nil, gensupport.WrapError(err)
  9203  	}
  9204  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  9205  	if rx != nil {
  9206  		rx.Client = c.s.client
  9207  		rx.UserAgent = c.s.userAgent()
  9208  		ctx := c.ctx_
  9209  		if ctx == nil {
  9210  			ctx = context.TODO()
  9211  		}
  9212  		res, err = rx.Upload(ctx)
  9213  		if err != nil {
  9214  			return nil, err
  9215  		}
  9216  		defer res.Body.Close()
  9217  		if err := googleapi.CheckResponse(res); err != nil {
  9218  			return nil, gensupport.WrapError(err)
  9219  		}
  9220  	}
  9221  	ret := &UploadYumArtifactMediaResponse{
  9222  		ServerResponse: googleapi.ServerResponse{
  9223  			Header:         res.Header,
  9224  			HTTPStatusCode: res.StatusCode,
  9225  		},
  9226  	}
  9227  	target := &ret
  9228  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9229  		return nil, err
  9230  	}
  9231  	return ret, nil
  9232  }
  9233  

View as plain text