...

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

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

     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/v1beta1"
    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/v1beta1"
    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:v1beta1"
    95  const apiName = "artifactregistry"
    96  const apiVersion = "v1beta1"
    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.Files = NewProjectsLocationsRepositoriesFilesService(s)
   206  	rs.Packages = NewProjectsLocationsRepositoriesPackagesService(s)
   207  	return rs
   208  }
   209  
   210  type ProjectsLocationsRepositoriesService struct {
   211  	s *Service
   212  
   213  	Files *ProjectsLocationsRepositoriesFilesService
   214  
   215  	Packages *ProjectsLocationsRepositoriesPackagesService
   216  }
   217  
   218  func NewProjectsLocationsRepositoriesFilesService(s *Service) *ProjectsLocationsRepositoriesFilesService {
   219  	rs := &ProjectsLocationsRepositoriesFilesService{s: s}
   220  	return rs
   221  }
   222  
   223  type ProjectsLocationsRepositoriesFilesService struct {
   224  	s *Service
   225  }
   226  
   227  func NewProjectsLocationsRepositoriesPackagesService(s *Service) *ProjectsLocationsRepositoriesPackagesService {
   228  	rs := &ProjectsLocationsRepositoriesPackagesService{s: s}
   229  	rs.Tags = NewProjectsLocationsRepositoriesPackagesTagsService(s)
   230  	rs.Versions = NewProjectsLocationsRepositoriesPackagesVersionsService(s)
   231  	return rs
   232  }
   233  
   234  type ProjectsLocationsRepositoriesPackagesService struct {
   235  	s *Service
   236  
   237  	Tags *ProjectsLocationsRepositoriesPackagesTagsService
   238  
   239  	Versions *ProjectsLocationsRepositoriesPackagesVersionsService
   240  }
   241  
   242  func NewProjectsLocationsRepositoriesPackagesTagsService(s *Service) *ProjectsLocationsRepositoriesPackagesTagsService {
   243  	rs := &ProjectsLocationsRepositoriesPackagesTagsService{s: s}
   244  	return rs
   245  }
   246  
   247  type ProjectsLocationsRepositoriesPackagesTagsService struct {
   248  	s *Service
   249  }
   250  
   251  func NewProjectsLocationsRepositoriesPackagesVersionsService(s *Service) *ProjectsLocationsRepositoriesPackagesVersionsService {
   252  	rs := &ProjectsLocationsRepositoriesPackagesVersionsService{s: s}
   253  	return rs
   254  }
   255  
   256  type ProjectsLocationsRepositoriesPackagesVersionsService struct {
   257  	s *Service
   258  }
   259  
   260  // Binding: Associates `members`, or principals, with a `role`.
   261  type Binding struct {
   262  	// Condition: The condition that is associated with this binding. If the
   263  	// condition evaluates to `true`, then this binding applies to the current
   264  	// request. If the condition evaluates to `false`, then this binding does not
   265  	// apply to the current request. However, a different role binding might grant
   266  	// the same role to one or more of the principals in this binding. To learn
   267  	// which resources support conditions in their IAM policies, see the IAM
   268  	// documentation
   269  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   270  	Condition *Expr `json:"condition,omitempty"`
   271  	// Members: Specifies the principals requesting access for a Google Cloud
   272  	// resource. `members` can have the following values: * `allUsers`: A special
   273  	// identifier that represents anyone who is on the internet; with or without a
   274  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   275  	// represents anyone who is authenticated with a Google account or a service
   276  	// account. Does not include identities that come from external identity
   277  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   278  	// address that represents a specific Google account. For example,
   279  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   280  	// represents a Google service account. For example,
   281  	// `my-other-app@appspot.gserviceaccount.com`. *
   282  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   283  	// identifier for a Kubernetes service account
   284  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   285  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   286  	// `group:{emailid}`: An email address that represents a Google group. For
   287  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   288  	// (primary) that represents all the users of that domain. For example,
   289  	// `google.com` or `example.com`. *
   290  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   291  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   292  	// pool. *
   293  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   294  	// group/{group_id}`: All workforce identities in a group. *
   295  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   296  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   297  	// a specific attribute value. *
   298  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   299  	// *`: All identities in a workforce identity pool. *
   300  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   301  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   302  	// identity in a workload identity pool. *
   303  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   304  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   305  	// group. *
   306  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   307  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   308  	// `: All identities in a workload identity pool with a certain attribute. *
   309  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   310  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   311  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   312  	// unique identifier) representing a user that has been recently deleted. For
   313  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   314  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   315  	// retains the role in the binding. *
   316  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   317  	// unique identifier) representing a service account that has been recently
   318  	// deleted. For example,
   319  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   320  	// service account is undeleted, this value reverts to
   321  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   322  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   323  	// address (plus unique identifier) representing a Google group that has been
   324  	// recently deleted. For example,
   325  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   326  	// this value reverts to `group:{emailid}` and the recovered group retains the
   327  	// role in the binding. *
   328  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   329  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   330  	// workforce identity pool. For example,
   331  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   332  	// ol-id/subject/my-subject-attribute-value`.
   333  	Members []string `json:"members,omitempty"`
   334  	// Role: Role that is assigned to the list of `members`, or principals. For
   335  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   336  	// of the IAM roles and permissions, see the IAM documentation
   337  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   338  	// available pre-defined roles, see here
   339  	// (https://cloud.google.com/iam/docs/understanding-roles).
   340  	Role string `json:"role,omitempty"`
   341  	// ForceSendFields is a list of field names (e.g. "Condition") to
   342  	// unconditionally include in API requests. By default, fields with empty or
   343  	// default values are omitted from API requests. See
   344  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   345  	// details.
   346  	ForceSendFields []string `json:"-"`
   347  	// NullFields is a list of field names (e.g. "Condition") to include in API
   348  	// requests with the JSON null value. By default, fields with empty values are
   349  	// omitted from API requests. See
   350  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   351  	NullFields []string `json:"-"`
   352  }
   353  
   354  func (s *Binding) MarshalJSON() ([]byte, error) {
   355  	type NoMethod Binding
   356  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   357  }
   358  
   359  // Empty: A generic empty message that you can re-use to avoid defining
   360  // duplicated empty messages in your APIs. A typical example is to use it as
   361  // the request or the response type of an API method. For instance: service Foo
   362  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   363  type Empty struct {
   364  	// ServerResponse contains the HTTP response code and headers from the server.
   365  	googleapi.ServerResponse `json:"-"`
   366  }
   367  
   368  // Expr: Represents a textual expression in the Common Expression Language
   369  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   370  // of CEL are documented at https://github.com/google/cel-spec. Example
   371  // (Comparison): title: "Summary size limit" description: "Determines if a
   372  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   373  // Example (Equality): title: "Requestor is owner" description: "Determines if
   374  // requestor is the document owner" expression: "document.owner ==
   375  // request.auth.claims.email" Example (Logic): title: "Public documents"
   376  // description: "Determine whether the document should be publicly visible"
   377  // expression: "document.type != 'private' && document.type != 'internal'"
   378  // Example (Data Manipulation): title: "Notification string" description:
   379  // "Create a notification string with a timestamp." expression: "'New message
   380  // received at ' + string(document.create_time)" The exact variables and
   381  // functions that may be referenced within an expression are determined by the
   382  // service that evaluates it. See the service documentation for additional
   383  // information.
   384  type Expr struct {
   385  	// Description: Optional. Description of the expression. This is a longer text
   386  	// which describes the expression, e.g. when hovered over it in a UI.
   387  	Description string `json:"description,omitempty"`
   388  	// Expression: Textual representation of an expression in Common Expression
   389  	// Language syntax.
   390  	Expression string `json:"expression,omitempty"`
   391  	// Location: Optional. String indicating the location of the expression for
   392  	// error reporting, e.g. a file name and a position in the file.
   393  	Location string `json:"location,omitempty"`
   394  	// Title: Optional. Title for the expression, i.e. a short string describing
   395  	// its purpose. This can be used e.g. in UIs which allow to enter the
   396  	// expression.
   397  	Title string `json:"title,omitempty"`
   398  	// ForceSendFields is a list of field names (e.g. "Description") to
   399  	// unconditionally include in API requests. By default, fields with empty or
   400  	// default values are omitted from API requests. See
   401  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   402  	// details.
   403  	ForceSendFields []string `json:"-"`
   404  	// NullFields is a list of field names (e.g. "Description") to include in API
   405  	// requests with the JSON null value. By default, fields with empty values are
   406  	// omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   408  	NullFields []string `json:"-"`
   409  }
   410  
   411  func (s *Expr) MarshalJSON() ([]byte, error) {
   412  	type NoMethod Expr
   413  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   414  }
   415  
   416  // File: Files store content that is potentially associated with Packages or
   417  // Versions.
   418  type File struct {
   419  	// CreateTime: Output only. The time when the File was created.
   420  	CreateTime string `json:"createTime,omitempty"`
   421  	// Hashes: The hashes of the file content.
   422  	Hashes []*Hash `json:"hashes,omitempty"`
   423  	// Name: The name of the file, for example:
   424  	// `projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.
   425  	// If the file ID part contains slashes, they are escaped.
   426  	Name string `json:"name,omitempty"`
   427  	// Owner: The name of the Package or Version that owns this file, if any.
   428  	Owner string `json:"owner,omitempty"`
   429  	// SizeBytes: The size of the File in bytes.
   430  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   431  	// UpdateTime: Output only. The time when the File was last updated.
   432  	UpdateTime string `json:"updateTime,omitempty"`
   433  
   434  	// ServerResponse contains the HTTP response code and headers from the server.
   435  	googleapi.ServerResponse `json:"-"`
   436  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   437  	// unconditionally include in API requests. By default, fields with empty or
   438  	// default values are omitted from API requests. See
   439  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   440  	// details.
   441  	ForceSendFields []string `json:"-"`
   442  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   443  	// requests with the JSON null value. By default, fields with empty values are
   444  	// omitted from API requests. See
   445  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   446  	NullFields []string `json:"-"`
   447  }
   448  
   449  func (s *File) MarshalJSON() ([]byte, error) {
   450  	type NoMethod File
   451  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   452  }
   453  
   454  // Hash: A hash of file content.
   455  type Hash struct {
   456  	// Type: The algorithm used to compute the hash value.
   457  	//
   458  	// Possible values:
   459  	//   "HASH_TYPE_UNSPECIFIED" - Unspecified.
   460  	//   "SHA256" - SHA256 hash.
   461  	//   "MD5" - MD5 hash.
   462  	Type string `json:"type,omitempty"`
   463  	// Value: The hash value.
   464  	Value string `json:"value,omitempty"`
   465  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
   466  	// include in API requests. By default, fields with empty or default values are
   467  	// omitted from API requests. See
   468  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   469  	// details.
   470  	ForceSendFields []string `json:"-"`
   471  	// NullFields is a list of field names (e.g. "Type") to include in API requests
   472  	// with the JSON null value. By default, fields with empty values are omitted
   473  	// from API requests. See
   474  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   475  	NullFields []string `json:"-"`
   476  }
   477  
   478  func (s *Hash) MarshalJSON() ([]byte, error) {
   479  	type NoMethod Hash
   480  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   481  }
   482  
   483  // ListFilesResponse: The response from listing files.
   484  type ListFilesResponse struct {
   485  	// Files: The files returned.
   486  	Files []*File `json:"files,omitempty"`
   487  	// NextPageToken: The token to retrieve the next page of files, or empty if
   488  	// there are no more files to return.
   489  	NextPageToken string `json:"nextPageToken,omitempty"`
   490  
   491  	// ServerResponse contains the HTTP response code and headers from the server.
   492  	googleapi.ServerResponse `json:"-"`
   493  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
   494  	// include in API requests. By default, fields with empty or default values are
   495  	// omitted from API requests. See
   496  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   497  	// details.
   498  	ForceSendFields []string `json:"-"`
   499  	// NullFields is a list of field names (e.g. "Files") to include in API
   500  	// requests with the JSON null value. By default, fields with empty values are
   501  	// omitted from API requests. See
   502  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   503  	NullFields []string `json:"-"`
   504  }
   505  
   506  func (s *ListFilesResponse) MarshalJSON() ([]byte, error) {
   507  	type NoMethod ListFilesResponse
   508  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   509  }
   510  
   511  // ListLocationsResponse: The response message for Locations.ListLocations.
   512  type ListLocationsResponse struct {
   513  	// Locations: A list of locations that matches the specified filter in the
   514  	// request.
   515  	Locations []*Location `json:"locations,omitempty"`
   516  	// NextPageToken: The standard List next-page token.
   517  	NextPageToken string `json:"nextPageToken,omitempty"`
   518  
   519  	// ServerResponse contains the HTTP response code and headers from the server.
   520  	googleapi.ServerResponse `json:"-"`
   521  	// ForceSendFields is a list of field names (e.g. "Locations") to
   522  	// unconditionally include in API requests. By default, fields with empty or
   523  	// default values are omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   525  	// details.
   526  	ForceSendFields []string `json:"-"`
   527  	// NullFields is a list of field names (e.g. "Locations") to include in API
   528  	// requests with the JSON null value. By default, fields with empty values are
   529  	// omitted from API requests. See
   530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   531  	NullFields []string `json:"-"`
   532  }
   533  
   534  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   535  	type NoMethod ListLocationsResponse
   536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   537  }
   538  
   539  // ListPackagesResponse: The response from listing packages.
   540  type ListPackagesResponse struct {
   541  	// NextPageToken: The token to retrieve the next page of packages, or empty if
   542  	// there are no more packages to return.
   543  	NextPageToken string `json:"nextPageToken,omitempty"`
   544  	// Packages: The packages returned.
   545  	Packages []*Package `json:"packages,omitempty"`
   546  
   547  	// ServerResponse contains the HTTP response code and headers from the server.
   548  	googleapi.ServerResponse `json:"-"`
   549  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   550  	// unconditionally include in API requests. By default, fields with empty or
   551  	// default values are omitted from API requests. See
   552  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   553  	// details.
   554  	ForceSendFields []string `json:"-"`
   555  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   556  	// requests with the JSON null value. By default, fields with empty values are
   557  	// omitted from API requests. See
   558  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   559  	NullFields []string `json:"-"`
   560  }
   561  
   562  func (s *ListPackagesResponse) MarshalJSON() ([]byte, error) {
   563  	type NoMethod ListPackagesResponse
   564  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   565  }
   566  
   567  // ListRepositoriesResponse: The response from listing repositories.
   568  type ListRepositoriesResponse struct {
   569  	// NextPageToken: The token to retrieve the next page of repositories, or empty
   570  	// if there are no more repositories to return.
   571  	NextPageToken string `json:"nextPageToken,omitempty"`
   572  	// Repositories: The repositories returned.
   573  	Repositories []*Repository `json:"repositories,omitempty"`
   574  
   575  	// ServerResponse contains the HTTP response code and headers from the server.
   576  	googleapi.ServerResponse `json:"-"`
   577  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   578  	// unconditionally include in API requests. By default, fields with empty or
   579  	// default values are omitted from API requests. See
   580  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   581  	// details.
   582  	ForceSendFields []string `json:"-"`
   583  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   584  	// requests with the JSON null value. By default, fields with empty values are
   585  	// omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   587  	NullFields []string `json:"-"`
   588  }
   589  
   590  func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) {
   591  	type NoMethod ListRepositoriesResponse
   592  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   593  }
   594  
   595  // ListTagsResponse: The response from listing tags.
   596  type ListTagsResponse struct {
   597  	// NextPageToken: The token to retrieve the next page of tags, or empty if
   598  	// there are no more tags to return.
   599  	NextPageToken string `json:"nextPageToken,omitempty"`
   600  	// Tags: The tags returned.
   601  	Tags []*Tag `json:"tags,omitempty"`
   602  
   603  	// ServerResponse contains the HTTP response code and headers from the server.
   604  	googleapi.ServerResponse `json:"-"`
   605  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   606  	// unconditionally include in API requests. By default, fields with empty or
   607  	// default values are omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   609  	// details.
   610  	ForceSendFields []string `json:"-"`
   611  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   612  	// requests with the JSON null value. By default, fields with empty values are
   613  	// omitted from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   615  	NullFields []string `json:"-"`
   616  }
   617  
   618  func (s *ListTagsResponse) MarshalJSON() ([]byte, error) {
   619  	type NoMethod ListTagsResponse
   620  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   621  }
   622  
   623  // ListVersionsResponse: The response from listing versions.
   624  type ListVersionsResponse struct {
   625  	// NextPageToken: The token to retrieve the next page of versions, or empty if
   626  	// there are no more versions to return.
   627  	NextPageToken string `json:"nextPageToken,omitempty"`
   628  	// Versions: The versions returned.
   629  	Versions []*Version `json:"versions,omitempty"`
   630  
   631  	// ServerResponse contains the HTTP response code and headers from the server.
   632  	googleapi.ServerResponse `json:"-"`
   633  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   634  	// unconditionally include in API requests. By default, fields with empty or
   635  	// default values are omitted from API requests. See
   636  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   637  	// details.
   638  	ForceSendFields []string `json:"-"`
   639  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   640  	// requests with the JSON null value. By default, fields with empty values are
   641  	// omitted from API requests. See
   642  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   643  	NullFields []string `json:"-"`
   644  }
   645  
   646  func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
   647  	type NoMethod ListVersionsResponse
   648  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   649  }
   650  
   651  // Location: A resource that represents a Google Cloud location.
   652  type Location struct {
   653  	// DisplayName: The friendly name for this location, typically a nearby city
   654  	// name. For example, "Tokyo".
   655  	DisplayName string `json:"displayName,omitempty"`
   656  	// Labels: Cross-service attributes for the location. For example
   657  	// {"cloud.googleapis.com/region": "us-east1"}
   658  	Labels map[string]string `json:"labels,omitempty"`
   659  	// LocationId: The canonical id for this location. For example: "us-east1".
   660  	LocationId string `json:"locationId,omitempty"`
   661  	// Metadata: Service-specific metadata. For example the available capacity at
   662  	// the given location.
   663  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   664  	// Name: Resource name for the location, which may vary between
   665  	// implementations. For example:
   666  	// "projects/example-project/locations/us-east1"
   667  	Name string `json:"name,omitempty"`
   668  
   669  	// ServerResponse contains the HTTP response code and headers from the server.
   670  	googleapi.ServerResponse `json:"-"`
   671  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   672  	// unconditionally include in API requests. By default, fields with empty or
   673  	// default values are omitted from API requests. See
   674  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   675  	// details.
   676  	ForceSendFields []string `json:"-"`
   677  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   678  	// requests with the JSON null value. By default, fields with empty values are
   679  	// omitted from API requests. See
   680  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   681  	NullFields []string `json:"-"`
   682  }
   683  
   684  func (s *Location) MarshalJSON() ([]byte, error) {
   685  	type NoMethod Location
   686  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   687  }
   688  
   689  // Operation: This resource represents a long-running operation that is the
   690  // result of a network API call.
   691  type Operation struct {
   692  	// Done: If the value is `false`, it means the operation is still in progress.
   693  	// If `true`, the operation is completed, and either `error` or `response` is
   694  	// available.
   695  	Done bool `json:"done,omitempty"`
   696  	// Error: The error result of the operation in case of failure or cancellation.
   697  	Error *Status `json:"error,omitempty"`
   698  	// Metadata: Service-specific metadata associated with the operation. It
   699  	// typically contains progress information and common metadata such as create
   700  	// time. Some services might not provide such metadata. Any method that returns
   701  	// a long-running operation should document the metadata type, if any.
   702  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   703  	// Name: The server-assigned name, which is only unique within the same service
   704  	// that originally returns it. If you use the default HTTP mapping, the `name`
   705  	// should be a resource name ending with `operations/{unique_id}`.
   706  	Name string `json:"name,omitempty"`
   707  	// Response: The normal, successful response of the operation. If the original
   708  	// method returns no data on success, such as `Delete`, the response is
   709  	// `google.protobuf.Empty`. If the original method is standard
   710  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   711  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   712  	// original method name. For example, if the original method name is
   713  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   714  	Response googleapi.RawMessage `json:"response,omitempty"`
   715  
   716  	// ServerResponse contains the HTTP response code and headers from the server.
   717  	googleapi.ServerResponse `json:"-"`
   718  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   719  	// include in API requests. By default, fields with empty or default values are
   720  	// omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   722  	// details.
   723  	ForceSendFields []string `json:"-"`
   724  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   725  	// with the JSON null value. By default, fields with empty values are omitted
   726  	// from API requests. See
   727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   728  	NullFields []string `json:"-"`
   729  }
   730  
   731  func (s *Operation) MarshalJSON() ([]byte, error) {
   732  	type NoMethod Operation
   733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   734  }
   735  
   736  // Package: Packages are named collections of versions.
   737  type Package struct {
   738  	// CreateTime: The time when the package was created.
   739  	CreateTime string `json:"createTime,omitempty"`
   740  	// DisplayName: The display name of the package.
   741  	DisplayName string `json:"displayName,omitempty"`
   742  	// Name: The name of the package, for example:
   743  	// `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`. If the
   744  	// package ID part contains slashes, the slashes are escaped.
   745  	Name string `json:"name,omitempty"`
   746  	// UpdateTime: The time when the package was last updated. This includes
   747  	// publishing a new version of the package.
   748  	UpdateTime string `json:"updateTime,omitempty"`
   749  
   750  	// ServerResponse contains the HTTP response code and headers from the server.
   751  	googleapi.ServerResponse `json:"-"`
   752  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   753  	// unconditionally include in API requests. By default, fields with empty or
   754  	// default values are omitted from API requests. See
   755  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   756  	// details.
   757  	ForceSendFields []string `json:"-"`
   758  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   759  	// requests with the JSON null value. By default, fields with empty values are
   760  	// omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   762  	NullFields []string `json:"-"`
   763  }
   764  
   765  func (s *Package) MarshalJSON() ([]byte, error) {
   766  	type NoMethod Package
   767  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   768  }
   769  
   770  // Policy: An Identity and Access Management (IAM) policy, which specifies
   771  // access controls for Google Cloud resources. A `Policy` is a collection of
   772  // `bindings`. A `binding` binds one or more `members`, or principals, to a
   773  // single `role`. Principals can be user accounts, service accounts, Google
   774  // groups, and domains (such as G Suite). A `role` is a named list of
   775  // permissions; each `role` can be an IAM predefined role or a user-created
   776  // custom role. For some types of Google Cloud resources, a `binding` can also
   777  // specify a `condition`, which is a logical expression that allows access to a
   778  // resource only if the expression evaluates to `true`. A condition can add
   779  // constraints based on attributes of the request, the resource, or both. To
   780  // learn which resources support conditions in their IAM policies, see the IAM
   781  // documentation
   782  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
   783  // example:** ``` { "bindings": [ { "role":
   784  // "roles/resourcemanager.organizationAdmin", "members": [
   785  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
   786  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
   787  // "roles/resourcemanager.organizationViewer", "members": [
   788  // "user:eve@example.com" ], "condition": { "title": "expirable access",
   789  // "description": "Does not grant access after Sep 2020", "expression":
   790  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
   791  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
   792  // members: - user:mike@example.com - group:admins@example.com -
   793  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
   794  // role: roles/resourcemanager.organizationAdmin - members: -
   795  // user:eve@example.com role: roles/resourcemanager.organizationViewer
   796  // condition: title: expirable access description: Does not grant access after
   797  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
   798  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
   799  // see the IAM documentation (https://cloud.google.com/iam/docs/).
   800  type Policy struct {
   801  	// Bindings: Associates a list of `members`, or principals, with a `role`.
   802  	// Optionally, may specify a `condition` that determines how and when the
   803  	// `bindings` are applied. Each of the `bindings` must contain at least one
   804  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
   805  	// up to 250 of these principals can be Google groups. Each occurrence of a
   806  	// principal counts towards these limits. For example, if the `bindings` grant
   807  	// 50 different roles to `user:alice@example.com`, and not to any other
   808  	// principal, then you can add another 1,450 principals to the `bindings` in
   809  	// the `Policy`.
   810  	Bindings []*Binding `json:"bindings,omitempty"`
   811  	// Etag: `etag` is used for optimistic concurrency control as a way to help
   812  	// prevent simultaneous updates of a policy from overwriting each other. It is
   813  	// strongly suggested that systems make use of the `etag` in the
   814  	// read-modify-write cycle to perform policy updates in order to avoid race
   815  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
   816  	// systems are expected to put that etag in the request to `setIamPolicy` to
   817  	// ensure that their change will be applied to the same version of the policy.
   818  	// **Important:** If you use IAM Conditions, you must include the `etag` field
   819  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
   820  	// you to overwrite a version `3` policy with a version `1` policy, and all of
   821  	// the conditions in the version `3` policy are lost.
   822  	Etag string `json:"etag,omitempty"`
   823  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
   824  	// `3`. Requests that specify an invalid value are rejected. Any operation that
   825  	// affects conditional role bindings must specify version `3`. This requirement
   826  	// applies to the following operations: * Getting a policy that includes a
   827  	// conditional role binding * Adding a conditional role binding to a policy *
   828  	// Changing a conditional role binding in a policy * Removing any role binding,
   829  	// with or without a condition, from a policy that includes conditions
   830  	// **Important:** If you use IAM Conditions, you must include the `etag` field
   831  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
   832  	// you to overwrite a version `3` policy with a version `1` policy, and all of
   833  	// the conditions in the version `3` policy are lost. If a policy does not
   834  	// include any conditions, operations on that policy may specify any valid
   835  	// version or leave the field unset. To learn which resources support
   836  	// conditions in their IAM policies, see the IAM documentation
   837  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   838  	Version int64 `json:"version,omitempty"`
   839  
   840  	// ServerResponse contains the HTTP response code and headers from the server.
   841  	googleapi.ServerResponse `json:"-"`
   842  	// ForceSendFields is a list of field names (e.g. "Bindings") to
   843  	// unconditionally include in API requests. By default, fields with empty or
   844  	// default values are omitted from API requests. See
   845  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   846  	// details.
   847  	ForceSendFields []string `json:"-"`
   848  	// NullFields is a list of field names (e.g. "Bindings") to include in API
   849  	// requests with the JSON null value. By default, fields with empty values are
   850  	// omitted from API requests. See
   851  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   852  	NullFields []string `json:"-"`
   853  }
   854  
   855  func (s *Policy) MarshalJSON() ([]byte, error) {
   856  	type NoMethod Policy
   857  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   858  }
   859  
   860  // Repository: A Repository for storing artifacts with a specific format.
   861  type Repository struct {
   862  	// CreateTime: Output only. The time when the repository was created.
   863  	CreateTime string `json:"createTime,omitempty"`
   864  	// Description: The user-provided description of the repository.
   865  	Description string `json:"description,omitempty"`
   866  	// Format: Optional. The format of packages that are stored in the repository.
   867  	//
   868  	// Possible values:
   869  	//   "FORMAT_UNSPECIFIED" - Unspecified package format.
   870  	//   "DOCKER" - Docker package format.
   871  	//   "MAVEN" - Maven package format.
   872  	//   "NPM" - NPM package format.
   873  	//   "APT" - APT package format.
   874  	//   "YUM" - YUM package format.
   875  	//   "GOOGET" - GooGet package format.
   876  	//   "PYTHON" - Python package format.
   877  	Format string `json:"format,omitempty"`
   878  	// KmsKeyName: The Cloud KMS resource name of the customer managed encryption
   879  	// key that's used to encrypt the contents of the Repository. Has the form:
   880  	// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
   881  	// This value may not be changed after the Repository has been created.
   882  	KmsKeyName string `json:"kmsKeyName,omitempty"`
   883  	// Labels: Labels with user-defined metadata. This field may contain up to 64
   884  	// entries. Label keys and values may be no longer than 63 characters. Label
   885  	// keys must begin with a lowercase letter and may only contain lowercase
   886  	// letters, numeric characters, underscores, and dashes.
   887  	Labels map[string]string `json:"labels,omitempty"`
   888  	// Name: The name of the repository, for example:
   889  	// `projects/p1/locations/us-central1/repositories/repo1`. For each location in
   890  	// a project, repository names must be unique.
   891  	Name string `json:"name,omitempty"`
   892  	// SatisfiesPzi: Output only. If set, the repository satisfies physical zone
   893  	// isolation.
   894  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
   895  	// SatisfiesPzs: Output only. If set, the repository satisfies physical zone
   896  	// separation.
   897  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
   898  	// SizeBytes: Output only. The size, in bytes, of all artifact storage in this
   899  	// repository. Repositories that are generally available or in public preview
   900  	// use this to calculate storage costs.
   901  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   902  	// UpdateTime: Output only. The time when the repository was last updated.
   903  	UpdateTime string `json:"updateTime,omitempty"`
   904  
   905  	// ServerResponse contains the HTTP response code and headers from the server.
   906  	googleapi.ServerResponse `json:"-"`
   907  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   908  	// unconditionally include in API requests. By default, fields with empty or
   909  	// default values are omitted from API requests. See
   910  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   911  	// details.
   912  	ForceSendFields []string `json:"-"`
   913  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   914  	// requests with the JSON null value. By default, fields with empty values are
   915  	// omitted from API requests. See
   916  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   917  	NullFields []string `json:"-"`
   918  }
   919  
   920  func (s *Repository) MarshalJSON() ([]byte, error) {
   921  	type NoMethod Repository
   922  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   923  }
   924  
   925  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
   926  type SetIamPolicyRequest struct {
   927  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
   928  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
   929  	// policy but certain Google Cloud services (such as Projects) might reject
   930  	// them.
   931  	Policy *Policy `json:"policy,omitempty"`
   932  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
   933  	// include in API requests. By default, fields with empty or default values are
   934  	// omitted from API requests. See
   935  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   936  	// details.
   937  	ForceSendFields []string `json:"-"`
   938  	// NullFields is a list of field names (e.g. "Policy") to include in API
   939  	// requests with the JSON null value. By default, fields with empty values are
   940  	// omitted from API requests. See
   941  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   942  	NullFields []string `json:"-"`
   943  }
   944  
   945  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   946  	type NoMethod SetIamPolicyRequest
   947  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   948  }
   949  
   950  // Status: The `Status` type defines a logical error model that is suitable for
   951  // different programming environments, including REST APIs and RPC APIs. It is
   952  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
   953  // pieces of data: error code, error message, and error details. You can find
   954  // out more about this error model and how to work with it in the API Design
   955  // Guide (https://cloud.google.com/apis/design/errors).
   956  type Status struct {
   957  	// Code: The status code, which should be an enum value of google.rpc.Code.
   958  	Code int64 `json:"code,omitempty"`
   959  	// Details: A list of messages that carry the error details. There is a common
   960  	// set of message types for APIs to use.
   961  	Details []googleapi.RawMessage `json:"details,omitempty"`
   962  	// Message: A developer-facing error message, which should be in English. Any
   963  	// user-facing error message should be localized and sent in the
   964  	// google.rpc.Status.details field, or localized by the client.
   965  	Message string `json:"message,omitempty"`
   966  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   967  	// include in API requests. By default, fields with empty or default values are
   968  	// omitted from API requests. See
   969  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   970  	// details.
   971  	ForceSendFields []string `json:"-"`
   972  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   973  	// with the JSON null value. By default, fields with empty values are omitted
   974  	// from API requests. See
   975  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   976  	NullFields []string `json:"-"`
   977  }
   978  
   979  func (s *Status) MarshalJSON() ([]byte, error) {
   980  	type NoMethod Status
   981  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   982  }
   983  
   984  // Tag: Tags point to a version and represent an alternative name that can be
   985  // used to access the version.
   986  type Tag struct {
   987  	// Name: The name of the tag, for example:
   988  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1
   989  	// ". If the package part contains slashes, the slashes are escaped. The tag
   990  	// part can only have characters in [a-zA-Z0-9\-._~:@], anything else must be
   991  	// URL encoded.
   992  	Name string `json:"name,omitempty"`
   993  	// Version: The name of the version the tag refers to, for example:
   994  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
   995  	// sha256:5243811" If the package or version ID parts contain slashes, the
   996  	// slashes are escaped.
   997  	Version string `json:"version,omitempty"`
   998  
   999  	// ServerResponse contains the HTTP response code and headers from the server.
  1000  	googleapi.ServerResponse `json:"-"`
  1001  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1002  	// include in API requests. By default, fields with empty or default values are
  1003  	// omitted from API requests. See
  1004  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1005  	// details.
  1006  	ForceSendFields []string `json:"-"`
  1007  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1008  	// with the JSON null value. By default, fields with empty values are omitted
  1009  	// from API requests. See
  1010  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1011  	NullFields []string `json:"-"`
  1012  }
  1013  
  1014  func (s *Tag) MarshalJSON() ([]byte, error) {
  1015  	type NoMethod Tag
  1016  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1017  }
  1018  
  1019  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1020  type TestIamPermissionsRequest struct {
  1021  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1022  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1023  	// information see IAM Overview
  1024  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1025  	Permissions []string `json:"permissions,omitempty"`
  1026  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1027  	// unconditionally include in API requests. By default, fields with empty or
  1028  	// default values are 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. "Permissions") to include in API
  1033  	// requests with the JSON null value. By default, fields with empty values are
  1034  	// omitted 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1040  	type NoMethod TestIamPermissionsRequest
  1041  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1042  }
  1043  
  1044  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1045  // method.
  1046  type TestIamPermissionsResponse struct {
  1047  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1048  	// caller is allowed.
  1049  	Permissions []string `json:"permissions,omitempty"`
  1050  
  1051  	// ServerResponse contains the HTTP response code and headers from the server.
  1052  	googleapi.ServerResponse `json:"-"`
  1053  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1054  	// unconditionally include in API requests. By default, fields with empty or
  1055  	// default values are omitted from API requests. See
  1056  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1057  	// details.
  1058  	ForceSendFields []string `json:"-"`
  1059  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1060  	// requests with the JSON null value. By default, fields with empty values are
  1061  	// omitted from API requests. See
  1062  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1063  	NullFields []string `json:"-"`
  1064  }
  1065  
  1066  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1067  	type NoMethod TestIamPermissionsResponse
  1068  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1069  }
  1070  
  1071  // Version: The body of a version resource. A version resource represents a
  1072  // collection of components, such as files and other data. This may correspond
  1073  // to a version in many package management schemes.
  1074  type Version struct {
  1075  	// CreateTime: The time when the version was created.
  1076  	CreateTime string `json:"createTime,omitempty"`
  1077  	// Description: Optional. Description of the version, as specified in its
  1078  	// metadata.
  1079  	Description string `json:"description,omitempty"`
  1080  	// Name: The name of the version, for example:
  1081  	// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/
  1082  	// art1". If the package or version ID parts contain slashes, the slashes are
  1083  	// escaped.
  1084  	Name string `json:"name,omitempty"`
  1085  	// RelatedTags: Output only. A list of related tags. Will contain up to 100
  1086  	// tags that reference this version.
  1087  	RelatedTags []*Tag `json:"relatedTags,omitempty"`
  1088  	// UpdateTime: The time when the version was last updated.
  1089  	UpdateTime string `json:"updateTime,omitempty"`
  1090  
  1091  	// ServerResponse contains the HTTP response code and headers from the server.
  1092  	googleapi.ServerResponse `json:"-"`
  1093  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1094  	// unconditionally include in API requests. By default, fields with empty or
  1095  	// default values are omitted from API requests. See
  1096  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1097  	// details.
  1098  	ForceSendFields []string `json:"-"`
  1099  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1100  	// requests with the JSON null value. By default, fields with empty values are
  1101  	// omitted from API requests. See
  1102  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1103  	NullFields []string `json:"-"`
  1104  }
  1105  
  1106  func (s *Version) MarshalJSON() ([]byte, error) {
  1107  	type NoMethod Version
  1108  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1109  }
  1110  
  1111  type ProjectsLocationsGetCall struct {
  1112  	s            *Service
  1113  	name         string
  1114  	urlParams_   gensupport.URLParams
  1115  	ifNoneMatch_ string
  1116  	ctx_         context.Context
  1117  	header_      http.Header
  1118  }
  1119  
  1120  // Get: Gets information about a location.
  1121  //
  1122  // - name: Resource name for the location.
  1123  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1124  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1125  	c.name = name
  1126  	return c
  1127  }
  1128  
  1129  // Fields allows partial responses to be retrieved. See
  1130  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1131  // details.
  1132  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1133  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1134  	return c
  1135  }
  1136  
  1137  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1138  // object's ETag matches the given value. This is useful for getting updates
  1139  // only after the object has changed since the last request.
  1140  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1141  	c.ifNoneMatch_ = entityTag
  1142  	return c
  1143  }
  1144  
  1145  // Context sets the context to be used in this call's Do method.
  1146  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1147  	c.ctx_ = ctx
  1148  	return c
  1149  }
  1150  
  1151  // Header returns a http.Header that can be modified by the caller to add
  1152  // headers to the request.
  1153  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1154  	if c.header_ == nil {
  1155  		c.header_ = make(http.Header)
  1156  	}
  1157  	return c.header_
  1158  }
  1159  
  1160  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1161  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1162  	if c.ifNoneMatch_ != "" {
  1163  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1164  	}
  1165  	var body io.Reader = nil
  1166  	c.urlParams_.Set("alt", alt)
  1167  	c.urlParams_.Set("prettyPrint", "false")
  1168  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1169  	urls += "?" + c.urlParams_.Encode()
  1170  	req, err := http.NewRequest("GET", urls, body)
  1171  	if err != nil {
  1172  		return nil, err
  1173  	}
  1174  	req.Header = reqHeaders
  1175  	googleapi.Expand(req.URL, map[string]string{
  1176  		"name": c.name,
  1177  	})
  1178  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1179  }
  1180  
  1181  // Do executes the "artifactregistry.projects.locations.get" call.
  1182  // Any non-2xx status code is an error. Response headers are in either
  1183  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1184  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1185  // whether the returned error was because http.StatusNotModified was returned.
  1186  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1187  	gensupport.SetOptions(c.urlParams_, opts...)
  1188  	res, err := c.doRequest("json")
  1189  	if res != nil && res.StatusCode == http.StatusNotModified {
  1190  		if res.Body != nil {
  1191  			res.Body.Close()
  1192  		}
  1193  		return nil, gensupport.WrapError(&googleapi.Error{
  1194  			Code:   res.StatusCode,
  1195  			Header: res.Header,
  1196  		})
  1197  	}
  1198  	if err != nil {
  1199  		return nil, err
  1200  	}
  1201  	defer googleapi.CloseBody(res)
  1202  	if err := googleapi.CheckResponse(res); err != nil {
  1203  		return nil, gensupport.WrapError(err)
  1204  	}
  1205  	ret := &Location{
  1206  		ServerResponse: googleapi.ServerResponse{
  1207  			Header:         res.Header,
  1208  			HTTPStatusCode: res.StatusCode,
  1209  		},
  1210  	}
  1211  	target := &ret
  1212  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1213  		return nil, err
  1214  	}
  1215  	return ret, nil
  1216  }
  1217  
  1218  type ProjectsLocationsListCall struct {
  1219  	s            *Service
  1220  	name         string
  1221  	urlParams_   gensupport.URLParams
  1222  	ifNoneMatch_ string
  1223  	ctx_         context.Context
  1224  	header_      http.Header
  1225  }
  1226  
  1227  // List: Lists information about the supported locations for this service.
  1228  //
  1229  // - name: The resource that owns the locations collection, if applicable.
  1230  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1231  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1232  	c.name = name
  1233  	return c
  1234  }
  1235  
  1236  // Filter sets the optional parameter "filter": A filter to narrow down results
  1237  // to a preferred subset. The filtering language accepts strings like
  1238  // "displayName=tokyo", and is documented in more detail in AIP-160
  1239  // (https://google.aip.dev/160).
  1240  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1241  	c.urlParams_.Set("filter", filter)
  1242  	return c
  1243  }
  1244  
  1245  // PageSize sets the optional parameter "pageSize": The maximum number of
  1246  // results to return. If not set, the service selects a default.
  1247  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1248  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1249  	return c
  1250  }
  1251  
  1252  // PageToken sets the optional parameter "pageToken": A page token received
  1253  // from the `next_page_token` field in the response. Send that page token to
  1254  // receive the subsequent page.
  1255  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1256  	c.urlParams_.Set("pageToken", pageToken)
  1257  	return c
  1258  }
  1259  
  1260  // Fields allows partial responses to be retrieved. See
  1261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1262  // details.
  1263  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1265  	return c
  1266  }
  1267  
  1268  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1269  // object's ETag matches the given value. This is useful for getting updates
  1270  // only after the object has changed since the last request.
  1271  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1272  	c.ifNoneMatch_ = entityTag
  1273  	return c
  1274  }
  1275  
  1276  // Context sets the context to be used in this call's Do method.
  1277  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1278  	c.ctx_ = ctx
  1279  	return c
  1280  }
  1281  
  1282  // Header returns a http.Header that can be modified by the caller to add
  1283  // headers to the request.
  1284  func (c *ProjectsLocationsListCall) Header() http.Header {
  1285  	if c.header_ == nil {
  1286  		c.header_ = make(http.Header)
  1287  	}
  1288  	return c.header_
  1289  }
  1290  
  1291  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1293  	if c.ifNoneMatch_ != "" {
  1294  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1295  	}
  1296  	var body io.Reader = nil
  1297  	c.urlParams_.Set("alt", alt)
  1298  	c.urlParams_.Set("prettyPrint", "false")
  1299  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
  1300  	urls += "?" + c.urlParams_.Encode()
  1301  	req, err := http.NewRequest("GET", urls, body)
  1302  	if err != nil {
  1303  		return nil, err
  1304  	}
  1305  	req.Header = reqHeaders
  1306  	googleapi.Expand(req.URL, map[string]string{
  1307  		"name": c.name,
  1308  	})
  1309  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1310  }
  1311  
  1312  // Do executes the "artifactregistry.projects.locations.list" call.
  1313  // Any non-2xx status code is an error. Response headers are in either
  1314  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1315  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1316  // check whether the returned error was because http.StatusNotModified was
  1317  // returned.
  1318  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1319  	gensupport.SetOptions(c.urlParams_, opts...)
  1320  	res, err := c.doRequest("json")
  1321  	if res != nil && res.StatusCode == http.StatusNotModified {
  1322  		if res.Body != nil {
  1323  			res.Body.Close()
  1324  		}
  1325  		return nil, gensupport.WrapError(&googleapi.Error{
  1326  			Code:   res.StatusCode,
  1327  			Header: res.Header,
  1328  		})
  1329  	}
  1330  	if err != nil {
  1331  		return nil, err
  1332  	}
  1333  	defer googleapi.CloseBody(res)
  1334  	if err := googleapi.CheckResponse(res); err != nil {
  1335  		return nil, gensupport.WrapError(err)
  1336  	}
  1337  	ret := &ListLocationsResponse{
  1338  		ServerResponse: googleapi.ServerResponse{
  1339  			Header:         res.Header,
  1340  			HTTPStatusCode: res.StatusCode,
  1341  		},
  1342  	}
  1343  	target := &ret
  1344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1345  		return nil, err
  1346  	}
  1347  	return ret, nil
  1348  }
  1349  
  1350  // Pages invokes f for each page of results.
  1351  // A non-nil error returned from f will halt the iteration.
  1352  // The provided context supersedes any context provided to the Context method.
  1353  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1354  	c.ctx_ = ctx
  1355  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1356  	for {
  1357  		x, err := c.Do()
  1358  		if err != nil {
  1359  			return err
  1360  		}
  1361  		if err := f(x); err != nil {
  1362  			return err
  1363  		}
  1364  		if x.NextPageToken == "" {
  1365  			return nil
  1366  		}
  1367  		c.PageToken(x.NextPageToken)
  1368  	}
  1369  }
  1370  
  1371  type ProjectsLocationsOperationsGetCall struct {
  1372  	s            *Service
  1373  	name         string
  1374  	urlParams_   gensupport.URLParams
  1375  	ifNoneMatch_ string
  1376  	ctx_         context.Context
  1377  	header_      http.Header
  1378  }
  1379  
  1380  // Get: Gets the latest state of a long-running operation. Clients can use this
  1381  // method to poll the operation result at intervals as recommended by the API
  1382  // service.
  1383  //
  1384  // - name: The name of the operation resource.
  1385  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  1386  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1387  	c.name = name
  1388  	return c
  1389  }
  1390  
  1391  // Fields allows partial responses to be retrieved. See
  1392  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1393  // details.
  1394  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  1395  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1396  	return c
  1397  }
  1398  
  1399  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1400  // object's ETag matches the given value. This is useful for getting updates
  1401  // only after the object has changed since the last request.
  1402  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  1403  	c.ifNoneMatch_ = entityTag
  1404  	return c
  1405  }
  1406  
  1407  // Context sets the context to be used in this call's Do method.
  1408  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  1409  	c.ctx_ = ctx
  1410  	return c
  1411  }
  1412  
  1413  // Header returns a http.Header that can be modified by the caller to add
  1414  // headers to the request.
  1415  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  1416  	if c.header_ == nil {
  1417  		c.header_ = make(http.Header)
  1418  	}
  1419  	return c.header_
  1420  }
  1421  
  1422  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  1423  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1424  	if c.ifNoneMatch_ != "" {
  1425  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1426  	}
  1427  	var body io.Reader = nil
  1428  	c.urlParams_.Set("alt", alt)
  1429  	c.urlParams_.Set("prettyPrint", "false")
  1430  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1431  	urls += "?" + c.urlParams_.Encode()
  1432  	req, err := http.NewRequest("GET", urls, body)
  1433  	if err != nil {
  1434  		return nil, err
  1435  	}
  1436  	req.Header = reqHeaders
  1437  	googleapi.Expand(req.URL, map[string]string{
  1438  		"name": c.name,
  1439  	})
  1440  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1441  }
  1442  
  1443  // Do executes the "artifactregistry.projects.locations.operations.get" call.
  1444  // Any non-2xx status code is an error. Response headers are in either
  1445  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1446  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1447  // whether the returned error was because http.StatusNotModified was returned.
  1448  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1449  	gensupport.SetOptions(c.urlParams_, opts...)
  1450  	res, err := c.doRequest("json")
  1451  	if res != nil && res.StatusCode == http.StatusNotModified {
  1452  		if res.Body != nil {
  1453  			res.Body.Close()
  1454  		}
  1455  		return nil, gensupport.WrapError(&googleapi.Error{
  1456  			Code:   res.StatusCode,
  1457  			Header: res.Header,
  1458  		})
  1459  	}
  1460  	if err != nil {
  1461  		return nil, err
  1462  	}
  1463  	defer googleapi.CloseBody(res)
  1464  	if err := googleapi.CheckResponse(res); err != nil {
  1465  		return nil, gensupport.WrapError(err)
  1466  	}
  1467  	ret := &Operation{
  1468  		ServerResponse: googleapi.ServerResponse{
  1469  			Header:         res.Header,
  1470  			HTTPStatusCode: res.StatusCode,
  1471  		},
  1472  	}
  1473  	target := &ret
  1474  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1475  		return nil, err
  1476  	}
  1477  	return ret, nil
  1478  }
  1479  
  1480  type ProjectsLocationsRepositoriesCreateCall struct {
  1481  	s          *Service
  1482  	parent     string
  1483  	repository *Repository
  1484  	urlParams_ gensupport.URLParams
  1485  	ctx_       context.Context
  1486  	header_    http.Header
  1487  }
  1488  
  1489  // Create: Creates a repository. The returned Operation will finish once the
  1490  // repository has been created. Its response will be the created Repository.
  1491  //
  1492  //   - parent: The name of the parent resource where the repository will be
  1493  //     created.
  1494  func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall {
  1495  	c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1496  	c.parent = parent
  1497  	c.repository = repository
  1498  	return c
  1499  }
  1500  
  1501  // RepositoryId sets the optional parameter "repositoryId": Required. The
  1502  // repository id to use for this repository.
  1503  func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall {
  1504  	c.urlParams_.Set("repositoryId", repositoryId)
  1505  	return c
  1506  }
  1507  
  1508  // Fields allows partial responses to be retrieved. See
  1509  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1510  // details.
  1511  func (c *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall {
  1512  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1513  	return c
  1514  }
  1515  
  1516  // Context sets the context to be used in this call's Do method.
  1517  func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall {
  1518  	c.ctx_ = ctx
  1519  	return c
  1520  }
  1521  
  1522  // Header returns a http.Header that can be modified by the caller to add
  1523  // headers to the request.
  1524  func (c *ProjectsLocationsRepositoriesCreateCall) Header() http.Header {
  1525  	if c.header_ == nil {
  1526  		c.header_ = make(http.Header)
  1527  	}
  1528  	return c.header_
  1529  }
  1530  
  1531  func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) {
  1532  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1533  	var body io.Reader = nil
  1534  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  1535  	if err != nil {
  1536  		return nil, err
  1537  	}
  1538  	c.urlParams_.Set("alt", alt)
  1539  	c.urlParams_.Set("prettyPrint", "false")
  1540  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories")
  1541  	urls += "?" + c.urlParams_.Encode()
  1542  	req, err := http.NewRequest("POST", urls, body)
  1543  	if err != nil {
  1544  		return nil, err
  1545  	}
  1546  	req.Header = reqHeaders
  1547  	googleapi.Expand(req.URL, map[string]string{
  1548  		"parent": c.parent,
  1549  	})
  1550  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1551  }
  1552  
  1553  // Do executes the "artifactregistry.projects.locations.repositories.create" call.
  1554  // Any non-2xx status code is an error. Response headers are in either
  1555  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1556  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1557  // whether the returned error was because http.StatusNotModified was returned.
  1558  func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1559  	gensupport.SetOptions(c.urlParams_, opts...)
  1560  	res, err := c.doRequest("json")
  1561  	if res != nil && res.StatusCode == http.StatusNotModified {
  1562  		if res.Body != nil {
  1563  			res.Body.Close()
  1564  		}
  1565  		return nil, gensupport.WrapError(&googleapi.Error{
  1566  			Code:   res.StatusCode,
  1567  			Header: res.Header,
  1568  		})
  1569  	}
  1570  	if err != nil {
  1571  		return nil, err
  1572  	}
  1573  	defer googleapi.CloseBody(res)
  1574  	if err := googleapi.CheckResponse(res); err != nil {
  1575  		return nil, gensupport.WrapError(err)
  1576  	}
  1577  	ret := &Operation{
  1578  		ServerResponse: googleapi.ServerResponse{
  1579  			Header:         res.Header,
  1580  			HTTPStatusCode: res.StatusCode,
  1581  		},
  1582  	}
  1583  	target := &ret
  1584  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1585  		return nil, err
  1586  	}
  1587  	return ret, nil
  1588  }
  1589  
  1590  type ProjectsLocationsRepositoriesDeleteCall struct {
  1591  	s          *Service
  1592  	name       string
  1593  	urlParams_ gensupport.URLParams
  1594  	ctx_       context.Context
  1595  	header_    http.Header
  1596  }
  1597  
  1598  // Delete: Deletes a repository and all of its contents. The returned Operation
  1599  // will finish once the repository has been deleted. It will not have any
  1600  // Operation metadata and will return a google.protobuf.Empty response.
  1601  //
  1602  // - name: The name of the repository to delete.
  1603  func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall {
  1604  	c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1605  	c.name = name
  1606  	return c
  1607  }
  1608  
  1609  // Fields allows partial responses to be retrieved. See
  1610  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1611  // details.
  1612  func (c *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall {
  1613  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1614  	return c
  1615  }
  1616  
  1617  // Context sets the context to be used in this call's Do method.
  1618  func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall {
  1619  	c.ctx_ = ctx
  1620  	return c
  1621  }
  1622  
  1623  // Header returns a http.Header that can be modified by the caller to add
  1624  // headers to the request.
  1625  func (c *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header {
  1626  	if c.header_ == nil {
  1627  		c.header_ = make(http.Header)
  1628  	}
  1629  	return c.header_
  1630  }
  1631  
  1632  func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1633  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1634  	var body io.Reader = nil
  1635  	c.urlParams_.Set("alt", alt)
  1636  	c.urlParams_.Set("prettyPrint", "false")
  1637  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1638  	urls += "?" + c.urlParams_.Encode()
  1639  	req, err := http.NewRequest("DELETE", urls, body)
  1640  	if err != nil {
  1641  		return nil, err
  1642  	}
  1643  	req.Header = reqHeaders
  1644  	googleapi.Expand(req.URL, map[string]string{
  1645  		"name": c.name,
  1646  	})
  1647  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1648  }
  1649  
  1650  // Do executes the "artifactregistry.projects.locations.repositories.delete" call.
  1651  // Any non-2xx status code is an error. Response headers are in either
  1652  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1653  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1654  // whether the returned error was because http.StatusNotModified was returned.
  1655  func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1656  	gensupport.SetOptions(c.urlParams_, opts...)
  1657  	res, err := c.doRequest("json")
  1658  	if res != nil && res.StatusCode == http.StatusNotModified {
  1659  		if res.Body != nil {
  1660  			res.Body.Close()
  1661  		}
  1662  		return nil, gensupport.WrapError(&googleapi.Error{
  1663  			Code:   res.StatusCode,
  1664  			Header: res.Header,
  1665  		})
  1666  	}
  1667  	if err != nil {
  1668  		return nil, err
  1669  	}
  1670  	defer googleapi.CloseBody(res)
  1671  	if err := googleapi.CheckResponse(res); err != nil {
  1672  		return nil, gensupport.WrapError(err)
  1673  	}
  1674  	ret := &Operation{
  1675  		ServerResponse: googleapi.ServerResponse{
  1676  			Header:         res.Header,
  1677  			HTTPStatusCode: res.StatusCode,
  1678  		},
  1679  	}
  1680  	target := &ret
  1681  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1682  		return nil, err
  1683  	}
  1684  	return ret, nil
  1685  }
  1686  
  1687  type ProjectsLocationsRepositoriesGetCall struct {
  1688  	s            *Service
  1689  	name         string
  1690  	urlParams_   gensupport.URLParams
  1691  	ifNoneMatch_ string
  1692  	ctx_         context.Context
  1693  	header_      http.Header
  1694  }
  1695  
  1696  // Get: Gets a repository.
  1697  //
  1698  // - name: The name of the repository to retrieve.
  1699  func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall {
  1700  	c := &ProjectsLocationsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1701  	c.name = name
  1702  	return c
  1703  }
  1704  
  1705  // Fields allows partial responses to be retrieved. See
  1706  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1707  // details.
  1708  func (c *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall {
  1709  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1710  	return c
  1711  }
  1712  
  1713  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1714  // object's ETag matches the given value. This is useful for getting updates
  1715  // only after the object has changed since the last request.
  1716  func (c *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall {
  1717  	c.ifNoneMatch_ = entityTag
  1718  	return c
  1719  }
  1720  
  1721  // Context sets the context to be used in this call's Do method.
  1722  func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall {
  1723  	c.ctx_ = ctx
  1724  	return c
  1725  }
  1726  
  1727  // Header returns a http.Header that can be modified by the caller to add
  1728  // headers to the request.
  1729  func (c *ProjectsLocationsRepositoriesGetCall) Header() http.Header {
  1730  	if c.header_ == nil {
  1731  		c.header_ = make(http.Header)
  1732  	}
  1733  	return c.header_
  1734  }
  1735  
  1736  func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) {
  1737  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1738  	if c.ifNoneMatch_ != "" {
  1739  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1740  	}
  1741  	var body io.Reader = nil
  1742  	c.urlParams_.Set("alt", alt)
  1743  	c.urlParams_.Set("prettyPrint", "false")
  1744  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1745  	urls += "?" + c.urlParams_.Encode()
  1746  	req, err := http.NewRequest("GET", urls, body)
  1747  	if err != nil {
  1748  		return nil, err
  1749  	}
  1750  	req.Header = reqHeaders
  1751  	googleapi.Expand(req.URL, map[string]string{
  1752  		"name": c.name,
  1753  	})
  1754  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1755  }
  1756  
  1757  // Do executes the "artifactregistry.projects.locations.repositories.get" call.
  1758  // Any non-2xx status code is an error. Response headers are in either
  1759  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  1760  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1761  // whether the returned error was because http.StatusNotModified was returned.
  1762  func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  1763  	gensupport.SetOptions(c.urlParams_, opts...)
  1764  	res, err := c.doRequest("json")
  1765  	if res != nil && res.StatusCode == http.StatusNotModified {
  1766  		if res.Body != nil {
  1767  			res.Body.Close()
  1768  		}
  1769  		return nil, gensupport.WrapError(&googleapi.Error{
  1770  			Code:   res.StatusCode,
  1771  			Header: res.Header,
  1772  		})
  1773  	}
  1774  	if err != nil {
  1775  		return nil, err
  1776  	}
  1777  	defer googleapi.CloseBody(res)
  1778  	if err := googleapi.CheckResponse(res); err != nil {
  1779  		return nil, gensupport.WrapError(err)
  1780  	}
  1781  	ret := &Repository{
  1782  		ServerResponse: googleapi.ServerResponse{
  1783  			Header:         res.Header,
  1784  			HTTPStatusCode: res.StatusCode,
  1785  		},
  1786  	}
  1787  	target := &ret
  1788  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1789  		return nil, err
  1790  	}
  1791  	return ret, nil
  1792  }
  1793  
  1794  type ProjectsLocationsRepositoriesGetIamPolicyCall struct {
  1795  	s            *Service
  1796  	resource     string
  1797  	urlParams_   gensupport.URLParams
  1798  	ifNoneMatch_ string
  1799  	ctx_         context.Context
  1800  	header_      http.Header
  1801  }
  1802  
  1803  // GetIamPolicy: Gets the IAM policy for a given resource.
  1804  //
  1805  //   - resource: REQUIRED: The resource for which the policy is being requested.
  1806  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  1807  //     for the appropriate value for this field.
  1808  func (r *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  1809  	c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1810  	c.resource = resource
  1811  	return c
  1812  }
  1813  
  1814  // OptionsRequestedPolicyVersion sets the optional parameter
  1815  // "options.requestedPolicyVersion": The maximum policy version that will be
  1816  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  1817  // an invalid value will be rejected. Requests for policies with any
  1818  // conditional role bindings must specify version 3. Policies with no
  1819  // conditional role bindings may specify any valid value or leave the field
  1820  // unset. The policy in the response might use the policy version that you
  1821  // specified, or it might use a lower policy version. For example, if you
  1822  // specify version 3, but the policy has no conditional role bindings, the
  1823  // response uses version 1. To learn which resources support conditions in
  1824  // their IAM policies, see the IAM documentation
  1825  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  1826  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  1827  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  1828  	return c
  1829  }
  1830  
  1831  // Fields allows partial responses to be retrieved. See
  1832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1833  // details.
  1834  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  1835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1836  	return c
  1837  }
  1838  
  1839  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1840  // object's ETag matches the given value. This is useful for getting updates
  1841  // only after the object has changed since the last request.
  1842  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  1843  	c.ifNoneMatch_ = entityTag
  1844  	return c
  1845  }
  1846  
  1847  // Context sets the context to be used in this call's Do method.
  1848  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall {
  1849  	c.ctx_ = ctx
  1850  	return c
  1851  }
  1852  
  1853  // Header returns a http.Header that can be modified by the caller to add
  1854  // headers to the request.
  1855  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header {
  1856  	if c.header_ == nil {
  1857  		c.header_ = make(http.Header)
  1858  	}
  1859  	return c.header_
  1860  }
  1861  
  1862  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1863  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1864  	if c.ifNoneMatch_ != "" {
  1865  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1866  	}
  1867  	var body io.Reader = nil
  1868  	c.urlParams_.Set("alt", alt)
  1869  	c.urlParams_.Set("prettyPrint", "false")
  1870  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  1871  	urls += "?" + c.urlParams_.Encode()
  1872  	req, err := http.NewRequest("GET", urls, body)
  1873  	if err != nil {
  1874  		return nil, err
  1875  	}
  1876  	req.Header = reqHeaders
  1877  	googleapi.Expand(req.URL, map[string]string{
  1878  		"resource": c.resource,
  1879  	})
  1880  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1881  }
  1882  
  1883  // Do executes the "artifactregistry.projects.locations.repositories.getIamPolicy" call.
  1884  // Any non-2xx status code is an error. Response headers are in either
  1885  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  1886  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1887  // whether the returned error was because http.StatusNotModified was returned.
  1888  func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1889  	gensupport.SetOptions(c.urlParams_, opts...)
  1890  	res, err := c.doRequest("json")
  1891  	if res != nil && res.StatusCode == http.StatusNotModified {
  1892  		if res.Body != nil {
  1893  			res.Body.Close()
  1894  		}
  1895  		return nil, gensupport.WrapError(&googleapi.Error{
  1896  			Code:   res.StatusCode,
  1897  			Header: res.Header,
  1898  		})
  1899  	}
  1900  	if err != nil {
  1901  		return nil, err
  1902  	}
  1903  	defer googleapi.CloseBody(res)
  1904  	if err := googleapi.CheckResponse(res); err != nil {
  1905  		return nil, gensupport.WrapError(err)
  1906  	}
  1907  	ret := &Policy{
  1908  		ServerResponse: googleapi.ServerResponse{
  1909  			Header:         res.Header,
  1910  			HTTPStatusCode: res.StatusCode,
  1911  		},
  1912  	}
  1913  	target := &ret
  1914  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1915  		return nil, err
  1916  	}
  1917  	return ret, nil
  1918  }
  1919  
  1920  type ProjectsLocationsRepositoriesListCall struct {
  1921  	s            *Service
  1922  	parent       string
  1923  	urlParams_   gensupport.URLParams
  1924  	ifNoneMatch_ string
  1925  	ctx_         context.Context
  1926  	header_      http.Header
  1927  }
  1928  
  1929  // List: Lists repositories.
  1930  //
  1931  // - parent: The name of the parent resource whose repositories will be listed.
  1932  func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall {
  1933  	c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1934  	c.parent = parent
  1935  	return c
  1936  }
  1937  
  1938  // PageSize sets the optional parameter "pageSize": The maximum number of
  1939  // repositories to return. Maximum page size is 1,000.
  1940  func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall {
  1941  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1942  	return c
  1943  }
  1944  
  1945  // PageToken sets the optional parameter "pageToken": The next_page_token value
  1946  // returned from a previous list request, if any.
  1947  func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall {
  1948  	c.urlParams_.Set("pageToken", pageToken)
  1949  	return c
  1950  }
  1951  
  1952  // Fields allows partial responses to be retrieved. See
  1953  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1954  // details.
  1955  func (c *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall {
  1956  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1957  	return c
  1958  }
  1959  
  1960  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1961  // object's ETag matches the given value. This is useful for getting updates
  1962  // only after the object has changed since the last request.
  1963  func (c *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall {
  1964  	c.ifNoneMatch_ = entityTag
  1965  	return c
  1966  }
  1967  
  1968  // Context sets the context to be used in this call's Do method.
  1969  func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall {
  1970  	c.ctx_ = ctx
  1971  	return c
  1972  }
  1973  
  1974  // Header returns a http.Header that can be modified by the caller to add
  1975  // headers to the request.
  1976  func (c *ProjectsLocationsRepositoriesListCall) Header() http.Header {
  1977  	if c.header_ == nil {
  1978  		c.header_ = make(http.Header)
  1979  	}
  1980  	return c.header_
  1981  }
  1982  
  1983  func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) {
  1984  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1985  	if c.ifNoneMatch_ != "" {
  1986  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1987  	}
  1988  	var body io.Reader = nil
  1989  	c.urlParams_.Set("alt", alt)
  1990  	c.urlParams_.Set("prettyPrint", "false")
  1991  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories")
  1992  	urls += "?" + c.urlParams_.Encode()
  1993  	req, err := http.NewRequest("GET", urls, body)
  1994  	if err != nil {
  1995  		return nil, err
  1996  	}
  1997  	req.Header = reqHeaders
  1998  	googleapi.Expand(req.URL, map[string]string{
  1999  		"parent": c.parent,
  2000  	})
  2001  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2002  }
  2003  
  2004  // Do executes the "artifactregistry.projects.locations.repositories.list" call.
  2005  // Any non-2xx status code is an error. Response headers are in either
  2006  // *ListRepositoriesResponse.ServerResponse.Header or (if a response was
  2007  // returned at all) in error.(*googleapi.Error).Header. Use
  2008  // googleapi.IsNotModified to check whether the returned error was because
  2009  // http.StatusNotModified was returned.
  2010  func (c *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) {
  2011  	gensupport.SetOptions(c.urlParams_, opts...)
  2012  	res, err := c.doRequest("json")
  2013  	if res != nil && res.StatusCode == http.StatusNotModified {
  2014  		if res.Body != nil {
  2015  			res.Body.Close()
  2016  		}
  2017  		return nil, gensupport.WrapError(&googleapi.Error{
  2018  			Code:   res.StatusCode,
  2019  			Header: res.Header,
  2020  		})
  2021  	}
  2022  	if err != nil {
  2023  		return nil, err
  2024  	}
  2025  	defer googleapi.CloseBody(res)
  2026  	if err := googleapi.CheckResponse(res); err != nil {
  2027  		return nil, gensupport.WrapError(err)
  2028  	}
  2029  	ret := &ListRepositoriesResponse{
  2030  		ServerResponse: googleapi.ServerResponse{
  2031  			Header:         res.Header,
  2032  			HTTPStatusCode: res.StatusCode,
  2033  		},
  2034  	}
  2035  	target := &ret
  2036  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2037  		return nil, err
  2038  	}
  2039  	return ret, nil
  2040  }
  2041  
  2042  // Pages invokes f for each page of results.
  2043  // A non-nil error returned from f will halt the iteration.
  2044  // The provided context supersedes any context provided to the Context method.
  2045  func (c *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error {
  2046  	c.ctx_ = ctx
  2047  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2048  	for {
  2049  		x, err := c.Do()
  2050  		if err != nil {
  2051  			return err
  2052  		}
  2053  		if err := f(x); err != nil {
  2054  			return err
  2055  		}
  2056  		if x.NextPageToken == "" {
  2057  			return nil
  2058  		}
  2059  		c.PageToken(x.NextPageToken)
  2060  	}
  2061  }
  2062  
  2063  type ProjectsLocationsRepositoriesPatchCall struct {
  2064  	s          *Service
  2065  	name       string
  2066  	repository *Repository
  2067  	urlParams_ gensupport.URLParams
  2068  	ctx_       context.Context
  2069  	header_    http.Header
  2070  }
  2071  
  2072  // Patch: Updates a repository.
  2073  //
  2074  //   - name: The name of the repository, for example:
  2075  //     `projects/p1/locations/us-central1/repositories/repo1`. For each location
  2076  //     in a project, repository names must be unique.
  2077  func (r *ProjectsLocationsRepositoriesService) Patch(name string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall {
  2078  	c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2079  	c.name = name
  2080  	c.repository = repository
  2081  	return c
  2082  }
  2083  
  2084  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  2085  // to the resource. For the `FieldMask` definition, see
  2086  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  2087  func (c *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall {
  2088  	c.urlParams_.Set("updateMask", updateMask)
  2089  	return c
  2090  }
  2091  
  2092  // Fields allows partial responses to be retrieved. See
  2093  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2094  // details.
  2095  func (c *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall {
  2096  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2097  	return c
  2098  }
  2099  
  2100  // Context sets the context to be used in this call's Do method.
  2101  func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall {
  2102  	c.ctx_ = ctx
  2103  	return c
  2104  }
  2105  
  2106  // Header returns a http.Header that can be modified by the caller to add
  2107  // headers to the request.
  2108  func (c *ProjectsLocationsRepositoriesPatchCall) Header() http.Header {
  2109  	if c.header_ == nil {
  2110  		c.header_ = make(http.Header)
  2111  	}
  2112  	return c.header_
  2113  }
  2114  
  2115  func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) {
  2116  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2117  	var body io.Reader = nil
  2118  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository)
  2119  	if err != nil {
  2120  		return nil, err
  2121  	}
  2122  	c.urlParams_.Set("alt", alt)
  2123  	c.urlParams_.Set("prettyPrint", "false")
  2124  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2125  	urls += "?" + c.urlParams_.Encode()
  2126  	req, err := http.NewRequest("PATCH", urls, body)
  2127  	if err != nil {
  2128  		return nil, err
  2129  	}
  2130  	req.Header = reqHeaders
  2131  	googleapi.Expand(req.URL, map[string]string{
  2132  		"name": c.name,
  2133  	})
  2134  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2135  }
  2136  
  2137  // Do executes the "artifactregistry.projects.locations.repositories.patch" call.
  2138  // Any non-2xx status code is an error. Response headers are in either
  2139  // *Repository.ServerResponse.Header or (if a response was returned at all) in
  2140  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2141  // whether the returned error was because http.StatusNotModified was returned.
  2142  func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption) (*Repository, error) {
  2143  	gensupport.SetOptions(c.urlParams_, opts...)
  2144  	res, err := c.doRequest("json")
  2145  	if res != nil && res.StatusCode == http.StatusNotModified {
  2146  		if res.Body != nil {
  2147  			res.Body.Close()
  2148  		}
  2149  		return nil, gensupport.WrapError(&googleapi.Error{
  2150  			Code:   res.StatusCode,
  2151  			Header: res.Header,
  2152  		})
  2153  	}
  2154  	if err != nil {
  2155  		return nil, err
  2156  	}
  2157  	defer googleapi.CloseBody(res)
  2158  	if err := googleapi.CheckResponse(res); err != nil {
  2159  		return nil, gensupport.WrapError(err)
  2160  	}
  2161  	ret := &Repository{
  2162  		ServerResponse: googleapi.ServerResponse{
  2163  			Header:         res.Header,
  2164  			HTTPStatusCode: res.StatusCode,
  2165  		},
  2166  	}
  2167  	target := &ret
  2168  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2169  		return nil, err
  2170  	}
  2171  	return ret, nil
  2172  }
  2173  
  2174  type ProjectsLocationsRepositoriesSetIamPolicyCall struct {
  2175  	s                   *Service
  2176  	resource            string
  2177  	setiampolicyrequest *SetIamPolicyRequest
  2178  	urlParams_          gensupport.URLParams
  2179  	ctx_                context.Context
  2180  	header_             http.Header
  2181  }
  2182  
  2183  // SetIamPolicy: Updates the IAM policy for a given resource.
  2184  //
  2185  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2186  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2187  //     for the appropriate value for this field.
  2188  func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2189  	c := &ProjectsLocationsRepositoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2190  	c.resource = resource
  2191  	c.setiampolicyrequest = setiampolicyrequest
  2192  	return c
  2193  }
  2194  
  2195  // Fields allows partial responses to be retrieved. See
  2196  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2197  // details.
  2198  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2199  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2200  	return c
  2201  }
  2202  
  2203  // Context sets the context to be used in this call's Do method.
  2204  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall {
  2205  	c.ctx_ = ctx
  2206  	return c
  2207  }
  2208  
  2209  // Header returns a http.Header that can be modified by the caller to add
  2210  // headers to the request.
  2211  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header {
  2212  	if c.header_ == nil {
  2213  		c.header_ = make(http.Header)
  2214  	}
  2215  	return c.header_
  2216  }
  2217  
  2218  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2219  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2220  	var body io.Reader = nil
  2221  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2222  	if err != nil {
  2223  		return nil, err
  2224  	}
  2225  	c.urlParams_.Set("alt", alt)
  2226  	c.urlParams_.Set("prettyPrint", "false")
  2227  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  2228  	urls += "?" + c.urlParams_.Encode()
  2229  	req, err := http.NewRequest("POST", urls, body)
  2230  	if err != nil {
  2231  		return nil, err
  2232  	}
  2233  	req.Header = reqHeaders
  2234  	googleapi.Expand(req.URL, map[string]string{
  2235  		"resource": c.resource,
  2236  	})
  2237  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2238  }
  2239  
  2240  // Do executes the "artifactregistry.projects.locations.repositories.setIamPolicy" call.
  2241  // Any non-2xx status code is an error. Response headers are in either
  2242  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2243  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2244  // whether the returned error was because http.StatusNotModified was returned.
  2245  func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2246  	gensupport.SetOptions(c.urlParams_, opts...)
  2247  	res, err := c.doRequest("json")
  2248  	if res != nil && res.StatusCode == http.StatusNotModified {
  2249  		if res.Body != nil {
  2250  			res.Body.Close()
  2251  		}
  2252  		return nil, gensupport.WrapError(&googleapi.Error{
  2253  			Code:   res.StatusCode,
  2254  			Header: res.Header,
  2255  		})
  2256  	}
  2257  	if err != nil {
  2258  		return nil, err
  2259  	}
  2260  	defer googleapi.CloseBody(res)
  2261  	if err := googleapi.CheckResponse(res); err != nil {
  2262  		return nil, gensupport.WrapError(err)
  2263  	}
  2264  	ret := &Policy{
  2265  		ServerResponse: googleapi.ServerResponse{
  2266  			Header:         res.Header,
  2267  			HTTPStatusCode: res.StatusCode,
  2268  		},
  2269  	}
  2270  	target := &ret
  2271  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2272  		return nil, err
  2273  	}
  2274  	return ret, nil
  2275  }
  2276  
  2277  type ProjectsLocationsRepositoriesTestIamPermissionsCall struct {
  2278  	s                         *Service
  2279  	resource                  string
  2280  	testiampermissionsrequest *TestIamPermissionsRequest
  2281  	urlParams_                gensupport.URLParams
  2282  	ctx_                      context.Context
  2283  	header_                   http.Header
  2284  }
  2285  
  2286  // TestIamPermissions: Tests if the caller has a list of permissions on a
  2287  // resource.
  2288  //
  2289  //   - resource: REQUIRED: The resource for which the policy detail is being
  2290  //     requested. See Resource names
  2291  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2292  //     value for this field.
  2293  func (r *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  2294  	c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2295  	c.resource = resource
  2296  	c.testiampermissionsrequest = testiampermissionsrequest
  2297  	return c
  2298  }
  2299  
  2300  // Fields allows partial responses to be retrieved. See
  2301  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2302  // details.
  2303  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  2304  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2305  	return c
  2306  }
  2307  
  2308  // Context sets the context to be used in this call's Do method.
  2309  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall {
  2310  	c.ctx_ = ctx
  2311  	return c
  2312  }
  2313  
  2314  // Header returns a http.Header that can be modified by the caller to add
  2315  // headers to the request.
  2316  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header {
  2317  	if c.header_ == nil {
  2318  		c.header_ = make(http.Header)
  2319  	}
  2320  	return c.header_
  2321  }
  2322  
  2323  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2324  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2325  	var body io.Reader = nil
  2326  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2327  	if err != nil {
  2328  		return nil, err
  2329  	}
  2330  	c.urlParams_.Set("alt", alt)
  2331  	c.urlParams_.Set("prettyPrint", "false")
  2332  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  2333  	urls += "?" + c.urlParams_.Encode()
  2334  	req, err := http.NewRequest("POST", urls, body)
  2335  	if err != nil {
  2336  		return nil, err
  2337  	}
  2338  	req.Header = reqHeaders
  2339  	googleapi.Expand(req.URL, map[string]string{
  2340  		"resource": c.resource,
  2341  	})
  2342  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2343  }
  2344  
  2345  // Do executes the "artifactregistry.projects.locations.repositories.testIamPermissions" call.
  2346  // Any non-2xx status code is an error. Response headers are in either
  2347  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2348  // returned at all) in error.(*googleapi.Error).Header. Use
  2349  // googleapi.IsNotModified to check whether the returned error was because
  2350  // http.StatusNotModified was returned.
  2351  func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2352  	gensupport.SetOptions(c.urlParams_, opts...)
  2353  	res, err := c.doRequest("json")
  2354  	if res != nil && res.StatusCode == http.StatusNotModified {
  2355  		if res.Body != nil {
  2356  			res.Body.Close()
  2357  		}
  2358  		return nil, gensupport.WrapError(&googleapi.Error{
  2359  			Code:   res.StatusCode,
  2360  			Header: res.Header,
  2361  		})
  2362  	}
  2363  	if err != nil {
  2364  		return nil, err
  2365  	}
  2366  	defer googleapi.CloseBody(res)
  2367  	if err := googleapi.CheckResponse(res); err != nil {
  2368  		return nil, gensupport.WrapError(err)
  2369  	}
  2370  	ret := &TestIamPermissionsResponse{
  2371  		ServerResponse: googleapi.ServerResponse{
  2372  			Header:         res.Header,
  2373  			HTTPStatusCode: res.StatusCode,
  2374  		},
  2375  	}
  2376  	target := &ret
  2377  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2378  		return nil, err
  2379  	}
  2380  	return ret, nil
  2381  }
  2382  
  2383  type ProjectsLocationsRepositoriesFilesGetCall struct {
  2384  	s            *Service
  2385  	name         string
  2386  	urlParams_   gensupport.URLParams
  2387  	ifNoneMatch_ string
  2388  	ctx_         context.Context
  2389  	header_      http.Header
  2390  }
  2391  
  2392  // Get: Gets a file.
  2393  //
  2394  // - name: The name of the file to retrieve.
  2395  func (r *ProjectsLocationsRepositoriesFilesService) Get(name string) *ProjectsLocationsRepositoriesFilesGetCall {
  2396  	c := &ProjectsLocationsRepositoriesFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2397  	c.name = name
  2398  	return c
  2399  }
  2400  
  2401  // Fields allows partial responses to be retrieved. See
  2402  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2403  // details.
  2404  func (c *ProjectsLocationsRepositoriesFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesGetCall {
  2405  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2406  	return c
  2407  }
  2408  
  2409  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2410  // object's ETag matches the given value. This is useful for getting updates
  2411  // only after the object has changed since the last request.
  2412  func (c *ProjectsLocationsRepositoriesFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesGetCall {
  2413  	c.ifNoneMatch_ = entityTag
  2414  	return c
  2415  }
  2416  
  2417  // Context sets the context to be used in this call's Do method.
  2418  func (c *ProjectsLocationsRepositoriesFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesGetCall {
  2419  	c.ctx_ = ctx
  2420  	return c
  2421  }
  2422  
  2423  // Header returns a http.Header that can be modified by the caller to add
  2424  // headers to the request.
  2425  func (c *ProjectsLocationsRepositoriesFilesGetCall) Header() http.Header {
  2426  	if c.header_ == nil {
  2427  		c.header_ = make(http.Header)
  2428  	}
  2429  	return c.header_
  2430  }
  2431  
  2432  func (c *ProjectsLocationsRepositoriesFilesGetCall) doRequest(alt string) (*http.Response, error) {
  2433  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2434  	if c.ifNoneMatch_ != "" {
  2435  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2436  	}
  2437  	var body io.Reader = nil
  2438  	c.urlParams_.Set("alt", alt)
  2439  	c.urlParams_.Set("prettyPrint", "false")
  2440  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2441  	urls += "?" + c.urlParams_.Encode()
  2442  	req, err := http.NewRequest("GET", urls, body)
  2443  	if err != nil {
  2444  		return nil, err
  2445  	}
  2446  	req.Header = reqHeaders
  2447  	googleapi.Expand(req.URL, map[string]string{
  2448  		"name": c.name,
  2449  	})
  2450  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2451  }
  2452  
  2453  // Do executes the "artifactregistry.projects.locations.repositories.files.get" call.
  2454  // Any non-2xx status code is an error. Response headers are in either
  2455  // *File.ServerResponse.Header or (if a response was returned at all) in
  2456  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2457  // whether the returned error was because http.StatusNotModified was returned.
  2458  func (c *ProjectsLocationsRepositoriesFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
  2459  	gensupport.SetOptions(c.urlParams_, opts...)
  2460  	res, err := c.doRequest("json")
  2461  	if res != nil && res.StatusCode == http.StatusNotModified {
  2462  		if res.Body != nil {
  2463  			res.Body.Close()
  2464  		}
  2465  		return nil, gensupport.WrapError(&googleapi.Error{
  2466  			Code:   res.StatusCode,
  2467  			Header: res.Header,
  2468  		})
  2469  	}
  2470  	if err != nil {
  2471  		return nil, err
  2472  	}
  2473  	defer googleapi.CloseBody(res)
  2474  	if err := googleapi.CheckResponse(res); err != nil {
  2475  		return nil, gensupport.WrapError(err)
  2476  	}
  2477  	ret := &File{
  2478  		ServerResponse: googleapi.ServerResponse{
  2479  			Header:         res.Header,
  2480  			HTTPStatusCode: res.StatusCode,
  2481  		},
  2482  	}
  2483  	target := &ret
  2484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2485  		return nil, err
  2486  	}
  2487  	return ret, nil
  2488  }
  2489  
  2490  type ProjectsLocationsRepositoriesFilesListCall struct {
  2491  	s            *Service
  2492  	parent       string
  2493  	urlParams_   gensupport.URLParams
  2494  	ifNoneMatch_ string
  2495  	ctx_         context.Context
  2496  	header_      http.Header
  2497  }
  2498  
  2499  // List: Lists files.
  2500  //
  2501  //   - parent: The name of the repository whose files will be listed. For
  2502  //     example: "projects/p1/locations/us-central1/repositories/repo1.
  2503  func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *ProjectsLocationsRepositoriesFilesListCall {
  2504  	c := &ProjectsLocationsRepositoriesFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2505  	c.parent = parent
  2506  	return c
  2507  }
  2508  
  2509  // Filter sets the optional parameter "filter": An expression for filtering the
  2510  // results of the request. Filter rules are case insensitive. The fields
  2511  // eligible for filtering are: * `name` * `owner` An example of using a filter:
  2512  // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"
  2513  // --> Files with an ID starting with "a/b/". *
  2514  // `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve
  2515  // rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`.
  2516  func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall {
  2517  	c.urlParams_.Set("filter", filter)
  2518  	return c
  2519  }
  2520  
  2521  // PageSize sets the optional parameter "pageSize": The maximum number of files
  2522  // to return.
  2523  func (c *ProjectsLocationsRepositoriesFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFilesListCall {
  2524  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2525  	return c
  2526  }
  2527  
  2528  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2529  // returned from a previous list request, if any.
  2530  func (c *ProjectsLocationsRepositoriesFilesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFilesListCall {
  2531  	c.urlParams_.Set("pageToken", pageToken)
  2532  	return c
  2533  }
  2534  
  2535  // Fields allows partial responses to be retrieved. See
  2536  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2537  // details.
  2538  func (c *ProjectsLocationsRepositoriesFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFilesListCall {
  2539  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2540  	return c
  2541  }
  2542  
  2543  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2544  // object's ETag matches the given value. This is useful for getting updates
  2545  // only after the object has changed since the last request.
  2546  func (c *ProjectsLocationsRepositoriesFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFilesListCall {
  2547  	c.ifNoneMatch_ = entityTag
  2548  	return c
  2549  }
  2550  
  2551  // Context sets the context to be used in this call's Do method.
  2552  func (c *ProjectsLocationsRepositoriesFilesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFilesListCall {
  2553  	c.ctx_ = ctx
  2554  	return c
  2555  }
  2556  
  2557  // Header returns a http.Header that can be modified by the caller to add
  2558  // headers to the request.
  2559  func (c *ProjectsLocationsRepositoriesFilesListCall) Header() http.Header {
  2560  	if c.header_ == nil {
  2561  		c.header_ = make(http.Header)
  2562  	}
  2563  	return c.header_
  2564  }
  2565  
  2566  func (c *ProjectsLocationsRepositoriesFilesListCall) doRequest(alt string) (*http.Response, error) {
  2567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2568  	if c.ifNoneMatch_ != "" {
  2569  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2570  	}
  2571  	var body io.Reader = nil
  2572  	c.urlParams_.Set("alt", alt)
  2573  	c.urlParams_.Set("prettyPrint", "false")
  2574  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/files")
  2575  	urls += "?" + c.urlParams_.Encode()
  2576  	req, err := http.NewRequest("GET", urls, body)
  2577  	if err != nil {
  2578  		return nil, err
  2579  	}
  2580  	req.Header = reqHeaders
  2581  	googleapi.Expand(req.URL, map[string]string{
  2582  		"parent": c.parent,
  2583  	})
  2584  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2585  }
  2586  
  2587  // Do executes the "artifactregistry.projects.locations.repositories.files.list" call.
  2588  // Any non-2xx status code is an error. Response headers are in either
  2589  // *ListFilesResponse.ServerResponse.Header or (if a response was returned at
  2590  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2591  // check whether the returned error was because http.StatusNotModified was
  2592  // returned.
  2593  func (c *ProjectsLocationsRepositoriesFilesListCall) Do(opts ...googleapi.CallOption) (*ListFilesResponse, error) {
  2594  	gensupport.SetOptions(c.urlParams_, opts...)
  2595  	res, err := c.doRequest("json")
  2596  	if res != nil && res.StatusCode == http.StatusNotModified {
  2597  		if res.Body != nil {
  2598  			res.Body.Close()
  2599  		}
  2600  		return nil, gensupport.WrapError(&googleapi.Error{
  2601  			Code:   res.StatusCode,
  2602  			Header: res.Header,
  2603  		})
  2604  	}
  2605  	if err != nil {
  2606  		return nil, err
  2607  	}
  2608  	defer googleapi.CloseBody(res)
  2609  	if err := googleapi.CheckResponse(res); err != nil {
  2610  		return nil, gensupport.WrapError(err)
  2611  	}
  2612  	ret := &ListFilesResponse{
  2613  		ServerResponse: googleapi.ServerResponse{
  2614  			Header:         res.Header,
  2615  			HTTPStatusCode: res.StatusCode,
  2616  		},
  2617  	}
  2618  	target := &ret
  2619  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2620  		return nil, err
  2621  	}
  2622  	return ret, nil
  2623  }
  2624  
  2625  // Pages invokes f for each page of results.
  2626  // A non-nil error returned from f will halt the iteration.
  2627  // The provided context supersedes any context provided to the Context method.
  2628  func (c *ProjectsLocationsRepositoriesFilesListCall) Pages(ctx context.Context, f func(*ListFilesResponse) error) error {
  2629  	c.ctx_ = ctx
  2630  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2631  	for {
  2632  		x, err := c.Do()
  2633  		if err != nil {
  2634  			return err
  2635  		}
  2636  		if err := f(x); err != nil {
  2637  			return err
  2638  		}
  2639  		if x.NextPageToken == "" {
  2640  			return nil
  2641  		}
  2642  		c.PageToken(x.NextPageToken)
  2643  	}
  2644  }
  2645  
  2646  type ProjectsLocationsRepositoriesPackagesDeleteCall struct {
  2647  	s          *Service
  2648  	name       string
  2649  	urlParams_ gensupport.URLParams
  2650  	ctx_       context.Context
  2651  	header_    http.Header
  2652  }
  2653  
  2654  // Delete: Deletes a package and all of its versions and tags. The returned
  2655  // operation will complete once the package has been deleted.
  2656  //
  2657  // - name: The name of the package to delete.
  2658  func (r *ProjectsLocationsRepositoriesPackagesService) Delete(name string) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  2659  	c := &ProjectsLocationsRepositoriesPackagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2660  	c.name = name
  2661  	return c
  2662  }
  2663  
  2664  // Fields allows partial responses to be retrieved. See
  2665  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2666  // details.
  2667  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  2668  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2669  	return c
  2670  }
  2671  
  2672  // Context sets the context to be used in this call's Do method.
  2673  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesDeleteCall {
  2674  	c.ctx_ = ctx
  2675  	return c
  2676  }
  2677  
  2678  // Header returns a http.Header that can be modified by the caller to add
  2679  // headers to the request.
  2680  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Header() http.Header {
  2681  	if c.header_ == nil {
  2682  		c.header_ = make(http.Header)
  2683  	}
  2684  	return c.header_
  2685  }
  2686  
  2687  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2689  	var body io.Reader = nil
  2690  	c.urlParams_.Set("alt", alt)
  2691  	c.urlParams_.Set("prettyPrint", "false")
  2692  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2693  	urls += "?" + c.urlParams_.Encode()
  2694  	req, err := http.NewRequest("DELETE", urls, body)
  2695  	if err != nil {
  2696  		return nil, err
  2697  	}
  2698  	req.Header = reqHeaders
  2699  	googleapi.Expand(req.URL, map[string]string{
  2700  		"name": c.name,
  2701  	})
  2702  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2703  }
  2704  
  2705  // Do executes the "artifactregistry.projects.locations.repositories.packages.delete" call.
  2706  // Any non-2xx status code is an error. Response headers are in either
  2707  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2708  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2709  // whether the returned error was because http.StatusNotModified was returned.
  2710  func (c *ProjectsLocationsRepositoriesPackagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2711  	gensupport.SetOptions(c.urlParams_, opts...)
  2712  	res, err := c.doRequest("json")
  2713  	if res != nil && res.StatusCode == http.StatusNotModified {
  2714  		if res.Body != nil {
  2715  			res.Body.Close()
  2716  		}
  2717  		return nil, gensupport.WrapError(&googleapi.Error{
  2718  			Code:   res.StatusCode,
  2719  			Header: res.Header,
  2720  		})
  2721  	}
  2722  	if err != nil {
  2723  		return nil, err
  2724  	}
  2725  	defer googleapi.CloseBody(res)
  2726  	if err := googleapi.CheckResponse(res); err != nil {
  2727  		return nil, gensupport.WrapError(err)
  2728  	}
  2729  	ret := &Operation{
  2730  		ServerResponse: googleapi.ServerResponse{
  2731  			Header:         res.Header,
  2732  			HTTPStatusCode: res.StatusCode,
  2733  		},
  2734  	}
  2735  	target := &ret
  2736  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2737  		return nil, err
  2738  	}
  2739  	return ret, nil
  2740  }
  2741  
  2742  type ProjectsLocationsRepositoriesPackagesGetCall struct {
  2743  	s            *Service
  2744  	name         string
  2745  	urlParams_   gensupport.URLParams
  2746  	ifNoneMatch_ string
  2747  	ctx_         context.Context
  2748  	header_      http.Header
  2749  }
  2750  
  2751  // Get: Gets a package.
  2752  //
  2753  // - name: The name of the package to retrieve.
  2754  func (r *ProjectsLocationsRepositoriesPackagesService) Get(name string) *ProjectsLocationsRepositoriesPackagesGetCall {
  2755  	c := &ProjectsLocationsRepositoriesPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2756  	c.name = name
  2757  	return c
  2758  }
  2759  
  2760  // Fields allows partial responses to be retrieved. See
  2761  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2762  // details.
  2763  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesGetCall {
  2764  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2765  	return c
  2766  }
  2767  
  2768  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2769  // object's ETag matches the given value. This is useful for getting updates
  2770  // only after the object has changed since the last request.
  2771  func (c *ProjectsLocationsRepositoriesPackagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesGetCall {
  2772  	c.ifNoneMatch_ = entityTag
  2773  	return c
  2774  }
  2775  
  2776  // Context sets the context to be used in this call's Do method.
  2777  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesGetCall {
  2778  	c.ctx_ = ctx
  2779  	return c
  2780  }
  2781  
  2782  // Header returns a http.Header that can be modified by the caller to add
  2783  // headers to the request.
  2784  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Header() http.Header {
  2785  	if c.header_ == nil {
  2786  		c.header_ = make(http.Header)
  2787  	}
  2788  	return c.header_
  2789  }
  2790  
  2791  func (c *ProjectsLocationsRepositoriesPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  2792  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2793  	if c.ifNoneMatch_ != "" {
  2794  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2795  	}
  2796  	var body io.Reader = nil
  2797  	c.urlParams_.Set("alt", alt)
  2798  	c.urlParams_.Set("prettyPrint", "false")
  2799  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2800  	urls += "?" + c.urlParams_.Encode()
  2801  	req, err := http.NewRequest("GET", urls, body)
  2802  	if err != nil {
  2803  		return nil, err
  2804  	}
  2805  	req.Header = reqHeaders
  2806  	googleapi.Expand(req.URL, map[string]string{
  2807  		"name": c.name,
  2808  	})
  2809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2810  }
  2811  
  2812  // Do executes the "artifactregistry.projects.locations.repositories.packages.get" call.
  2813  // Any non-2xx status code is an error. Response headers are in either
  2814  // *Package.ServerResponse.Header or (if a response was returned at all) in
  2815  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2816  // whether the returned error was because http.StatusNotModified was returned.
  2817  func (c *ProjectsLocationsRepositoriesPackagesGetCall) Do(opts ...googleapi.CallOption) (*Package, error) {
  2818  	gensupport.SetOptions(c.urlParams_, opts...)
  2819  	res, err := c.doRequest("json")
  2820  	if res != nil && res.StatusCode == http.StatusNotModified {
  2821  		if res.Body != nil {
  2822  			res.Body.Close()
  2823  		}
  2824  		return nil, gensupport.WrapError(&googleapi.Error{
  2825  			Code:   res.StatusCode,
  2826  			Header: res.Header,
  2827  		})
  2828  	}
  2829  	if err != nil {
  2830  		return nil, err
  2831  	}
  2832  	defer googleapi.CloseBody(res)
  2833  	if err := googleapi.CheckResponse(res); err != nil {
  2834  		return nil, gensupport.WrapError(err)
  2835  	}
  2836  	ret := &Package{
  2837  		ServerResponse: googleapi.ServerResponse{
  2838  			Header:         res.Header,
  2839  			HTTPStatusCode: res.StatusCode,
  2840  		},
  2841  	}
  2842  	target := &ret
  2843  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2844  		return nil, err
  2845  	}
  2846  	return ret, nil
  2847  }
  2848  
  2849  type ProjectsLocationsRepositoriesPackagesListCall struct {
  2850  	s            *Service
  2851  	parent       string
  2852  	urlParams_   gensupport.URLParams
  2853  	ifNoneMatch_ string
  2854  	ctx_         context.Context
  2855  	header_      http.Header
  2856  }
  2857  
  2858  // List: Lists packages.
  2859  //
  2860  // - parent: The name of the parent resource whose packages will be listed.
  2861  func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *ProjectsLocationsRepositoriesPackagesListCall {
  2862  	c := &ProjectsLocationsRepositoriesPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2863  	c.parent = parent
  2864  	return c
  2865  }
  2866  
  2867  // PageSize sets the optional parameter "pageSize": The maximum number of
  2868  // packages to return. Maximum page size is 1,000.
  2869  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall {
  2870  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2871  	return c
  2872  }
  2873  
  2874  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2875  // returned from a previous list request, if any.
  2876  func (c *ProjectsLocationsRepositoriesPackagesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesListCall {
  2877  	c.urlParams_.Set("pageToken", pageToken)
  2878  	return c
  2879  }
  2880  
  2881  // Fields allows partial responses to be retrieved. See
  2882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2883  // details.
  2884  func (c *ProjectsLocationsRepositoriesPackagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesListCall {
  2885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2886  	return c
  2887  }
  2888  
  2889  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2890  // object's ETag matches the given value. This is useful for getting updates
  2891  // only after the object has changed since the last request.
  2892  func (c *ProjectsLocationsRepositoriesPackagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesListCall {
  2893  	c.ifNoneMatch_ = entityTag
  2894  	return c
  2895  }
  2896  
  2897  // Context sets the context to be used in this call's Do method.
  2898  func (c *ProjectsLocationsRepositoriesPackagesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesListCall {
  2899  	c.ctx_ = ctx
  2900  	return c
  2901  }
  2902  
  2903  // Header returns a http.Header that can be modified by the caller to add
  2904  // headers to the request.
  2905  func (c *ProjectsLocationsRepositoriesPackagesListCall) Header() http.Header {
  2906  	if c.header_ == nil {
  2907  		c.header_ = make(http.Header)
  2908  	}
  2909  	return c.header_
  2910  }
  2911  
  2912  func (c *ProjectsLocationsRepositoriesPackagesListCall) doRequest(alt string) (*http.Response, error) {
  2913  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2914  	if c.ifNoneMatch_ != "" {
  2915  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2916  	}
  2917  	var body io.Reader = nil
  2918  	c.urlParams_.Set("alt", alt)
  2919  	c.urlParams_.Set("prettyPrint", "false")
  2920  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/packages")
  2921  	urls += "?" + c.urlParams_.Encode()
  2922  	req, err := http.NewRequest("GET", urls, body)
  2923  	if err != nil {
  2924  		return nil, err
  2925  	}
  2926  	req.Header = reqHeaders
  2927  	googleapi.Expand(req.URL, map[string]string{
  2928  		"parent": c.parent,
  2929  	})
  2930  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2931  }
  2932  
  2933  // Do executes the "artifactregistry.projects.locations.repositories.packages.list" call.
  2934  // Any non-2xx status code is an error. Response headers are in either
  2935  // *ListPackagesResponse.ServerResponse.Header or (if a response was returned
  2936  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2937  // check whether the returned error was because http.StatusNotModified was
  2938  // returned.
  2939  func (c *ProjectsLocationsRepositoriesPackagesListCall) Do(opts ...googleapi.CallOption) (*ListPackagesResponse, error) {
  2940  	gensupport.SetOptions(c.urlParams_, opts...)
  2941  	res, err := c.doRequest("json")
  2942  	if res != nil && res.StatusCode == http.StatusNotModified {
  2943  		if res.Body != nil {
  2944  			res.Body.Close()
  2945  		}
  2946  		return nil, gensupport.WrapError(&googleapi.Error{
  2947  			Code:   res.StatusCode,
  2948  			Header: res.Header,
  2949  		})
  2950  	}
  2951  	if err != nil {
  2952  		return nil, err
  2953  	}
  2954  	defer googleapi.CloseBody(res)
  2955  	if err := googleapi.CheckResponse(res); err != nil {
  2956  		return nil, gensupport.WrapError(err)
  2957  	}
  2958  	ret := &ListPackagesResponse{
  2959  		ServerResponse: googleapi.ServerResponse{
  2960  			Header:         res.Header,
  2961  			HTTPStatusCode: res.StatusCode,
  2962  		},
  2963  	}
  2964  	target := &ret
  2965  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2966  		return nil, err
  2967  	}
  2968  	return ret, nil
  2969  }
  2970  
  2971  // Pages invokes f for each page of results.
  2972  // A non-nil error returned from f will halt the iteration.
  2973  // The provided context supersedes any context provided to the Context method.
  2974  func (c *ProjectsLocationsRepositoriesPackagesListCall) Pages(ctx context.Context, f func(*ListPackagesResponse) error) error {
  2975  	c.ctx_ = ctx
  2976  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2977  	for {
  2978  		x, err := c.Do()
  2979  		if err != nil {
  2980  			return err
  2981  		}
  2982  		if err := f(x); err != nil {
  2983  			return err
  2984  		}
  2985  		if x.NextPageToken == "" {
  2986  			return nil
  2987  		}
  2988  		c.PageToken(x.NextPageToken)
  2989  	}
  2990  }
  2991  
  2992  type ProjectsLocationsRepositoriesPackagesTagsCreateCall struct {
  2993  	s          *Service
  2994  	parent     string
  2995  	tag        *Tag
  2996  	urlParams_ gensupport.URLParams
  2997  	ctx_       context.Context
  2998  	header_    http.Header
  2999  }
  3000  
  3001  // Create: Creates a tag.
  3002  //
  3003  // - parent: The name of the parent resource where the tag will be created.
  3004  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Create(parent string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  3005  	c := &ProjectsLocationsRepositoriesPackagesTagsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3006  	c.parent = parent
  3007  	c.tag = tag
  3008  	return c
  3009  }
  3010  
  3011  // TagId sets the optional parameter "tagId": The tag id to use for this
  3012  // repository.
  3013  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) TagId(tagId string) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  3014  	c.urlParams_.Set("tagId", tagId)
  3015  	return c
  3016  }
  3017  
  3018  // Fields allows partial responses to be retrieved. See
  3019  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3020  // details.
  3021  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  3022  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3023  	return c
  3024  }
  3025  
  3026  // Context sets the context to be used in this call's Do method.
  3027  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsCreateCall {
  3028  	c.ctx_ = ctx
  3029  	return c
  3030  }
  3031  
  3032  // Header returns a http.Header that can be modified by the caller to add
  3033  // headers to the request.
  3034  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Header() http.Header {
  3035  	if c.header_ == nil {
  3036  		c.header_ = make(http.Header)
  3037  	}
  3038  	return c.header_
  3039  }
  3040  
  3041  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) doRequest(alt string) (*http.Response, error) {
  3042  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3043  	var body io.Reader = nil
  3044  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  3045  	if err != nil {
  3046  		return nil, err
  3047  	}
  3048  	c.urlParams_.Set("alt", alt)
  3049  	c.urlParams_.Set("prettyPrint", "false")
  3050  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags")
  3051  	urls += "?" + c.urlParams_.Encode()
  3052  	req, err := http.NewRequest("POST", urls, body)
  3053  	if err != nil {
  3054  		return nil, err
  3055  	}
  3056  	req.Header = reqHeaders
  3057  	googleapi.Expand(req.URL, map[string]string{
  3058  		"parent": c.parent,
  3059  	})
  3060  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3061  }
  3062  
  3063  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.create" call.
  3064  // Any non-2xx status code is an error. Response headers are in either
  3065  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  3066  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3067  // whether the returned error was because http.StatusNotModified was returned.
  3068  func (c *ProjectsLocationsRepositoriesPackagesTagsCreateCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  3069  	gensupport.SetOptions(c.urlParams_, opts...)
  3070  	res, err := c.doRequest("json")
  3071  	if res != nil && res.StatusCode == http.StatusNotModified {
  3072  		if res.Body != nil {
  3073  			res.Body.Close()
  3074  		}
  3075  		return nil, gensupport.WrapError(&googleapi.Error{
  3076  			Code:   res.StatusCode,
  3077  			Header: res.Header,
  3078  		})
  3079  	}
  3080  	if err != nil {
  3081  		return nil, err
  3082  	}
  3083  	defer googleapi.CloseBody(res)
  3084  	if err := googleapi.CheckResponse(res); err != nil {
  3085  		return nil, gensupport.WrapError(err)
  3086  	}
  3087  	ret := &Tag{
  3088  		ServerResponse: googleapi.ServerResponse{
  3089  			Header:         res.Header,
  3090  			HTTPStatusCode: res.StatusCode,
  3091  		},
  3092  	}
  3093  	target := &ret
  3094  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3095  		return nil, err
  3096  	}
  3097  	return ret, nil
  3098  }
  3099  
  3100  type ProjectsLocationsRepositoriesPackagesTagsDeleteCall struct {
  3101  	s          *Service
  3102  	name       string
  3103  	urlParams_ gensupport.URLParams
  3104  	ctx_       context.Context
  3105  	header_    http.Header
  3106  }
  3107  
  3108  // Delete: Deletes a tag.
  3109  //
  3110  // - name: The name of the tag to delete.
  3111  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  3112  	c := &ProjectsLocationsRepositoriesPackagesTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3113  	c.name = name
  3114  	return c
  3115  }
  3116  
  3117  // Fields allows partial responses to be retrieved. See
  3118  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3119  // details.
  3120  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  3121  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3122  	return c
  3123  }
  3124  
  3125  // Context sets the context to be used in this call's Do method.
  3126  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsDeleteCall {
  3127  	c.ctx_ = ctx
  3128  	return c
  3129  }
  3130  
  3131  // Header returns a http.Header that can be modified by the caller to add
  3132  // headers to the request.
  3133  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Header() http.Header {
  3134  	if c.header_ == nil {
  3135  		c.header_ = make(http.Header)
  3136  	}
  3137  	return c.header_
  3138  }
  3139  
  3140  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3141  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3142  	var body io.Reader = nil
  3143  	c.urlParams_.Set("alt", alt)
  3144  	c.urlParams_.Set("prettyPrint", "false")
  3145  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3146  	urls += "?" + c.urlParams_.Encode()
  3147  	req, err := http.NewRequest("DELETE", urls, body)
  3148  	if err != nil {
  3149  		return nil, err
  3150  	}
  3151  	req.Header = reqHeaders
  3152  	googleapi.Expand(req.URL, map[string]string{
  3153  		"name": c.name,
  3154  	})
  3155  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3156  }
  3157  
  3158  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.delete" call.
  3159  // Any non-2xx status code is an error. Response headers are in either
  3160  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3161  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3162  // whether the returned error was because http.StatusNotModified was returned.
  3163  func (c *ProjectsLocationsRepositoriesPackagesTagsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3164  	gensupport.SetOptions(c.urlParams_, opts...)
  3165  	res, err := c.doRequest("json")
  3166  	if res != nil && res.StatusCode == http.StatusNotModified {
  3167  		if res.Body != nil {
  3168  			res.Body.Close()
  3169  		}
  3170  		return nil, gensupport.WrapError(&googleapi.Error{
  3171  			Code:   res.StatusCode,
  3172  			Header: res.Header,
  3173  		})
  3174  	}
  3175  	if err != nil {
  3176  		return nil, err
  3177  	}
  3178  	defer googleapi.CloseBody(res)
  3179  	if err := googleapi.CheckResponse(res); err != nil {
  3180  		return nil, gensupport.WrapError(err)
  3181  	}
  3182  	ret := &Empty{
  3183  		ServerResponse: googleapi.ServerResponse{
  3184  			Header:         res.Header,
  3185  			HTTPStatusCode: res.StatusCode,
  3186  		},
  3187  	}
  3188  	target := &ret
  3189  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3190  		return nil, err
  3191  	}
  3192  	return ret, nil
  3193  }
  3194  
  3195  type ProjectsLocationsRepositoriesPackagesTagsGetCall struct {
  3196  	s            *Service
  3197  	name         string
  3198  	urlParams_   gensupport.URLParams
  3199  	ifNoneMatch_ string
  3200  	ctx_         context.Context
  3201  	header_      http.Header
  3202  }
  3203  
  3204  // Get: Gets a tag.
  3205  //
  3206  // - name: The name of the tag to retrieve.
  3207  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Get(name string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  3208  	c := &ProjectsLocationsRepositoriesPackagesTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3209  	c.name = name
  3210  	return c
  3211  }
  3212  
  3213  // Fields allows partial responses to be retrieved. See
  3214  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3215  // details.
  3216  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  3217  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3218  	return c
  3219  }
  3220  
  3221  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3222  // object's ETag matches the given value. This is useful for getting updates
  3223  // only after the object has changed since the last request.
  3224  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  3225  	c.ifNoneMatch_ = entityTag
  3226  	return c
  3227  }
  3228  
  3229  // Context sets the context to be used in this call's Do method.
  3230  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsGetCall {
  3231  	c.ctx_ = ctx
  3232  	return c
  3233  }
  3234  
  3235  // Header returns a http.Header that can be modified by the caller to add
  3236  // headers to the request.
  3237  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Header() http.Header {
  3238  	if c.header_ == nil {
  3239  		c.header_ = make(http.Header)
  3240  	}
  3241  	return c.header_
  3242  }
  3243  
  3244  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) doRequest(alt string) (*http.Response, error) {
  3245  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3246  	if c.ifNoneMatch_ != "" {
  3247  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3248  	}
  3249  	var body io.Reader = nil
  3250  	c.urlParams_.Set("alt", alt)
  3251  	c.urlParams_.Set("prettyPrint", "false")
  3252  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3253  	urls += "?" + c.urlParams_.Encode()
  3254  	req, err := http.NewRequest("GET", urls, body)
  3255  	if err != nil {
  3256  		return nil, err
  3257  	}
  3258  	req.Header = reqHeaders
  3259  	googleapi.Expand(req.URL, map[string]string{
  3260  		"name": c.name,
  3261  	})
  3262  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3263  }
  3264  
  3265  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.get" call.
  3266  // Any non-2xx status code is an error. Response headers are in either
  3267  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  3268  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3269  // whether the returned error was because http.StatusNotModified was returned.
  3270  func (c *ProjectsLocationsRepositoriesPackagesTagsGetCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  3271  	gensupport.SetOptions(c.urlParams_, opts...)
  3272  	res, err := c.doRequest("json")
  3273  	if res != nil && res.StatusCode == http.StatusNotModified {
  3274  		if res.Body != nil {
  3275  			res.Body.Close()
  3276  		}
  3277  		return nil, gensupport.WrapError(&googleapi.Error{
  3278  			Code:   res.StatusCode,
  3279  			Header: res.Header,
  3280  		})
  3281  	}
  3282  	if err != nil {
  3283  		return nil, err
  3284  	}
  3285  	defer googleapi.CloseBody(res)
  3286  	if err := googleapi.CheckResponse(res); err != nil {
  3287  		return nil, gensupport.WrapError(err)
  3288  	}
  3289  	ret := &Tag{
  3290  		ServerResponse: googleapi.ServerResponse{
  3291  			Header:         res.Header,
  3292  			HTTPStatusCode: res.StatusCode,
  3293  		},
  3294  	}
  3295  	target := &ret
  3296  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3297  		return nil, err
  3298  	}
  3299  	return ret, nil
  3300  }
  3301  
  3302  type ProjectsLocationsRepositoriesPackagesTagsListCall struct {
  3303  	s            *Service
  3304  	parent       string
  3305  	urlParams_   gensupport.URLParams
  3306  	ifNoneMatch_ string
  3307  	ctx_         context.Context
  3308  	header_      http.Header
  3309  }
  3310  
  3311  // List: Lists tags.
  3312  //
  3313  //   - parent: The name of the parent package whose tags will be listed. For
  3314  //     example:
  3315  //     `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
  3316  func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3317  	c := &ProjectsLocationsRepositoriesPackagesTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3318  	c.parent = parent
  3319  	return c
  3320  }
  3321  
  3322  // Filter sets the optional parameter "filter": An expression for filtering the
  3323  // results of the request. Filter rules are case insensitive. The fields
  3324  // eligible for filtering are: * `version` An example of using a filter: *
  3325  // `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/
  3326  // versions/1.0" --> Tags that are applied to the version `1.0` in package
  3327  // `pkg1`.
  3328  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3329  	c.urlParams_.Set("filter", filter)
  3330  	return c
  3331  }
  3332  
  3333  // PageSize sets the optional parameter "pageSize": The maximum number of tags
  3334  // to return. Maximum page size is 10,000.
  3335  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3336  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3337  	return c
  3338  }
  3339  
  3340  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3341  // returned from a previous list request, if any.
  3342  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3343  	c.urlParams_.Set("pageToken", pageToken)
  3344  	return c
  3345  }
  3346  
  3347  // Fields allows partial responses to be retrieved. See
  3348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3349  // details.
  3350  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3352  	return c
  3353  }
  3354  
  3355  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3356  // object's ETag matches the given value. This is useful for getting updates
  3357  // only after the object has changed since the last request.
  3358  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3359  	c.ifNoneMatch_ = entityTag
  3360  	return c
  3361  }
  3362  
  3363  // Context sets the context to be used in this call's Do method.
  3364  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsListCall {
  3365  	c.ctx_ = ctx
  3366  	return c
  3367  }
  3368  
  3369  // Header returns a http.Header that can be modified by the caller to add
  3370  // headers to the request.
  3371  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Header() http.Header {
  3372  	if c.header_ == nil {
  3373  		c.header_ = make(http.Header)
  3374  	}
  3375  	return c.header_
  3376  }
  3377  
  3378  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) doRequest(alt string) (*http.Response, error) {
  3379  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3380  	if c.ifNoneMatch_ != "" {
  3381  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3382  	}
  3383  	var body io.Reader = nil
  3384  	c.urlParams_.Set("alt", alt)
  3385  	c.urlParams_.Set("prettyPrint", "false")
  3386  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tags")
  3387  	urls += "?" + c.urlParams_.Encode()
  3388  	req, err := http.NewRequest("GET", urls, body)
  3389  	if err != nil {
  3390  		return nil, err
  3391  	}
  3392  	req.Header = reqHeaders
  3393  	googleapi.Expand(req.URL, map[string]string{
  3394  		"parent": c.parent,
  3395  	})
  3396  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3397  }
  3398  
  3399  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.list" call.
  3400  // Any non-2xx status code is an error. Response headers are in either
  3401  // *ListTagsResponse.ServerResponse.Header or (if a response was returned at
  3402  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3403  // check whether the returned error was because http.StatusNotModified was
  3404  // returned.
  3405  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Do(opts ...googleapi.CallOption) (*ListTagsResponse, error) {
  3406  	gensupport.SetOptions(c.urlParams_, opts...)
  3407  	res, err := c.doRequest("json")
  3408  	if res != nil && res.StatusCode == http.StatusNotModified {
  3409  		if res.Body != nil {
  3410  			res.Body.Close()
  3411  		}
  3412  		return nil, gensupport.WrapError(&googleapi.Error{
  3413  			Code:   res.StatusCode,
  3414  			Header: res.Header,
  3415  		})
  3416  	}
  3417  	if err != nil {
  3418  		return nil, err
  3419  	}
  3420  	defer googleapi.CloseBody(res)
  3421  	if err := googleapi.CheckResponse(res); err != nil {
  3422  		return nil, gensupport.WrapError(err)
  3423  	}
  3424  	ret := &ListTagsResponse{
  3425  		ServerResponse: googleapi.ServerResponse{
  3426  			Header:         res.Header,
  3427  			HTTPStatusCode: res.StatusCode,
  3428  		},
  3429  	}
  3430  	target := &ret
  3431  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3432  		return nil, err
  3433  	}
  3434  	return ret, nil
  3435  }
  3436  
  3437  // Pages invokes f for each page of results.
  3438  // A non-nil error returned from f will halt the iteration.
  3439  // The provided context supersedes any context provided to the Context method.
  3440  func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Pages(ctx context.Context, f func(*ListTagsResponse) error) error {
  3441  	c.ctx_ = ctx
  3442  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3443  	for {
  3444  		x, err := c.Do()
  3445  		if err != nil {
  3446  			return err
  3447  		}
  3448  		if err := f(x); err != nil {
  3449  			return err
  3450  		}
  3451  		if x.NextPageToken == "" {
  3452  			return nil
  3453  		}
  3454  		c.PageToken(x.NextPageToken)
  3455  	}
  3456  }
  3457  
  3458  type ProjectsLocationsRepositoriesPackagesTagsPatchCall struct {
  3459  	s          *Service
  3460  	name       string
  3461  	tag        *Tag
  3462  	urlParams_ gensupport.URLParams
  3463  	ctx_       context.Context
  3464  	header_    http.Header
  3465  }
  3466  
  3467  // Patch: Updates a tag.
  3468  //
  3469  //   - name: The name of the tag, for example:
  3470  //     "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/ta
  3471  //     g1". If the package part contains slashes, the slashes are escaped. The
  3472  //     tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else
  3473  //     must be URL encoded.
  3474  func (r *ProjectsLocationsRepositoriesPackagesTagsService) Patch(name string, tag *Tag) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  3475  	c := &ProjectsLocationsRepositoriesPackagesTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3476  	c.name = name
  3477  	c.tag = tag
  3478  	return c
  3479  }
  3480  
  3481  // UpdateMask sets the optional parameter "updateMask": The update mask applies
  3482  // to the resource. For the `FieldMask` definition, see
  3483  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  3484  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  3485  	c.urlParams_.Set("updateMask", updateMask)
  3486  	return c
  3487  }
  3488  
  3489  // Fields allows partial responses to be retrieved. See
  3490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3491  // details.
  3492  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  3493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3494  	return c
  3495  }
  3496  
  3497  // Context sets the context to be used in this call's Do method.
  3498  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesTagsPatchCall {
  3499  	c.ctx_ = ctx
  3500  	return c
  3501  }
  3502  
  3503  // Header returns a http.Header that can be modified by the caller to add
  3504  // headers to the request.
  3505  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Header() http.Header {
  3506  	if c.header_ == nil {
  3507  		c.header_ = make(http.Header)
  3508  	}
  3509  	return c.header_
  3510  }
  3511  
  3512  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) doRequest(alt string) (*http.Response, error) {
  3513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3514  	var body io.Reader = nil
  3515  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
  3516  	if err != nil {
  3517  		return nil, err
  3518  	}
  3519  	c.urlParams_.Set("alt", alt)
  3520  	c.urlParams_.Set("prettyPrint", "false")
  3521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3522  	urls += "?" + c.urlParams_.Encode()
  3523  	req, err := http.NewRequest("PATCH", urls, body)
  3524  	if err != nil {
  3525  		return nil, err
  3526  	}
  3527  	req.Header = reqHeaders
  3528  	googleapi.Expand(req.URL, map[string]string{
  3529  		"name": c.name,
  3530  	})
  3531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3532  }
  3533  
  3534  // Do executes the "artifactregistry.projects.locations.repositories.packages.tags.patch" call.
  3535  // Any non-2xx status code is an error. Response headers are in either
  3536  // *Tag.ServerResponse.Header or (if a response was returned at all) in
  3537  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3538  // whether the returned error was because http.StatusNotModified was returned.
  3539  func (c *ProjectsLocationsRepositoriesPackagesTagsPatchCall) Do(opts ...googleapi.CallOption) (*Tag, error) {
  3540  	gensupport.SetOptions(c.urlParams_, opts...)
  3541  	res, err := c.doRequest("json")
  3542  	if res != nil && res.StatusCode == http.StatusNotModified {
  3543  		if res.Body != nil {
  3544  			res.Body.Close()
  3545  		}
  3546  		return nil, gensupport.WrapError(&googleapi.Error{
  3547  			Code:   res.StatusCode,
  3548  			Header: res.Header,
  3549  		})
  3550  	}
  3551  	if err != nil {
  3552  		return nil, err
  3553  	}
  3554  	defer googleapi.CloseBody(res)
  3555  	if err := googleapi.CheckResponse(res); err != nil {
  3556  		return nil, gensupport.WrapError(err)
  3557  	}
  3558  	ret := &Tag{
  3559  		ServerResponse: googleapi.ServerResponse{
  3560  			Header:         res.Header,
  3561  			HTTPStatusCode: res.StatusCode,
  3562  		},
  3563  	}
  3564  	target := &ret
  3565  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3566  		return nil, err
  3567  	}
  3568  	return ret, nil
  3569  }
  3570  
  3571  type ProjectsLocationsRepositoriesPackagesVersionsDeleteCall struct {
  3572  	s          *Service
  3573  	name       string
  3574  	urlParams_ gensupport.URLParams
  3575  	ctx_       context.Context
  3576  	header_    http.Header
  3577  }
  3578  
  3579  // Delete: Deletes a version and all of its content. The returned operation
  3580  // will complete once the version has been deleted.
  3581  //
  3582  // - name: The name of the version to delete.
  3583  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Delete(name string) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  3584  	c := &ProjectsLocationsRepositoriesPackagesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3585  	c.name = name
  3586  	return c
  3587  }
  3588  
  3589  // Force sets the optional parameter "force": By default, a version that is
  3590  // tagged may not be deleted. If force=true, the version and any tags pointing
  3591  // to the version are deleted.
  3592  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Force(force bool) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  3593  	c.urlParams_.Set("force", fmt.Sprint(force))
  3594  	return c
  3595  }
  3596  
  3597  // Fields allows partial responses to be retrieved. See
  3598  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3599  // details.
  3600  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  3601  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3602  	return c
  3603  }
  3604  
  3605  // Context sets the context to be used in this call's Do method.
  3606  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall {
  3607  	c.ctx_ = ctx
  3608  	return c
  3609  }
  3610  
  3611  // Header returns a http.Header that can be modified by the caller to add
  3612  // headers to the request.
  3613  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Header() http.Header {
  3614  	if c.header_ == nil {
  3615  		c.header_ = make(http.Header)
  3616  	}
  3617  	return c.header_
  3618  }
  3619  
  3620  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3621  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3622  	var body io.Reader = nil
  3623  	c.urlParams_.Set("alt", alt)
  3624  	c.urlParams_.Set("prettyPrint", "false")
  3625  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3626  	urls += "?" + c.urlParams_.Encode()
  3627  	req, err := http.NewRequest("DELETE", urls, body)
  3628  	if err != nil {
  3629  		return nil, err
  3630  	}
  3631  	req.Header = reqHeaders
  3632  	googleapi.Expand(req.URL, map[string]string{
  3633  		"name": c.name,
  3634  	})
  3635  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3636  }
  3637  
  3638  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.delete" call.
  3639  // Any non-2xx status code is an error. Response headers are in either
  3640  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3641  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3642  // whether the returned error was because http.StatusNotModified was returned.
  3643  func (c *ProjectsLocationsRepositoriesPackagesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3644  	gensupport.SetOptions(c.urlParams_, opts...)
  3645  	res, err := c.doRequest("json")
  3646  	if res != nil && res.StatusCode == http.StatusNotModified {
  3647  		if res.Body != nil {
  3648  			res.Body.Close()
  3649  		}
  3650  		return nil, gensupport.WrapError(&googleapi.Error{
  3651  			Code:   res.StatusCode,
  3652  			Header: res.Header,
  3653  		})
  3654  	}
  3655  	if err != nil {
  3656  		return nil, err
  3657  	}
  3658  	defer googleapi.CloseBody(res)
  3659  	if err := googleapi.CheckResponse(res); err != nil {
  3660  		return nil, gensupport.WrapError(err)
  3661  	}
  3662  	ret := &Operation{
  3663  		ServerResponse: googleapi.ServerResponse{
  3664  			Header:         res.Header,
  3665  			HTTPStatusCode: res.StatusCode,
  3666  		},
  3667  	}
  3668  	target := &ret
  3669  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3670  		return nil, err
  3671  	}
  3672  	return ret, nil
  3673  }
  3674  
  3675  type ProjectsLocationsRepositoriesPackagesVersionsGetCall struct {
  3676  	s            *Service
  3677  	name         string
  3678  	urlParams_   gensupport.URLParams
  3679  	ifNoneMatch_ string
  3680  	ctx_         context.Context
  3681  	header_      http.Header
  3682  }
  3683  
  3684  // Get: Gets a version
  3685  //
  3686  // - name: The name of the version to retrieve.
  3687  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) Get(name string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  3688  	c := &ProjectsLocationsRepositoriesPackagesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3689  	c.name = name
  3690  	return c
  3691  }
  3692  
  3693  // View sets the optional parameter "view": The view that should be returned in
  3694  // the response.
  3695  //
  3696  // Possible values:
  3697  //
  3698  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  3699  //
  3700  // default to the BASIC view.
  3701  //
  3702  //	"BASIC" - Includes basic information about the version, but not any
  3703  //
  3704  // related tags.
  3705  //
  3706  //	"FULL" - Include everything.
  3707  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  3708  	c.urlParams_.Set("view", view)
  3709  	return c
  3710  }
  3711  
  3712  // Fields allows partial responses to be retrieved. See
  3713  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3714  // details.
  3715  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  3716  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3717  	return c
  3718  }
  3719  
  3720  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3721  // object's ETag matches the given value. This is useful for getting updates
  3722  // only after the object has changed since the last request.
  3723  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  3724  	c.ifNoneMatch_ = entityTag
  3725  	return c
  3726  }
  3727  
  3728  // Context sets the context to be used in this call's Do method.
  3729  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsGetCall {
  3730  	c.ctx_ = ctx
  3731  	return c
  3732  }
  3733  
  3734  // Header returns a http.Header that can be modified by the caller to add
  3735  // headers to the request.
  3736  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Header() http.Header {
  3737  	if c.header_ == nil {
  3738  		c.header_ = make(http.Header)
  3739  	}
  3740  	return c.header_
  3741  }
  3742  
  3743  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  3744  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3745  	if c.ifNoneMatch_ != "" {
  3746  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3747  	}
  3748  	var body io.Reader = nil
  3749  	c.urlParams_.Set("alt", alt)
  3750  	c.urlParams_.Set("prettyPrint", "false")
  3751  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3752  	urls += "?" + c.urlParams_.Encode()
  3753  	req, err := http.NewRequest("GET", urls, body)
  3754  	if err != nil {
  3755  		return nil, err
  3756  	}
  3757  	req.Header = reqHeaders
  3758  	googleapi.Expand(req.URL, map[string]string{
  3759  		"name": c.name,
  3760  	})
  3761  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3762  }
  3763  
  3764  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.get" call.
  3765  // Any non-2xx status code is an error. Response headers are in either
  3766  // *Version.ServerResponse.Header or (if a response was returned at all) in
  3767  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3768  // whether the returned error was because http.StatusNotModified was returned.
  3769  func (c *ProjectsLocationsRepositoriesPackagesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
  3770  	gensupport.SetOptions(c.urlParams_, opts...)
  3771  	res, err := c.doRequest("json")
  3772  	if res != nil && res.StatusCode == http.StatusNotModified {
  3773  		if res.Body != nil {
  3774  			res.Body.Close()
  3775  		}
  3776  		return nil, gensupport.WrapError(&googleapi.Error{
  3777  			Code:   res.StatusCode,
  3778  			Header: res.Header,
  3779  		})
  3780  	}
  3781  	if err != nil {
  3782  		return nil, err
  3783  	}
  3784  	defer googleapi.CloseBody(res)
  3785  	if err := googleapi.CheckResponse(res); err != nil {
  3786  		return nil, gensupport.WrapError(err)
  3787  	}
  3788  	ret := &Version{
  3789  		ServerResponse: googleapi.ServerResponse{
  3790  			Header:         res.Header,
  3791  			HTTPStatusCode: res.StatusCode,
  3792  		},
  3793  	}
  3794  	target := &ret
  3795  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3796  		return nil, err
  3797  	}
  3798  	return ret, nil
  3799  }
  3800  
  3801  type ProjectsLocationsRepositoriesPackagesVersionsListCall struct {
  3802  	s            *Service
  3803  	parent       string
  3804  	urlParams_   gensupport.URLParams
  3805  	ifNoneMatch_ string
  3806  	ctx_         context.Context
  3807  	header_      http.Header
  3808  }
  3809  
  3810  // List: Lists versions.
  3811  //
  3812  // - parent: The name of the parent resource whose versions will be listed.
  3813  func (r *ProjectsLocationsRepositoriesPackagesVersionsService) List(parent string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3814  	c := &ProjectsLocationsRepositoriesPackagesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3815  	c.parent = parent
  3816  	return c
  3817  }
  3818  
  3819  // OrderBy sets the optional parameter "orderBy": The field to order the
  3820  // results by.
  3821  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3822  	c.urlParams_.Set("orderBy", orderBy)
  3823  	return c
  3824  }
  3825  
  3826  // PageSize sets the optional parameter "pageSize": The maximum number of
  3827  // versions to return. Maximum page size is 1,000.
  3828  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3829  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3830  	return c
  3831  }
  3832  
  3833  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3834  // returned from a previous list request, if any.
  3835  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3836  	c.urlParams_.Set("pageToken", pageToken)
  3837  	return c
  3838  }
  3839  
  3840  // View sets the optional parameter "view": The view that should be returned in
  3841  // the response.
  3842  //
  3843  // Possible values:
  3844  //
  3845  //	"VERSION_VIEW_UNSPECIFIED" - The default / unset value. The API will
  3846  //
  3847  // default to the BASIC view.
  3848  //
  3849  //	"BASIC" - Includes basic information about the version, but not any
  3850  //
  3851  // related tags.
  3852  //
  3853  //	"FULL" - Include everything.
  3854  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) View(view string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3855  	c.urlParams_.Set("view", view)
  3856  	return c
  3857  }
  3858  
  3859  // Fields allows partial responses to be retrieved. See
  3860  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3861  // details.
  3862  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3863  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3864  	return c
  3865  }
  3866  
  3867  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3868  // object's ETag matches the given value. This is useful for getting updates
  3869  // only after the object has changed since the last request.
  3870  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3871  	c.ifNoneMatch_ = entityTag
  3872  	return c
  3873  }
  3874  
  3875  // Context sets the context to be used in this call's Do method.
  3876  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPackagesVersionsListCall {
  3877  	c.ctx_ = ctx
  3878  	return c
  3879  }
  3880  
  3881  // Header returns a http.Header that can be modified by the caller to add
  3882  // headers to the request.
  3883  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Header() http.Header {
  3884  	if c.header_ == nil {
  3885  		c.header_ = make(http.Header)
  3886  	}
  3887  	return c.header_
  3888  }
  3889  
  3890  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) doRequest(alt string) (*http.Response, error) {
  3891  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3892  	if c.ifNoneMatch_ != "" {
  3893  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3894  	}
  3895  	var body io.Reader = nil
  3896  	c.urlParams_.Set("alt", alt)
  3897  	c.urlParams_.Set("prettyPrint", "false")
  3898  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions")
  3899  	urls += "?" + c.urlParams_.Encode()
  3900  	req, err := http.NewRequest("GET", urls, body)
  3901  	if err != nil {
  3902  		return nil, err
  3903  	}
  3904  	req.Header = reqHeaders
  3905  	googleapi.Expand(req.URL, map[string]string{
  3906  		"parent": c.parent,
  3907  	})
  3908  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3909  }
  3910  
  3911  // Do executes the "artifactregistry.projects.locations.repositories.packages.versions.list" call.
  3912  // Any non-2xx status code is an error. Response headers are in either
  3913  // *ListVersionsResponse.ServerResponse.Header or (if a response was returned
  3914  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3915  // check whether the returned error was because http.StatusNotModified was
  3916  // returned.
  3917  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
  3918  	gensupport.SetOptions(c.urlParams_, opts...)
  3919  	res, err := c.doRequest("json")
  3920  	if res != nil && res.StatusCode == http.StatusNotModified {
  3921  		if res.Body != nil {
  3922  			res.Body.Close()
  3923  		}
  3924  		return nil, gensupport.WrapError(&googleapi.Error{
  3925  			Code:   res.StatusCode,
  3926  			Header: res.Header,
  3927  		})
  3928  	}
  3929  	if err != nil {
  3930  		return nil, err
  3931  	}
  3932  	defer googleapi.CloseBody(res)
  3933  	if err := googleapi.CheckResponse(res); err != nil {
  3934  		return nil, gensupport.WrapError(err)
  3935  	}
  3936  	ret := &ListVersionsResponse{
  3937  		ServerResponse: googleapi.ServerResponse{
  3938  			Header:         res.Header,
  3939  			HTTPStatusCode: res.StatusCode,
  3940  		},
  3941  	}
  3942  	target := &ret
  3943  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3944  		return nil, err
  3945  	}
  3946  	return ret, nil
  3947  }
  3948  
  3949  // Pages invokes f for each page of results.
  3950  // A non-nil error returned from f will halt the iteration.
  3951  // The provided context supersedes any context provided to the Context method.
  3952  func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
  3953  	c.ctx_ = ctx
  3954  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3955  	for {
  3956  		x, err := c.Do()
  3957  		if err != nil {
  3958  			return err
  3959  		}
  3960  		if err := f(x); err != nil {
  3961  			return err
  3962  		}
  3963  		if x.NextPageToken == "" {
  3964  			return nil
  3965  		}
  3966  		c.PageToken(x.NextPageToken)
  3967  	}
  3968  }
  3969  

View as plain text