...

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

Documentation: google.golang.org/api/artifactregistry/v1beta2

     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/v1beta2"
    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/v1beta2"
    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:v1beta2"
    95  const apiName = "artifactregistry"
    96  const apiVersion = "v1beta2"
    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.Files = NewProjectsLocationsRepositoriesFilesService(s)
   207  	rs.Packages = NewProjectsLocationsRepositoriesPackagesService(s)
   208  	rs.YumArtifacts = NewProjectsLocationsRepositoriesYumArtifactsService(s)
   209  	return rs
   210  }
   211  
   212  type ProjectsLocationsRepositoriesService struct {
   213  	s *Service
   214  
   215  	AptArtifacts *ProjectsLocationsRepositoriesAptArtifactsService
   216  
   217  	Files *ProjectsLocationsRepositoriesFilesService
   218  
   219  	Packages *ProjectsLocationsRepositoriesPackagesService
   220  
   221  	YumArtifacts *ProjectsLocationsRepositoriesYumArtifactsService
   222  }
   223  
   224  func NewProjectsLocationsRepositoriesAptArtifactsService(s *Service) *ProjectsLocationsRepositoriesAptArtifactsService {
   225  	rs := &ProjectsLocationsRepositoriesAptArtifactsService{s: s}
   226  	return rs
   227  }
   228  
   229  type ProjectsLocationsRepositoriesAptArtifactsService struct {
   230  	s *Service
   231  }
   232  
   233  func NewProjectsLocationsRepositoriesFilesService(s *Service) *ProjectsLocationsRepositoriesFilesService {
   234  	rs := &ProjectsLocationsRepositoriesFilesService{s: s}
   235  	return rs
   236  }
   237  
   238  type ProjectsLocationsRepositoriesFilesService struct {
   239  	s *Service
   240  }
   241  
   242  func NewProjectsLocationsRepositoriesPackagesService(s *Service) *ProjectsLocationsRepositoriesPackagesService {
   243  	rs := &ProjectsLocationsRepositoriesPackagesService{s: s}
   244  	rs.Tags = NewProjectsLocationsRepositoriesPackagesTagsService(s)
   245  	rs.Versions = NewProjectsLocationsRepositoriesPackagesVersionsService(s)
   246  	return rs
   247  }
   248  
   249  type ProjectsLocationsRepositoriesPackagesService struct {
   250  	s *Service
   251  
   252  	Tags *ProjectsLocationsRepositoriesPackagesTagsService
   253  
   254  	Versions *ProjectsLocationsRepositoriesPackagesVersionsService
   255  }
   256  
   257  func NewProjectsLocationsRepositoriesPackagesTagsService(s *Service) *ProjectsLocationsRepositoriesPackagesTagsService {
   258  	rs := &ProjectsLocationsRepositoriesPackagesTagsService{s: s}
   259  	return rs
   260  }
   261  
   262  type ProjectsLocationsRepositoriesPackagesTagsService struct {
   263  	s *Service
   264  }
   265  
   266  func NewProjectsLocationsRepositoriesPackagesVersionsService(s *Service) *ProjectsLocationsRepositoriesPackagesVersionsService {
   267  	rs := &ProjectsLocationsRepositoriesPackagesVersionsService{s: s}
   268  	return rs
   269  }
   270  
   271  type ProjectsLocationsRepositoriesPackagesVersionsService struct {
   272  	s *Service
   273  }
   274  
   275  func NewProjectsLocationsRepositoriesYumArtifactsService(s *Service) *ProjectsLocationsRepositoriesYumArtifactsService {
   276  	rs := &ProjectsLocationsRepositoriesYumArtifactsService{s: s}
   277  	return rs
   278  }
   279  
   280  type ProjectsLocationsRepositoriesYumArtifactsService struct {
   281  	s *Service
   282  }
   283  
   284  // AptArtifact: A detailed representation of an Apt artifact. Information in
   285  // the record is derived from the archive's control file. See
   286  // https://www.debian.org/doc/debian-policy/ch-controlfields.html
   287  type AptArtifact struct {
   288  	// Architecture: Output only. Operating system architecture of the artifact.
   289  	Architecture string `json:"architecture,omitempty"`
   290  	// Component: Output only. Repository component of the artifact.
   291  	Component string `json:"component,omitempty"`
   292  	// ControlFile: Output only. Contents of the artifact's control metadata file.
   293  	ControlFile string `json:"controlFile,omitempty"`
   294  	// Name: Output only. The Artifact Registry resource name of the artifact.
   295  	Name string `json:"name,omitempty"`
   296  	// PackageName: Output only. The Apt package name of the artifact.
   297  	PackageName string `json:"packageName,omitempty"`
   298  	// PackageType: Output only. An artifact is a binary or source package.
   299  	//
   300  	// Possible values:
   301  	//   "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified.
   302  	//   "BINARY" - Binary package.
   303  	//   "SOURCE" - Source package.
   304  	PackageType string `json:"packageType,omitempty"`
   305  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   306  	// unconditionally include in API requests. By default, fields with empty or
   307  	// default values are omitted from API requests. See
   308  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   309  	// details.
   310  	ForceSendFields []string `json:"-"`
   311  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   312  	// requests with the JSON null value. By default, fields with empty values are
   313  	// omitted from API requests. See
   314  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   315  	NullFields []string `json:"-"`
   316  }
   317  
   318  func (s *AptArtifact) MarshalJSON() ([]byte, error) {
   319  	type NoMethod AptArtifact
   320  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   321  }
   322  
   323  // Binding: Associates `members`, or principals, with a `role`.
   324  type Binding struct {
   325  	// Condition: The condition that is associated with this binding. If the
   326  	// condition evaluates to `true`, then this binding applies to the current
   327  	// request. If the condition evaluates to `false`, then this binding does not
   328  	// apply to the current request. However, a different role binding might grant
   329  	// the same role to one or more of the principals in this binding. To learn
   330  	// which resources support conditions in their IAM policies, see the IAM
   331  	// documentation
   332  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   333  	Condition *Expr `json:"condition,omitempty"`
   334  	// Members: Specifies the principals requesting access for a Google Cloud
   335  	// resource. `members` can have the following values: * `allUsers`: A special
   336  	// identifier that represents anyone who is on the internet; with or without a
   337  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   338  	// represents anyone who is authenticated with a Google account or a service
   339  	// account. Does not include identities that come from external identity
   340  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   341  	// address that represents a specific Google account. For example,
   342  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   343  	// represents a Google service account. For example,
   344  	// `my-other-app@appspot.gserviceaccount.com`. *
   345  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   346  	// identifier for a Kubernetes service account
   347  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   348  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   349  	// `group:{emailid}`: An email address that represents a Google group. For
   350  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   351  	// (primary) that represents all the users of that domain. For example,
   352  	// `google.com` or `example.com`. *
   353  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   354  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   355  	// pool. *
   356  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   357  	// group/{group_id}`: All workforce identities in a group. *
   358  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   359  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   360  	// a specific attribute value. *
   361  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   362  	// *`: All identities in a workforce identity pool. *
   363  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   364  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   365  	// identity in a workload identity pool. *
   366  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   367  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   368  	// group. *
   369  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   370  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   371  	// `: All identities in a workload identity pool with a certain attribute. *
   372  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   373  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   374  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   375  	// unique identifier) representing a user that has been recently deleted. For
   376  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   377  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   378  	// retains the role in the binding. *
   379  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   380  	// unique identifier) representing a service account that has been recently
   381  	// deleted. For example,
   382  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   383  	// service account is undeleted, this value reverts to
   384  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   385  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   386  	// address (plus unique identifier) representing a Google group that has been
   387  	// recently deleted. For example,
   388  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   389  	// this value reverts to `group:{emailid}` and the recovered group retains the
   390  	// role in the binding. *
   391  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   392  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   393  	// workforce identity pool. For example,
   394  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   395  	// ol-id/subject/my-subject-attribute-value`.
   396  	Members []string `json:"members,omitempty"`
   397  	// Role: Role that is assigned to the list of `members`, or principals. For
   398  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   399  	// of the IAM roles and permissions, see the IAM documentation
   400  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   401  	// available pre-defined roles, see here
   402  	// (https://cloud.google.com/iam/docs/understanding-roles).
   403  	Role string `json:"role,omitempty"`
   404  	// ForceSendFields is a list of field names (e.g. "Condition") to
   405  	// unconditionally include in API requests. By default, fields with empty or
   406  	// default values are omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   408  	// details.
   409  	ForceSendFields []string `json:"-"`
   410  	// NullFields is a list of field names (e.g. "Condition") to include in API
   411  	// requests with the JSON null value. By default, fields with empty values are
   412  	// omitted from API requests. See
   413  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   414  	NullFields []string `json:"-"`
   415  }
   416  
   417  func (s *Binding) MarshalJSON() ([]byte, error) {
   418  	type NoMethod Binding
   419  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   420  }
   421  
   422  // DownloadFileResponse: The response to download a file.
   423  type DownloadFileResponse struct {
   424  	// ServerResponse contains the HTTP response code and headers from the server.
   425  	googleapi.ServerResponse `json:"-"`
   426  }
   427  
   428  // Empty: A generic empty message that you can re-use to avoid defining
   429  // duplicated empty messages in your APIs. A typical example is to use it as
   430  // the request or the response type of an API method. For instance: service Foo
   431  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   432  type Empty struct {
   433  	// ServerResponse contains the HTTP response code and headers from the server.
   434  	googleapi.ServerResponse `json:"-"`
   435  }
   436  
   437  // Expr: Represents a textual expression in the Common Expression Language
   438  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   439  // of CEL are documented at https://github.com/google/cel-spec. Example
   440  // (Comparison): title: "Summary size limit" description: "Determines if a
   441  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   442  // Example (Equality): title: "Requestor is owner" description: "Determines if
   443  // requestor is the document owner" expression: "document.owner ==
   444  // request.auth.claims.email" Example (Logic): title: "Public documents"
   445  // description: "Determine whether the document should be publicly visible"
   446  // expression: "document.type != 'private' && document.type != 'internal'"
   447  // Example (Data Manipulation): title: "Notification string" description:
   448  // "Create a notification string with a timestamp." expression: "'New message
   449  // received at ' + string(document.create_time)" The exact variables and
   450  // functions that may be referenced within an expression are determined by the
   451  // service that evaluates it. See the service documentation for additional
   452  // information.
   453  type Expr struct {
   454  	// Description: Optional. Description of the expression. This is a longer text
   455  	// which describes the expression, e.g. when hovered over it in a UI.
   456  	Description string `json:"description,omitempty"`
   457  	// Expression: Textual representation of an expression in Common Expression
   458  	// Language syntax.
   459  	Expression string `json:"expression,omitempty"`
   460  	// Location: Optional. String indicating the location of the expression for
   461  	// error reporting, e.g. a file name and a position in the file.
   462  	Location string `json:"location,omitempty"`
   463  	// Title: Optional. Title for the expression, i.e. a short string describing
   464  	// its purpose. This can be used e.g. in UIs which allow to enter the
   465  	// expression.
   466  	Title string `json:"title,omitempty"`
   467  	// ForceSendFields is a list of field names (e.g. "Description") to
   468  	// unconditionally include in API requests. By default, fields with empty or
   469  	// default values are omitted from API requests. See
   470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   471  	// details.
   472  	ForceSendFields []string `json:"-"`
   473  	// NullFields is a list of field names (e.g. "Description") to include in API
   474  	// requests with the JSON null value. By default, fields with empty values are
   475  	// omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   477  	NullFields []string `json:"-"`
   478  }
   479  
   480  func (s *Expr) MarshalJSON() ([]byte, error) {
   481  	type NoMethod Expr
   482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   483  }
   484  
   485  // GoogleDevtoolsArtifactregistryV1beta2File: Files store content that is
   486  // potentially associated with Packages or Versions.
   487  type GoogleDevtoolsArtifactregistryV1beta2File struct {
   488  	// CreateTime: Output only. The time when the File was created.
   489  	CreateTime string `json:"createTime,omitempty"`
   490  	// Hashes: The hashes of the file content.
   491  	Hashes []*Hash `json:"hashes,omitempty"`
   492  	// Name: The name of the file, for example:
   493  	// `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.
   494  	// If the file ID part contains slashes, they are escaped.
   495  	Name string `json:"name,omitempty"`
   496  	// Owner: The name of the Package or Version that owns this file, if any.
   497  	Owner string `json:"owner,omitempty"`
   498  	// SizeBytes: The size of the File in bytes.
   499  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   500  	// UpdateTime: Output only. The time when the File was last updated.
   501  	UpdateTime string `json:"updateTime,omitempty"`
   502  
   503  	// ServerResponse contains the HTTP response code and headers from the server.
   504  	googleapi.ServerResponse `json:"-"`
   505  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   506  	// unconditionally include in API requests. By default, fields with empty or
   507  	// default values are omitted from API requests. See
   508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   509  	// details.
   510  	ForceSendFields []string `json:"-"`
   511  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   512  	// requests with the JSON null value. By default, fields with empty values are
   513  	// omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   515  	NullFields []string `json:"-"`
   516  }
   517  
   518  func (s *GoogleDevtoolsArtifactregistryV1beta2File) MarshalJSON() ([]byte, error) {
   519  	type NoMethod GoogleDevtoolsArtifactregistryV1beta2File
   520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   521  }
   522  
   523  // Hash: A hash of file content.
   524  type Hash struct {
   525  	// Type: The algorithm used to compute the hash value.
   526  	//
   527  	// Possible values:
   528  	//   "HASH_TYPE_UNSPECIFIED" - Unspecified.
   529  	//   "SHA256" - SHA256 hash.
   530  	//   "MD5" - MD5 hash.
   531  	Type string `json:"type,omitempty"`
   532  	// Value: The hash value.
   533  	Value string `json:"value,omitempty"`
   534  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
   535  	// include in API requests. By default, fields with empty or default values are
   536  	// omitted from API requests. See
   537  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   538  	// details.
   539  	ForceSendFields []string `json:"-"`
   540  	// NullFields is a list of field names (e.g. "Type") to include in API requests
   541  	// with the JSON null value. By default, fields with empty values are omitted
   542  	// from API requests. See
   543  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   544  	NullFields []string `json:"-"`
   545  }
   546  
   547  func (s *Hash) MarshalJSON() ([]byte, error) {
   548  	type NoMethod Hash
   549  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   550  }
   551  
   552  // ImportAptArtifactsErrorInfo: Error information explaining why a package was
   553  // not imported.
   554  type ImportAptArtifactsErrorInfo struct {
   555  	// Error: The detailed error status.
   556  	Error *Status `json:"error,omitempty"`
   557  	// GcsSource: Google Cloud Storage location requested.
   558  	GcsSource *ImportAptArtifactsGcsSource `json:"gcsSource,omitempty"`
   559  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
   560  	// include in API requests. By default, fields with empty or default values are
   561  	// omitted from API requests. See
   562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   563  	// details.
   564  	ForceSendFields []string `json:"-"`
   565  	// NullFields is a list of field names (e.g. "Error") to include in API
   566  	// requests with the JSON null value. By default, fields with empty values are
   567  	// omitted from API requests. See
   568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   569  	NullFields []string `json:"-"`
   570  }
   571  
   572  func (s *ImportAptArtifactsErrorInfo) MarshalJSON() ([]byte, error) {
   573  	type NoMethod ImportAptArtifactsErrorInfo
   574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   575  }
   576  
   577  // ImportAptArtifactsGcsSource: Google Cloud Storage location where the
   578  // artifacts currently reside.
   579  type ImportAptArtifactsGcsSource struct {
   580  	// Uris: Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
   581  	Uris []string `json:"uris,omitempty"`
   582  	// UseWildcards: Supports URI wildcards for matching multiple objects from a
   583  	// single URI.
   584  	UseWildcards bool `json:"useWildcards,omitempty"`
   585  	// ForceSendFields is a list of field names (e.g. "Uris") to unconditionally
   586  	// include in API requests. By default, fields with empty or default values are
   587  	// omitted from API requests. See
   588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   589  	// details.
   590  	ForceSendFields []string `json:"-"`
   591  	// NullFields is a list of field names (e.g. "Uris") to include in API requests
   592  	// with the JSON null value. By default, fields with empty values are omitted
   593  	// from API requests. See
   594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   595  	NullFields []string `json:"-"`
   596  }
   597  
   598  func (s *ImportAptArtifactsGcsSource) MarshalJSON() ([]byte, error) {
   599  	type NoMethod ImportAptArtifactsGcsSource
   600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   601  }
   602  
   603  // ImportAptArtifactsMetadata: The operation metadata for importing artifacts.
   604  type ImportAptArtifactsMetadata struct {
   605  }
   606  
   607  // ImportAptArtifactsRequest: The request to import new apt artifacts.
   608  type ImportAptArtifactsRequest struct {
   609  	// GcsSource: Google Cloud Storage location where input content is located.
   610  	GcsSource *ImportAptArtifactsGcsSource `json:"gcsSource,omitempty"`
   611  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
   612  	// unconditionally include in API requests. By default, fields with empty or
   613  	// default values are omitted from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   615  	// details.
   616  	ForceSendFields []string `json:"-"`
   617  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
   618  	// requests with the JSON null value. By default, fields with empty values are
   619  	// omitted from API requests. See
   620  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   621  	NullFields []string `json:"-"`
   622  }
   623  
   624  func (s *ImportAptArtifactsRequest) MarshalJSON() ([]byte, error) {
   625  	type NoMethod ImportAptArtifactsRequest
   626  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   627  }
   628  
   629  // ImportAptArtifactsResponse: The response message from importing APT
   630  // artifacts.
   631  type ImportAptArtifactsResponse struct {
   632  	// AptArtifacts: The Apt artifacts imported.
   633  	AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"`
   634  	// Errors: Detailed error info for packages that were not imported.
   635  	Errors []*ImportAptArtifactsErrorInfo `json:"errors,omitempty"`
   636  	// ForceSendFields is a list of field names (e.g. "AptArtifacts") to
   637  	// unconditionally include in API requests. By default, fields with empty or
   638  	// default values are omitted from API requests. See
   639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   640  	// details.
   641  	ForceSendFields []string `json:"-"`
   642  	// NullFields is a list of field names (e.g. "AptArtifacts") to include in API
   643  	// requests with the JSON null value. By default, fields with empty values are
   644  	// omitted from API requests. See
   645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   646  	NullFields []string `json:"-"`
   647  }
   648  
   649  func (s *ImportAptArtifactsResponse) MarshalJSON() ([]byte, error) {
   650  	type NoMethod ImportAptArtifactsResponse
   651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   652  }
   653  
   654  // ImportYumArtifactsErrorInfo: Error information explaining why a package was
   655  // not imported.
   656  type ImportYumArtifactsErrorInfo struct {
   657  	// Error: The detailed error status.
   658  	Error *Status `json:"error,omitempty"`
   659  	// GcsSource: Google Cloud Storage location requested.
   660  	GcsSource *ImportYumArtifactsGcsSource `json:"gcsSource,omitempty"`
   661  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
   662  	// include in API requests. By default, fields with empty or default values are
   663  	// omitted from API requests. See
   664  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   665  	// details.
   666  	ForceSendFields []string `json:"-"`
   667  	// NullFields is a list of field names (e.g. "Error") to include in API
   668  	// requests with the JSON null value. By default, fields with empty values are
   669  	// omitted from API requests. See
   670  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   671  	NullFields []string `json:"-"`
   672  }
   673  
   674  func (s *ImportYumArtifactsErrorInfo) MarshalJSON() ([]byte, error) {
   675  	type NoMethod ImportYumArtifactsErrorInfo
   676  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   677  }
   678  
   679  // ImportYumArtifactsGcsSource: Google Cloud Storage location where the
   680  // artifacts currently reside.
   681  type ImportYumArtifactsGcsSource struct {
   682  	// Uris: Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
   683  	Uris []string `json:"uris,omitempty"`
   684  	// UseWildcards: Supports URI wildcards for matching multiple objects from a
   685  	// single URI.
   686  	UseWildcards bool `json:"useWildcards,omitempty"`
   687  	// ForceSendFields is a list of field names (e.g. "Uris") to unconditionally
   688  	// include in API requests. By default, fields with empty or default values are
   689  	// omitted from API requests. See
   690  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   691  	// details.
   692  	ForceSendFields []string `json:"-"`
   693  	// NullFields is a list of field names (e.g. "Uris") to include in API requests
   694  	// with the JSON null value. By default, fields with empty values are omitted
   695  	// from API requests. See
   696  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   697  	NullFields []string `json:"-"`
   698  }
   699  
   700  func (s *ImportYumArtifactsGcsSource) MarshalJSON() ([]byte, error) {
   701  	type NoMethod ImportYumArtifactsGcsSource
   702  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   703  }
   704  
   705  // ImportYumArtifactsMetadata: The operation metadata for importing artifacts.
   706  type ImportYumArtifactsMetadata struct {
   707  }
   708  
   709  // ImportYumArtifactsRequest: The request to import new yum artifacts.
   710  type ImportYumArtifactsRequest struct {
   711  	// GcsSource: Google Cloud Storage location where input content is located.
   712  	GcsSource *ImportYumArtifactsGcsSource `json:"gcsSource,omitempty"`
   713  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
   714  	// unconditionally include in API requests. By default, fields with empty or
   715  	// default values are omitted from API requests. See
   716  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   717  	// details.
   718  	ForceSendFields []string `json:"-"`
   719  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
   720  	// requests with the JSON null value. By default, fields with empty values are
   721  	// omitted from API requests. See
   722  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   723  	NullFields []string `json:"-"`
   724  }
   725  
   726  func (s *ImportYumArtifactsRequest) MarshalJSON() ([]byte, error) {
   727  	type NoMethod ImportYumArtifactsRequest
   728  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   729  }
   730  
   731  // ImportYumArtifactsResponse: The response message from importing YUM
   732  // artifacts.
   733  type ImportYumArtifactsResponse struct {
   734  	// Errors: Detailed error info for packages that were not imported.
   735  	Errors []*ImportYumArtifactsErrorInfo `json:"errors,omitempty"`
   736  	// YumArtifacts: The yum artifacts imported.
   737  	YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"`
   738  	// ForceSendFields is a list of field names (e.g. "Errors") to unconditionally
   739  	// include in API requests. By default, fields with empty or default values are
   740  	// 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. "Errors") 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 *ImportYumArtifactsResponse) MarshalJSON() ([]byte, error) {
   752  	type NoMethod ImportYumArtifactsResponse
   753  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   754  }
   755  
   756  // ListFilesResponse: The response from listing files.
   757  type ListFilesResponse struct {
   758  	// Files: The files returned.
   759  	Files []*GoogleDevtoolsArtifactregistryV1beta2File `json:"files,omitempty"`
   760  	// NextPageToken: The token to retrieve the next page of files, or empty if
   761  	// there are no more files to return.
   762  	NextPageToken string `json:"nextPageToken,omitempty"`
   763  
   764  	// ServerResponse contains the HTTP response code and headers from the server.
   765  	googleapi.ServerResponse `json:"-"`
   766  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
   767  	// include in API requests. By default, fields with empty or default values are
   768  	// omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "Files") to include in API
   773  	// requests with the JSON null value. By default, fields with empty values are
   774  	// omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *ListFilesResponse) MarshalJSON() ([]byte, error) {
   780  	type NoMethod ListFilesResponse
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  // ListLocationsResponse: The response message for Locations.ListLocations.
   785  type ListLocationsResponse struct {
   786  	// Locations: A list of locations that matches the specified filter in the
   787  	// request.
   788  	Locations []*Location `json:"locations,omitempty"`
   789  	// NextPageToken: The standard List next-page token.
   790  	NextPageToken string `json:"nextPageToken,omitempty"`
   791  
   792  	// ServerResponse contains the HTTP response code and headers from the server.
   793  	googleapi.ServerResponse `json:"-"`
   794  	// ForceSendFields is a list of field names (e.g. "Locations") to
   795  	// unconditionally include in API requests. By default, fields with empty or
   796  	// default values are omitted from API requests. See
   797  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   798  	// details.
   799  	ForceSendFields []string `json:"-"`
   800  	// NullFields is a list of field names (e.g. "Locations") to include in API
   801  	// requests with the JSON null value. By default, fields with empty values are
   802  	// omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   804  	NullFields []string `json:"-"`
   805  }
   806  
   807  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   808  	type NoMethod ListLocationsResponse
   809  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   810  }
   811  
   812  // ListPackagesResponse: The response from listing packages.
   813  type ListPackagesResponse struct {
   814  	// NextPageToken: The token to retrieve the next page of packages, or empty if
   815  	// there are no more packages to return.
   816  	NextPageToken string `json:"nextPageToken,omitempty"`
   817  	// Packages: The packages returned.
   818  	Packages []*Package `json:"packages,omitempty"`
   819  
   820  	// ServerResponse contains the HTTP response code and headers from the server.
   821  	googleapi.ServerResponse `json:"-"`
   822  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   823  	// unconditionally include in API requests. By default, fields with empty or
   824  	// default values are omitted from API requests. See
   825  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   826  	// details.
   827  	ForceSendFields []string `json:"-"`
   828  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   829  	// requests with the JSON null value. By default, fields with empty values are
   830  	// omitted from API requests. See
   831  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   832  	NullFields []string `json:"-"`
   833  }
   834  
   835  func (s *ListPackagesResponse) MarshalJSON() ([]byte, error) {
   836  	type NoMethod ListPackagesResponse
   837  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   838  }
   839  
   840  // ListRepositoriesResponse: The response from listing repositories.
   841  type ListRepositoriesResponse struct {
   842  	// NextPageToken: The token to retrieve the next page of repositories, or empty
   843  	// if there are no more repositories to return.
   844  	NextPageToken string `json:"nextPageToken,omitempty"`
   845  	// Repositories: The repositories returned.
   846  	Repositories []*Repository `json:"repositories,omitempty"`
   847  
   848  	// ServerResponse contains the HTTP response code and headers from the server.
   849  	googleapi.ServerResponse `json:"-"`
   850  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   851  	// unconditionally include in API requests. By default, fields with empty or
   852  	// default values are omitted from API requests. See
   853  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   854  	// details.
   855  	ForceSendFields []string `json:"-"`
   856  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   857  	// requests with the JSON null value. By default, fields with empty values are
   858  	// omitted from API requests. See
   859  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   860  	NullFields []string `json:"-"`
   861  }
   862  
   863  func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) {
   864  	type NoMethod ListRepositoriesResponse
   865  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   866  }
   867  
   868  // ListTagsResponse: The response from listing tags.
   869  type ListTagsResponse struct {
   870  	// NextPageToken: The token to retrieve the next page of tags, or empty if
   871  	// there are no more tags to return.
   872  	NextPageToken string `json:"nextPageToken,omitempty"`
   873  	// Tags: The tags returned.
   874  	Tags []*Tag `json:"tags,omitempty"`
   875  
   876  	// ServerResponse contains the HTTP response code and headers from the server.
   877  	googleapi.ServerResponse `json:"-"`
   878  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   879  	// unconditionally include in API requests. By default, fields with empty or
   880  	// default values are omitted from API requests. See
   881  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   882  	// details.
   883  	ForceSendFields []string `json:"-"`
   884  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   885  	// requests with the JSON null value. By default, fields with empty values are
   886  	// omitted from API requests. See
   887  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   888  	NullFields []string `json:"-"`
   889  }
   890  
   891  func (s *ListTagsResponse) MarshalJSON() ([]byte, error) {
   892  	type NoMethod ListTagsResponse
   893  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   894  }
   895  
   896  // ListVersionsResponse: The response from listing versions.
   897  type ListVersionsResponse struct {
   898  	// NextPageToken: The token to retrieve the next page of versions, or empty if
   899  	// there are no more versions to return.
   900  	NextPageToken string `json:"nextPageToken,omitempty"`
   901  	// Versions: The versions returned.
   902  	Versions []*Version `json:"versions,omitempty"`
   903  
   904  	// ServerResponse contains the HTTP response code and headers from the server.
   905  	googleapi.ServerResponse `json:"-"`
   906  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   907  	// unconditionally include in API requests. By default, fields with empty or
   908  	// default values are omitted from API requests. See
   909  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   910  	// details.
   911  	ForceSendFields []string `json:"-"`
   912  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   913  	// requests with the JSON null value. By default, fields with empty values are
   914  	// omitted from API requests. See
   915  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   916  	NullFields []string `json:"-"`
   917  }
   918  
   919  func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
   920  	type NoMethod ListVersionsResponse
   921  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   922  }
   923  
   924  // Location: A resource that represents a Google Cloud location.
   925  type Location struct {
   926  	// DisplayName: The friendly name for this location, typically a nearby city
   927  	// name. For example, "Tokyo".
   928  	DisplayName string `json:"displayName,omitempty"`
   929  	// Labels: Cross-service attributes for the location. For example
   930  	// {"cloud.googleapis.com/region": "us-east1"}
   931  	Labels map[string]string `json:"labels,omitempty"`
   932  	// LocationId: The canonical id for this location. For example: "us-east1".
   933  	LocationId string `json:"locationId,omitempty"`
   934  	// Metadata: Service-specific metadata. For example the available capacity at
   935  	// the given location.
   936  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   937  	// Name: Resource name for the location, which may vary between
   938  	// implementations. For example:
   939  	// "projects/example-project/locations/us-east1"
   940  	Name string `json:"name,omitempty"`
   941  
   942  	// ServerResponse contains the HTTP response code and headers from the server.
   943  	googleapi.ServerResponse `json:"-"`
   944  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   945  	// unconditionally include in API requests. By default, fields with empty or
   946  	// default values are omitted from API requests. See
   947  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   948  	// details.
   949  	ForceSendFields []string `json:"-"`
   950  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   951  	// requests with the JSON null value. By default, fields with empty values are
   952  	// omitted from API requests. See
   953  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   954  	NullFields []string `json:"-"`
   955  }
   956  
   957  func (s *Location) MarshalJSON() ([]byte, error) {
   958  	type NoMethod Location
   959  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   960  }
   961  
   962  // MavenRepositoryConfig: MavenRepositoryConfig is maven related repository
   963  // details. Provides additional configuration details for repositories of the
   964  // maven format type.
   965  type MavenRepositoryConfig struct {
   966  	// AllowSnapshotOverwrites: The repository with this flag will allow publishing
   967  	// the same snapshot versions.
   968  	AllowSnapshotOverwrites bool `json:"allowSnapshotOverwrites,omitempty"`
   969  	// VersionPolicy: Version policy defines the versions that the registry will
   970  	// accept.
   971  	//
   972  	// Possible values:
   973  	//   "VERSION_POLICY_UNSPECIFIED" - VERSION_POLICY_UNSPECIFIED - the version
   974  	// policy is not defined. When the version policy is not defined, no validation
   975  	// is performed for the versions.
   976  	//   "RELEASE" - RELEASE - repository will accept only Release versions.
   977  	//   "SNAPSHOT" - SNAPSHOT - repository will accept only Snapshot versions.
   978  	VersionPolicy string `json:"versionPolicy,omitempty"`
   979  	// ForceSendFields is a list of field names (e.g. "AllowSnapshotOverwrites") to
   980  	// unconditionally include in API requests. By default, fields with empty or
   981  	// default values are omitted from API requests. See
   982  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   983  	// details.
   984  	ForceSendFields []string `json:"-"`
   985  	// NullFields is a list of field names (e.g. "AllowSnapshotOverwrites") to
   986  	// include in API requests with the JSON null value. By default, fields with
   987  	// empty values are omitted from API requests. See
   988  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   989  	NullFields []string `json:"-"`
   990  }
   991  
   992  func (s *MavenRepositoryConfig) MarshalJSON() ([]byte, error) {
   993  	type NoMethod MavenRepositoryConfig
   994  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   995  }
   996  
   997  // Operation: This resource represents a long-running operation that is the
   998  // result of a network API call.
   999  type Operation struct {
  1000  	// Done: If the value is `false`, it means the operation is still in progress.
  1001  	// If `true`, the operation is completed, and either `error` or `response` is
  1002  	// available.
  1003  	Done bool `json:"done,omitempty"`
  1004  	// Error: The error result of the operation in case of failure or cancellation.
  1005  	Error *Status `json:"error,omitempty"`
  1006  	// Metadata: Service-specific metadata associated with the operation. It
  1007  	// typically contains progress information and common metadata such as create
  1008  	// time. Some services might not provide such metadata. Any method that returns
  1009  	// a long-running operation should document the metadata type, if any.
  1010  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1011  	// Name: The server-assigned name, which is only unique within the same service
  1012  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1013  	// should be a resource name ending with `operations/{unique_id}`.
  1014  	Name string `json:"name,omitempty"`
  1015  	// Response: The normal, successful response of the operation. If the original
  1016  	// method returns no data on success, such as `Delete`, the response is
  1017  	// `google.protobuf.Empty`. If the original method is standard
  1018  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1019  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1020  	// original method name. For example, if the original method name is
  1021  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1022  	Response googleapi.RawMessage `json:"response,omitempty"`
  1023  
  1024  	// ServerResponse contains the HTTP response code and headers from the server.
  1025  	googleapi.ServerResponse `json:"-"`
  1026  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1027  	// include in API requests. By default, fields with empty or default values are
  1028  	// omitted from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1030  	// details.
  1031  	ForceSendFields []string `json:"-"`
  1032  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1033  	// with the JSON null value. By default, fields with empty values are omitted
  1034  	// from API requests. See
  1035  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1036  	NullFields []string `json:"-"`
  1037  }
  1038  
  1039  func (s *Operation) MarshalJSON() ([]byte, error) {
  1040  	type NoMethod Operation
  1041  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1042  }
  1043  
  1044  // OperationMetadata: Metadata type for longrunning-operations, currently
  1045  // empty.
  1046  type OperationMetadata struct {
  1047  }
  1048  
  1049  // Package: Packages are named collections of versions.
  1050  type Package struct {
  1051  	// Annotations: Optional. Client specified annotations.
  1052  	Annotations map[string]string `json:"annotations,omitempty"`
  1053  	// CreateTime: The time when the package was created.
  1054  	CreateTime string `json:"createTime,omitempty"`
  1055  	// DisplayName: The display name of the package.
  1056  	DisplayName string `json:"displayName,omitempty"`
  1057  	// Name: The name of the package, for example:
  1058  	// `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the
  1059  	// package ID part contains slashes, the slashes are escaped.
  1060  	Name string `json:"name,omitempty"`
  1061  	// UpdateTime: The time when the package was last updated. This includes
  1062  	// publishing a new version of the package.
  1063  	UpdateTime string `json:"updateTime,omitempty"`
  1064  
  1065  	// ServerResponse contains the HTTP response code and headers from the server.
  1066  	googleapi.ServerResponse `json:"-"`
  1067  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  1068  	// unconditionally include in API requests. By default, fields with empty or
  1069  	// default values are omitted from API requests. See
  1070  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1071  	// details.
  1072  	ForceSendFields []string `json:"-"`
  1073  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  1074  	// requests with the JSON null value. By default, fields with empty values are
  1075  	// omitted from API requests. See
  1076  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1077  	NullFields []string `json:"-"`
  1078  }
  1079  
  1080  func (s *Package) MarshalJSON() ([]byte, error) {
  1081  	type NoMethod Package
  1082  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1083  }
  1084  
  1085  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1086  // access controls for Google Cloud resources. A `Policy` is a collection of
  1087  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1088  // single `role`. Principals can be user accounts, service accounts, Google
  1089  // groups, and domains (such as G Suite). A `role` is a named list of
  1090  // permissions; each `role` can be an IAM predefined role or a user-created
  1091  // custom role. For some types of Google Cloud resources, a `binding` can also
  1092  // specify a `condition`, which is a logical expression that allows access to a
  1093  // resource only if the expression evaluates to `true`. A condition can add
  1094  // constraints based on attributes of the request, the resource, or both. To
  1095  // learn which resources support conditions in their IAM policies, see the IAM
  1096  // documentation
  1097  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1098  // example:** ``` { "bindings": [ { "role":
  1099  // "roles/resourcemanager.organizationAdmin", "members": [
  1100  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1101  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1102  // "roles/resourcemanager.organizationViewer", "members": [
  1103  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1104  // "description": "Does not grant access after Sep 2020", "expression":
  1105  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1106  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1107  // members: - user:mike@example.com - group:admins@example.com -
  1108  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1109  // role: roles/resourcemanager.organizationAdmin - members: -
  1110  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1111  // condition: title: expirable access description: Does not grant access after
  1112  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1113  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1114  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1115  type Policy struct {
  1116  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1117  	// Optionally, may specify a `condition` that determines how and when the
  1118  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1119  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1120  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1121  	// principal counts towards these limits. For example, if the `bindings` grant
  1122  	// 50 different roles to `user:alice@example.com`, and not to any other
  1123  	// principal, then you can add another 1,450 principals to the `bindings` in
  1124  	// the `Policy`.
  1125  	Bindings []*Binding `json:"bindings,omitempty"`
  1126  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1127  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1128  	// strongly suggested that systems make use of the `etag` in the
  1129  	// read-modify-write cycle to perform policy updates in order to avoid race
  1130  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1131  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1132  	// ensure that their change will be applied to the same version of the policy.
  1133  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1134  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1135  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1136  	// the conditions in the version `3` policy are lost.
  1137  	Etag string `json:"etag,omitempty"`
  1138  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1139  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1140  	// affects conditional role bindings must specify version `3`. This requirement
  1141  	// applies to the following operations: * Getting a policy that includes a
  1142  	// conditional role binding * Adding a conditional role binding to a policy *
  1143  	// Changing a conditional role binding in a policy * Removing any role binding,
  1144  	// with or without a condition, from a policy that includes conditions
  1145  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1146  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1147  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1148  	// the conditions in the version `3` policy are lost. If a policy does not
  1149  	// include any conditions, operations on that policy may specify any valid
  1150  	// version or leave the field unset. To learn which resources support
  1151  	// conditions in their IAM policies, see the IAM documentation
  1152  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1153  	Version int64 `json:"version,omitempty"`
  1154  
  1155  	// ServerResponse contains the HTTP response code and headers from the server.
  1156  	googleapi.ServerResponse `json:"-"`
  1157  	// ForceSendFields is a list of field names (e.g. "Bindings") to
  1158  	// unconditionally include in API requests. By default, fields with empty or
  1159  	// default values are omitted from API requests. See
  1160  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1161  	// details.
  1162  	ForceSendFields []string `json:"-"`
  1163  	// NullFields is a list of field names (e.g. "Bindings") to include in API
  1164  	// requests with the JSON null value. By default, fields with empty values are
  1165  	// omitted from API requests. See
  1166  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1167  	NullFields []string `json:"-"`
  1168  }
  1169  
  1170  func (s *Policy) MarshalJSON() ([]byte, error) {
  1171  	type NoMethod Policy
  1172  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1173  }
  1174  
  1175  // ProjectSettings: The Artifact Registry settings that apply to a Project.
  1176  type ProjectSettings struct {
  1177  	// LegacyRedirectionState: The redirection state of the legacy repositories in
  1178  	// this project.
  1179  	//
  1180  	// Possible values:
  1181  	//   "REDIRECTION_STATE_UNSPECIFIED" - No redirection status has been set.
  1182  	//   "REDIRECTION_FROM_GCR_IO_DISABLED" - Redirection is disabled.
  1183  	//   "REDIRECTION_FROM_GCR_IO_ENABLED" - Redirection is enabled.
  1184  	//   "REDIRECTION_FROM_GCR_IO_FINALIZED" - Redirection is enabled, and has been
  1185  	// finalized so cannot be reverted.
  1186  	//   "REDIRECTION_FROM_GCR_IO_ENABLED_AND_COPYING" - Redirection is enabled and
  1187  	// missing images are copied from GCR
  1188  	LegacyRedirectionState string `json:"legacyRedirectionState,omitempty"`
  1189  	// Name: The name of the project's settings. Always of the form:
  1190  	// projects/{project-id}/projectSettings In update request: never set In
  1191  	// response: always set
  1192  	Name string `json:"name,omitempty"`
  1193  
  1194  	// ServerResponse contains the HTTP response code and headers from the server.
  1195  	googleapi.ServerResponse `json:"-"`
  1196  	// ForceSendFields is a list of field names (e.g. "LegacyRedirectionState") 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. "LegacyRedirectionState") to
  1203  	// include in API requests with the JSON null value. By default, fields with
  1204  	// empty values 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 *ProjectSettings) MarshalJSON() ([]byte, error) {
  1210  	type NoMethod ProjectSettings
  1211  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1212  }
  1213  
  1214  // Repository: A Repository for storing artifacts with a specific format.
  1215  type Repository struct {
  1216  	// CreateTime: Output only. The time when the repository was created.
  1217  	CreateTime string `json:"createTime,omitempty"`
  1218  	// Description: The user-provided description of the repository.
  1219  	Description string `json:"description,omitempty"`
  1220  	// Format: Optional. The format of packages that are stored in the repository.
  1221  	//
  1222  	// Possible values:
  1223  	//   "FORMAT_UNSPECIFIED" - Unspecified package format.
  1224  	//   "DOCKER" - Docker package format.
  1225  	//   "MAVEN" - Maven package format.
  1226  	//   "NPM" - NPM package format.
  1227  	//   "APT" - APT package format.
  1228  	//   "YUM" - YUM package format.
  1229  	//   "GOOGET" - GooGet package format.
  1230  	//   "PYTHON" - Python package format.
  1231  	Format string `json:"format,omitempty"`
  1232  	// KmsKeyName: The Cloud KMS resource name of the customer managed encryption
  1233  	// key that's used to encrypt the contents of the Repository. Has the form:
  1234  	// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
  1235  	// This value may not be changed after the Repository has been created.
  1236  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1237  	// Labels: Labels with user-defined metadata. This field may contain up to 64
  1238  	// entries. Label keys and values may be no longer than 63 characters. Label
  1239  	// keys must begin with a lowercase letter and may only contain lowercase
  1240  	// letters, numeric characters, underscores, and dashes.
  1241  	Labels map[string]string `json:"labels,omitempty"`
  1242  	// MavenConfig: Maven repository config contains repository level configuration
  1243  	// for the repositories of maven type.
  1244  	MavenConfig *MavenRepositoryConfig `json:"mavenConfig,omitempty"`
  1245  	// Name: The name of the repository, for example:
  1246  	// `projects/p1/locations/us-central1/repositories/repo1`. For each location in
  1247  	// a project, repository names must be unique.
  1248  	Name string `json:"name,omitempty"`
  1249  	// SatisfiesPzi: Output only. If set, the repository satisfies physical zone
  1250  	// isolation.
  1251  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
  1252  	// SatisfiesPzs: Output only. If set, the repository satisfies physical zone
  1253  	// separation.
  1254  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
  1255  	// SizeBytes: Output only. The size, in bytes, of all artifact storage in this
  1256  	// repository. Repositories that are generally available or in public preview
  1257  	// use this to calculate storage costs.
  1258  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  1259  	// UpdateTime: Output only. The time when the repository was last updated.
  1260  	UpdateTime string `json:"updateTime,omitempty"`
  1261  
  1262  	// ServerResponse contains the HTTP response code and headers from the server.
  1263  	googleapi.ServerResponse `json:"-"`
  1264  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1265  	// unconditionally include in API requests. By default, fields with empty or
  1266  	// default values are omitted from API requests. See
  1267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1268  	// details.
  1269  	ForceSendFields []string `json:"-"`
  1270  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1271  	// requests with the JSON null value. By default, fields with empty values are
  1272  	// omitted from API requests. See
  1273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1274  	NullFields []string `json:"-"`
  1275  }
  1276  
  1277  func (s *Repository) MarshalJSON() ([]byte, error) {
  1278  	type NoMethod Repository
  1279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1280  }
  1281  
  1282  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1283  type SetIamPolicyRequest struct {
  1284  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1285  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1286  	// policy but certain Google Cloud services (such as Projects) might reject
  1287  	// them.
  1288  	Policy *Policy `json:"policy,omitempty"`
  1289  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1290  	// include in API requests. By default, fields with empty or default values are
  1291  	// omitted from API requests. See
  1292  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1293  	// details.
  1294  	ForceSendFields []string `json:"-"`
  1295  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1296  	// requests with the JSON null value. By default, fields with empty values are
  1297  	// omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1299  	NullFields []string `json:"-"`
  1300  }
  1301  
  1302  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1303  	type NoMethod SetIamPolicyRequest
  1304  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1305  }
  1306  
  1307  // Status: The `Status` type defines a logical error model that is suitable for
  1308  // different programming environments, including REST APIs and RPC APIs. It is
  1309  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1310  // pieces of data: error code, error message, and error details. You can find
  1311  // out more about this error model and how to work with it in the API Design
  1312  // Guide (https://cloud.google.com/apis/design/errors).
  1313  type Status struct {
  1314  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1315  	Code int64 `json:"code,omitempty"`
  1316  	// Details: A list of messages that carry the error details. There is a common
  1317  	// set of message types for APIs to use.
  1318  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1319  	// Message: A developer-facing error message, which should be in English. Any
  1320  	// user-facing error message should be localized and sent in the
  1321  	// google.rpc.Status.details field, or localized by the client.
  1322  	Message string `json:"message,omitempty"`
  1323  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1324  	// include in API requests. By default, fields with empty or default values are
  1325  	// omitted from API requests. See
  1326  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1327  	// details.
  1328  	ForceSendFields []string `json:"-"`
  1329  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1330  	// with the JSON null value. By default, fields with empty values are omitted
  1331  	// from API requests. See
  1332  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1333  	NullFields []string `json:"-"`
  1334  }
  1335  
  1336  func (s *Status) MarshalJSON() ([]byte, error) {
  1337  	type NoMethod Status
  1338  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1339  }
  1340  
  1341  // Tag: Tags point to a version and represent an alternative name that can be
  1342  // used to access the version.
  1343  type Tag struct {
  1344  	// Name: The name of the tag, for example:
  1345  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1
  1346  	// ". If the package part contains slashes, the slashes are escaped. The tag
  1347  	// part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be
  1348  	// URL encoded.
  1349  	Name string `json:"name,omitempty"`
  1350  	// Version: The name of the version the tag refers to, for example:
  1351  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
  1352  	// sha256:5243811" If the package or version ID parts contain slashes, the
  1353  	// slashes are escaped.
  1354  	Version string `json:"version,omitempty"`
  1355  
  1356  	// ServerResponse contains the HTTP response code and headers from the server.
  1357  	googleapi.ServerResponse `json:"-"`
  1358  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1359  	// include in API requests. By default, fields with empty or default values are
  1360  	// omitted from API requests. See
  1361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1362  	// details.
  1363  	ForceSendFields []string `json:"-"`
  1364  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1365  	// with the JSON null value. By default, fields with empty values are omitted
  1366  	// from API requests. See
  1367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1368  	NullFields []string `json:"-"`
  1369  }
  1370  
  1371  func (s *Tag) MarshalJSON() ([]byte, error) {
  1372  	type NoMethod Tag
  1373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1374  }
  1375  
  1376  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1377  type TestIamPermissionsRequest struct {
  1378  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1379  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1380  	// information see IAM Overview
  1381  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1382  	Permissions []string `json:"permissions,omitempty"`
  1383  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1384  	// unconditionally include in API requests. By default, fields with empty or
  1385  	// default values are omitted from API requests. See
  1386  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1387  	// details.
  1388  	ForceSendFields []string `json:"-"`
  1389  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1390  	// requests with the JSON null value. By default, fields with empty values are
  1391  	// omitted from API requests. See
  1392  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1393  	NullFields []string `json:"-"`
  1394  }
  1395  
  1396  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1397  	type NoMethod TestIamPermissionsRequest
  1398  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1399  }
  1400  
  1401  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1402  // method.
  1403  type TestIamPermissionsResponse struct {
  1404  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1405  	// caller is allowed.
  1406  	Permissions []string `json:"permissions,omitempty"`
  1407  
  1408  	// ServerResponse contains the HTTP response code and headers from the server.
  1409  	googleapi.ServerResponse `json:"-"`
  1410  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1411  	// unconditionally include in API requests. By default, fields with empty or
  1412  	// default values are omitted from API requests. See
  1413  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1414  	// details.
  1415  	ForceSendFields []string `json:"-"`
  1416  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1417  	// requests with the JSON null value. By default, fields with empty values are
  1418  	// omitted from API requests. See
  1419  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1420  	NullFields []string `json:"-"`
  1421  }
  1422  
  1423  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1424  	type NoMethod TestIamPermissionsResponse
  1425  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1426  }
  1427  
  1428  // UploadAptArtifactMediaResponse: The response to upload an artifact.
  1429  type UploadAptArtifactMediaResponse struct {
  1430  	// Operation: Operation to be returned to the user.
  1431  	Operation *Operation `json:"operation,omitempty"`
  1432  
  1433  	// ServerResponse contains the HTTP response code and headers from the server.
  1434  	googleapi.ServerResponse `json:"-"`
  1435  	// ForceSendFields is a list of field names (e.g. "Operation") to
  1436  	// unconditionally include in API requests. By default, fields with empty or
  1437  	// default values are omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1439  	// details.
  1440  	ForceSendFields []string `json:"-"`
  1441  	// NullFields is a list of field names (e.g. "Operation") to include in API
  1442  	// requests with the JSON null value. By default, fields with empty values are
  1443  	// omitted from API requests. See
  1444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1445  	NullFields []string `json:"-"`
  1446  }
  1447  
  1448  func (s *UploadAptArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  1449  	type NoMethod UploadAptArtifactMediaResponse
  1450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1451  }
  1452  
  1453  // UploadAptArtifactMetadata: The operation metadata for uploading artifacts.
  1454  type UploadAptArtifactMetadata struct {
  1455  }
  1456  
  1457  // UploadAptArtifactRequest: The request to upload an artifact.
  1458  type UploadAptArtifactRequest struct {
  1459  }
  1460  
  1461  // UploadAptArtifactResponse: The response of the completed artifact upload
  1462  // operation. This response is contained in the Operation and available to
  1463  // users.
  1464  type UploadAptArtifactResponse struct {
  1465  	// AptArtifacts: The Apt artifacts updated.
  1466  	AptArtifacts []*AptArtifact `json:"aptArtifacts,omitempty"`
  1467  	// ForceSendFields is a list of field names (e.g. "AptArtifacts") to
  1468  	// unconditionally include in API requests. By default, fields with empty or
  1469  	// default values are omitted from API requests. See
  1470  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1471  	// details.
  1472  	ForceSendFields []string `json:"-"`
  1473  	// NullFields is a list of field names (e.g. "AptArtifacts") to include in API
  1474  	// requests with the JSON null value. By default, fields with empty values are
  1475  	// omitted from API requests. See
  1476  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1477  	NullFields []string `json:"-"`
  1478  }
  1479  
  1480  func (s *UploadAptArtifactResponse) MarshalJSON() ([]byte, error) {
  1481  	type NoMethod UploadAptArtifactResponse
  1482  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1483  }
  1484  
  1485  // UploadYumArtifactMediaResponse: The response to upload an artifact.
  1486  type UploadYumArtifactMediaResponse struct {
  1487  	// Operation: Operation to be returned to the user.
  1488  	Operation *Operation `json:"operation,omitempty"`
  1489  
  1490  	// ServerResponse contains the HTTP response code and headers from the server.
  1491  	googleapi.ServerResponse `json:"-"`
  1492  	// ForceSendFields is a list of field names (e.g. "Operation") to
  1493  	// unconditionally include in API requests. By default, fields with empty or
  1494  	// default values are omitted from API requests. See
  1495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1496  	// details.
  1497  	ForceSendFields []string `json:"-"`
  1498  	// NullFields is a list of field names (e.g. "Operation") to include in API
  1499  	// requests with the JSON null value. By default, fields with empty values are
  1500  	// omitted from API requests. See
  1501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1502  	NullFields []string `json:"-"`
  1503  }
  1504  
  1505  func (s *UploadYumArtifactMediaResponse) MarshalJSON() ([]byte, error) {
  1506  	type NoMethod UploadYumArtifactMediaResponse
  1507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1508  }
  1509  
  1510  // UploadYumArtifactMetadata: The operation metadata for uploading artifacts.
  1511  type UploadYumArtifactMetadata struct {
  1512  }
  1513  
  1514  // UploadYumArtifactRequest: The request to upload an artifact.
  1515  type UploadYumArtifactRequest struct {
  1516  }
  1517  
  1518  // UploadYumArtifactResponse: The response of the completed artifact upload
  1519  // operation. This response is contained in the Operation and available to
  1520  // users.
  1521  type UploadYumArtifactResponse struct {
  1522  	// YumArtifacts: The Yum artifacts updated.
  1523  	YumArtifacts []*YumArtifact `json:"yumArtifacts,omitempty"`
  1524  	// ForceSendFields is a list of field names (e.g. "YumArtifacts") to
  1525  	// unconditionally include in API requests. By default, fields with empty or
  1526  	// default values are omitted from API requests. See
  1527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1528  	// details.
  1529  	ForceSendFields []string `json:"-"`
  1530  	// NullFields is a list of field names (e.g. "YumArtifacts") to include in API
  1531  	// requests with the JSON null value. By default, fields with empty values are
  1532  	// omitted from API requests. See
  1533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1534  	NullFields []string `json:"-"`
  1535  }
  1536  
  1537  func (s *UploadYumArtifactResponse) MarshalJSON() ([]byte, error) {
  1538  	type NoMethod UploadYumArtifactResponse
  1539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1540  }
  1541  
  1542  // Version: The body of a version resource. A version resource represents a
  1543  // collection of components, such as files and other data. This may correspond
  1544  // to a version in many package management schemes.
  1545  type Version struct {
  1546  	// CreateTime: The time when the version was created.
  1547  	CreateTime string `json:"createTime,omitempty"`
  1548  	// Description: Optional. Description of the version, as specified in its
  1549  	// metadata.
  1550  	Description string `json:"description,omitempty"`
  1551  	// Metadata: Output only. Repository-specific Metadata stored against this
  1552  	// version. The fields returned are defined by the underlying
  1553  	// repository-specific resource. Currently, the resources could be: DockerImage
  1554  	// MavenArtifact
  1555  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1556  	// Name: The name of the version, for example:
  1557  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
  1558  	// art1". If the package or version ID parts contain slashes, the slashes are
  1559  	// escaped.
  1560  	Name string `json:"name,omitempty"`
  1561  	// RelatedTags: Output only. A list of related tags. Will contain up to 100
  1562  	// tags that reference this version.
  1563  	RelatedTags []*Tag `json:"relatedTags,omitempty"`
  1564  	// UpdateTime: The time when the version was last updated.
  1565  	UpdateTime string `json:"updateTime,omitempty"`
  1566  
  1567  	// ServerResponse contains the HTTP response code and headers from the server.
  1568  	googleapi.ServerResponse `json:"-"`
  1569  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1570  	// unconditionally include in API requests. By default, fields with empty or
  1571  	// default values are omitted from API requests. See
  1572  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1573  	// details.
  1574  	ForceSendFields []string `json:"-"`
  1575  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1576  	// requests with the JSON null value. By default, fields with empty values are
  1577  	// omitted from API requests. See
  1578  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1579  	NullFields []string `json:"-"`
  1580  }
  1581  
  1582  func (s *Version) MarshalJSON() ([]byte, error) {
  1583  	type NoMethod Version
  1584  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1585  }
  1586  
  1587  // YumArtifact: A detailed representation of a Yum artifact.
  1588  type YumArtifact struct {
  1589  	// Architecture: Output only. Operating system architecture of the artifact.
  1590  	Architecture string `json:"architecture,omitempty"`
  1591  	// Name: Output only. The Artifact Registry resource name of the artifact.
  1592  	Name string `json:"name,omitempty"`
  1593  	// PackageName: Output only. The yum package name of the artifact.
  1594  	PackageName string `json:"packageName,omitempty"`
  1595  	// PackageType: Output only. An artifact is a binary or source package.
  1596  	//
  1597  	// Possible values:
  1598  	//   "PACKAGE_TYPE_UNSPECIFIED" - Package type is not specified.
  1599  	//   "BINARY" - Binary package (.rpm).
  1600  	//   "SOURCE" - Source package (.srpm).
  1601  	PackageType string `json:"packageType,omitempty"`
  1602  	// ForceSendFields is a list of field names (e.g. "Architecture") to
  1603  	// unconditionally include in API requests. By default, fields with empty or
  1604  	// default values are omitted from API requests. See
  1605  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1606  	// details.
  1607  	ForceSendFields []string `json:"-"`
  1608  	// NullFields is a list of field names (e.g. "Architecture") to include in API
  1609  	// requests with the JSON null value. By default, fields with empty values are
  1610  	// omitted from API requests. See
  1611  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1612  	NullFields []string `json:"-"`
  1613  }
  1614  
  1615  func (s *YumArtifact) MarshalJSON() ([]byte, error) {
  1616  	type NoMethod YumArtifact
  1617  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1618  }
  1619  
  1620  type ProjectsGetProjectSettingsCall struct {
  1621  	s            *Service
  1622  	name         string
  1623  	urlParams_   gensupport.URLParams
  1624  	ifNoneMatch_ string
  1625  	ctx_         context.Context
  1626  	header_      http.Header
  1627  }
  1628  
  1629  // GetProjectSettings: Retrieves the Settings for the Project.
  1630  //
  1631  // - name: The name of the projectSettings resource.
  1632  func (r *ProjectsService) GetProjectSettings(name string) *ProjectsGetProjectSettingsCall {
  1633  	c := &ProjectsGetProjectSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1634  	c.name = name
  1635  	return c
  1636  }
  1637  
  1638  // Fields allows partial responses to be retrieved. See
  1639  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1640  // details.
  1641  func (c *ProjectsGetProjectSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetProjectSettingsCall {
  1642  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1643  	return c
  1644  }
  1645  
  1646  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1647  // object's ETag matches the given value. This is useful for getting updates
  1648  // only after the object has changed since the last request.
  1649  func (c *ProjectsGetProjectSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetProjectSettingsCall {
  1650  	c.ifNoneMatch_ = entityTag
  1651  	return c
  1652  }
  1653  
  1654  // Context sets the context to be used in this call's Do method.
  1655  func (c *ProjectsGetProjectSettingsCall) Context(ctx context.Context) *ProjectsGetProjectSettingsCall {
  1656  	c.ctx_ = ctx
  1657  	return c
  1658  }
  1659  
  1660  // Header returns a http.Header that can be modified by the caller to add
  1661  // headers to the request.
  1662  func (c *ProjectsGetProjectSettingsCall) Header() http.Header {
  1663  	if c.header_ == nil {
  1664  		c.header_ = make(http.Header)
  1665  	}
  1666  	return c.header_
  1667  }
  1668  
  1669  func (c *ProjectsGetProjectSettingsCall) doRequest(alt string) (*http.Response, error) {
  1670  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1671  	if c.ifNoneMatch_ != "" {
  1672  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1673  	}
  1674  	var body io.Reader = nil
  1675  	c.urlParams_.Set("alt", alt)
  1676  	c.urlParams_.Set("prettyPrint", "false")
  1677  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  1678  	urls += "?" + c.urlParams_.Encode()
  1679  	req, err := http.NewRequest("GET", urls, body)
  1680  	if err != nil {
  1681  		return nil, err
  1682  	}
  1683  	req.Header = reqHeaders
  1684  	googleapi.Expand(req.URL, map[string]string{
  1685  		"name": c.name,
  1686  	})
  1687  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1688  }
  1689  
  1690  // Do executes the "artifactregistry.projects.getProjectSettings" call.
  1691  // Any non-2xx status code is an error. Response headers are in either
  1692  // *ProjectSettings.ServerResponse.Header or (if a response was returned at
  1693  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1694  // check whether the returned error was because http.StatusNotModified was
  1695  // returned.
  1696  func (c *ProjectsGetProjectSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  1697  	gensupport.SetOptions(c.urlParams_, opts...)
  1698  	res, err := c.doRequest("json")
  1699  	if res != nil && res.StatusCode == http.StatusNotModified {
  1700  		if res.Body != nil {
  1701  			res.Body.Close()
  1702  		}
  1703  		return nil, gensupport.WrapError(&googleapi.Error{
  1704  			Code:   res.StatusCode,
  1705  			Header: res.Header,
  1706  		})
  1707  	}
  1708  	if err != nil {
  1709  		return nil, err
  1710  	}
  1711  	defer googleapi.CloseBody(res)
  1712  	if err := googleapi.CheckResponse(res); err != nil {
  1713  		return nil, gensupport.WrapError(err)
  1714  	}
  1715  	ret := &ProjectSettings{
  1716  		ServerResponse: googleapi.ServerResponse{
  1717  			Header:         res.Header,
  1718  			HTTPStatusCode: res.StatusCode,
  1719  		},
  1720  	}
  1721  	target := &ret
  1722  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1723  		return nil, err
  1724  	}
  1725  	return ret, nil
  1726  }
  1727  
  1728  type ProjectsUpdateProjectSettingsCall struct {
  1729  	s               *Service
  1730  	name            string
  1731  	projectsettings *ProjectSettings
  1732  	urlParams_      gensupport.URLParams
  1733  	ctx_            context.Context
  1734  	header_         http.Header
  1735  }
  1736  
  1737  // UpdateProjectSettings: Updates the Settings for the Project.
  1738  //
  1739  //   - name: The name of the project's settings. Always of the form:
  1740  //     projects/{project-id}/projectSettings In update request: never set In
  1741  //     response: always set.
  1742  func (r *ProjectsService) UpdateProjectSettings(name string, projectsettings *ProjectSettings) *ProjectsUpdateProjectSettingsCall {
  1743  	c := &ProjectsUpdateProjectSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1744  	c.name = name
  1745  	c.projectsettings = projectsettings
  1746  	return c
  1747  }
  1748  
  1749  // UpdateMask sets the optional parameter "updateMask": Field mask to support
  1750  // partial updates.
  1751  func (c *ProjectsUpdateProjectSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateProjectSettingsCall {
  1752  	c.urlParams_.Set("updateMask", updateMask)
  1753  	return c
  1754  }
  1755  
  1756  // Fields allows partial responses to be retrieved. See
  1757  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1758  // details.
  1759  func (c *ProjectsUpdateProjectSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateProjectSettingsCall {
  1760  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1761  	return c
  1762  }
  1763  
  1764  // Context sets the context to be used in this call's Do method.
  1765  func (c *ProjectsUpdateProjectSettingsCall) Context(ctx context.Context) *ProjectsUpdateProjectSettingsCall {
  1766  	c.ctx_ = ctx
  1767  	return c
  1768  }
  1769  
  1770  // Header returns a http.Header that can be modified by the caller to add
  1771  // headers to the request.
  1772  func (c *ProjectsUpdateProjectSettingsCall) Header() http.Header {
  1773  	if c.header_ == nil {
  1774  		c.header_ = make(http.Header)
  1775  	}
  1776  	return c.header_
  1777  }
  1778  
  1779  func (c *ProjectsUpdateProjectSettingsCall) doRequest(alt string) (*http.Response, error) {
  1780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1781  	var body io.Reader = nil
  1782  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsettings)
  1783  	if err != nil {
  1784  		return nil, err
  1785  	}
  1786  	c.urlParams_.Set("alt", alt)
  1787  	c.urlParams_.Set("prettyPrint", "false")
  1788  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  1789  	urls += "?" + c.urlParams_.Encode()
  1790  	req, err := http.NewRequest("PATCH", urls, body)
  1791  	if err != nil {
  1792  		return nil, err
  1793  	}
  1794  	req.Header = reqHeaders
  1795  	googleapi.Expand(req.URL, map[string]string{
  1796  		"name": c.name,
  1797  	})
  1798  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1799  }
  1800  
  1801  // Do executes the "artifactregistry.projects.updateProjectSettings" call.
  1802  // Any non-2xx status code is an error. Response headers are in either
  1803  // *ProjectSettings.ServerResponse.Header or (if a response was returned at
  1804  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1805  // check whether the returned error was because http.StatusNotModified was
  1806  // returned.
  1807  func (c *ProjectsUpdateProjectSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  1808  	gensupport.SetOptions(c.urlParams_, opts...)
  1809  	res, err := c.doRequest("json")
  1810  	if res != nil && res.StatusCode == http.StatusNotModified {
  1811  		if res.Body != nil {
  1812  			res.Body.Close()
  1813  		}
  1814  		return nil, gensupport.WrapError(&googleapi.Error{
  1815  			Code:   res.StatusCode,
  1816  			Header: res.Header,
  1817  		})
  1818  	}
  1819  	if err != nil {
  1820  		return nil, err
  1821  	}
  1822  	defer googleapi.CloseBody(res)
  1823  	if err := googleapi.CheckResponse(res); err != nil {
  1824  		return nil, gensupport.WrapError(err)
  1825  	}
  1826  	ret := &ProjectSettings{
  1827  		ServerResponse: googleapi.ServerResponse{
  1828  			Header:         res.Header,
  1829  			HTTPStatusCode: res.StatusCode,
  1830  		},
  1831  	}
  1832  	target := &ret
  1833  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1834  		return nil, err
  1835  	}
  1836  	return ret, nil
  1837  }
  1838  
  1839  type ProjectsLocationsGetCall struct {
  1840  	s            *Service
  1841  	name         string
  1842  	urlParams_   gensupport.URLParams
  1843  	ifNoneMatch_ string
  1844  	ctx_         context.Context
  1845  	header_      http.Header
  1846  }
  1847  
  1848  // Get: Gets information about a location.
  1849  //
  1850  // - name: Resource name for the location.
  1851  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1852  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1853  	c.name = name
  1854  	return c
  1855  }
  1856  
  1857  // Fields allows partial responses to be retrieved. See
  1858  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1859  // details.
  1860  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1861  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1862  	return c
  1863  }
  1864  
  1865  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1866  // object's ETag matches the given value. This is useful for getting updates
  1867  // only after the object has changed since the last request.
  1868  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1869  	c.ifNoneMatch_ = entityTag
  1870  	return c
  1871  }
  1872  
  1873  // Context sets the context to be used in this call's Do method.
  1874  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1875  	c.ctx_ = ctx
  1876  	return c
  1877  }
  1878  
  1879  // Header returns a http.Header that can be modified by the caller to add
  1880  // headers to the request.
  1881  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1882  	if c.header_ == nil {
  1883  		c.header_ = make(http.Header)
  1884  	}
  1885  	return c.header_
  1886  }
  1887  
  1888  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1889  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1890  	if c.ifNoneMatch_ != "" {
  1891  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1892  	}
  1893  	var body io.Reader = nil
  1894  	c.urlParams_.Set("alt", alt)
  1895  	c.urlParams_.Set("prettyPrint", "false")
  1896  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  1897  	urls += "?" + c.urlParams_.Encode()
  1898  	req, err := http.NewRequest("GET", urls, body)
  1899  	if err != nil {
  1900  		return nil, err
  1901  	}
  1902  	req.Header = reqHeaders
  1903  	googleapi.Expand(req.URL, map[string]string{
  1904  		"name": c.name,
  1905  	})
  1906  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1907  }
  1908  
  1909  // Do executes the "artifactregistry.projects.locations.get" call.
  1910  // Any non-2xx status code is an error. Response headers are in either
  1911  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1912  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1913  // whether the returned error was because http.StatusNotModified was returned.
  1914  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1915  	gensupport.SetOptions(c.urlParams_, opts...)
  1916  	res, err := c.doRequest("json")
  1917  	if res != nil && res.StatusCode == http.StatusNotModified {
  1918  		if res.Body != nil {
  1919  			res.Body.Close()
  1920  		}
  1921  		return nil, gensupport.WrapError(&googleapi.Error{
  1922  			Code:   res.StatusCode,
  1923  			Header: res.Header,
  1924  		})
  1925  	}
  1926  	if err != nil {
  1927  		return nil, err
  1928  	}
  1929  	defer googleapi.CloseBody(res)
  1930  	if err := googleapi.CheckResponse(res); err != nil {
  1931  		return nil, gensupport.WrapError(err)
  1932  	}
  1933  	ret := &Location{
  1934  		ServerResponse: googleapi.ServerResponse{
  1935  			Header:         res.Header,
  1936  			HTTPStatusCode: res.StatusCode,
  1937  		},
  1938  	}
  1939  	target := &ret
  1940  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1941  		return nil, err
  1942  	}
  1943  	return ret, nil
  1944  }
  1945  
  1946  type ProjectsLocationsListCall struct {
  1947  	s            *Service
  1948  	name         string
  1949  	urlParams_   gensupport.URLParams
  1950  	ifNoneMatch_ string
  1951  	ctx_         context.Context
  1952  	header_      http.Header
  1953  }
  1954  
  1955  // List: Lists information about the supported locations for this service.
  1956  //
  1957  // - name: The resource that owns the locations collection, if applicable.
  1958  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1959  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1960  	c.name = name
  1961  	return c
  1962  }
  1963  
  1964  // Filter sets the optional parameter "filter": A filter to narrow down results
  1965  // to a preferred subset. The filtering language accepts strings like
  1966  // "displayName=tokyo", and is documented in more detail in AIP-160
  1967  // (https://google.aip.dev/160).
  1968  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1969  	c.urlParams_.Set("filter", filter)
  1970  	return c
  1971  }
  1972  
  1973  // PageSize sets the optional parameter "pageSize": The maximum number of
  1974  // results to return. If not set, the service selects a default.
  1975  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1976  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1977  	return c
  1978  }
  1979  
  1980  // PageToken sets the optional parameter "pageToken": A page token received
  1981  // from the `next_page_token` field in the response. Send that page token to
  1982  // receive the subsequent page.
  1983  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1984  	c.urlParams_.Set("pageToken", pageToken)
  1985  	return c
  1986  }
  1987  
  1988  // Fields allows partial responses to be retrieved. See
  1989  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1990  // details.
  1991  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1992  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1993  	return c
  1994  }
  1995  
  1996  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1997  // object's ETag matches the given value. This is useful for getting updates
  1998  // only after the object has changed since the last request.
  1999  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2000  	c.ifNoneMatch_ = entityTag
  2001  	return c
  2002  }
  2003  
  2004  // Context sets the context to be used in this call's Do method.
  2005  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2006  	c.ctx_ = ctx
  2007  	return c
  2008  }
  2009  
  2010  // Header returns a http.Header that can be modified by the caller to add
  2011  // headers to the request.
  2012  func (c *ProjectsLocationsListCall) Header() http.Header {
  2013  	if c.header_ == nil {
  2014  		c.header_ = make(http.Header)
  2015  	}
  2016  	return c.header_
  2017  }
  2018  
  2019  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2020  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2021  	if c.ifNoneMatch_ != "" {
  2022  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2023  	}
  2024  	var body io.Reader = nil
  2025  	c.urlParams_.Set("alt", alt)
  2026  	c.urlParams_.Set("prettyPrint", "false")
  2027  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}/locations")
  2028  	urls += "?" + c.urlParams_.Encode()
  2029  	req, err := http.NewRequest("GET", urls, body)
  2030  	if err != nil {
  2031  		return nil, err
  2032  	}
  2033  	req.Header = reqHeaders
  2034  	googleapi.Expand(req.URL, map[string]string{
  2035  		"name": c.name,
  2036  	})
  2037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2038  }
  2039  
  2040  // Do executes the "artifactregistry.projects.locations.list" call.
  2041  // Any non-2xx status code is an error. Response headers are in either
  2042  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2043  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2044  // check whether the returned error was because http.StatusNotModified was
  2045  // returned.
  2046  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2047  	gensupport.SetOptions(c.urlParams_, opts...)
  2048  	res, err := c.doRequest("json")
  2049  	if res != nil && res.StatusCode == http.StatusNotModified {
  2050  		if res.Body != nil {
  2051  			res.Body.Close()
  2052  		}
  2053  		return nil, gensupport.WrapError(&googleapi.Error{
  2054  			Code:   res.StatusCode,
  2055  			Header: res.Header,
  2056  		})
  2057  	}
  2058  	if err != nil {
  2059  		return nil, err
  2060  	}
  2061  	defer googleapi.CloseBody(res)
  2062  	if err := googleapi.CheckResponse(res); err != nil {
  2063  		return nil, gensupport.WrapError(err)
  2064  	}
  2065  	ret := &ListLocationsResponse{
  2066  		ServerResponse: googleapi.ServerResponse{
  2067  			Header:         res.Header,
  2068  			HTTPStatusCode: res.StatusCode,
  2069  		},
  2070  	}
  2071  	target := &ret
  2072  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2073  		return nil, err
  2074  	}
  2075  	return ret, nil
  2076  }
  2077  
  2078  // Pages invokes f for each page of results.
  2079  // A non-nil error returned from f will halt the iteration.
  2080  // The provided context supersedes any context provided to the Context method.
  2081  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2082  	c.ctx_ = ctx
  2083  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2084  	for {
  2085  		x, err := c.Do()
  2086  		if err != nil {
  2087  			return err
  2088  		}
  2089  		if err := f(x); err != nil {
  2090  			return err
  2091  		}
  2092  		if x.NextPageToken == "" {
  2093  			return nil
  2094  		}
  2095  		c.PageToken(x.NextPageToken)
  2096  	}
  2097  }
  2098  
  2099  type ProjectsLocationsOperationsGetCall struct {
  2100  	s            *Service
  2101  	name         string
  2102  	urlParams_   gensupport.URLParams
  2103  	ifNoneMatch_ string
  2104  	ctx_         context.Context
  2105  	header_      http.Header
  2106  }
  2107  
  2108  // Get: Gets the latest state of a long-running operation. Clients can use this
  2109  // method to poll the operation result at intervals as recommended by the API
  2110  // service.
  2111  //
  2112  // - name: The name of the operation resource.
  2113  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  2114  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2115  	c.name = name
  2116  	return c
  2117  }
  2118  
  2119  // Fields allows partial responses to be retrieved. See
  2120  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2121  // details.
  2122  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  2123  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2124  	return c
  2125  }
  2126  
  2127  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2128  // object's ETag matches the given value. This is useful for getting updates
  2129  // only after the object has changed since the last request.
  2130  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  2131  	c.ifNoneMatch_ = entityTag
  2132  	return c
  2133  }
  2134  
  2135  // Context sets the context to be used in this call's Do method.
  2136  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  2137  	c.ctx_ = ctx
  2138  	return c
  2139  }
  2140  
  2141  // Header returns a http.Header that can be modified by the caller to add
  2142  // headers to the request.
  2143  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  2144  	if c.header_ == nil {
  2145  		c.header_ = make(http.Header)
  2146  	}
  2147  	return c.header_
  2148  }
  2149  
  2150  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2151  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2152  	if c.ifNoneMatch_ != "" {
  2153  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2154  	}
  2155  	var body io.Reader = nil
  2156  	c.urlParams_.Set("alt", alt)
  2157  	c.urlParams_.Set("prettyPrint", "false")
  2158  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  2159  	urls += "?" + c.urlParams_.Encode()
  2160  	req, err := http.NewRequest("GET", urls, body)
  2161  	if err != nil {
  2162  		return nil, err
  2163  	}
  2164  	req.Header = reqHeaders
  2165  	googleapi.Expand(req.URL, map[string]string{
  2166  		"name": c.name,
  2167  	})
  2168  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2169  }
  2170  
  2171  // Do executes the "artifactregistry.projects.locations.operations.get" call.
  2172  // Any non-2xx status code is an error. Response headers are in either
  2173  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2174  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2175  // whether the returned error was because http.StatusNotModified was returned.
  2176  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2177  	gensupport.SetOptions(c.urlParams_, opts...)
  2178  	res, err := c.doRequest("json")
  2179  	if res != nil && res.StatusCode == http.StatusNotModified {
  2180  		if res.Body != nil {
  2181  			res.Body.Close()
  2182  		}
  2183  		return nil, gensupport.WrapError(&googleapi.Error{
  2184  			Code:   res.StatusCode,
  2185  			Header: res.Header,
  2186  		})
  2187  	}
  2188  	if err != nil {
  2189  		return nil, err
  2190  	}
  2191  	defer googleapi.CloseBody(res)
  2192  	if err := googleapi.CheckResponse(res); err != nil {
  2193  		return nil, gensupport.WrapError(err)
  2194  	}
  2195  	ret := &Operation{
  2196  		ServerResponse: googleapi.ServerResponse{
  2197  			Header:         res.Header,
  2198  			HTTPStatusCode: res.StatusCode,
  2199  		},
  2200  	}
  2201  	target := &ret
  2202  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2203  		return nil, err
  2204  	}
  2205  	return ret, nil
  2206  }
  2207  
  2208  type ProjectsLocationsRepositoriesCreateCall struct {
  2209  	s          *Service
  2210  	parent     string
  2211  	repository *Repository
  2212  	urlParams_ gensupport.URLParams
  2213  	ctx_       context.Context
  2214  	header_    http.Header
  2215  }
  2216  
  2217  // Create: Creates a repository. The returned Operation will finish once the
  2218  // repository has been created. Its response will be the created Repository.
  2219  //
  2220  //   - parent: The name of the parent resource where the repository will be
  2221  //     created.
  2222  func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall {
  2223  	c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2224  	c.parent = parent
  2225  	c.repository = repository
  2226  	return c
  2227  }
  2228  
  2229  // RepositoryId sets the optional parameter "repositoryId": Required. The
  2230  // repository id to use for this repository.
  2231  func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall {
  2232  	c.urlParams_.Set("repositoryId", repositoryId)
  2233  	return c
  2234  }
  2235  
  2236  // Fields allows partial responses to be retrieved. See
  2237  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2238  // details.
  2239  func (c *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall {
  2240  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2241  	return c
  2242  }
  2243  
  2244  // Context sets the context to be used in this call's Do method.
  2245  func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall {
  2246  	c.ctx_ = ctx
  2247  	return c
  2248  }
  2249  
  2250  // Header returns a http.Header that can be modified by the caller to add
  2251  // headers to the request.
  2252  func (c *ProjectsLocationsRepositoriesCreateCall) Header() http.Header {
  2253  	if c.header_ == nil {
  2254  		c.header_ = make(http.Header)
  2255  	}
  2256  	return c.header_
  2257  }
  2258  
  2259  func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) {
  2260  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2261  	var body io.Reader = nil
  2262  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  2263  	if err != nil {
  2264  		return nil, err
  2265  	}
  2266  	c.urlParams_.Set("alt", alt)
  2267  	c.urlParams_.Set("prettyPrint", "false")
  2268  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/repositories")
  2269  	urls += "?" + c.urlParams_.Encode()
  2270  	req, err := http.NewRequest("POST", urls, body)
  2271  	if err != nil {
  2272  		return nil, err
  2273  	}
  2274  	req.Header = reqHeaders
  2275  	googleapi.Expand(req.URL, map[string]string{
  2276  		"parent": c.parent,
  2277  	})
  2278  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2279  }
  2280  
  2281  // Do executes the "artifactregistry.projects.locations.repositories.create" call.
  2282  // Any non-2xx status code is an error. Response headers are in either
  2283  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2284  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2285  // whether the returned error was because http.StatusNotModified was returned.
  2286  func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2287  	gensupport.SetOptions(c.urlParams_, opts...)
  2288  	res, err := c.doRequest("json")
  2289  	if res != nil && res.StatusCode == http.StatusNotModified {
  2290  		if res.Body != nil {
  2291  			res.Body.Close()
  2292  		}
  2293  		return nil, gensupport.WrapError(&googleapi.Error{
  2294  			Code:   res.StatusCode,
  2295  			Header: res.Header,
  2296  		})
  2297  	}
  2298  	if err != nil {
  2299  		return nil, err
  2300  	}
  2301  	defer googleapi.CloseBody(res)
  2302  	if err := googleapi.CheckResponse(res); err != nil {
  2303  		return nil, gensupport.WrapError(err)
  2304  	}
  2305  	ret := &Operation{
  2306  		ServerResponse: googleapi.ServerResponse{
  2307  			Header:         res.Header,
  2308  			HTTPStatusCode: res.StatusCode,
  2309  		},
  2310  	}
  2311  	target := &ret
  2312  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2313  		return nil, err
  2314  	}
  2315  	return ret, nil
  2316  }
  2317  
  2318  type ProjectsLocationsRepositoriesDeleteCall struct {
  2319  	s          *Service
  2320  	name       string
  2321  	urlParams_ gensupport.URLParams
  2322  	ctx_       context.Context
  2323  	header_    http.Header
  2324  }
  2325  
  2326  // Delete: Deletes a repository and all of its contents. The returned Operation
  2327  // will finish once the repository has been deleted. It will not have any
  2328  // Operation metadata and will return a google.protobuf.Empty response.
  2329  //
  2330  // - name: The name of the repository to delete.
  2331  func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall {
  2332  	c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2333  	c.name = name
  2334  	return c
  2335  }
  2336  
  2337  // Fields allows partial responses to be retrieved. See
  2338  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2339  // details.
  2340  func (c *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall {
  2341  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2342  	return c
  2343  }
  2344  
  2345  // Context sets the context to be used in this call's Do method.
  2346  func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall {
  2347  	c.ctx_ = ctx
  2348  	return c
  2349  }
  2350  
  2351  // Header returns a http.Header that can be modified by the caller to add
  2352  // headers to the request.
  2353  func (c *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header {
  2354  	if c.header_ == nil {
  2355  		c.header_ = make(http.Header)
  2356  	}
  2357  	return c.header_
  2358  }
  2359  
  2360  func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2361  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2362  	var body io.Reader = nil
  2363  	c.urlParams_.Set("alt", alt)
  2364  	c.urlParams_.Set("prettyPrint", "false")
  2365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  2366  	urls += "?" + c.urlParams_.Encode()
  2367  	req, err := http.NewRequest("DELETE", urls, body)
  2368  	if err != nil {
  2369  		return nil, err
  2370  	}
  2371  	req.Header = reqHeaders
  2372  	googleapi.Expand(req.URL, map[string]string{
  2373  		"name": c.name,
  2374  	})
  2375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2376  }
  2377  
  2378  // Do executes the "artifactregistry.projects.locations.repositories.delete" call.
  2379  // Any non-2xx status code is an error. Response headers are in either
  2380  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2381  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2382  // whether the returned error was because http.StatusNotModified was returned.
  2383  func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2384  	gensupport.SetOptions(c.urlParams_, opts...)
  2385  	res, err := c.doRequest("json")
  2386  	if res != nil && res.StatusCode == http.StatusNotModified {
  2387  		if res.Body != nil {
  2388  			res.Body.Close()
  2389  		}
  2390  		return nil, gensupport.WrapError(&googleapi.Error{
  2391  			Code:   res.StatusCode,
  2392  			Header: res.Header,
  2393  		})
  2394  	}
  2395  	if err != nil {
  2396  		return nil, err
  2397  	}
  2398  	defer googleapi.CloseBody(res)
  2399  	if err := googleapi.CheckResponse(res); err != nil {
  2400  		return nil, gensupport.WrapError(err)
  2401  	}
  2402  	ret := &Operation{
  2403  		ServerResponse: googleapi.ServerResponse{
  2404  			Header:         res.Header,
  2405  			HTTPStatusCode: res.StatusCode,
  2406  		},
  2407  	}
  2408  	target := &ret
  2409  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2410  		return nil, err
  2411  	}
  2412  	return ret, nil
  2413  }
  2414  
  2415  type ProjectsLocationsRepositoriesGetCall struct {
  2416  	s            *Service
  2417  	name         string
  2418  	urlParams_   gensupport.URLParams
  2419  	ifNoneMatch_ string
  2420  	ctx_         context.Context
  2421  	header_      http.Header
  2422  }
  2423  
  2424  // Get: Gets a repository.
  2425  //
  2426  // - name: The name of the repository to retrieve.
  2427  func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall {
  2428  	c := &ProjectsLocationsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2429  	c.name = name
  2430  	return c
  2431  }
  2432  
  2433  // Fields allows partial responses to be retrieved. See
  2434  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2435  // details.
  2436  func (c *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall {
  2437  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2438  	return c
  2439  }
  2440  
  2441  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2442  // object's ETag matches the given value. This is useful for getting updates
  2443  // only after the object has changed since the last request.
  2444  func (c *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall {
  2445  	c.ifNoneMatch_ = entityTag
  2446  	return c
  2447  }
  2448  
  2449  // Context sets the context to be used in this call's Do method.
  2450  func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall {
  2451  	c.ctx_ = ctx
  2452  	return c
  2453  }
  2454  
  2455  // Header returns a http.Header that can be modified by the caller to add
  2456  // headers to the request.
  2457  func (c *ProjectsLocationsRepositoriesGetCall) Header() http.Header {
  2458  	if c.header_ == nil {
  2459  		c.header_ = make(http.Header)
  2460  	}
  2461  	return c.header_
  2462  }
  2463  
  2464  func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) {
  2465  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2466  	if c.ifNoneMatch_ != "" {
  2467  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2468  	}
  2469  	var body io.Reader = nil
  2470  	c.urlParams_.Set("alt", alt)
  2471  	c.urlParams_.Set("prettyPrint", "false")
  2472  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  2473  	urls += "?" + c.urlParams_.Encode()
  2474  	req, err := http.NewRequest("GET", urls, body)
  2475  	if err != nil {
  2476  		return nil, err
  2477  	}
  2478  	req.Header = reqHeaders
  2479  	googleapi.Expand(req.URL, map[string]string{
  2480  		"name": c.name,
  2481  	})
  2482  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2483  }
  2484  
  2485  // Do executes the "artifactregistry.projects.locations.repositories.get" call.
  2486  // Any non-2xx status code is an error. Response headers are in either
  2487  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  2488  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2489  // whether the returned error was because http.StatusNotModified was returned.
  2490  func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  2491  	gensupport.SetOptions(c.urlParams_, opts...)
  2492  	res, err := c.doRequest("json")
  2493  	if res != nil && res.StatusCode == http.StatusNotModified {
  2494  		if res.Body != nil {
  2495  			res.Body.Close()
  2496  		}
  2497  		return nil, gensupport.WrapError(&googleapi.Error{
  2498  			Code:   res.StatusCode,
  2499  			Header: res.Header,
  2500  		})
  2501  	}
  2502  	if err != nil {
  2503  		return nil, err
  2504  	}
  2505  	defer googleapi.CloseBody(res)
  2506  	if err := googleapi.CheckResponse(res); err != nil {
  2507  		return nil, gensupport.WrapError(err)
  2508  	}
  2509  	ret := &Repository{
  2510  		ServerResponse: googleapi.ServerResponse{
  2511  			Header:         res.Header,
  2512  			HTTPStatusCode: res.StatusCode,
  2513  		},
  2514  	}
  2515  	target := &ret
  2516  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2517  		return nil, err
  2518  	}
  2519  	return ret, nil
  2520  }
  2521  
  2522  type ProjectsLocationsRepositoriesGetIamPolicyCall struct {
  2523  	s            *Service
  2524  	resource     string
  2525  	urlParams_   gensupport.URLParams
  2526  	ifNoneMatch_ string
  2527  	ctx_         context.Context
  2528  	header_      http.Header
  2529  }
  2530  
  2531  // GetIamPolicy: Gets the IAM policy for a given resource.
  2532  //
  2533  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2534  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2535  //     for the appropriate value for this field.
  2536  func (r *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  2537  	c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2538  	c.resource = resource
  2539  	return c
  2540  }
  2541  
  2542  // OptionsRequestedPolicyVersion sets the optional parameter
  2543  // "options.requestedPolicyVersion": The maximum policy version that will be
  2544  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2545  // an invalid value will be rejected. Requests for policies with any
  2546  // conditional role bindings must specify version 3. Policies with no
  2547  // conditional role bindings may specify any valid value or leave the field
  2548  // unset. The policy in the response might use the policy version that you
  2549  // specified, or it might use a lower policy version. For example, if you
  2550  // specify version 3, but the policy has no conditional role bindings, the
  2551  // response uses version 1. To learn which resources support conditions in
  2552  // their IAM policies, see the IAM documentation
  2553  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2554  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  2555  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2556  	return c
  2557  }
  2558  
  2559  // Fields allows partial responses to be retrieved. See
  2560  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2561  // details.
  2562  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  2563  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2564  	return c
  2565  }
  2566  
  2567  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2568  // object's ETag matches the given value. This is useful for getting updates
  2569  // only after the object has changed since the last request.
  2570  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  2571  	c.ifNoneMatch_ = entityTag
  2572  	return c
  2573  }
  2574  
  2575  // Context sets the context to be used in this call's Do method.
  2576  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  2577  	c.ctx_ = ctx
  2578  	return c
  2579  }
  2580  
  2581  // Header returns a http.Header that can be modified by the caller to add
  2582  // headers to the request.
  2583  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header {
  2584  	if c.header_ == nil {
  2585  		c.header_ = make(http.Header)
  2586  	}
  2587  	return c.header_
  2588  }
  2589  
  2590  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2591  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2592  	if c.ifNoneMatch_ != "" {
  2593  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2594  	}
  2595  	var body io.Reader = nil
  2596  	c.urlParams_.Set("alt", alt)
  2597  	c.urlParams_.Set("prettyPrint", "false")
  2598  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
  2599  	urls += "?" + c.urlParams_.Encode()
  2600  	req, err := http.NewRequest("GET", urls, body)
  2601  	if err != nil {
  2602  		return nil, err
  2603  	}
  2604  	req.Header = reqHeaders
  2605  	googleapi.Expand(req.URL, map[string]string{
  2606  		"resource": c.resource,
  2607  	})
  2608  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2609  }
  2610  
  2611  // Do executes the "artifactregistry.projects.locations.repositories.getIamPolicy" call.
  2612  // Any non-2xx status code is an error. Response headers are in either
  2613  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2614  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2615  // whether the returned error was because http.StatusNotModified was returned.
  2616  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2617  	gensupport.SetOptions(c.urlParams_, opts...)
  2618  	res, err := c.doRequest("json")
  2619  	if res != nil && res.StatusCode == http.StatusNotModified {
  2620  		if res.Body != nil {
  2621  			res.Body.Close()
  2622  		}
  2623  		return nil, gensupport.WrapError(&googleapi.Error{
  2624  			Code:   res.StatusCode,
  2625  			Header: res.Header,
  2626  		})
  2627  	}
  2628  	if err != nil {
  2629  		return nil, err
  2630  	}
  2631  	defer googleapi.CloseBody(res)
  2632  	if err := googleapi.CheckResponse(res); err != nil {
  2633  		return nil, gensupport.WrapError(err)
  2634  	}
  2635  	ret := &Policy{
  2636  		ServerResponse: googleapi.ServerResponse{
  2637  			Header:         res.Header,
  2638  			HTTPStatusCode: res.StatusCode,
  2639  		},
  2640  	}
  2641  	target := &ret
  2642  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2643  		return nil, err
  2644  	}
  2645  	return ret, nil
  2646  }
  2647  
  2648  type ProjectsLocationsRepositoriesListCall struct {
  2649  	s            *Service
  2650  	parent       string
  2651  	urlParams_   gensupport.URLParams
  2652  	ifNoneMatch_ string
  2653  	ctx_         context.Context
  2654  	header_      http.Header
  2655  }
  2656  
  2657  // List: Lists repositories.
  2658  //
  2659  // - parent: The name of the parent resource whose repositories will be listed.
  2660  func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall {
  2661  	c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2662  	c.parent = parent
  2663  	return c
  2664  }
  2665  
  2666  // PageSize sets the optional parameter "pageSize": The maximum number of
  2667  // repositories to return. Maximum page size is 1,000.
  2668  func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall {
  2669  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2670  	return c
  2671  }
  2672  
  2673  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2674  // returned from a previous list request, if any.
  2675  func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall {
  2676  	c.urlParams_.Set("pageToken", pageToken)
  2677  	return c
  2678  }
  2679  
  2680  // Fields allows partial responses to be retrieved. See
  2681  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2682  // details.
  2683  func (c *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall {
  2684  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2685  	return c
  2686  }
  2687  
  2688  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2689  // object's ETag matches the given value. This is useful for getting updates
  2690  // only after the object has changed since the last request.
  2691  func (c *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall {
  2692  	c.ifNoneMatch_ = entityTag
  2693  	return c
  2694  }
  2695  
  2696  // Context sets the context to be used in this call's Do method.
  2697  func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall {
  2698  	c.ctx_ = ctx
  2699  	return c
  2700  }
  2701  
  2702  // Header returns a http.Header that can be modified by the caller to add
  2703  // headers to the request.
  2704  func (c *ProjectsLocationsRepositoriesListCall) Header() http.Header {
  2705  	if c.header_ == nil {
  2706  		c.header_ = make(http.Header)
  2707  	}
  2708  	return c.header_
  2709  }
  2710  
  2711  func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) {
  2712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2713  	if c.ifNoneMatch_ != "" {
  2714  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2715  	}
  2716  	var body io.Reader = nil
  2717  	c.urlParams_.Set("alt", alt)
  2718  	c.urlParams_.Set("prettyPrint", "false")
  2719  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/repositories")
  2720  	urls += "?" + c.urlParams_.Encode()
  2721  	req, err := http.NewRequest("GET", urls, body)
  2722  	if err != nil {
  2723  		return nil, err
  2724  	}
  2725  	req.Header = reqHeaders
  2726  	googleapi.Expand(req.URL, map[string]string{
  2727  		"parent": c.parent,
  2728  	})
  2729  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2730  }
  2731  
  2732  // Do executes the "artifactregistry.projects.locations.repositories.list" call.
  2733  // Any non-2xx status code is an error. Response headers are in either
  2734  // *ListRepositoriesResponse.ServerResponse.Header or (if a response was
  2735  // returned at all) in error.(*googleapi.Error).Header. Use
  2736  // googleapi.IsNotModified to check whether the returned error was because
  2737  // http.StatusNotModified was returned.
  2738  func (c *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) {
  2739  	gensupport.SetOptions(c.urlParams_, opts...)
  2740  	res, err := c.doRequest("json")
  2741  	if res != nil && res.StatusCode == http.StatusNotModified {
  2742  		if res.Body != nil {
  2743  			res.Body.Close()
  2744  		}
  2745  		return nil, gensupport.WrapError(&googleapi.Error{
  2746  			Code:   res.StatusCode,
  2747  			Header: res.Header,
  2748  		})
  2749  	}
  2750  	if err != nil {
  2751  		return nil, err
  2752  	}
  2753  	defer googleapi.CloseBody(res)
  2754  	if err := googleapi.CheckResponse(res); err != nil {
  2755  		return nil, gensupport.WrapError(err)
  2756  	}
  2757  	ret := &ListRepositoriesResponse{
  2758  		ServerResponse: googleapi.ServerResponse{
  2759  			Header:         res.Header,
  2760  			HTTPStatusCode: res.StatusCode,
  2761  		},
  2762  	}
  2763  	target := &ret
  2764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2765  		return nil, err
  2766  	}
  2767  	return ret, nil
  2768  }
  2769  
  2770  // Pages invokes f for each page of results.
  2771  // A non-nil error returned from f will halt the iteration.
  2772  // The provided context supersedes any context provided to the Context method.
  2773  func (c *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error {
  2774  	c.ctx_ = ctx
  2775  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2776  	for {
  2777  		x, err := c.Do()
  2778  		if err != nil {
  2779  			return err
  2780  		}
  2781  		if err := f(x); err != nil {
  2782  			return err
  2783  		}
  2784  		if x.NextPageToken == "" {
  2785  			return nil
  2786  		}
  2787  		c.PageToken(x.NextPageToken)
  2788  	}
  2789  }
  2790  
  2791  type ProjectsLocationsRepositoriesPatchCall struct {
  2792  	s          *Service
  2793  	name       string
  2794  	repository *Repository
  2795  	urlParams_ gensupport.URLParams
  2796  	ctx_       context.Context
  2797  	header_    http.Header
  2798  }
  2799  
  2800  // Patch: Updates a repository.
  2801  //
  2802  //   - name: The name of the repository, for example:
  2803  //     `projects/p1/locations/us-central1/repositories/repo1`. For each location
  2804  //     in a project, repository names must be unique.
  2805  func (r *ProjectsLocationsRepositoriesService) Patch(name string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall {
  2806  	c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2807  	c.name = name
  2808  	c.repository = repository
  2809  	return c
  2810  }
  2811  
  2812  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  2813  // to the resource. For the `FieldMask` definition, see
  2814  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  2815  func (c *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall {
  2816  	c.urlParams_.Set("updateMask", updateMask)
  2817  	return c
  2818  }
  2819  
  2820  // Fields allows partial responses to be retrieved. See
  2821  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2822  // details.
  2823  func (c *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall {
  2824  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2825  	return c
  2826  }
  2827  
  2828  // Context sets the context to be used in this call's Do method.
  2829  func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall {
  2830  	c.ctx_ = ctx
  2831  	return c
  2832  }
  2833  
  2834  // Header returns a http.Header that can be modified by the caller to add
  2835  // headers to the request.
  2836  func (c *ProjectsLocationsRepositoriesPatchCall) Header() http.Header {
  2837  	if c.header_ == nil {
  2838  		c.header_ = make(http.Header)
  2839  	}
  2840  	return c.header_
  2841  }
  2842  
  2843  func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) {
  2844  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2845  	var body io.Reader = nil
  2846  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  2847  	if err != nil {
  2848  		return nil, err
  2849  	}
  2850  	c.urlParams_.Set("alt", alt)
  2851  	c.urlParams_.Set("prettyPrint", "false")
  2852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  2853  	urls += "?" + c.urlParams_.Encode()
  2854  	req, err := http.NewRequest("PATCH", urls, body)
  2855  	if err != nil {
  2856  		return nil, err
  2857  	}
  2858  	req.Header = reqHeaders
  2859  	googleapi.Expand(req.URL, map[string]string{
  2860  		"name": c.name,
  2861  	})
  2862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2863  }
  2864  
  2865  // Do executes the "artifactregistry.projects.locations.repositories.patch" call.
  2866  // Any non-2xx status code is an error. Response headers are in either
  2867  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  2868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2869  // whether the returned error was because http.StatusNotModified was returned.
  2870  func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  2871  	gensupport.SetOptions(c.urlParams_, opts...)
  2872  	res, err := c.doRequest("json")
  2873  	if res != nil && res.StatusCode == http.StatusNotModified {
  2874  		if res.Body != nil {
  2875  			res.Body.Close()
  2876  		}
  2877  		return nil, gensupport.WrapError(&googleapi.Error{
  2878  			Code:   res.StatusCode,
  2879  			Header: res.Header,
  2880  		})
  2881  	}
  2882  	if err != nil {
  2883  		return nil, err
  2884  	}
  2885  	defer googleapi.CloseBody(res)
  2886  	if err := googleapi.CheckResponse(res); err != nil {
  2887  		return nil, gensupport.WrapError(err)
  2888  	}
  2889  	ret := &Repository{
  2890  		ServerResponse: googleapi.ServerResponse{
  2891  			Header:         res.Header,
  2892  			HTTPStatusCode: res.StatusCode,
  2893  		},
  2894  	}
  2895  	target := &ret
  2896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2897  		return nil, err
  2898  	}
  2899  	return ret, nil
  2900  }
  2901  
  2902  type ProjectsLocationsRepositoriesSetIamPolicyCall struct {
  2903  	s                   *Service
  2904  	resource            string
  2905  	setiampolicyrequest *SetIamPolicyRequest
  2906  	urlParams_          gensupport.URLParams
  2907  	ctx_                context.Context
  2908  	header_             http.Header
  2909  }
  2910  
  2911  // SetIamPolicy: Updates the IAM policy for a given resource.
  2912  //
  2913  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2914  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2915  //     for the appropriate value for this field.
  2916  func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2917  	c := &ProjectsLocationsRepositoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2918  	c.resource = resource
  2919  	c.setiampolicyrequest = setiampolicyrequest
  2920  	return c
  2921  }
  2922  
  2923  // Fields allows partial responses to be retrieved. See
  2924  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2925  // details.
  2926  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2927  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2928  	return c
  2929  }
  2930  
  2931  // Context sets the context to be used in this call's Do method.
  2932  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2933  	c.ctx_ = ctx
  2934  	return c
  2935  }
  2936  
  2937  // Header returns a http.Header that can be modified by the caller to add
  2938  // headers to the request.
  2939  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header {
  2940  	if c.header_ == nil {
  2941  		c.header_ = make(http.Header)
  2942  	}
  2943  	return c.header_
  2944  }
  2945  
  2946  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2947  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2948  	var body io.Reader = nil
  2949  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2950  	if err != nil {
  2951  		return nil, err
  2952  	}
  2953  	c.urlParams_.Set("alt", alt)
  2954  	c.urlParams_.Set("prettyPrint", "false")
  2955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
  2956  	urls += "?" + c.urlParams_.Encode()
  2957  	req, err := http.NewRequest("POST", urls, body)
  2958  	if err != nil {
  2959  		return nil, err
  2960  	}
  2961  	req.Header = reqHeaders
  2962  	googleapi.Expand(req.URL, map[string]string{
  2963  		"resource": c.resource,
  2964  	})
  2965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2966  }
  2967  
  2968  // Do executes the "artifactregistry.projects.locations.repositories.setIamPolicy" call.
  2969  // Any non-2xx status code is an error. Response headers are in either
  2970  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2971  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2972  // whether the returned error was because http.StatusNotModified was returned.
  2973  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2974  	gensupport.SetOptions(c.urlParams_, opts...)
  2975  	res, err := c.doRequest("json")
  2976  	if res != nil && res.StatusCode == http.StatusNotModified {
  2977  		if res.Body != nil {
  2978  			res.Body.Close()
  2979  		}
  2980  		return nil, gensupport.WrapError(&googleapi.Error{
  2981  			Code:   res.StatusCode,
  2982  			Header: res.Header,
  2983  		})
  2984  	}
  2985  	if err != nil {
  2986  		return nil, err
  2987  	}
  2988  	defer googleapi.CloseBody(res)
  2989  	if err := googleapi.CheckResponse(res); err != nil {
  2990  		return nil, gensupport.WrapError(err)
  2991  	}
  2992  	ret := &Policy{
  2993  		ServerResponse: googleapi.ServerResponse{
  2994  			Header:         res.Header,
  2995  			HTTPStatusCode: res.StatusCode,
  2996  		},
  2997  	}
  2998  	target := &ret
  2999  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3000  		return nil, err
  3001  	}
  3002  	return ret, nil
  3003  }
  3004  
  3005  type ProjectsLocationsRepositoriesTestIamPermissionsCall struct {
  3006  	s                         *Service
  3007  	resource                  string
  3008  	testiampermissionsrequest *TestIamPermissionsRequest
  3009  	urlParams_                gensupport.URLParams
  3010  	ctx_                      context.Context
  3011  	header_                   http.Header
  3012  }
  3013  
  3014  // TestIamPermissions: Tests if the caller has a list of permissions on a
  3015  // resource.
  3016  //
  3017  //   - resource: REQUIRED: The resource for which the policy detail is being
  3018  //     requested. See Resource names
  3019  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3020  //     value for this field.
  3021  func (r *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  3022  	c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3023  	c.resource = resource
  3024  	c.testiampermissionsrequest = testiampermissionsrequest
  3025  	return c
  3026  }
  3027  
  3028  // Fields allows partial responses to be retrieved. See
  3029  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3030  // details.
  3031  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  3032  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3033  	return c
  3034  }
  3035  
  3036  // Context sets the context to be used in this call's Do method.
  3037  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  3038  	c.ctx_ = ctx
  3039  	return c
  3040  }
  3041  
  3042  // Header returns a http.Header that can be modified by the caller to add
  3043  // headers to the request.
  3044  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header {
  3045  	if c.header_ == nil {
  3046  		c.header_ = make(http.Header)
  3047  	}
  3048  	return c.header_
  3049  }
  3050  
  3051  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3052  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3053  	var body io.Reader = nil
  3054  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3055  	if err != nil {
  3056  		return nil, err
  3057  	}
  3058  	c.urlParams_.Set("alt", alt)
  3059  	c.urlParams_.Set("prettyPrint", "false")
  3060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
  3061  	urls += "?" + c.urlParams_.Encode()
  3062  	req, err := http.NewRequest("POST", urls, body)
  3063  	if err != nil {
  3064  		return nil, err
  3065  	}
  3066  	req.Header = reqHeaders
  3067  	googleapi.Expand(req.URL, map[string]string{
  3068  		"resource": c.resource,
  3069  	})
  3070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3071  }
  3072  
  3073  // Do executes the "artifactregistry.projects.locations.repositories.testIamPermissions" call.
  3074  // Any non-2xx status code is an error. Response headers are in either
  3075  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3076  // returned at all) in error.(*googleapi.Error).Header. Use
  3077  // googleapi.IsNotModified to check whether the returned error was because
  3078  // http.StatusNotModified was returned.
  3079  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3080  	gensupport.SetOptions(c.urlParams_, opts...)
  3081  	res, err := c.doRequest("json")
  3082  	if res != nil && res.StatusCode == http.StatusNotModified {
  3083  		if res.Body != nil {
  3084  			res.Body.Close()
  3085  		}
  3086  		return nil, gensupport.WrapError(&googleapi.Error{
  3087  			Code:   res.StatusCode,
  3088  			Header: res.Header,
  3089  		})
  3090  	}
  3091  	if err != nil {
  3092  		return nil, err
  3093  	}
  3094  	defer googleapi.CloseBody(res)
  3095  	if err := googleapi.CheckResponse(res); err != nil {
  3096  		return nil, gensupport.WrapError(err)
  3097  	}
  3098  	ret := &TestIamPermissionsResponse{
  3099  		ServerResponse: googleapi.ServerResponse{
  3100  			Header:         res.Header,
  3101  			HTTPStatusCode: res.StatusCode,
  3102  		},
  3103  	}
  3104  	target := &ret
  3105  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3106  		return nil, err
  3107  	}
  3108  	return ret, nil
  3109  }
  3110  
  3111  type ProjectsLocationsRepositoriesAptArtifactsImportCall struct {
  3112  	s                         *Service
  3113  	parent                    string
  3114  	importaptartifactsrequest *ImportAptArtifactsRequest
  3115  	urlParams_                gensupport.URLParams
  3116  	ctx_                      context.Context
  3117  	header_                   http.Header
  3118  }
  3119  
  3120  // Import: Imports Apt artifacts. The returned Operation will complete once the
  3121  // resources are imported. Package, Version, and File resources are created
  3122  // based on the imported artifacts. Imported artifacts that conflict with
  3123  // existing resources are ignored.
  3124  //
  3125  //   - parent: The name of the parent resource where the artifacts will be
  3126  //     imported.
  3127  func (r *ProjectsLocationsRepositoriesAptArtifactsService) Import(parent string, importaptartifactsrequest *ImportAptArtifactsRequest) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  3128  	c := &ProjectsLocationsRepositoriesAptArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3129  	c.parent = parent
  3130  	c.importaptartifactsrequest = importaptartifactsrequest
  3131  	return c
  3132  }
  3133  
  3134  // Fields allows partial responses to be retrieved. See
  3135  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3136  // details.
  3137  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  3138  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3139  	return c
  3140  }
  3141  
  3142  // Context sets the context to be used in this call's Do method.
  3143  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesAptArtifactsImportCall {
  3144  	c.ctx_ = ctx
  3145  	return c
  3146  }
  3147  
  3148  // Header returns a http.Header that can be modified by the caller to add
  3149  // headers to the request.
  3150  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Header() http.Header {
  3151  	if c.header_ == nil {
  3152  		c.header_ = make(http.Header)
  3153  	}
  3154  	return c.header_
  3155  }
  3156  
  3157  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) doRequest(alt string) (*http.Response, error) {
  3158  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3159  	var body io.Reader = nil
  3160  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importaptartifactsrequest)
  3161  	if err != nil {
  3162  		return nil, err
  3163  	}
  3164  	c.urlParams_.Set("alt", alt)
  3165  	c.urlParams_.Set("prettyPrint", "false")
  3166  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/aptArtifacts:import")
  3167  	urls += "?" + c.urlParams_.Encode()
  3168  	req, err := http.NewRequest("POST", urls, body)
  3169  	if err != nil {
  3170  		return nil, err
  3171  	}
  3172  	req.Header = reqHeaders
  3173  	googleapi.Expand(req.URL, map[string]string{
  3174  		"parent": c.parent,
  3175  	})
  3176  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3177  }
  3178  
  3179  // Do executes the "artifactregistry.projects.locations.repositories.aptArtifacts.import" call.
  3180  // Any non-2xx status code is an error. Response headers are in either
  3181  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3182  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3183  // whether the returned error was because http.StatusNotModified was returned.
  3184  func (c *ProjectsLocationsRepositoriesAptArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3185  	gensupport.SetOptions(c.urlParams_, opts...)
  3186  	res, err := c.doRequest("json")
  3187  	if res != nil && res.StatusCode == http.StatusNotModified {
  3188  		if res.Body != nil {
  3189  			res.Body.Close()
  3190  		}
  3191  		return nil, gensupport.WrapError(&googleapi.Error{
  3192  			Code:   res.StatusCode,
  3193  			Header: res.Header,
  3194  		})
  3195  	}
  3196  	if err != nil {
  3197  		return nil, err
  3198  	}
  3199  	defer googleapi.CloseBody(res)
  3200  	if err := googleapi.CheckResponse(res); err != nil {
  3201  		return nil, gensupport.WrapError(err)
  3202  	}
  3203  	ret := &Operation{
  3204  		ServerResponse: googleapi.ServerResponse{
  3205  			Header:         res.Header,
  3206  			HTTPStatusCode: res.StatusCode,
  3207  		},
  3208  	}
  3209  	target := &ret
  3210  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3211  		return nil, err
  3212  	}
  3213  	return ret, nil
  3214  }
  3215  
  3216  type ProjectsLocationsRepositoriesAptArtifactsUploadCall struct {
  3217  	s                        *Service
  3218  	parent                   string
  3219  	uploadaptartifactrequest *UploadAptArtifactRequest
  3220  	urlParams_               gensupport.URLParams
  3221  	mediaInfo_               *gensupport.MediaInfo
  3222  	ctx_                     context.Context
  3223  	header_                  http.Header
  3224  }
  3225  
  3226  // Upload: Directly uploads an Apt artifact. The returned Operation will
  3227  // complete once the resources are uploaded. Package, Version, and File
  3228  // resources are created based on the imported artifact. Imported artifacts
  3229  // that conflict with existing resources are ignored.
  3230  //
  3231  //   - parent: The name of the parent resource where the artifacts will be
  3232  //     uploaded.
  3233  func (r *ProjectsLocationsRepositoriesAptArtifactsService) Upload(parent string, uploadaptartifactrequest *UploadAptArtifactRequest) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3234  	c := &ProjectsLocationsRepositoriesAptArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3235  	c.parent = parent
  3236  	c.uploadaptartifactrequest = uploadaptartifactrequest
  3237  	return c
  3238  }
  3239  
  3240  // Media specifies the media to upload in one or more chunks. The chunk size
  3241  // may be controlled by supplying a MediaOption generated by
  3242  // googleapi.ChunkSize. The chunk size defaults to
  3243  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  3244  // request will be determined by sniffing the contents of r, unless a
  3245  // MediaOption generated by googleapi.ContentType is supplied.
  3246  // At most one of Media and ResumableMedia may be set.
  3247  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3248  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  3249  	return c
  3250  }
  3251  
  3252  // ResumableMedia specifies the media to upload in chunks and can be canceled
  3253  // with ctx.
  3254  //
  3255  // Deprecated: use Media instead.
  3256  //
  3257  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  3258  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  3259  // will be auto-detected. The provided ctx will supersede any context
  3260  // previously provided to the Context method.
  3261  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3262  	c.ctx_ = ctx
  3263  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  3264  	return c
  3265  }
  3266  
  3267  // ProgressUpdater provides a callback function that will be called after every
  3268  // chunk. It should be a low-latency function in order to not slow down the
  3269  // upload operation. This should only be called when using ResumableMedia (as
  3270  // opposed to Media).
  3271  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3272  	c.mediaInfo_.SetProgressUpdater(pu)
  3273  	return c
  3274  }
  3275  
  3276  // Fields allows partial responses to be retrieved. See
  3277  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3278  // details.
  3279  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3280  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3281  	return c
  3282  }
  3283  
  3284  // Context sets the context to be used in this call's Do method.
  3285  // This context will supersede any context previously provided to the
  3286  // ResumableMedia method.
  3287  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesAptArtifactsUploadCall {
  3288  	c.ctx_ = ctx
  3289  	return c
  3290  }
  3291  
  3292  // Header returns a http.Header that can be modified by the caller to add
  3293  // headers to the request.
  3294  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Header() http.Header {
  3295  	if c.header_ == nil {
  3296  		c.header_ = make(http.Header)
  3297  	}
  3298  	return c.header_
  3299  }
  3300  
  3301  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  3302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3303  	var body io.Reader = nil
  3304  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadaptartifactrequest)
  3305  	if err != nil {
  3306  		return nil, err
  3307  	}
  3308  	c.urlParams_.Set("alt", alt)
  3309  	c.urlParams_.Set("prettyPrint", "false")
  3310  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/aptArtifacts:create")
  3311  	if c.mediaInfo_ != nil {
  3312  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta2/{+parent}/aptArtifacts:create")
  3313  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  3314  	}
  3315  	if body == nil {
  3316  		body = new(bytes.Buffer)
  3317  		reqHeaders.Set("Content-Type", "application/json")
  3318  	}
  3319  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  3320  	defer cleanup()
  3321  	urls += "?" + c.urlParams_.Encode()
  3322  	req, err := http.NewRequest("POST", urls, body)
  3323  	if err != nil {
  3324  		return nil, err
  3325  	}
  3326  	req.Header = reqHeaders
  3327  	req.GetBody = getBody
  3328  	googleapi.Expand(req.URL, map[string]string{
  3329  		"parent": c.parent,
  3330  	})
  3331  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3332  }
  3333  
  3334  // Do executes the "artifactregistry.projects.locations.repositories.aptArtifacts.upload" call.
  3335  // Any non-2xx status code is an error. Response headers are in either
  3336  // *UploadAptArtifactMediaResponse.ServerResponse.Header or (if a response was
  3337  // returned at all) in error.(*googleapi.Error).Header. Use
  3338  // googleapi.IsNotModified to check whether the returned error was because
  3339  // http.StatusNotModified was returned.
  3340  func (c *ProjectsLocationsRepositoriesAptArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadAptArtifactMediaResponse, error) {
  3341  	gensupport.SetOptions(c.urlParams_, opts...)
  3342  	res, err := c.doRequest("json")
  3343  	if res != nil && res.StatusCode == http.StatusNotModified {
  3344  		if res.Body != nil {
  3345  			res.Body.Close()
  3346  		}
  3347  		return nil, gensupport.WrapError(&googleapi.Error{
  3348  			Code:   res.StatusCode,
  3349  			Header: res.Header,
  3350  		})
  3351  	}
  3352  	if err != nil {
  3353  		return nil, err
  3354  	}
  3355  	defer googleapi.CloseBody(res)
  3356  	if err := googleapi.CheckResponse(res); err != nil {
  3357  		return nil, gensupport.WrapError(err)
  3358  	}
  3359  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  3360  	if rx != nil {
  3361  		rx.Client = c.s.client
  3362  		rx.UserAgent = c.s.userAgent()
  3363  		ctx := c.ctx_
  3364  		if ctx == nil {
  3365  			ctx = context.TODO()
  3366  		}
  3367  		res, err = rx.Upload(ctx)
  3368  		if err != nil {
  3369  			return nil, err
  3370  		}
  3371  		defer res.Body.Close()
  3372  		if err := googleapi.CheckResponse(res); err != nil {
  3373  			return nil, gensupport.WrapError(err)
  3374  		}
  3375  	}
  3376  	ret := &UploadAptArtifactMediaResponse{
  3377  		ServerResponse: googleapi.ServerResponse{
  3378  			Header:         res.Header,
  3379  			HTTPStatusCode: res.StatusCode,
  3380  		},
  3381  	}
  3382  	target := &ret
  3383  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3384  		return nil, err
  3385  	}
  3386  	return ret, nil
  3387  }
  3388  
  3389  type ProjectsLocationsRepositoriesFilesDownloadCall struct {
  3390  	s            *Service
  3391  	name         string
  3392  	urlParams_   gensupport.URLParams
  3393  	ifNoneMatch_ string
  3394  	ctx_         context.Context
  3395  	header_      http.Header
  3396  }
  3397  
  3398  // Download: Download a file.
  3399  //
  3400  // - name: The name of the file to download.
  3401  func (r *ProjectsLocationsRepositoriesFilesService) Download(name string) *ProjectsLocationsRepositoriesFilesDownloadCall {
  3402  	c := &ProjectsLocationsRepositoriesFilesDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3403  	c.name = name
  3404  	return c
  3405  }
  3406  
  3407  // Fields allows partial responses to be retrieved. See
  3408  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3409  // details.
  3410  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesDownloadCall {
  3411  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3412  	return c
  3413  }
  3414  
  3415  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3416  // object's ETag matches the given value. This is useful for getting updates
  3417  // only after the object has changed since the last request.
  3418  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesDownloadCall {
  3419  	c.ifNoneMatch_ = entityTag
  3420  	return c
  3421  }
  3422  
  3423  // Context sets the context to be used in this call's Do and Download methods.
  3424  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesDownloadCall {
  3425  	c.ctx_ = ctx
  3426  	return c
  3427  }
  3428  
  3429  // Header returns a http.Header that can be modified by the caller to add
  3430  // headers to the request.
  3431  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Header() http.Header {
  3432  	if c.header_ == nil {
  3433  		c.header_ = make(http.Header)
  3434  	}
  3435  	return c.header_
  3436  }
  3437  
  3438  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) doRequest(alt string) (*http.Response, error) {
  3439  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3440  	if c.ifNoneMatch_ != "" {
  3441  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3442  	}
  3443  	var body io.Reader = nil
  3444  	c.urlParams_.Set("alt", alt)
  3445  	c.urlParams_.Set("prettyPrint", "false")
  3446  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:download")
  3447  	urls += "?" + c.urlParams_.Encode()
  3448  	req, err := http.NewRequest("GET", urls, body)
  3449  	if err != nil {
  3450  		return nil, err
  3451  	}
  3452  	req.Header = reqHeaders
  3453  	googleapi.Expand(req.URL, map[string]string{
  3454  		"name": c.name,
  3455  	})
  3456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3457  }
  3458  
  3459  // Download fetches the API endpoint's "media" value, instead of the normal
  3460  // API response value. If the returned error is nil, the Response is guaranteed to
  3461  // have a 2xx status code. Callers must close the Response.Body as usual.
  3462  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  3463  	gensupport.SetOptions(c.urlParams_, opts...)
  3464  	res, err := c.doRequest("media")
  3465  	if err != nil {
  3466  		return nil, err
  3467  	}
  3468  	if err := googleapi.CheckResponse(res); err != nil {
  3469  		res.Body.Close()
  3470  		return nil, gensupport.WrapError(err)
  3471  	}
  3472  	return res, nil
  3473  }
  3474  
  3475  // Do executes the "artifactregistry.projects.locations.repositories.files.download" call.
  3476  // Any non-2xx status code is an error. Response headers are in either
  3477  // *DownloadFileResponse.ServerResponse.Header or (if a response was returned
  3478  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3479  // check whether the returned error was because http.StatusNotModified was
  3480  // returned.
  3481  func (c *ProjectsLocationsRepositoriesFilesDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadFileResponse, error) {
  3482  	gensupport.SetOptions(c.urlParams_, opts...)
  3483  	res, err := c.doRequest("json")
  3484  	if res != nil && res.StatusCode == http.StatusNotModified {
  3485  		if res.Body != nil {
  3486  			res.Body.Close()
  3487  		}
  3488  		return nil, gensupport.WrapError(&googleapi.Error{
  3489  			Code:   res.StatusCode,
  3490  			Header: res.Header,
  3491  		})
  3492  	}
  3493  	if err != nil {
  3494  		return nil, err
  3495  	}
  3496  	defer googleapi.CloseBody(res)
  3497  	if err := googleapi.CheckResponse(res); err != nil {
  3498  		return nil, gensupport.WrapError(err)
  3499  	}
  3500  	ret := &DownloadFileResponse{
  3501  		ServerResponse: googleapi.ServerResponse{
  3502  			Header:         res.Header,
  3503  			HTTPStatusCode: res.StatusCode,
  3504  		},
  3505  	}
  3506  	target := &ret
  3507  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3508  		return nil, err
  3509  	}
  3510  	return ret, nil
  3511  }
  3512  
  3513  type ProjectsLocationsRepositoriesFilesGetCall struct {
  3514  	s            *Service
  3515  	name         string
  3516  	urlParams_   gensupport.URLParams
  3517  	ifNoneMatch_ string
  3518  	ctx_         context.Context
  3519  	header_      http.Header
  3520  }
  3521  
  3522  // Get: Gets a file.
  3523  //
  3524  // - name: The name of the file to retrieve.
  3525  func (r *ProjectsLocationsRepositoriesFilesService) Get(name string) *ProjectsLocationsRepositoriesFilesGetCall {
  3526  	c := &ProjectsLocationsRepositoriesFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3527  	c.name = name
  3528  	return c
  3529  }
  3530  
  3531  // Fields allows partial responses to be retrieved. See
  3532  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3533  // details.
  3534  func (c *ProjectsLocationsRepositoriesFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesGetCall {
  3535  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3536  	return c
  3537  }
  3538  
  3539  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3540  // object's ETag matches the given value. This is useful for getting updates
  3541  // only after the object has changed since the last request.
  3542  func (c *ProjectsLocationsRepositoriesFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesGetCall {
  3543  	c.ifNoneMatch_ = entityTag
  3544  	return c
  3545  }
  3546  
  3547  // Context sets the context to be used in this call's Do method.
  3548  func (c *ProjectsLocationsRepositoriesFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesGetCall {
  3549  	c.ctx_ = ctx
  3550  	return c
  3551  }
  3552  
  3553  // Header returns a http.Header that can be modified by the caller to add
  3554  // headers to the request.
  3555  func (c *ProjectsLocationsRepositoriesFilesGetCall) Header() http.Header {
  3556  	if c.header_ == nil {
  3557  		c.header_ = make(http.Header)
  3558  	}
  3559  	return c.header_
  3560  }
  3561  
  3562  func (c *ProjectsLocationsRepositoriesFilesGetCall) doRequest(alt string) (*http.Response, error) {
  3563  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3564  	if c.ifNoneMatch_ != "" {
  3565  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3566  	}
  3567  	var body io.Reader = nil
  3568  	c.urlParams_.Set("alt", alt)
  3569  	c.urlParams_.Set("prettyPrint", "false")
  3570  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  3571  	urls += "?" + c.urlParams_.Encode()
  3572  	req, err := http.NewRequest("GET", urls, body)
  3573  	if err != nil {
  3574  		return nil, err
  3575  	}
  3576  	req.Header = reqHeaders
  3577  	googleapi.Expand(req.URL, map[string]string{
  3578  		"name": c.name,
  3579  	})
  3580  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3581  }
  3582  
  3583  // Do executes the "artifactregistry.projects.locations.repositories.files.get" call.
  3584  // Any non-2xx status code is an error. Response headers are in either
  3585  // *GoogleDevtoolsArtifactregistryV1beta2File.ServerResponse.Header or (if a
  3586  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3587  // googleapi.IsNotModified to check whether the returned error was because
  3588  // http.StatusNotModified was returned.
  3589  func (c *ProjectsLocationsRepositoriesFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsArtifactregistryV1beta2File, error) {
  3590  	gensupport.SetOptions(c.urlParams_, opts...)
  3591  	res, err := c.doRequest("json")
  3592  	if res != nil && res.StatusCode == http.StatusNotModified {
  3593  		if res.Body != nil {
  3594  			res.Body.Close()
  3595  		}
  3596  		return nil, gensupport.WrapError(&googleapi.Error{
  3597  			Code:   res.StatusCode,
  3598  			Header: res.Header,
  3599  		})
  3600  	}
  3601  	if err != nil {
  3602  		return nil, err
  3603  	}
  3604  	defer googleapi.CloseBody(res)
  3605  	if err := googleapi.CheckResponse(res); err != nil {
  3606  		return nil, gensupport.WrapError(err)
  3607  	}
  3608  	ret := &GoogleDevtoolsArtifactregistryV1beta2File{
  3609  		ServerResponse: googleapi.ServerResponse{
  3610  			Header:         res.Header,
  3611  			HTTPStatusCode: res.StatusCode,
  3612  		},
  3613  	}
  3614  	target := &ret
  3615  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3616  		return nil, err
  3617  	}
  3618  	return ret, nil
  3619  }
  3620  
  3621  type ProjectsLocationsRepositoriesFilesListCall struct {
  3622  	s            *Service
  3623  	parent       string
  3624  	urlParams_   gensupport.URLParams
  3625  	ifNoneMatch_ string
  3626  	ctx_         context.Context
  3627  	header_      http.Header
  3628  }
  3629  
  3630  // List: Lists files.
  3631  //
  3632  //   - parent: The name of the repository whose files will be listed. For
  3633  //     example: "projects/p1/locations/us-central1/repositories/repo1.
  3634  func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall {
  3635  	c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3636  	c.parent = parent
  3637  	return c
  3638  }
  3639  
  3640  // Filter sets the optional parameter "filter": An expression for filtering the
  3641  // results of the request. Filter rules are case insensitive. The fields
  3642  // eligible for filtering are: * `name` * `owner` An example of using a filter:
  3643  // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"
  3644  // --> Files with an ID starting with "a/b/". *
  3645  // `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve
  3646  // rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`.
  3647  func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall {
  3648  	c.urlParams_.Set("filter", filter)
  3649  	return c
  3650  }
  3651  
  3652  // PageSize sets the optional parameter "pageSize": The maximum number of files
  3653  // to return.
  3654  func (c *ProjectsLocationsRepositoriesFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFilesListCall {
  3655  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3656  	return c
  3657  }
  3658  
  3659  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3660  // returned from a previous list request, if any.
  3661  func (c *ProjectsLocationsRepositoriesFilesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFilesListCall {
  3662  	c.urlParams_.Set("pageToken", pageToken)
  3663  	return c
  3664  }
  3665  
  3666  // Fields allows partial responses to be retrieved. See
  3667  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3668  // details.
  3669  func (c *ProjectsLocationsRepositoriesFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesListCall {
  3670  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3671  	return c
  3672  }
  3673  
  3674  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3675  // object's ETag matches the given value. This is useful for getting updates
  3676  // only after the object has changed since the last request.
  3677  func (c *ProjectsLocationsRepositoriesFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesListCall {
  3678  	c.ifNoneMatch_ = entityTag
  3679  	return c
  3680  }
  3681  
  3682  // Context sets the context to be used in this call's Do method.
  3683  func (c *ProjectsLocationsRepositoriesFilesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesListCall {
  3684  	c.ctx_ = ctx
  3685  	return c
  3686  }
  3687  
  3688  // Header returns a http.Header that can be modified by the caller to add
  3689  // headers to the request.
  3690  func (c *ProjectsLocationsRepositoriesFilesListCall) Header() http.Header {
  3691  	if c.header_ == nil {
  3692  		c.header_ = make(http.Header)
  3693  	}
  3694  	return c.header_
  3695  }
  3696  
  3697  func (c *ProjectsLocationsRepositoriesFilesListCall) doRequest(alt string) (*http.Response, error) {
  3698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3699  	if c.ifNoneMatch_ != "" {
  3700  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3701  	}
  3702  	var body io.Reader = nil
  3703  	c.urlParams_.Set("alt", alt)
  3704  	c.urlParams_.Set("prettyPrint", "false")
  3705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/files")
  3706  	urls += "?" + c.urlParams_.Encode()
  3707  	req, err := http.NewRequest("GET", urls, body)
  3708  	if err != nil {
  3709  		return nil, err
  3710  	}
  3711  	req.Header = reqHeaders
  3712  	googleapi.Expand(req.URL, map[string]string{
  3713  		"parent": c.parent,
  3714  	})
  3715  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3716  }
  3717  
  3718  // Do executes the "artifactregistry.projects.locations.repositories.files.list" call.
  3719  // Any non-2xx status code is an error. Response headers are in either
  3720  // *ListFilesResponse.ServerResponse.Header or (if a response was returned at
  3721  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3722  // check whether the returned error was because http.StatusNotModified was
  3723  // returned.
  3724  func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOption) (*ListFilesResponse, error) {
  3725  	gensupport.SetOptions(c.urlParams_, opts...)
  3726  	res, err := c.doRequest("json")
  3727  	if res != nil && res.StatusCode == http.StatusNotModified {
  3728  		if res.Body != nil {
  3729  			res.Body.Close()
  3730  		}
  3731  		return nil, gensupport.WrapError(&googleapi.Error{
  3732  			Code:   res.StatusCode,
  3733  			Header: res.Header,
  3734  		})
  3735  	}
  3736  	if err != nil {
  3737  		return nil, err
  3738  	}
  3739  	defer googleapi.CloseBody(res)
  3740  	if err := googleapi.CheckResponse(res); err != nil {
  3741  		return nil, gensupport.WrapError(err)
  3742  	}
  3743  	ret := &ListFilesResponse{
  3744  		ServerResponse: googleapi.ServerResponse{
  3745  			Header:         res.Header,
  3746  			HTTPStatusCode: res.StatusCode,
  3747  		},
  3748  	}
  3749  	target := &ret
  3750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3751  		return nil, err
  3752  	}
  3753  	return ret, nil
  3754  }
  3755  
  3756  // Pages invokes f for each page of results.
  3757  // A non-nil error returned from f will halt the iteration.
  3758  // The provided context supersedes any context provided to the Context method.
  3759  func (c *ProjectsLocationsRepositoriesFilesListCall) Pages(ctx context.Context, f func(*ListFilesResponse) error) error {
  3760  	c.ctx_ = ctx
  3761  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3762  	for {
  3763  		x, err := c.Do()
  3764  		if err != nil {
  3765  			return err
  3766  		}
  3767  		if err := f(x); err != nil {
  3768  			return err
  3769  		}
  3770  		if x.NextPageToken == "" {
  3771  			return nil
  3772  		}
  3773  		c.PageToken(x.NextPageToken)
  3774  	}
  3775  }
  3776  
  3777  type ProjectsLocationsRepositoriesPackagesDeleteCall struct {
  3778  	s          *Service
  3779  	name       string
  3780  	urlParams_ gensupport.URLParams
  3781  	ctx_       context.Context
  3782  	header_    http.Header
  3783  }
  3784  
  3785  // Delete: Deletes a package and all of its versions and tags. The returned
  3786  // operation will complete once the package has been deleted.
  3787  //
  3788  // - name: The name of the package to delete.
  3789  func (r *ProjectsLocationsRepositoriesPackagesService) Delete(name string) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  3790  	c := &ProjectsLocationsRepositoriesPackagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3791  	c.name = name
  3792  	return c
  3793  }
  3794  
  3795  // Fields allows partial responses to be retrieved. See
  3796  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3797  // details.
  3798  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  3799  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3800  	return c
  3801  }
  3802  
  3803  // Context sets the context to be used in this call's Do method.
  3804  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  3805  	c.ctx_ = ctx
  3806  	return c
  3807  }
  3808  
  3809  // Header returns a http.Header that can be modified by the caller to add
  3810  // headers to the request.
  3811  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Header() http.Header {
  3812  	if c.header_ == nil {
  3813  		c.header_ = make(http.Header)
  3814  	}
  3815  	return c.header_
  3816  }
  3817  
  3818  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3819  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3820  	var body io.Reader = nil
  3821  	c.urlParams_.Set("alt", alt)
  3822  	c.urlParams_.Set("prettyPrint", "false")
  3823  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  3824  	urls += "?" + c.urlParams_.Encode()
  3825  	req, err := http.NewRequest("DELETE", urls, body)
  3826  	if err != nil {
  3827  		return nil, err
  3828  	}
  3829  	req.Header = reqHeaders
  3830  	googleapi.Expand(req.URL, map[string]string{
  3831  		"name": c.name,
  3832  	})
  3833  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3834  }
  3835  
  3836  // Do executes the "artifactregistry.projects.locations.repositories.packages.delete" call.
  3837  // Any non-2xx status code is an error. Response headers are in either
  3838  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3839  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3840  // whether the returned error was because http.StatusNotModified was returned.
  3841  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3842  	gensupport.SetOptions(c.urlParams_, opts...)
  3843  	res, err := c.doRequest("json")
  3844  	if res != nil && res.StatusCode == http.StatusNotModified {
  3845  		if res.Body != nil {
  3846  			res.Body.Close()
  3847  		}
  3848  		return nil, gensupport.WrapError(&googleapi.Error{
  3849  			Code:   res.StatusCode,
  3850  			Header: res.Header,
  3851  		})
  3852  	}
  3853  	if err != nil {
  3854  		return nil, err
  3855  	}
  3856  	defer googleapi.CloseBody(res)
  3857  	if err := googleapi.CheckResponse(res); err != nil {
  3858  		return nil, gensupport.WrapError(err)
  3859  	}
  3860  	ret := &Operation{
  3861  		ServerResponse: googleapi.ServerResponse{
  3862  			Header:         res.Header,
  3863  			HTTPStatusCode: res.StatusCode,
  3864  		},
  3865  	}
  3866  	target := &ret
  3867  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3868  		return nil, err
  3869  	}
  3870  	return ret, nil
  3871  }
  3872  
  3873  type ProjectsLocationsRepositoriesPackagesGetCall struct {
  3874  	s            *Service
  3875  	name         string
  3876  	urlParams_   gensupport.URLParams
  3877  	ifNoneMatch_ string
  3878  	ctx_         context.Context
  3879  	header_      http.Header
  3880  }
  3881  
  3882  // Get: Gets a package.
  3883  //
  3884  // - name: The name of the package to retrieve.
  3885  func (r *ProjectsLocationsRepositoriesPackagesService) Get(name string) *ProjectsLocationsRepositoriesPackagesGetCall {
  3886  	c := &ProjectsLocationsRepositoriesPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3887  	c.name = name
  3888  	return c
  3889  }
  3890  
  3891  // Fields allows partial responses to be retrieved. See
  3892  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3893  // details.
  3894  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesGetCall {
  3895  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3896  	return c
  3897  }
  3898  
  3899  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3900  // object's ETag matches the given value. This is useful for getting updates
  3901  // only after the object has changed since the last request.
  3902  func (c *ProjectsLocationsRepositoriesPackagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesGetCall {
  3903  	c.ifNoneMatch_ = entityTag
  3904  	return c
  3905  }
  3906  
  3907  // Context sets the context to be used in this call's Do method.
  3908  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesGetCall {
  3909  	c.ctx_ = ctx
  3910  	return c
  3911  }
  3912  
  3913  // Header returns a http.Header that can be modified by the caller to add
  3914  // headers to the request.
  3915  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Header() http.Header {
  3916  	if c.header_ == nil {
  3917  		c.header_ = make(http.Header)
  3918  	}
  3919  	return c.header_
  3920  }
  3921  
  3922  func (c *ProjectsLocationsRepositoriesPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  3923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3924  	if c.ifNoneMatch_ != "" {
  3925  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3926  	}
  3927  	var body io.Reader = nil
  3928  	c.urlParams_.Set("alt", alt)
  3929  	c.urlParams_.Set("prettyPrint", "false")
  3930  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  3931  	urls += "?" + c.urlParams_.Encode()
  3932  	req, err := http.NewRequest("GET", urls, body)
  3933  	if err != nil {
  3934  		return nil, err
  3935  	}
  3936  	req.Header = reqHeaders
  3937  	googleapi.Expand(req.URL, map[string]string{
  3938  		"name": c.name,
  3939  	})
  3940  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3941  }
  3942  
  3943  // Do executes the "artifactregistry.projects.locations.repositories.packages.get" call.
  3944  // Any non-2xx status code is an error. Response headers are in either
  3945  // *Package.ServerResponse.Header or (if a response was returned at all) in
  3946  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3947  // whether the returned error was because http.StatusNotModified was returned.
  3948  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Do(opts ...googleapi.CallOption) (*Package, error) {
  3949  	gensupport.SetOptions(c.urlParams_, opts...)
  3950  	res, err := c.doRequest("json")
  3951  	if res != nil && res.StatusCode == http.StatusNotModified {
  3952  		if res.Body != nil {
  3953  			res.Body.Close()
  3954  		}
  3955  		return nil, gensupport.WrapError(&googleapi.Error{
  3956  			Code:   res.StatusCode,
  3957  			Header: res.Header,
  3958  		})
  3959  	}
  3960  	if err != nil {
  3961  		return nil, err
  3962  	}
  3963  	defer googleapi.CloseBody(res)
  3964  	if err := googleapi.CheckResponse(res); err != nil {
  3965  		return nil, gensupport.WrapError(err)
  3966  	}
  3967  	ret := &Package{
  3968  		ServerResponse: googleapi.ServerResponse{
  3969  			Header:         res.Header,
  3970  			HTTPStatusCode: res.StatusCode,
  3971  		},
  3972  	}
  3973  	target := &ret
  3974  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3975  		return nil, err
  3976  	}
  3977  	return ret, nil
  3978  }
  3979  
  3980  type ProjectsLocationsRepositoriesPackagesListCall struct {
  3981  	s            *Service
  3982  	parent       string
  3983  	urlParams_   gensupport.URLParams
  3984  	ifNoneMatch_ string
  3985  	ctx_         context.Context
  3986  	header_      http.Header
  3987  }
  3988  
  3989  // List: Lists packages.
  3990  //
  3991  // - parent: The name of the parent resource whose packages will be listed.
  3992  func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *ProjectsLocationsRepositoriesPackagesListCall {
  3993  	c := &ProjectsLocationsRepositoriesPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3994  	c.parent = parent
  3995  	return c
  3996  }
  3997  
  3998  // PageSize sets the optional parameter "pageSize": The maximum number of
  3999  // packages to return. Maximum page size is 1,000.
  4000  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall {
  4001  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4002  	return c
  4003  }
  4004  
  4005  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4006  // returned from a previous list request, if any.
  4007  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesListCall {
  4008  	c.urlParams_.Set("pageToken", pageToken)
  4009  	return c
  4010  }
  4011  
  4012  // Fields allows partial responses to be retrieved. See
  4013  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4014  // details.
  4015  func (c *ProjectsLocationsRepositoriesPackagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesListCall {
  4016  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4017  	return c
  4018  }
  4019  
  4020  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4021  // object's ETag matches the given value. This is useful for getting updates
  4022  // only after the object has changed since the last request.
  4023  func (c *ProjectsLocationsRepositoriesPackagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesListCall {
  4024  	c.ifNoneMatch_ = entityTag
  4025  	return c
  4026  }
  4027  
  4028  // Context sets the context to be used in this call's Do method.
  4029  func (c *ProjectsLocationsRepositoriesPackagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesListCall {
  4030  	c.ctx_ = ctx
  4031  	return c
  4032  }
  4033  
  4034  // Header returns a http.Header that can be modified by the caller to add
  4035  // headers to the request.
  4036  func (c *ProjectsLocationsRepositoriesPackagesListCall) Header() http.Header {
  4037  	if c.header_ == nil {
  4038  		c.header_ = make(http.Header)
  4039  	}
  4040  	return c.header_
  4041  }
  4042  
  4043  func (c *ProjectsLocationsRepositoriesPackagesListCall) doRequest(alt string) (*http.Response, error) {
  4044  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4045  	if c.ifNoneMatch_ != "" {
  4046  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4047  	}
  4048  	var body io.Reader = nil
  4049  	c.urlParams_.Set("alt", alt)
  4050  	c.urlParams_.Set("prettyPrint", "false")
  4051  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/packages")
  4052  	urls += "?" + c.urlParams_.Encode()
  4053  	req, err := http.NewRequest("GET", urls, body)
  4054  	if err != nil {
  4055  		return nil, err
  4056  	}
  4057  	req.Header = reqHeaders
  4058  	googleapi.Expand(req.URL, map[string]string{
  4059  		"parent": c.parent,
  4060  	})
  4061  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4062  }
  4063  
  4064  // Do executes the "artifactregistry.projects.locations.repositories.packages.list" call.
  4065  // Any non-2xx status code is an error. Response headers are in either
  4066  // *ListPackagesResponse.ServerResponse.Header or (if a response was returned
  4067  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4068  // check whether the returned error was because http.StatusNotModified was
  4069  // returned.
  4070  func (c *ProjectsLocationsRepositoriesPackagesListCall) Do(opts ...googleapi.CallOption) (*ListPackagesResponse, error) {
  4071  	gensupport.SetOptions(c.urlParams_, opts...)
  4072  	res, err := c.doRequest("json")
  4073  	if res != nil && res.StatusCode == http.StatusNotModified {
  4074  		if res.Body != nil {
  4075  			res.Body.Close()
  4076  		}
  4077  		return nil, gensupport.WrapError(&googleapi.Error{
  4078  			Code:   res.StatusCode,
  4079  			Header: res.Header,
  4080  		})
  4081  	}
  4082  	if err != nil {
  4083  		return nil, err
  4084  	}
  4085  	defer googleapi.CloseBody(res)
  4086  	if err := googleapi.CheckResponse(res); err != nil {
  4087  		return nil, gensupport.WrapError(err)
  4088  	}
  4089  	ret := &ListPackagesResponse{
  4090  		ServerResponse: googleapi.ServerResponse{
  4091  			Header:         res.Header,
  4092  			HTTPStatusCode: res.StatusCode,
  4093  		},
  4094  	}
  4095  	target := &ret
  4096  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4097  		return nil, err
  4098  	}
  4099  	return ret, nil
  4100  }
  4101  
  4102  // Pages invokes f for each page of results.
  4103  // A non-nil error returned from f will halt the iteration.
  4104  // The provided context supersedes any context provided to the Context method.
  4105  func (c *ProjectsLocationsRepositoriesPackagesListCall) Pages(ctx context.Context, f func(*ListPackagesResponse) error) error {
  4106  	c.ctx_ = ctx
  4107  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4108  	for {
  4109  		x, err := c.Do()
  4110  		if err != nil {
  4111  			return err
  4112  		}
  4113  		if err := f(x); err != nil {
  4114  			return err
  4115  		}
  4116  		if x.NextPageToken == "" {
  4117  			return nil
  4118  		}
  4119  		c.PageToken(x.NextPageToken)
  4120  	}
  4121  }
  4122  
  4123  type ProjectsLocationsRepositoriesPackagesPatchCall struct {
  4124  	s          *Service
  4125  	name       string
  4126  	package_   *Package
  4127  	urlParams_ gensupport.URLParams
  4128  	ctx_       context.Context
  4129  	header_    http.Header
  4130  }
  4131  
  4132  // Patch: Updates a package.
  4133  //
  4134  //   - name: The name of the package, for example:
  4135  //     `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If
  4136  //     the package ID part contains slashes, the slashes are escaped.
  4137  func (r *ProjectsLocationsRepositoriesPackagesService) Patch(name string, package_ *Package) *ProjectsLocationsRepositoriesPackagesPatchCall {
  4138  	c := &ProjectsLocationsRepositoriesPackagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4139  	c.name = name
  4140  	c.package_ = package_
  4141  	return c
  4142  }
  4143  
  4144  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  4145  // to the resource. For the `FieldMask` definition, see
  4146  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  4147  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesPatchCall {
  4148  	c.urlParams_.Set("updateMask", updateMask)
  4149  	return c
  4150  }
  4151  
  4152  // Fields allows partial responses to be retrieved. See
  4153  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4154  // details.
  4155  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesPatchCall {
  4156  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4157  	return c
  4158  }
  4159  
  4160  // Context sets the context to be used in this call's Do method.
  4161  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesPatchCall {
  4162  	c.ctx_ = ctx
  4163  	return c
  4164  }
  4165  
  4166  // Header returns a http.Header that can be modified by the caller to add
  4167  // headers to the request.
  4168  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Header() http.Header {
  4169  	if c.header_ == nil {
  4170  		c.header_ = make(http.Header)
  4171  	}
  4172  	return c.header_
  4173  }
  4174  
  4175  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) doRequest(alt string) (*http.Response, error) {
  4176  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4177  	var body io.Reader = nil
  4178  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.package_)
  4179  	if err != nil {
  4180  		return nil, err
  4181  	}
  4182  	c.urlParams_.Set("alt", alt)
  4183  	c.urlParams_.Set("prettyPrint", "false")
  4184  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4185  	urls += "?" + c.urlParams_.Encode()
  4186  	req, err := http.NewRequest("PATCH", urls, body)
  4187  	if err != nil {
  4188  		return nil, err
  4189  	}
  4190  	req.Header = reqHeaders
  4191  	googleapi.Expand(req.URL, map[string]string{
  4192  		"name": c.name,
  4193  	})
  4194  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4195  }
  4196  
  4197  // Do executes the "artifactregistry.projects.locations.repositories.packages.patch" call.
  4198  // Any non-2xx status code is an error. Response headers are in either
  4199  // *Package.ServerResponse.Header or (if a response was returned at all) in
  4200  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4201  // whether the returned error was because http.StatusNotModified was returned.
  4202  func (c *ProjectsLocationsRepositoriesPackagesPatchCall) Do(opts ...googleapi.CallOption) (*Package, error) {
  4203  	gensupport.SetOptions(c.urlParams_, opts...)
  4204  	res, err := c.doRequest("json")
  4205  	if res != nil && res.StatusCode == http.StatusNotModified {
  4206  		if res.Body != nil {
  4207  			res.Body.Close()
  4208  		}
  4209  		return nil, gensupport.WrapError(&googleapi.Error{
  4210  			Code:   res.StatusCode,
  4211  			Header: res.Header,
  4212  		})
  4213  	}
  4214  	if err != nil {
  4215  		return nil, err
  4216  	}
  4217  	defer googleapi.CloseBody(res)
  4218  	if err := googleapi.CheckResponse(res); err != nil {
  4219  		return nil, gensupport.WrapError(err)
  4220  	}
  4221  	ret := &Package{
  4222  		ServerResponse: googleapi.ServerResponse{
  4223  			Header:         res.Header,
  4224  			HTTPStatusCode: res.StatusCode,
  4225  		},
  4226  	}
  4227  	target := &ret
  4228  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4229  		return nil, err
  4230  	}
  4231  	return ret, nil
  4232  }
  4233  
  4234  type ProjectsLocationsRepositoriesPackagesTagsCreateCall struct {
  4235  	s          *Service
  4236  	parent     string
  4237  	tag        *Tag
  4238  	urlParams_ gensupport.URLParams
  4239  	ctx_       context.Context
  4240  	header_    http.Header
  4241  }
  4242  
  4243  // Create: Creates a tag.
  4244  //
  4245  // - parent: The name of the parent resource where the tag will be created.
  4246  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Create(parent string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  4247  	c := &ProjectsLocationsRepositoriesPackagesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4248  	c.parent = parent
  4249  	c.tag = tag
  4250  	return c
  4251  }
  4252  
  4253  // TagId sets the optional parameter "tagId": The tag id to use for this
  4254  // repository.
  4255  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) TagId(tagId string) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  4256  	c.urlParams_.Set("tagId", tagId)
  4257  	return c
  4258  }
  4259  
  4260  // Fields allows partial responses to be retrieved. See
  4261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4262  // details.
  4263  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  4264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4265  	return c
  4266  }
  4267  
  4268  // Context sets the context to be used in this call's Do method.
  4269  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  4270  	c.ctx_ = ctx
  4271  	return c
  4272  }
  4273  
  4274  // Header returns a http.Header that can be modified by the caller to add
  4275  // headers to the request.
  4276  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Header() http.Header {
  4277  	if c.header_ == nil {
  4278  		c.header_ = make(http.Header)
  4279  	}
  4280  	return c.header_
  4281  }
  4282  
  4283  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) doRequest(alt string) (*http.Response, error) {
  4284  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4285  	var body io.Reader = nil
  4286  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  4287  	if err != nil {
  4288  		return nil, err
  4289  	}
  4290  	c.urlParams_.Set("alt", alt)
  4291  	c.urlParams_.Set("prettyPrint", "false")
  4292  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/tags")
  4293  	urls += "?" + c.urlParams_.Encode()
  4294  	req, err := http.NewRequest("POST", urls, body)
  4295  	if err != nil {
  4296  		return nil, err
  4297  	}
  4298  	req.Header = reqHeaders
  4299  	googleapi.Expand(req.URL, map[string]string{
  4300  		"parent": c.parent,
  4301  	})
  4302  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4303  }
  4304  
  4305  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.create" call.
  4306  // Any non-2xx status code is an error. Response headers are in either
  4307  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  4308  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4309  // whether the returned error was because http.StatusNotModified was returned.
  4310  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  4311  	gensupport.SetOptions(c.urlParams_, opts...)
  4312  	res, err := c.doRequest("json")
  4313  	if res != nil && res.StatusCode == http.StatusNotModified {
  4314  		if res.Body != nil {
  4315  			res.Body.Close()
  4316  		}
  4317  		return nil, gensupport.WrapError(&googleapi.Error{
  4318  			Code:   res.StatusCode,
  4319  			Header: res.Header,
  4320  		})
  4321  	}
  4322  	if err != nil {
  4323  		return nil, err
  4324  	}
  4325  	defer googleapi.CloseBody(res)
  4326  	if err := googleapi.CheckResponse(res); err != nil {
  4327  		return nil, gensupport.WrapError(err)
  4328  	}
  4329  	ret := &Tag{
  4330  		ServerResponse: googleapi.ServerResponse{
  4331  			Header:         res.Header,
  4332  			HTTPStatusCode: res.StatusCode,
  4333  		},
  4334  	}
  4335  	target := &ret
  4336  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4337  		return nil, err
  4338  	}
  4339  	return ret, nil
  4340  }
  4341  
  4342  type ProjectsLocationsRepositoriesPackagesTagsDeleteCall struct {
  4343  	s          *Service
  4344  	name       string
  4345  	urlParams_ gensupport.URLParams
  4346  	ctx_       context.Context
  4347  	header_    http.Header
  4348  }
  4349  
  4350  // Delete: Deletes a tag.
  4351  //
  4352  // - name: The name of the tag to delete.
  4353  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  4354  	c := &ProjectsLocationsRepositoriesPackagesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4355  	c.name = name
  4356  	return c
  4357  }
  4358  
  4359  // Fields allows partial responses to be retrieved. See
  4360  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4361  // details.
  4362  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  4363  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4364  	return c
  4365  }
  4366  
  4367  // Context sets the context to be used in this call's Do method.
  4368  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  4369  	c.ctx_ = ctx
  4370  	return c
  4371  }
  4372  
  4373  // Header returns a http.Header that can be modified by the caller to add
  4374  // headers to the request.
  4375  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Header() http.Header {
  4376  	if c.header_ == nil {
  4377  		c.header_ = make(http.Header)
  4378  	}
  4379  	return c.header_
  4380  }
  4381  
  4382  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4383  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4384  	var body io.Reader = nil
  4385  	c.urlParams_.Set("alt", alt)
  4386  	c.urlParams_.Set("prettyPrint", "false")
  4387  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4388  	urls += "?" + c.urlParams_.Encode()
  4389  	req, err := http.NewRequest("DELETE", urls, body)
  4390  	if err != nil {
  4391  		return nil, err
  4392  	}
  4393  	req.Header = reqHeaders
  4394  	googleapi.Expand(req.URL, map[string]string{
  4395  		"name": c.name,
  4396  	})
  4397  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4398  }
  4399  
  4400  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.delete" call.
  4401  // Any non-2xx status code is an error. Response headers are in either
  4402  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4403  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4404  // whether the returned error was because http.StatusNotModified was returned.
  4405  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4406  	gensupport.SetOptions(c.urlParams_, opts...)
  4407  	res, err := c.doRequest("json")
  4408  	if res != nil && res.StatusCode == http.StatusNotModified {
  4409  		if res.Body != nil {
  4410  			res.Body.Close()
  4411  		}
  4412  		return nil, gensupport.WrapError(&googleapi.Error{
  4413  			Code:   res.StatusCode,
  4414  			Header: res.Header,
  4415  		})
  4416  	}
  4417  	if err != nil {
  4418  		return nil, err
  4419  	}
  4420  	defer googleapi.CloseBody(res)
  4421  	if err := googleapi.CheckResponse(res); err != nil {
  4422  		return nil, gensupport.WrapError(err)
  4423  	}
  4424  	ret := &Empty{
  4425  		ServerResponse: googleapi.ServerResponse{
  4426  			Header:         res.Header,
  4427  			HTTPStatusCode: res.StatusCode,
  4428  		},
  4429  	}
  4430  	target := &ret
  4431  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4432  		return nil, err
  4433  	}
  4434  	return ret, nil
  4435  }
  4436  
  4437  type ProjectsLocationsRepositoriesPackagesTagsGetCall struct {
  4438  	s            *Service
  4439  	name         string
  4440  	urlParams_   gensupport.URLParams
  4441  	ifNoneMatch_ string
  4442  	ctx_         context.Context
  4443  	header_      http.Header
  4444  }
  4445  
  4446  // Get: Gets a tag.
  4447  //
  4448  // - name: The name of the tag to retrieve.
  4449  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Get(name string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  4450  	c := &ProjectsLocationsRepositoriesPackagesTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4451  	c.name = name
  4452  	return c
  4453  }
  4454  
  4455  // Fields allows partial responses to be retrieved. See
  4456  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4457  // details.
  4458  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  4459  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4460  	return c
  4461  }
  4462  
  4463  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4464  // object's ETag matches the given value. This is useful for getting updates
  4465  // only after the object has changed since the last request.
  4466  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  4467  	c.ifNoneMatch_ = entityTag
  4468  	return c
  4469  }
  4470  
  4471  // Context sets the context to be used in this call's Do method.
  4472  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  4473  	c.ctx_ = ctx
  4474  	return c
  4475  }
  4476  
  4477  // Header returns a http.Header that can be modified by the caller to add
  4478  // headers to the request.
  4479  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Header() http.Header {
  4480  	if c.header_ == nil {
  4481  		c.header_ = make(http.Header)
  4482  	}
  4483  	return c.header_
  4484  }
  4485  
  4486  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) doRequest(alt string) (*http.Response, error) {
  4487  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4488  	if c.ifNoneMatch_ != "" {
  4489  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4490  	}
  4491  	var body io.Reader = nil
  4492  	c.urlParams_.Set("alt", alt)
  4493  	c.urlParams_.Set("prettyPrint", "false")
  4494  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4495  	urls += "?" + c.urlParams_.Encode()
  4496  	req, err := http.NewRequest("GET", urls, body)
  4497  	if err != nil {
  4498  		return nil, err
  4499  	}
  4500  	req.Header = reqHeaders
  4501  	googleapi.Expand(req.URL, map[string]string{
  4502  		"name": c.name,
  4503  	})
  4504  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4505  }
  4506  
  4507  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.get" call.
  4508  // Any non-2xx status code is an error. Response headers are in either
  4509  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  4510  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4511  // whether the returned error was because http.StatusNotModified was returned.
  4512  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  4513  	gensupport.SetOptions(c.urlParams_, opts...)
  4514  	res, err := c.doRequest("json")
  4515  	if res != nil && res.StatusCode == http.StatusNotModified {
  4516  		if res.Body != nil {
  4517  			res.Body.Close()
  4518  		}
  4519  		return nil, gensupport.WrapError(&googleapi.Error{
  4520  			Code:   res.StatusCode,
  4521  			Header: res.Header,
  4522  		})
  4523  	}
  4524  	if err != nil {
  4525  		return nil, err
  4526  	}
  4527  	defer googleapi.CloseBody(res)
  4528  	if err := googleapi.CheckResponse(res); err != nil {
  4529  		return nil, gensupport.WrapError(err)
  4530  	}
  4531  	ret := &Tag{
  4532  		ServerResponse: googleapi.ServerResponse{
  4533  			Header:         res.Header,
  4534  			HTTPStatusCode: res.StatusCode,
  4535  		},
  4536  	}
  4537  	target := &ret
  4538  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4539  		return nil, err
  4540  	}
  4541  	return ret, nil
  4542  }
  4543  
  4544  type ProjectsLocationsRepositoriesPackagesTagsListCall struct {
  4545  	s            *Service
  4546  	parent       string
  4547  	urlParams_   gensupport.URLParams
  4548  	ifNoneMatch_ string
  4549  	ctx_         context.Context
  4550  	header_      http.Header
  4551  }
  4552  
  4553  // List: Lists tags.
  4554  //
  4555  //   - parent: The name of the parent package whose tags will be listed. For
  4556  //     example:
  4557  //     `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
  4558  func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4559  	c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4560  	c.parent = parent
  4561  	return c
  4562  }
  4563  
  4564  // Filter sets the optional parameter "filter": An expression for filtering the
  4565  // results of the request. Filter rules are case insensitive. The fields
  4566  // eligible for filtering are: * `version` An example of using a filter: *
  4567  // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/
  4568  // versions/1.0" --> Tags that are applied to the version `1.0` in package
  4569  // `pkg1`.
  4570  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4571  	c.urlParams_.Set("filter", filter)
  4572  	return c
  4573  }
  4574  
  4575  // PageSize sets the optional parameter "pageSize": The maximum number of tags
  4576  // to return. Maximum page size is 10,000.
  4577  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4578  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4579  	return c
  4580  }
  4581  
  4582  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4583  // returned from a previous list request, if any.
  4584  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4585  	c.urlParams_.Set("pageToken", pageToken)
  4586  	return c
  4587  }
  4588  
  4589  // Fields allows partial responses to be retrieved. See
  4590  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4591  // details.
  4592  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4593  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4594  	return c
  4595  }
  4596  
  4597  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4598  // object's ETag matches the given value. This is useful for getting updates
  4599  // only after the object has changed since the last request.
  4600  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4601  	c.ifNoneMatch_ = entityTag
  4602  	return c
  4603  }
  4604  
  4605  // Context sets the context to be used in this call's Do method.
  4606  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  4607  	c.ctx_ = ctx
  4608  	return c
  4609  }
  4610  
  4611  // Header returns a http.Header that can be modified by the caller to add
  4612  // headers to the request.
  4613  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Header() http.Header {
  4614  	if c.header_ == nil {
  4615  		c.header_ = make(http.Header)
  4616  	}
  4617  	return c.header_
  4618  }
  4619  
  4620  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) doRequest(alt string) (*http.Response, error) {
  4621  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4622  	if c.ifNoneMatch_ != "" {
  4623  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4624  	}
  4625  	var body io.Reader = nil
  4626  	c.urlParams_.Set("alt", alt)
  4627  	c.urlParams_.Set("prettyPrint", "false")
  4628  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/tags")
  4629  	urls += "?" + c.urlParams_.Encode()
  4630  	req, err := http.NewRequest("GET", urls, body)
  4631  	if err != nil {
  4632  		return nil, err
  4633  	}
  4634  	req.Header = reqHeaders
  4635  	googleapi.Expand(req.URL, map[string]string{
  4636  		"parent": c.parent,
  4637  	})
  4638  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4639  }
  4640  
  4641  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.list" call.
  4642  // Any non-2xx status code is an error. Response headers are in either
  4643  // *ListTagsResponse.ServerResponse.Header or (if a response was returned at
  4644  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4645  // check whether the returned error was because http.StatusNotModified was
  4646  // returned.
  4647  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi.CallOption) (*ListTagsResponse, error) {
  4648  	gensupport.SetOptions(c.urlParams_, opts...)
  4649  	res, err := c.doRequest("json")
  4650  	if res != nil && res.StatusCode == http.StatusNotModified {
  4651  		if res.Body != nil {
  4652  			res.Body.Close()
  4653  		}
  4654  		return nil, gensupport.WrapError(&googleapi.Error{
  4655  			Code:   res.StatusCode,
  4656  			Header: res.Header,
  4657  		})
  4658  	}
  4659  	if err != nil {
  4660  		return nil, err
  4661  	}
  4662  	defer googleapi.CloseBody(res)
  4663  	if err := googleapi.CheckResponse(res); err != nil {
  4664  		return nil, gensupport.WrapError(err)
  4665  	}
  4666  	ret := &ListTagsResponse{
  4667  		ServerResponse: googleapi.ServerResponse{
  4668  			Header:         res.Header,
  4669  			HTTPStatusCode: res.StatusCode,
  4670  		},
  4671  	}
  4672  	target := &ret
  4673  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4674  		return nil, err
  4675  	}
  4676  	return ret, nil
  4677  }
  4678  
  4679  // Pages invokes f for each page of results.
  4680  // A non-nil error returned from f will halt the iteration.
  4681  // The provided context supersedes any context provided to the Context method.
  4682  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Pages(ctx context.Context, f func(*ListTagsResponse) error) error {
  4683  	c.ctx_ = ctx
  4684  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4685  	for {
  4686  		x, err := c.Do()
  4687  		if err != nil {
  4688  			return err
  4689  		}
  4690  		if err := f(x); err != nil {
  4691  			return err
  4692  		}
  4693  		if x.NextPageToken == "" {
  4694  			return nil
  4695  		}
  4696  		c.PageToken(x.NextPageToken)
  4697  	}
  4698  }
  4699  
  4700  type ProjectsLocationsRepositoriesPackagesTagsPatchCall struct {
  4701  	s          *Service
  4702  	name       string
  4703  	tag        *Tag
  4704  	urlParams_ gensupport.URLParams
  4705  	ctx_       context.Context
  4706  	header_    http.Header
  4707  }
  4708  
  4709  // Patch: Updates a tag.
  4710  //
  4711  //   - name: The name of the tag, for example:
  4712  //     "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/ta
  4713  //     g1". If the package part contains slashes, the slashes are escaped. The
  4714  //     tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else
  4715  //     must be URL encoded.
  4716  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Patch(name string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  4717  	c := &ProjectsLocationsRepositoriesPackagesTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4718  	c.name = name
  4719  	c.tag = tag
  4720  	return c
  4721  }
  4722  
  4723  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  4724  // to the resource. For the `FieldMask` definition, see
  4725  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  4726  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  4727  	c.urlParams_.Set("updateMask", updateMask)
  4728  	return c
  4729  }
  4730  
  4731  // Fields allows partial responses to be retrieved. See
  4732  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4733  // details.
  4734  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  4735  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4736  	return c
  4737  }
  4738  
  4739  // Context sets the context to be used in this call's Do method.
  4740  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  4741  	c.ctx_ = ctx
  4742  	return c
  4743  }
  4744  
  4745  // Header returns a http.Header that can be modified by the caller to add
  4746  // headers to the request.
  4747  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Header() http.Header {
  4748  	if c.header_ == nil {
  4749  		c.header_ = make(http.Header)
  4750  	}
  4751  	return c.header_
  4752  }
  4753  
  4754  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) doRequest(alt string) (*http.Response, error) {
  4755  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4756  	var body io.Reader = nil
  4757  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  4758  	if err != nil {
  4759  		return nil, err
  4760  	}
  4761  	c.urlParams_.Set("alt", alt)
  4762  	c.urlParams_.Set("prettyPrint", "false")
  4763  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4764  	urls += "?" + c.urlParams_.Encode()
  4765  	req, err := http.NewRequest("PATCH", urls, body)
  4766  	if err != nil {
  4767  		return nil, err
  4768  	}
  4769  	req.Header = reqHeaders
  4770  	googleapi.Expand(req.URL, map[string]string{
  4771  		"name": c.name,
  4772  	})
  4773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4774  }
  4775  
  4776  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.patch" call.
  4777  // Any non-2xx status code is an error. Response headers are in either
  4778  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  4779  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4780  // whether the returned error was because http.StatusNotModified was returned.
  4781  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  4782  	gensupport.SetOptions(c.urlParams_, opts...)
  4783  	res, err := c.doRequest("json")
  4784  	if res != nil && res.StatusCode == http.StatusNotModified {
  4785  		if res.Body != nil {
  4786  			res.Body.Close()
  4787  		}
  4788  		return nil, gensupport.WrapError(&googleapi.Error{
  4789  			Code:   res.StatusCode,
  4790  			Header: res.Header,
  4791  		})
  4792  	}
  4793  	if err != nil {
  4794  		return nil, err
  4795  	}
  4796  	defer googleapi.CloseBody(res)
  4797  	if err := googleapi.CheckResponse(res); err != nil {
  4798  		return nil, gensupport.WrapError(err)
  4799  	}
  4800  	ret := &Tag{
  4801  		ServerResponse: googleapi.ServerResponse{
  4802  			Header:         res.Header,
  4803  			HTTPStatusCode: res.StatusCode,
  4804  		},
  4805  	}
  4806  	target := &ret
  4807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4808  		return nil, err
  4809  	}
  4810  	return ret, nil
  4811  }
  4812  
  4813  type ProjectsLocationsRepositoriesPackagesVersionsDeleteCall struct {
  4814  	s          *Service
  4815  	name       string
  4816  	urlParams_ gensupport.URLParams
  4817  	ctx_       context.Context
  4818  	header_    http.Header
  4819  }
  4820  
  4821  // Delete: Deletes a version and all of its content. The returned operation
  4822  // will complete once the version has been deleted.
  4823  //
  4824  // - name: The name of the version to delete.
  4825  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  4826  	c := &ProjectsLocationsRepositoriesPackagesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4827  	c.name = name
  4828  	return c
  4829  }
  4830  
  4831  // Force sets the optional parameter "force": By default, a version that is
  4832  // tagged may not be deleted. If force=true, the version and any tags pointing
  4833  // to the version are deleted.
  4834  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Force(force bool) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  4835  	c.urlParams_.Set("force", fmt.Sprint(force))
  4836  	return c
  4837  }
  4838  
  4839  // Fields allows partial responses to be retrieved. See
  4840  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4841  // details.
  4842  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  4843  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4844  	return c
  4845  }
  4846  
  4847  // Context sets the context to be used in this call's Do method.
  4848  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  4849  	c.ctx_ = ctx
  4850  	return c
  4851  }
  4852  
  4853  // Header returns a http.Header that can be modified by the caller to add
  4854  // headers to the request.
  4855  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Header() http.Header {
  4856  	if c.header_ == nil {
  4857  		c.header_ = make(http.Header)
  4858  	}
  4859  	return c.header_
  4860  }
  4861  
  4862  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4863  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4864  	var body io.Reader = nil
  4865  	c.urlParams_.Set("alt", alt)
  4866  	c.urlParams_.Set("prettyPrint", "false")
  4867  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4868  	urls += "?" + c.urlParams_.Encode()
  4869  	req, err := http.NewRequest("DELETE", urls, body)
  4870  	if err != nil {
  4871  		return nil, err
  4872  	}
  4873  	req.Header = reqHeaders
  4874  	googleapi.Expand(req.URL, map[string]string{
  4875  		"name": c.name,
  4876  	})
  4877  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4878  }
  4879  
  4880  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.delete" call.
  4881  // Any non-2xx status code is an error. Response headers are in either
  4882  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4883  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4884  // whether the returned error was because http.StatusNotModified was returned.
  4885  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4886  	gensupport.SetOptions(c.urlParams_, opts...)
  4887  	res, err := c.doRequest("json")
  4888  	if res != nil && res.StatusCode == http.StatusNotModified {
  4889  		if res.Body != nil {
  4890  			res.Body.Close()
  4891  		}
  4892  		return nil, gensupport.WrapError(&googleapi.Error{
  4893  			Code:   res.StatusCode,
  4894  			Header: res.Header,
  4895  		})
  4896  	}
  4897  	if err != nil {
  4898  		return nil, err
  4899  	}
  4900  	defer googleapi.CloseBody(res)
  4901  	if err := googleapi.CheckResponse(res); err != nil {
  4902  		return nil, gensupport.WrapError(err)
  4903  	}
  4904  	ret := &Operation{
  4905  		ServerResponse: googleapi.ServerResponse{
  4906  			Header:         res.Header,
  4907  			HTTPStatusCode: res.StatusCode,
  4908  		},
  4909  	}
  4910  	target := &ret
  4911  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4912  		return nil, err
  4913  	}
  4914  	return ret, nil
  4915  }
  4916  
  4917  type ProjectsLocationsRepositoriesPackagesVersionsGetCall struct {
  4918  	s            *Service
  4919  	name         string
  4920  	urlParams_   gensupport.URLParams
  4921  	ifNoneMatch_ string
  4922  	ctx_         context.Context
  4923  	header_      http.Header
  4924  }
  4925  
  4926  // Get: Gets a version
  4927  //
  4928  // - name: The name of the version to retrieve.
  4929  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Get(name string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  4930  	c := &ProjectsLocationsRepositoriesPackagesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4931  	c.name = name
  4932  	return c
  4933  }
  4934  
  4935  // View sets the optional parameter "view": The view that should be returned in
  4936  // the response.
  4937  //
  4938  // Possible values:
  4939  //
  4940  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  4941  //
  4942  // default to the BASIC view.
  4943  //
  4944  //	"BASIC" - Includes basic information about the version, but not any
  4945  //
  4946  // related tags.
  4947  //
  4948  //	"FULL" - Include everything.
  4949  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  4950  	c.urlParams_.Set("view", view)
  4951  	return c
  4952  }
  4953  
  4954  // Fields allows partial responses to be retrieved. See
  4955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4956  // details.
  4957  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  4958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4959  	return c
  4960  }
  4961  
  4962  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4963  // object's ETag matches the given value. This is useful for getting updates
  4964  // only after the object has changed since the last request.
  4965  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  4966  	c.ifNoneMatch_ = entityTag
  4967  	return c
  4968  }
  4969  
  4970  // Context sets the context to be used in this call's Do method.
  4971  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  4972  	c.ctx_ = ctx
  4973  	return c
  4974  }
  4975  
  4976  // Header returns a http.Header that can be modified by the caller to add
  4977  // headers to the request.
  4978  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Header() http.Header {
  4979  	if c.header_ == nil {
  4980  		c.header_ = make(http.Header)
  4981  	}
  4982  	return c.header_
  4983  }
  4984  
  4985  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  4986  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4987  	if c.ifNoneMatch_ != "" {
  4988  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4989  	}
  4990  	var body io.Reader = nil
  4991  	c.urlParams_.Set("alt", alt)
  4992  	c.urlParams_.Set("prettyPrint", "false")
  4993  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
  4994  	urls += "?" + c.urlParams_.Encode()
  4995  	req, err := http.NewRequest("GET", urls, body)
  4996  	if err != nil {
  4997  		return nil, err
  4998  	}
  4999  	req.Header = reqHeaders
  5000  	googleapi.Expand(req.URL, map[string]string{
  5001  		"name": c.name,
  5002  	})
  5003  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5004  }
  5005  
  5006  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.get" call.
  5007  // Any non-2xx status code is an error. Response headers are in either
  5008  // *Version.ServerResponse.Header or (if a response was returned at all) in
  5009  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5010  // whether the returned error was because http.StatusNotModified was returned.
  5011  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  5012  	gensupport.SetOptions(c.urlParams_, opts...)
  5013  	res, err := c.doRequest("json")
  5014  	if res != nil && res.StatusCode == http.StatusNotModified {
  5015  		if res.Body != nil {
  5016  			res.Body.Close()
  5017  		}
  5018  		return nil, gensupport.WrapError(&googleapi.Error{
  5019  			Code:   res.StatusCode,
  5020  			Header: res.Header,
  5021  		})
  5022  	}
  5023  	if err != nil {
  5024  		return nil, err
  5025  	}
  5026  	defer googleapi.CloseBody(res)
  5027  	if err := googleapi.CheckResponse(res); err != nil {
  5028  		return nil, gensupport.WrapError(err)
  5029  	}
  5030  	ret := &Version{
  5031  		ServerResponse: googleapi.ServerResponse{
  5032  			Header:         res.Header,
  5033  			HTTPStatusCode: res.StatusCode,
  5034  		},
  5035  	}
  5036  	target := &ret
  5037  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5038  		return nil, err
  5039  	}
  5040  	return ret, nil
  5041  }
  5042  
  5043  type ProjectsLocationsRepositoriesPackagesVersionsListCall struct {
  5044  	s            *Service
  5045  	parent       string
  5046  	urlParams_   gensupport.URLParams
  5047  	ifNoneMatch_ string
  5048  	ctx_         context.Context
  5049  	header_      http.Header
  5050  }
  5051  
  5052  // List: Lists versions.
  5053  //
  5054  // - parent: The name of the parent resource whose versions will be listed.
  5055  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) List(parent string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5056  	c := &ProjectsLocationsRepositoriesPackagesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5057  	c.parent = parent
  5058  	return c
  5059  }
  5060  
  5061  // OrderBy sets the optional parameter "orderBy": The field to order the
  5062  // results by.
  5063  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5064  	c.urlParams_.Set("orderBy", orderBy)
  5065  	return c
  5066  }
  5067  
  5068  // PageSize sets the optional parameter "pageSize": The maximum number of
  5069  // versions to return. Maximum page size is 1,000.
  5070  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5071  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5072  	return c
  5073  }
  5074  
  5075  // PageToken sets the optional parameter "pageToken": The next_page_token value
  5076  // returned from a previous list request, if any.
  5077  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5078  	c.urlParams_.Set("pageToken", pageToken)
  5079  	return c
  5080  }
  5081  
  5082  // View sets the optional parameter "view": The view that should be returned in
  5083  // the response.
  5084  //
  5085  // Possible values:
  5086  //
  5087  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  5088  //
  5089  // default to the BASIC view.
  5090  //
  5091  //	"BASIC" - Includes basic information about the version, but not any
  5092  //
  5093  // related tags.
  5094  //
  5095  //	"FULL" - Include everything.
  5096  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5097  	c.urlParams_.Set("view", view)
  5098  	return c
  5099  }
  5100  
  5101  // Fields allows partial responses to be retrieved. See
  5102  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5103  // details.
  5104  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5105  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5106  	return c
  5107  }
  5108  
  5109  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5110  // object's ETag matches the given value. This is useful for getting updates
  5111  // only after the object has changed since the last request.
  5112  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5113  	c.ifNoneMatch_ = entityTag
  5114  	return c
  5115  }
  5116  
  5117  // Context sets the context to be used in this call's Do method.
  5118  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  5119  	c.ctx_ = ctx
  5120  	return c
  5121  }
  5122  
  5123  // Header returns a http.Header that can be modified by the caller to add
  5124  // headers to the request.
  5125  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Header() http.Header {
  5126  	if c.header_ == nil {
  5127  		c.header_ = make(http.Header)
  5128  	}
  5129  	return c.header_
  5130  }
  5131  
  5132  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  5133  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5134  	if c.ifNoneMatch_ != "" {
  5135  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5136  	}
  5137  	var body io.Reader = nil
  5138  	c.urlParams_.Set("alt", alt)
  5139  	c.urlParams_.Set("prettyPrint", "false")
  5140  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/versions")
  5141  	urls += "?" + c.urlParams_.Encode()
  5142  	req, err := http.NewRequest("GET", urls, body)
  5143  	if err != nil {
  5144  		return nil, err
  5145  	}
  5146  	req.Header = reqHeaders
  5147  	googleapi.Expand(req.URL, map[string]string{
  5148  		"parent": c.parent,
  5149  	})
  5150  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5151  }
  5152  
  5153  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.list" call.
  5154  // Any non-2xx status code is an error. Response headers are in either
  5155  // *ListVersionsResponse.ServerResponse.Header or (if a response was returned
  5156  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5157  // check whether the returned error was because http.StatusNotModified was
  5158  // returned.
  5159  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  5160  	gensupport.SetOptions(c.urlParams_, opts...)
  5161  	res, err := c.doRequest("json")
  5162  	if res != nil && res.StatusCode == http.StatusNotModified {
  5163  		if res.Body != nil {
  5164  			res.Body.Close()
  5165  		}
  5166  		return nil, gensupport.WrapError(&googleapi.Error{
  5167  			Code:   res.StatusCode,
  5168  			Header: res.Header,
  5169  		})
  5170  	}
  5171  	if err != nil {
  5172  		return nil, err
  5173  	}
  5174  	defer googleapi.CloseBody(res)
  5175  	if err := googleapi.CheckResponse(res); err != nil {
  5176  		return nil, gensupport.WrapError(err)
  5177  	}
  5178  	ret := &ListVersionsResponse{
  5179  		ServerResponse: googleapi.ServerResponse{
  5180  			Header:         res.Header,
  5181  			HTTPStatusCode: res.StatusCode,
  5182  		},
  5183  	}
  5184  	target := &ret
  5185  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5186  		return nil, err
  5187  	}
  5188  	return ret, nil
  5189  }
  5190  
  5191  // Pages invokes f for each page of results.
  5192  // A non-nil error returned from f will halt the iteration.
  5193  // The provided context supersedes any context provided to the Context method.
  5194  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  5195  	c.ctx_ = ctx
  5196  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5197  	for {
  5198  		x, err := c.Do()
  5199  		if err != nil {
  5200  			return err
  5201  		}
  5202  		if err := f(x); err != nil {
  5203  			return err
  5204  		}
  5205  		if x.NextPageToken == "" {
  5206  			return nil
  5207  		}
  5208  		c.PageToken(x.NextPageToken)
  5209  	}
  5210  }
  5211  
  5212  type ProjectsLocationsRepositoriesYumArtifactsImportCall struct {
  5213  	s                         *Service
  5214  	parent                    string
  5215  	importyumartifactsrequest *ImportYumArtifactsRequest
  5216  	urlParams_                gensupport.URLParams
  5217  	ctx_                      context.Context
  5218  	header_                   http.Header
  5219  }
  5220  
  5221  // Import: Imports Yum (RPM) artifacts. The returned Operation will complete
  5222  // once the resources are imported. Package, Version, and File resources are
  5223  // created based on the imported artifacts. Imported artifacts that conflict
  5224  // with existing resources are ignored.
  5225  //
  5226  //   - parent: The name of the parent resource where the artifacts will be
  5227  //     imported.
  5228  func (r *ProjectsLocationsRepositoriesYumArtifactsService) Import(parent string, importyumartifactsrequest *ImportYumArtifactsRequest) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  5229  	c := &ProjectsLocationsRepositoriesYumArtifactsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5230  	c.parent = parent
  5231  	c.importyumartifactsrequest = importyumartifactsrequest
  5232  	return c
  5233  }
  5234  
  5235  // Fields allows partial responses to be retrieved. See
  5236  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5237  // details.
  5238  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  5239  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5240  	return c
  5241  }
  5242  
  5243  // Context sets the context to be used in this call's Do method.
  5244  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesYumArtifactsImportCall {
  5245  	c.ctx_ = ctx
  5246  	return c
  5247  }
  5248  
  5249  // Header returns a http.Header that can be modified by the caller to add
  5250  // headers to the request.
  5251  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Header() http.Header {
  5252  	if c.header_ == nil {
  5253  		c.header_ = make(http.Header)
  5254  	}
  5255  	return c.header_
  5256  }
  5257  
  5258  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) doRequest(alt string) (*http.Response, error) {
  5259  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5260  	var body io.Reader = nil
  5261  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importyumartifactsrequest)
  5262  	if err != nil {
  5263  		return nil, err
  5264  	}
  5265  	c.urlParams_.Set("alt", alt)
  5266  	c.urlParams_.Set("prettyPrint", "false")
  5267  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/yumArtifacts:import")
  5268  	urls += "?" + c.urlParams_.Encode()
  5269  	req, err := http.NewRequest("POST", urls, body)
  5270  	if err != nil {
  5271  		return nil, err
  5272  	}
  5273  	req.Header = reqHeaders
  5274  	googleapi.Expand(req.URL, map[string]string{
  5275  		"parent": c.parent,
  5276  	})
  5277  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5278  }
  5279  
  5280  // Do executes the "artifactregistry.projects.locations.repositories.yumArtifacts.import" call.
  5281  // Any non-2xx status code is an error. Response headers are in either
  5282  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5283  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5284  // whether the returned error was because http.StatusNotModified was returned.
  5285  func (c *ProjectsLocationsRepositoriesYumArtifactsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5286  	gensupport.SetOptions(c.urlParams_, opts...)
  5287  	res, err := c.doRequest("json")
  5288  	if res != nil && res.StatusCode == http.StatusNotModified {
  5289  		if res.Body != nil {
  5290  			res.Body.Close()
  5291  		}
  5292  		return nil, gensupport.WrapError(&googleapi.Error{
  5293  			Code:   res.StatusCode,
  5294  			Header: res.Header,
  5295  		})
  5296  	}
  5297  	if err != nil {
  5298  		return nil, err
  5299  	}
  5300  	defer googleapi.CloseBody(res)
  5301  	if err := googleapi.CheckResponse(res); err != nil {
  5302  		return nil, gensupport.WrapError(err)
  5303  	}
  5304  	ret := &Operation{
  5305  		ServerResponse: googleapi.ServerResponse{
  5306  			Header:         res.Header,
  5307  			HTTPStatusCode: res.StatusCode,
  5308  		},
  5309  	}
  5310  	target := &ret
  5311  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5312  		return nil, err
  5313  	}
  5314  	return ret, nil
  5315  }
  5316  
  5317  type ProjectsLocationsRepositoriesYumArtifactsUploadCall struct {
  5318  	s                        *Service
  5319  	parent                   string
  5320  	uploadyumartifactrequest *UploadYumArtifactRequest
  5321  	urlParams_               gensupport.URLParams
  5322  	mediaInfo_               *gensupport.MediaInfo
  5323  	ctx_                     context.Context
  5324  	header_                  http.Header
  5325  }
  5326  
  5327  // Upload: Directly uploads a Yum artifact. The returned Operation will
  5328  // complete once the resources are uploaded. Package, Version, and File
  5329  // resources are created based on the imported artifact. Imported artifacts
  5330  // that conflict with existing resources are ignored.
  5331  //
  5332  //   - parent: The name of the parent resource where the artifacts will be
  5333  //     uploaded.
  5334  func (r *ProjectsLocationsRepositoriesYumArtifactsService) Upload(parent string, uploadyumartifactrequest *UploadYumArtifactRequest) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5335  	c := &ProjectsLocationsRepositoriesYumArtifactsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5336  	c.parent = parent
  5337  	c.uploadyumartifactrequest = uploadyumartifactrequest
  5338  	return c
  5339  }
  5340  
  5341  // Media specifies the media to upload in one or more chunks. The chunk size
  5342  // may be controlled by supplying a MediaOption generated by
  5343  // googleapi.ChunkSize. The chunk size defaults to
  5344  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  5345  // request will be determined by sniffing the contents of r, unless a
  5346  // MediaOption generated by googleapi.ContentType is supplied.
  5347  // At most one of Media and ResumableMedia may be set.
  5348  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5349  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  5350  	return c
  5351  }
  5352  
  5353  // ResumableMedia specifies the media to upload in chunks and can be canceled
  5354  // with ctx.
  5355  //
  5356  // Deprecated: use Media instead.
  5357  //
  5358  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  5359  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  5360  // will be auto-detected. The provided ctx will supersede any context
  5361  // previously provided to the Context method.
  5362  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5363  	c.ctx_ = ctx
  5364  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  5365  	return c
  5366  }
  5367  
  5368  // ProgressUpdater provides a callback function that will be called after every
  5369  // chunk. It should be a low-latency function in order to not slow down the
  5370  // upload operation. This should only be called when using ResumableMedia (as
  5371  // opposed to Media).
  5372  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5373  	c.mediaInfo_.SetProgressUpdater(pu)
  5374  	return c
  5375  }
  5376  
  5377  // Fields allows partial responses to be retrieved. See
  5378  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5379  // details.
  5380  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5381  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5382  	return c
  5383  }
  5384  
  5385  // Context sets the context to be used in this call's Do method.
  5386  // This context will supersede any context previously provided to the
  5387  // ResumableMedia method.
  5388  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesYumArtifactsUploadCall {
  5389  	c.ctx_ = ctx
  5390  	return c
  5391  }
  5392  
  5393  // Header returns a http.Header that can be modified by the caller to add
  5394  // headers to the request.
  5395  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Header() http.Header {
  5396  	if c.header_ == nil {
  5397  		c.header_ = make(http.Header)
  5398  	}
  5399  	return c.header_
  5400  }
  5401  
  5402  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) doRequest(alt string) (*http.Response, error) {
  5403  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5404  	var body io.Reader = nil
  5405  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadyumartifactrequest)
  5406  	if err != nil {
  5407  		return nil, err
  5408  	}
  5409  	c.urlParams_.Set("alt", alt)
  5410  	c.urlParams_.Set("prettyPrint", "false")
  5411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/yumArtifacts:create")
  5412  	if c.mediaInfo_ != nil {
  5413  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta2/{+parent}/yumArtifacts:create")
  5414  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  5415  	}
  5416  	if body == nil {
  5417  		body = new(bytes.Buffer)
  5418  		reqHeaders.Set("Content-Type", "application/json")
  5419  	}
  5420  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  5421  	defer cleanup()
  5422  	urls += "?" + c.urlParams_.Encode()
  5423  	req, err := http.NewRequest("POST", urls, body)
  5424  	if err != nil {
  5425  		return nil, err
  5426  	}
  5427  	req.Header = reqHeaders
  5428  	req.GetBody = getBody
  5429  	googleapi.Expand(req.URL, map[string]string{
  5430  		"parent": c.parent,
  5431  	})
  5432  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5433  }
  5434  
  5435  // Do executes the "artifactregistry.projects.locations.repositories.yumArtifacts.upload" call.
  5436  // Any non-2xx status code is an error. Response headers are in either
  5437  // *UploadYumArtifactMediaResponse.ServerResponse.Header or (if a response was
  5438  // returned at all) in error.(*googleapi.Error).Header. Use
  5439  // googleapi.IsNotModified to check whether the returned error was because
  5440  // http.StatusNotModified was returned.
  5441  func (c *ProjectsLocationsRepositoriesYumArtifactsUploadCall) Do(opts ...googleapi.CallOption) (*UploadYumArtifactMediaResponse, error) {
  5442  	gensupport.SetOptions(c.urlParams_, opts...)
  5443  	res, err := c.doRequest("json")
  5444  	if res != nil && res.StatusCode == http.StatusNotModified {
  5445  		if res.Body != nil {
  5446  			res.Body.Close()
  5447  		}
  5448  		return nil, gensupport.WrapError(&googleapi.Error{
  5449  			Code:   res.StatusCode,
  5450  			Header: res.Header,
  5451  		})
  5452  	}
  5453  	if err != nil {
  5454  		return nil, err
  5455  	}
  5456  	defer googleapi.CloseBody(res)
  5457  	if err := googleapi.CheckResponse(res); err != nil {
  5458  		return nil, gensupport.WrapError(err)
  5459  	}
  5460  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  5461  	if rx != nil {
  5462  		rx.Client = c.s.client
  5463  		rx.UserAgent = c.s.userAgent()
  5464  		ctx := c.ctx_
  5465  		if ctx == nil {
  5466  			ctx = context.TODO()
  5467  		}
  5468  		res, err = rx.Upload(ctx)
  5469  		if err != nil {
  5470  			return nil, err
  5471  		}
  5472  		defer res.Body.Close()
  5473  		if err := googleapi.CheckResponse(res); err != nil {
  5474  			return nil, gensupport.WrapError(err)
  5475  		}
  5476  	}
  5477  	ret := &UploadYumArtifactMediaResponse{
  5478  		ServerResponse: googleapi.ServerResponse{
  5479  			Header:         res.Header,
  5480  			HTTPStatusCode: res.StatusCode,
  5481  		},
  5482  	}
  5483  	target := &ret
  5484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5485  		return nil, err
  5486  	}
  5487  	return ret, nil
  5488  }
  5489  

View as plain text