...

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

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

     1  // Copyright 2020 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 storage provides access to the Cloud Storage JSON API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/storage instead.
    10  //
    11  // For product documentation, see: https://developers.google.com/storage/docs/json_api/
    12  //
    13  // # Creating a client
    14  //
    15  // Usage example:
    16  //
    17  //	import "google.golang.org/api/storage/v1beta1"
    18  //	...
    19  //	ctx := context.Background()
    20  //	storageService, err := storage.NewService(ctx)
    21  //
    22  // In this example, Google Application Default Credentials are used for authentication.
    23  //
    24  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    25  //
    26  // # Other authentication options
    27  //
    28  // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
    29  //
    30  //	storageService, err := storage.NewService(ctx, option.WithScopes(storage.DevstorageReadWriteScope))
    31  //
    32  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    33  //
    34  //	storageService, err := storage.NewService(ctx, option.WithAPIKey("AIza..."))
    35  //
    36  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    37  //
    38  //	config := &oauth2.Config{...}
    39  //	// ...
    40  //	token, err := config.Exchange(ctx, ...)
    41  //	storageService, err := storage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    42  //
    43  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    44  package storage // import "google.golang.org/api/storage/v1beta1"
    45  
    46  import (
    47  	"bytes"
    48  	"context"
    49  	"encoding/json"
    50  	"errors"
    51  	"fmt"
    52  	"io"
    53  	"net/http"
    54  	"net/url"
    55  	"strconv"
    56  	"strings"
    57  
    58  	googleapi "google.golang.org/api/googleapi"
    59  	gensupport "google.golang.org/api/internal/gensupport"
    60  	option "google.golang.org/api/option"
    61  	htransport "google.golang.org/api/transport/http"
    62  )
    63  
    64  // Always reference these packages, just in case the auto-generated code
    65  // below doesn't.
    66  var _ = bytes.NewBuffer
    67  var _ = strconv.Itoa
    68  var _ = fmt.Sprintf
    69  var _ = json.NewDecoder
    70  var _ = io.Copy
    71  var _ = url.Parse
    72  var _ = gensupport.MarshalJSON
    73  var _ = googleapi.Version
    74  var _ = errors.New
    75  var _ = strings.Replace
    76  var _ = context.Canceled
    77  
    78  const apiId = "storage:v1beta1"
    79  const apiName = "storage"
    80  const apiVersion = "v1beta1"
    81  const basePath = "https://www.googleapis.com/storage/v1beta1/"
    82  
    83  // OAuth2 scopes used by this API.
    84  const (
    85  	// Manage your data and permissions in Google Cloud Storage
    86  	DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"
    87  
    88  	// View your data in Google Cloud Storage
    89  	DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"
    90  
    91  	// Manage your data in Google Cloud Storage
    92  	DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
    93  )
    94  
    95  // NewService creates a new Service.
    96  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    97  	scopesOption := option.WithScopes(
    98  		"https://www.googleapis.com/auth/devstorage.full_control",
    99  		"https://www.googleapis.com/auth/devstorage.read_only",
   100  		"https://www.googleapis.com/auth/devstorage.read_write",
   101  	)
   102  	// NOTE: prepend, so we don't override user-specified scopes.
   103  	opts = append([]option.ClientOption{scopesOption}, opts...)
   104  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   105  	if err != nil {
   106  		return nil, err
   107  	}
   108  	s, err := New(client)
   109  	if err != nil {
   110  		return nil, err
   111  	}
   112  	if endpoint != "" {
   113  		s.BasePath = endpoint
   114  	}
   115  	return s, nil
   116  }
   117  
   118  // New creates a new Service. It uses the provided http.Client for requests.
   119  //
   120  // Deprecated: please use NewService instead.
   121  // To provide a custom HTTP client, use option.WithHTTPClient.
   122  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   123  func New(client *http.Client) (*Service, error) {
   124  	if client == nil {
   125  		return nil, errors.New("client is nil")
   126  	}
   127  	s := &Service{client: client, BasePath: basePath}
   128  	s.BucketAccessControls = NewBucketAccessControlsService(s)
   129  	s.Buckets = NewBucketsService(s)
   130  	s.ObjectAccessControls = NewObjectAccessControlsService(s)
   131  	s.Objects = NewObjectsService(s)
   132  	return s, nil
   133  }
   134  
   135  type Service struct {
   136  	client    *http.Client
   137  	BasePath  string // API endpoint base URL
   138  	UserAgent string // optional additional User-Agent fragment
   139  
   140  	BucketAccessControls *BucketAccessControlsService
   141  
   142  	Buckets *BucketsService
   143  
   144  	ObjectAccessControls *ObjectAccessControlsService
   145  
   146  	Objects *ObjectsService
   147  }
   148  
   149  func (s *Service) userAgent() string {
   150  	if s.UserAgent == "" {
   151  		return googleapi.UserAgent
   152  	}
   153  	return googleapi.UserAgent + " " + s.UserAgent
   154  }
   155  
   156  func NewBucketAccessControlsService(s *Service) *BucketAccessControlsService {
   157  	rs := &BucketAccessControlsService{s: s}
   158  	return rs
   159  }
   160  
   161  type BucketAccessControlsService struct {
   162  	s *Service
   163  }
   164  
   165  func NewBucketsService(s *Service) *BucketsService {
   166  	rs := &BucketsService{s: s}
   167  	return rs
   168  }
   169  
   170  type BucketsService struct {
   171  	s *Service
   172  }
   173  
   174  func NewObjectAccessControlsService(s *Service) *ObjectAccessControlsService {
   175  	rs := &ObjectAccessControlsService{s: s}
   176  	return rs
   177  }
   178  
   179  type ObjectAccessControlsService struct {
   180  	s *Service
   181  }
   182  
   183  func NewObjectsService(s *Service) *ObjectsService {
   184  	rs := &ObjectsService{s: s}
   185  	return rs
   186  }
   187  
   188  type ObjectsService struct {
   189  	s *Service
   190  }
   191  
   192  // Bucket: A bucket.
   193  type Bucket struct {
   194  	// Acl: Access controls on the bucket.
   195  	Acl []*BucketAccessControl `json:"acl,omitempty"`
   196  
   197  	// DefaultObjectAcl: Default access controls to apply to new objects
   198  	// when no ACL is provided.
   199  	DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"`
   200  
   201  	// Id: The name of the bucket.
   202  	Id string `json:"id,omitempty"`
   203  
   204  	// Kind: The kind of item this is. For buckets, this is always
   205  	// storage#bucket.
   206  	Kind string `json:"kind,omitempty"`
   207  
   208  	// Location: The location of the bucket. Object data for objects in the
   209  	// bucket resides in physical storage in this location. Can be US or EU.
   210  	// Defaults to US.
   211  	Location string `json:"location,omitempty"`
   212  
   213  	// Owner: The owner of the bucket. This will always be the project
   214  	// team's owner group.
   215  	Owner *BucketOwner `json:"owner,omitempty"`
   216  
   217  	// ProjectId: The project the bucket belongs to.
   218  	ProjectId uint64 `json:"projectId,omitempty,string"`
   219  
   220  	// SelfLink: The URI of this bucket.
   221  	SelfLink string `json:"selfLink,omitempty"`
   222  
   223  	// TimeCreated: Creation time of the bucket in RFC 3339 format.
   224  	TimeCreated string `json:"timeCreated,omitempty"`
   225  
   226  	// Website: The bucket's website configuration.
   227  	Website *BucketWebsite `json:"website,omitempty"`
   228  
   229  	// ServerResponse contains the HTTP response code and headers from the
   230  	// server.
   231  	googleapi.ServerResponse `json:"-"`
   232  
   233  	// ForceSendFields is a list of field names (e.g. "Acl") to
   234  	// unconditionally include in API requests. By default, fields with
   235  	// empty values are omitted from API requests. However, any non-pointer,
   236  	// non-interface field appearing in ForceSendFields will be sent to the
   237  	// server regardless of whether the field is empty or not. This may be
   238  	// used to include empty fields in Patch requests.
   239  	ForceSendFields []string `json:"-"`
   240  
   241  	// NullFields is a list of field names (e.g. "Acl") to include in API
   242  	// requests with the JSON null value. By default, fields with empty
   243  	// values are omitted from API requests. However, any field with an
   244  	// empty value appearing in NullFields will be sent to the server as
   245  	// null. It is an error if a field in this list has a non-empty value.
   246  	// This may be used to include null fields in Patch requests.
   247  	NullFields []string `json:"-"`
   248  }
   249  
   250  func (s *Bucket) MarshalJSON() ([]byte, error) {
   251  	type NoMethod Bucket
   252  	raw := NoMethod(*s)
   253  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   254  }
   255  
   256  // BucketOwner: The owner of the bucket. This will always be the project
   257  // team's owner group.
   258  type BucketOwner struct {
   259  	// Entity: The entity, in the form group-groupId.
   260  	Entity string `json:"entity,omitempty"`
   261  
   262  	// EntityId: The ID for the entity.
   263  	EntityId string `json:"entityId,omitempty"`
   264  
   265  	// ForceSendFields is a list of field names (e.g. "Entity") to
   266  	// unconditionally include in API requests. By default, fields with
   267  	// empty values are omitted from API requests. However, any non-pointer,
   268  	// non-interface field appearing in ForceSendFields will be sent to the
   269  	// server regardless of whether the field is empty or not. This may be
   270  	// used to include empty fields in Patch requests.
   271  	ForceSendFields []string `json:"-"`
   272  
   273  	// NullFields is a list of field names (e.g. "Entity") to include in API
   274  	// requests with the JSON null value. By default, fields with empty
   275  	// values are omitted from API requests. However, any field with an
   276  	// empty value appearing in NullFields will be sent to the server as
   277  	// null. It is an error if a field in this list has a non-empty value.
   278  	// This may be used to include null fields in Patch requests.
   279  	NullFields []string `json:"-"`
   280  }
   281  
   282  func (s *BucketOwner) MarshalJSON() ([]byte, error) {
   283  	type NoMethod BucketOwner
   284  	raw := NoMethod(*s)
   285  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   286  }
   287  
   288  // BucketWebsite: The bucket's website configuration.
   289  type BucketWebsite struct {
   290  	// MainPageSuffix: Behaves as the bucket's directory index where missing
   291  	// objects are treated as potential directories.
   292  	MainPageSuffix string `json:"mainPageSuffix,omitempty"`
   293  
   294  	// NotFoundPage: The custom object to return when a requested resource
   295  	// is not found.
   296  	NotFoundPage string `json:"notFoundPage,omitempty"`
   297  
   298  	// ForceSendFields is a list of field names (e.g. "MainPageSuffix") to
   299  	// unconditionally include in API requests. By default, fields with
   300  	// empty values are omitted from API requests. However, any non-pointer,
   301  	// non-interface field appearing in ForceSendFields will be sent to the
   302  	// server regardless of whether the field is empty or not. This may be
   303  	// used to include empty fields in Patch requests.
   304  	ForceSendFields []string `json:"-"`
   305  
   306  	// NullFields is a list of field names (e.g. "MainPageSuffix") to
   307  	// include in API requests with the JSON null value. By default, fields
   308  	// with empty values are omitted from API requests. However, any field
   309  	// with an empty value appearing in NullFields will be sent to the
   310  	// server as null. It is an error if a field in this list has a
   311  	// non-empty value. This may be used to include null fields in Patch
   312  	// requests.
   313  	NullFields []string `json:"-"`
   314  }
   315  
   316  func (s *BucketWebsite) MarshalJSON() ([]byte, error) {
   317  	type NoMethod BucketWebsite
   318  	raw := NoMethod(*s)
   319  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   320  }
   321  
   322  // BucketAccessControl: An access-control entry.
   323  type BucketAccessControl struct {
   324  	// Bucket: The name of the bucket.
   325  	Bucket string `json:"bucket,omitempty"`
   326  
   327  	// Domain: The domain associated with the entity, if any.
   328  	Domain string `json:"domain,omitempty"`
   329  
   330  	// Email: The email address associated with the entity, if any.
   331  	Email string `json:"email,omitempty"`
   332  
   333  	// Entity: The entity holding the permission, in one of the following
   334  	// forms:
   335  	// - user-userId
   336  	// - user-email
   337  	// - group-groupId
   338  	// - group-email
   339  	// - domain-domain
   340  	// - allUsers
   341  	// - allAuthenticatedUsers Examples:
   342  	// - The user liz@example.com would be user-liz@example.com.
   343  	// - The group example@googlegroups.com would be
   344  	// group-example@googlegroups.com.
   345  	// - To refer to all members of the Google Apps for Business domain
   346  	// example.com, the entity would be domain-example.com.
   347  	Entity string `json:"entity,omitempty"`
   348  
   349  	// EntityId: The ID for the entity, if any.
   350  	EntityId string `json:"entityId,omitempty"`
   351  
   352  	// Id: The ID of the access-control entry.
   353  	Id string `json:"id,omitempty"`
   354  
   355  	// Kind: The kind of item this is. For bucket access control entries,
   356  	// this is always storage#bucketAccessControl.
   357  	Kind string `json:"kind,omitempty"`
   358  
   359  	// Role: The access permission for the entity. Can be READER, WRITER, or
   360  	// OWNER.
   361  	Role string `json:"role,omitempty"`
   362  
   363  	// SelfLink: The link to this access-control entry.
   364  	SelfLink string `json:"selfLink,omitempty"`
   365  
   366  	// ServerResponse contains the HTTP response code and headers from the
   367  	// server.
   368  	googleapi.ServerResponse `json:"-"`
   369  
   370  	// ForceSendFields is a list of field names (e.g. "Bucket") to
   371  	// unconditionally include in API requests. By default, fields with
   372  	// empty values are omitted from API requests. However, any non-pointer,
   373  	// non-interface field appearing in ForceSendFields will be sent to the
   374  	// server regardless of whether the field is empty or not. This may be
   375  	// used to include empty fields in Patch requests.
   376  	ForceSendFields []string `json:"-"`
   377  
   378  	// NullFields is a list of field names (e.g. "Bucket") to include in API
   379  	// requests with the JSON null value. By default, fields with empty
   380  	// values are omitted from API requests. However, any field with an
   381  	// empty value appearing in NullFields will be sent to the server as
   382  	// null. It is an error if a field in this list has a non-empty value.
   383  	// This may be used to include null fields in Patch requests.
   384  	NullFields []string `json:"-"`
   385  }
   386  
   387  func (s *BucketAccessControl) MarshalJSON() ([]byte, error) {
   388  	type NoMethod BucketAccessControl
   389  	raw := NoMethod(*s)
   390  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   391  }
   392  
   393  // BucketAccessControls: An access-control list.
   394  type BucketAccessControls struct {
   395  	// Items: The list of items.
   396  	Items []*BucketAccessControl `json:"items,omitempty"`
   397  
   398  	// Kind: The kind of item this is. For lists of bucket access control
   399  	// entries, this is always storage#bucketAccessControls.
   400  	Kind string `json:"kind,omitempty"`
   401  
   402  	// ServerResponse contains the HTTP response code and headers from the
   403  	// server.
   404  	googleapi.ServerResponse `json:"-"`
   405  
   406  	// ForceSendFields is a list of field names (e.g. "Items") to
   407  	// unconditionally include in API requests. By default, fields with
   408  	// empty values are omitted from API requests. However, any non-pointer,
   409  	// non-interface field appearing in ForceSendFields will be sent to the
   410  	// server regardless of whether the field is empty or not. This may be
   411  	// used to include empty fields in Patch requests.
   412  	ForceSendFields []string `json:"-"`
   413  
   414  	// NullFields is a list of field names (e.g. "Items") to include in API
   415  	// requests with the JSON null value. By default, fields with empty
   416  	// values are omitted from API requests. However, any field with an
   417  	// empty value appearing in NullFields will be sent to the server as
   418  	// null. It is an error if a field in this list has a non-empty value.
   419  	// This may be used to include null fields in Patch requests.
   420  	NullFields []string `json:"-"`
   421  }
   422  
   423  func (s *BucketAccessControls) MarshalJSON() ([]byte, error) {
   424  	type NoMethod BucketAccessControls
   425  	raw := NoMethod(*s)
   426  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   427  }
   428  
   429  // Buckets: A list of buckets.
   430  type Buckets struct {
   431  	// Items: The list of items.
   432  	Items []*Bucket `json:"items,omitempty"`
   433  
   434  	// Kind: The kind of item this is. For lists of buckets, this is always
   435  	// storage#buckets.
   436  	Kind string `json:"kind,omitempty"`
   437  
   438  	// NextPageToken: The continuation token, used to page through large
   439  	// result sets. Provide this value in a subsequent request to return the
   440  	// next page of results.
   441  	NextPageToken string `json:"nextPageToken,omitempty"`
   442  
   443  	// ServerResponse contains the HTTP response code and headers from the
   444  	// server.
   445  	googleapi.ServerResponse `json:"-"`
   446  
   447  	// ForceSendFields is a list of field names (e.g. "Items") to
   448  	// unconditionally include in API requests. By default, fields with
   449  	// empty values are omitted from API requests. However, any non-pointer,
   450  	// non-interface field appearing in ForceSendFields will be sent to the
   451  	// server regardless of whether the field is empty or not. This may be
   452  	// used to include empty fields in Patch requests.
   453  	ForceSendFields []string `json:"-"`
   454  
   455  	// NullFields is a list of field names (e.g. "Items") to include in API
   456  	// requests with the JSON null value. By default, fields with empty
   457  	// values are omitted from API requests. However, any field with an
   458  	// empty value appearing in NullFields will be sent to the server as
   459  	// null. It is an error if a field in this list has a non-empty value.
   460  	// This may be used to include null fields in Patch requests.
   461  	NullFields []string `json:"-"`
   462  }
   463  
   464  func (s *Buckets) MarshalJSON() ([]byte, error) {
   465  	type NoMethod Buckets
   466  	raw := NoMethod(*s)
   467  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   468  }
   469  
   470  // Object: An object.
   471  type Object struct {
   472  	// Acl: Access controls on the object.
   473  	Acl []*ObjectAccessControl `json:"acl,omitempty"`
   474  
   475  	// Bucket: The bucket containing this object.
   476  	Bucket string `json:"bucket,omitempty"`
   477  
   478  	// CacheControl: Cache-Control directive for the object data.
   479  	CacheControl string `json:"cacheControl,omitempty"`
   480  
   481  	// ContentDisposition: Content-Disposition of the object data.
   482  	ContentDisposition string `json:"contentDisposition,omitempty"`
   483  
   484  	// ContentEncoding: Content-Encoding of the object data.
   485  	ContentEncoding string `json:"contentEncoding,omitempty"`
   486  
   487  	// ContentLanguage: Content-Language of the object data.
   488  	ContentLanguage string `json:"contentLanguage,omitempty"`
   489  
   490  	// Id: The ID of the object.
   491  	Id string `json:"id,omitempty"`
   492  
   493  	// Kind: The kind of item this is. For objects, this is always
   494  	// storage#object.
   495  	Kind string `json:"kind,omitempty"`
   496  
   497  	// Media: Object media data. Provided on your behalf when uploading raw
   498  	// media or multipart/related with an auxiliary media part.
   499  	Media *ObjectMedia `json:"media,omitempty"`
   500  
   501  	// Metadata: User-provided metadata, in key/value pairs.
   502  	Metadata map[string]string `json:"metadata,omitempty"`
   503  
   504  	// Name: The name of this object. Required if not specified by URL
   505  	// parameter.
   506  	Name string `json:"name,omitempty"`
   507  
   508  	// Owner: The owner of the object. This will always be the uploader of
   509  	// the object.
   510  	Owner *ObjectOwner `json:"owner,omitempty"`
   511  
   512  	// SelfLink: The link to this object.
   513  	SelfLink string `json:"selfLink,omitempty"`
   514  
   515  	// ServerResponse contains the HTTP response code and headers from the
   516  	// server.
   517  	googleapi.ServerResponse `json:"-"`
   518  
   519  	// ForceSendFields is a list of field names (e.g. "Acl") to
   520  	// unconditionally include in API requests. By default, fields with
   521  	// empty values are omitted from API requests. However, any non-pointer,
   522  	// non-interface field appearing in ForceSendFields will be sent to the
   523  	// server regardless of whether the field is empty or not. This may be
   524  	// used to include empty fields in Patch requests.
   525  	ForceSendFields []string `json:"-"`
   526  
   527  	// NullFields is a list of field names (e.g. "Acl") to include in API
   528  	// requests with the JSON null value. By default, fields with empty
   529  	// values are omitted from API requests. However, any field with an
   530  	// empty value appearing in NullFields will be sent to the server as
   531  	// null. It is an error if a field in this list has a non-empty value.
   532  	// This may be used to include null fields in Patch requests.
   533  	NullFields []string `json:"-"`
   534  }
   535  
   536  func (s *Object) MarshalJSON() ([]byte, error) {
   537  	type NoMethod Object
   538  	raw := NoMethod(*s)
   539  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   540  }
   541  
   542  // ObjectMedia: Object media data. Provided on your behalf when
   543  // uploading raw media or multipart/related with an auxiliary media
   544  // part.
   545  type ObjectMedia struct {
   546  	// Algorithm: Hash algorithm used. Currently only MD5 is supported.
   547  	// Required if a hash is provided.
   548  	Algorithm string `json:"algorithm,omitempty"`
   549  
   550  	// ContentType: Content-Type of the object data.
   551  	ContentType string `json:"contentType,omitempty"`
   552  
   553  	// Data: URL-safe Base64-encoded data. This property can be used to
   554  	// insert objects under 64KB in size, and will only be returned in
   555  	// response to the get method for objects so created. When this resource
   556  	// is returned in response to the list method, this property is omitted.
   557  	Data string `json:"data,omitempty"`
   558  
   559  	// Hash: Hash of the data. Required if a hash algorithm is provided.
   560  	Hash string `json:"hash,omitempty"`
   561  
   562  	// Length: Content-Length of the data in bytes.
   563  	Length uint64 `json:"length,omitempty,string"`
   564  
   565  	// Link: Media download link.
   566  	Link string `json:"link,omitempty"`
   567  
   568  	// TimeCreated: Creation time of the data in RFC 3339 format.
   569  	TimeCreated string `json:"timeCreated,omitempty"`
   570  
   571  	// ForceSendFields is a list of field names (e.g. "Algorithm") to
   572  	// unconditionally include in API requests. By default, fields with
   573  	// empty values are omitted from API requests. However, any non-pointer,
   574  	// non-interface field appearing in ForceSendFields will be sent to the
   575  	// server regardless of whether the field is empty or not. This may be
   576  	// used to include empty fields in Patch requests.
   577  	ForceSendFields []string `json:"-"`
   578  
   579  	// NullFields is a list of field names (e.g. "Algorithm") to include in
   580  	// API requests with the JSON null value. By default, fields with empty
   581  	// values are omitted from API requests. However, any field with an
   582  	// empty value appearing in NullFields will be sent to the server as
   583  	// null. It is an error if a field in this list has a non-empty value.
   584  	// This may be used to include null fields in Patch requests.
   585  	NullFields []string `json:"-"`
   586  }
   587  
   588  func (s *ObjectMedia) MarshalJSON() ([]byte, error) {
   589  	type NoMethod ObjectMedia
   590  	raw := NoMethod(*s)
   591  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   592  }
   593  
   594  // ObjectOwner: The owner of the object. This will always be the
   595  // uploader of the object.
   596  type ObjectOwner struct {
   597  	// Entity: The entity, in the form user-userId.
   598  	Entity string `json:"entity,omitempty"`
   599  
   600  	// EntityId: The ID for the entity.
   601  	EntityId string `json:"entityId,omitempty"`
   602  
   603  	// ForceSendFields is a list of field names (e.g. "Entity") to
   604  	// unconditionally include in API requests. By default, fields with
   605  	// empty values are omitted from API requests. However, any non-pointer,
   606  	// non-interface field appearing in ForceSendFields will be sent to the
   607  	// server regardless of whether the field is empty or not. This may be
   608  	// used to include empty fields in Patch requests.
   609  	ForceSendFields []string `json:"-"`
   610  
   611  	// NullFields is a list of field names (e.g. "Entity") to include in API
   612  	// requests with the JSON null value. By default, fields with empty
   613  	// values are omitted from API requests. However, any field with an
   614  	// empty value appearing in NullFields will be sent to the server as
   615  	// null. It is an error if a field in this list has a non-empty value.
   616  	// This may be used to include null fields in Patch requests.
   617  	NullFields []string `json:"-"`
   618  }
   619  
   620  func (s *ObjectOwner) MarshalJSON() ([]byte, error) {
   621  	type NoMethod ObjectOwner
   622  	raw := NoMethod(*s)
   623  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   624  }
   625  
   626  // ObjectAccessControl: An access-control entry.
   627  type ObjectAccessControl struct {
   628  	// Bucket: The name of the bucket.
   629  	Bucket string `json:"bucket,omitempty"`
   630  
   631  	// Domain: The domain associated with the entity, if any.
   632  	Domain string `json:"domain,omitempty"`
   633  
   634  	// Email: The email address associated with the entity, if any.
   635  	Email string `json:"email,omitempty"`
   636  
   637  	// Entity: The entity holding the permission, in one of the following
   638  	// forms:
   639  	// - user-userId
   640  	// - user-email
   641  	// - group-groupId
   642  	// - group-email
   643  	// - domain-domain
   644  	// - allUsers
   645  	// - allAuthenticatedUsers Examples:
   646  	// - The user liz@example.com would be user-liz@example.com.
   647  	// - The group example@googlegroups.com would be
   648  	// group-example@googlegroups.com.
   649  	// - To refer to all members of the Google Apps for Business domain
   650  	// example.com, the entity would be domain-example.com.
   651  	Entity string `json:"entity,omitempty"`
   652  
   653  	// EntityId: The ID for the entity, if any.
   654  	EntityId string `json:"entityId,omitempty"`
   655  
   656  	// Id: The ID of the access-control entry.
   657  	Id string `json:"id,omitempty"`
   658  
   659  	// Kind: The kind of item this is. For object access control entries,
   660  	// this is always storage#objectAccessControl.
   661  	Kind string `json:"kind,omitempty"`
   662  
   663  	// Object: The name of the object.
   664  	Object string `json:"object,omitempty"`
   665  
   666  	// Role: The access permission for the entity. Can be READER or OWNER.
   667  	Role string `json:"role,omitempty"`
   668  
   669  	// SelfLink: The link to this access-control entry.
   670  	SelfLink string `json:"selfLink,omitempty"`
   671  
   672  	// ServerResponse contains the HTTP response code and headers from the
   673  	// server.
   674  	googleapi.ServerResponse `json:"-"`
   675  
   676  	// ForceSendFields is a list of field names (e.g. "Bucket") to
   677  	// unconditionally include in API requests. By default, fields with
   678  	// empty values are omitted from API requests. However, any non-pointer,
   679  	// non-interface field appearing in ForceSendFields will be sent to the
   680  	// server regardless of whether the field is empty or not. This may be
   681  	// used to include empty fields in Patch requests.
   682  	ForceSendFields []string `json:"-"`
   683  
   684  	// NullFields is a list of field names (e.g. "Bucket") to include in API
   685  	// requests with the JSON null value. By default, fields with empty
   686  	// values are omitted from API requests. However, any field with an
   687  	// empty value appearing in NullFields will be sent to the server as
   688  	// null. It is an error if a field in this list has a non-empty value.
   689  	// This may be used to include null fields in Patch requests.
   690  	NullFields []string `json:"-"`
   691  }
   692  
   693  func (s *ObjectAccessControl) MarshalJSON() ([]byte, error) {
   694  	type NoMethod ObjectAccessControl
   695  	raw := NoMethod(*s)
   696  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   697  }
   698  
   699  // ObjectAccessControls: An access-control list.
   700  type ObjectAccessControls struct {
   701  	// Items: The list of items.
   702  	Items []*ObjectAccessControl `json:"items,omitempty"`
   703  
   704  	// Kind: The kind of item this is. For lists of object access control
   705  	// entries, this is always storage#objectAccessControls.
   706  	Kind string `json:"kind,omitempty"`
   707  
   708  	// ServerResponse contains the HTTP response code and headers from the
   709  	// server.
   710  	googleapi.ServerResponse `json:"-"`
   711  
   712  	// ForceSendFields is a list of field names (e.g. "Items") to
   713  	// unconditionally include in API requests. By default, fields with
   714  	// empty values are omitted from API requests. However, any non-pointer,
   715  	// non-interface field appearing in ForceSendFields will be sent to the
   716  	// server regardless of whether the field is empty or not. This may be
   717  	// used to include empty fields in Patch requests.
   718  	ForceSendFields []string `json:"-"`
   719  
   720  	// NullFields is a list of field names (e.g. "Items") to include in API
   721  	// requests with the JSON null value. By default, fields with empty
   722  	// values are omitted from API requests. However, any field with an
   723  	// empty value appearing in NullFields will be sent to the server as
   724  	// null. It is an error if a field in this list has a non-empty value.
   725  	// This may be used to include null fields in Patch requests.
   726  	NullFields []string `json:"-"`
   727  }
   728  
   729  func (s *ObjectAccessControls) MarshalJSON() ([]byte, error) {
   730  	type NoMethod ObjectAccessControls
   731  	raw := NoMethod(*s)
   732  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   733  }
   734  
   735  // Objects: A list of objects.
   736  type Objects struct {
   737  	// Items: The list of items.
   738  	Items []*Object `json:"items,omitempty"`
   739  
   740  	// Kind: The kind of item this is. For lists of objects, this is always
   741  	// storage#objects.
   742  	Kind string `json:"kind,omitempty"`
   743  
   744  	// NextPageToken: The continuation token, used to page through large
   745  	// result sets. Provide this value in a subsequent request to return the
   746  	// next page of results.
   747  	NextPageToken string `json:"nextPageToken,omitempty"`
   748  
   749  	// Prefixes: The list of prefixes of objects matching-but-not-listed up
   750  	// to and including the requested delimiter.
   751  	Prefixes []string `json:"prefixes,omitempty"`
   752  
   753  	// ServerResponse contains the HTTP response code and headers from the
   754  	// server.
   755  	googleapi.ServerResponse `json:"-"`
   756  
   757  	// ForceSendFields is a list of field names (e.g. "Items") to
   758  	// unconditionally include in API requests. By default, fields with
   759  	// empty values are omitted from API requests. However, any non-pointer,
   760  	// non-interface field appearing in ForceSendFields will be sent to the
   761  	// server regardless of whether the field is empty or not. This may be
   762  	// used to include empty fields in Patch requests.
   763  	ForceSendFields []string `json:"-"`
   764  
   765  	// NullFields is a list of field names (e.g. "Items") to include in API
   766  	// requests with the JSON null value. By default, fields with empty
   767  	// values are omitted from API requests. However, any field with an
   768  	// empty value appearing in NullFields will be sent to the server as
   769  	// null. It is an error if a field in this list has a non-empty value.
   770  	// This may be used to include null fields in Patch requests.
   771  	NullFields []string `json:"-"`
   772  }
   773  
   774  func (s *Objects) MarshalJSON() ([]byte, error) {
   775  	type NoMethod Objects
   776  	raw := NoMethod(*s)
   777  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   778  }
   779  
   780  // method id "storage.bucketAccessControls.delete":
   781  
   782  type BucketAccessControlsDeleteCall struct {
   783  	s          *Service
   784  	bucket     string
   785  	entity     string
   786  	urlParams_ gensupport.URLParams
   787  	ctx_       context.Context
   788  	header_    http.Header
   789  }
   790  
   791  // Delete: Deletes the ACL entry for the specified entity on the
   792  // specified bucket.
   793  func (r *BucketAccessControlsService) Delete(bucket string, entity string) *BucketAccessControlsDeleteCall {
   794  	c := &BucketAccessControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   795  	c.bucket = bucket
   796  	c.entity = entity
   797  	return c
   798  }
   799  
   800  // Fields allows partial responses to be retrieved. See
   801  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
   802  // for more information.
   803  func (c *BucketAccessControlsDeleteCall) Fields(s ...googleapi.Field) *BucketAccessControlsDeleteCall {
   804  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   805  	return c
   806  }
   807  
   808  // Context sets the context to be used in this call's Do method. Any
   809  // pending HTTP request will be aborted if the provided context is
   810  // canceled.
   811  func (c *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall {
   812  	c.ctx_ = ctx
   813  	return c
   814  }
   815  
   816  // Header returns an http.Header that can be modified by the caller to
   817  // add HTTP headers to the request.
   818  func (c *BucketAccessControlsDeleteCall) Header() http.Header {
   819  	if c.header_ == nil {
   820  		c.header_ = make(http.Header)
   821  	}
   822  	return c.header_
   823  }
   824  
   825  func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
   826  	reqHeaders := make(http.Header)
   827  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
   828  	for k, v := range c.header_ {
   829  		reqHeaders[k] = v
   830  	}
   831  	reqHeaders.Set("User-Agent", c.s.userAgent())
   832  	var body io.Reader = nil
   833  	c.urlParams_.Set("alt", alt)
   834  	c.urlParams_.Set("prettyPrint", "false")
   835  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}")
   836  	urls += "?" + c.urlParams_.Encode()
   837  	req, err := http.NewRequest("DELETE", urls, body)
   838  	if err != nil {
   839  		return nil, err
   840  	}
   841  	req.Header = reqHeaders
   842  	googleapi.Expand(req.URL, map[string]string{
   843  		"bucket": c.bucket,
   844  		"entity": c.entity,
   845  	})
   846  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   847  }
   848  
   849  // Do executes the "storage.bucketAccessControls.delete" call.
   850  func (c *BucketAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error {
   851  	gensupport.SetOptions(c.urlParams_, opts...)
   852  	res, err := c.doRequest("json")
   853  	if err != nil {
   854  		return err
   855  	}
   856  	defer googleapi.CloseBody(res)
   857  	if err := googleapi.CheckResponse(res); err != nil {
   858  		return err
   859  	}
   860  	return nil
   861  	// {
   862  	//   "description": "Deletes the ACL entry for the specified entity on the specified bucket.",
   863  	//   "httpMethod": "DELETE",
   864  	//   "id": "storage.bucketAccessControls.delete",
   865  	//   "parameterOrder": [
   866  	//     "bucket",
   867  	//     "entity"
   868  	//   ],
   869  	//   "parameters": {
   870  	//     "bucket": {
   871  	//       "description": "Name of a bucket.",
   872  	//       "location": "path",
   873  	//       "required": true,
   874  	//       "type": "string"
   875  	//     },
   876  	//     "entity": {
   877  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
   878  	//       "location": "path",
   879  	//       "required": true,
   880  	//       "type": "string"
   881  	//     }
   882  	//   },
   883  	//   "path": "b/{bucket}/acl/{entity}",
   884  	//   "scopes": [
   885  	//     "https://www.googleapis.com/auth/devstorage.full_control"
   886  	//   ]
   887  	// }
   888  
   889  }
   890  
   891  // method id "storage.bucketAccessControls.get":
   892  
   893  type BucketAccessControlsGetCall struct {
   894  	s            *Service
   895  	bucket       string
   896  	entity       string
   897  	urlParams_   gensupport.URLParams
   898  	ifNoneMatch_ string
   899  	ctx_         context.Context
   900  	header_      http.Header
   901  }
   902  
   903  // Get: Returns the ACL entry for the specified entity on the specified
   904  // bucket.
   905  func (r *BucketAccessControlsService) Get(bucket string, entity string) *BucketAccessControlsGetCall {
   906  	c := &BucketAccessControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   907  	c.bucket = bucket
   908  	c.entity = entity
   909  	return c
   910  }
   911  
   912  // Fields allows partial responses to be retrieved. See
   913  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
   914  // for more information.
   915  func (c *BucketAccessControlsGetCall) Fields(s ...googleapi.Field) *BucketAccessControlsGetCall {
   916  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   917  	return c
   918  }
   919  
   920  // IfNoneMatch sets the optional parameter which makes the operation
   921  // fail if the object's ETag matches the given value. This is useful for
   922  // getting updates only after the object has changed since the last
   923  // request. Use googleapi.IsNotModified to check whether the response
   924  // error from Do is the result of In-None-Match.
   925  func (c *BucketAccessControlsGetCall) IfNoneMatch(entityTag string) *BucketAccessControlsGetCall {
   926  	c.ifNoneMatch_ = entityTag
   927  	return c
   928  }
   929  
   930  // Context sets the context to be used in this call's Do method. Any
   931  // pending HTTP request will be aborted if the provided context is
   932  // canceled.
   933  func (c *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall {
   934  	c.ctx_ = ctx
   935  	return c
   936  }
   937  
   938  // Header returns an http.Header that can be modified by the caller to
   939  // add HTTP headers to the request.
   940  func (c *BucketAccessControlsGetCall) Header() http.Header {
   941  	if c.header_ == nil {
   942  		c.header_ = make(http.Header)
   943  	}
   944  	return c.header_
   945  }
   946  
   947  func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
   948  	reqHeaders := make(http.Header)
   949  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
   950  	for k, v := range c.header_ {
   951  		reqHeaders[k] = v
   952  	}
   953  	reqHeaders.Set("User-Agent", c.s.userAgent())
   954  	if c.ifNoneMatch_ != "" {
   955  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   956  	}
   957  	var body io.Reader = nil
   958  	c.urlParams_.Set("alt", alt)
   959  	c.urlParams_.Set("prettyPrint", "false")
   960  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}")
   961  	urls += "?" + c.urlParams_.Encode()
   962  	req, err := http.NewRequest("GET", urls, body)
   963  	if err != nil {
   964  		return nil, err
   965  	}
   966  	req.Header = reqHeaders
   967  	googleapi.Expand(req.URL, map[string]string{
   968  		"bucket": c.bucket,
   969  		"entity": c.entity,
   970  	})
   971  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   972  }
   973  
   974  // Do executes the "storage.bucketAccessControls.get" call.
   975  // Exactly one of *BucketAccessControl or error will be non-nil. Any
   976  // non-2xx status code is an error. Response headers are in either
   977  // *BucketAccessControl.ServerResponse.Header or (if a response was
   978  // returned at all) in error.(*googleapi.Error).Header. Use
   979  // googleapi.IsNotModified to check whether the returned error was
   980  // because http.StatusNotModified was returned.
   981  func (c *BucketAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) {
   982  	gensupport.SetOptions(c.urlParams_, opts...)
   983  	res, err := c.doRequest("json")
   984  	if res != nil && res.StatusCode == http.StatusNotModified {
   985  		if res.Body != nil {
   986  			res.Body.Close()
   987  		}
   988  		return nil, &googleapi.Error{
   989  			Code:   res.StatusCode,
   990  			Header: res.Header,
   991  		}
   992  	}
   993  	if err != nil {
   994  		return nil, err
   995  	}
   996  	defer googleapi.CloseBody(res)
   997  	if err := googleapi.CheckResponse(res); err != nil {
   998  		return nil, err
   999  	}
  1000  	ret := &BucketAccessControl{
  1001  		ServerResponse: googleapi.ServerResponse{
  1002  			Header:         res.Header,
  1003  			HTTPStatusCode: res.StatusCode,
  1004  		},
  1005  	}
  1006  	target := &ret
  1007  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1008  		return nil, err
  1009  	}
  1010  	return ret, nil
  1011  	// {
  1012  	//   "description": "Returns the ACL entry for the specified entity on the specified bucket.",
  1013  	//   "httpMethod": "GET",
  1014  	//   "id": "storage.bucketAccessControls.get",
  1015  	//   "parameterOrder": [
  1016  	//     "bucket",
  1017  	//     "entity"
  1018  	//   ],
  1019  	//   "parameters": {
  1020  	//     "bucket": {
  1021  	//       "description": "Name of a bucket.",
  1022  	//       "location": "path",
  1023  	//       "required": true,
  1024  	//       "type": "string"
  1025  	//     },
  1026  	//     "entity": {
  1027  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  1028  	//       "location": "path",
  1029  	//       "required": true,
  1030  	//       "type": "string"
  1031  	//     }
  1032  	//   },
  1033  	//   "path": "b/{bucket}/acl/{entity}",
  1034  	//   "response": {
  1035  	//     "$ref": "BucketAccessControl"
  1036  	//   },
  1037  	//   "scopes": [
  1038  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  1039  	//   ]
  1040  	// }
  1041  
  1042  }
  1043  
  1044  // method id "storage.bucketAccessControls.insert":
  1045  
  1046  type BucketAccessControlsInsertCall struct {
  1047  	s                   *Service
  1048  	bucket              string
  1049  	bucketaccesscontrol *BucketAccessControl
  1050  	urlParams_          gensupport.URLParams
  1051  	ctx_                context.Context
  1052  	header_             http.Header
  1053  }
  1054  
  1055  // Insert: Creates a new ACL entry on the specified bucket.
  1056  func (r *BucketAccessControlsService) Insert(bucket string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsInsertCall {
  1057  	c := &BucketAccessControlsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1058  	c.bucket = bucket
  1059  	c.bucketaccesscontrol = bucketaccesscontrol
  1060  	return c
  1061  }
  1062  
  1063  // Fields allows partial responses to be retrieved. See
  1064  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1065  // for more information.
  1066  func (c *BucketAccessControlsInsertCall) Fields(s ...googleapi.Field) *BucketAccessControlsInsertCall {
  1067  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1068  	return c
  1069  }
  1070  
  1071  // Context sets the context to be used in this call's Do method. Any
  1072  // pending HTTP request will be aborted if the provided context is
  1073  // canceled.
  1074  func (c *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall {
  1075  	c.ctx_ = ctx
  1076  	return c
  1077  }
  1078  
  1079  // Header returns an http.Header that can be modified by the caller to
  1080  // add HTTP headers to the request.
  1081  func (c *BucketAccessControlsInsertCall) Header() http.Header {
  1082  	if c.header_ == nil {
  1083  		c.header_ = make(http.Header)
  1084  	}
  1085  	return c.header_
  1086  }
  1087  
  1088  func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
  1089  	reqHeaders := make(http.Header)
  1090  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1091  	for k, v := range c.header_ {
  1092  		reqHeaders[k] = v
  1093  	}
  1094  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1095  	var body io.Reader = nil
  1096  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
  1097  	if err != nil {
  1098  		return nil, err
  1099  	}
  1100  	reqHeaders.Set("Content-Type", "application/json")
  1101  	c.urlParams_.Set("alt", alt)
  1102  	c.urlParams_.Set("prettyPrint", "false")
  1103  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl")
  1104  	urls += "?" + c.urlParams_.Encode()
  1105  	req, err := http.NewRequest("POST", urls, body)
  1106  	if err != nil {
  1107  		return nil, err
  1108  	}
  1109  	req.Header = reqHeaders
  1110  	googleapi.Expand(req.URL, map[string]string{
  1111  		"bucket": c.bucket,
  1112  	})
  1113  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1114  }
  1115  
  1116  // Do executes the "storage.bucketAccessControls.insert" call.
  1117  // Exactly one of *BucketAccessControl or error will be non-nil. Any
  1118  // non-2xx status code is an error. Response headers are in either
  1119  // *BucketAccessControl.ServerResponse.Header or (if a response was
  1120  // returned at all) in error.(*googleapi.Error).Header. Use
  1121  // googleapi.IsNotModified to check whether the returned error was
  1122  // because http.StatusNotModified was returned.
  1123  func (c *BucketAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) {
  1124  	gensupport.SetOptions(c.urlParams_, opts...)
  1125  	res, err := c.doRequest("json")
  1126  	if res != nil && res.StatusCode == http.StatusNotModified {
  1127  		if res.Body != nil {
  1128  			res.Body.Close()
  1129  		}
  1130  		return nil, &googleapi.Error{
  1131  			Code:   res.StatusCode,
  1132  			Header: res.Header,
  1133  		}
  1134  	}
  1135  	if err != nil {
  1136  		return nil, err
  1137  	}
  1138  	defer googleapi.CloseBody(res)
  1139  	if err := googleapi.CheckResponse(res); err != nil {
  1140  		return nil, err
  1141  	}
  1142  	ret := &BucketAccessControl{
  1143  		ServerResponse: googleapi.ServerResponse{
  1144  			Header:         res.Header,
  1145  			HTTPStatusCode: res.StatusCode,
  1146  		},
  1147  	}
  1148  	target := &ret
  1149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1150  		return nil, err
  1151  	}
  1152  	return ret, nil
  1153  	// {
  1154  	//   "description": "Creates a new ACL entry on the specified bucket.",
  1155  	//   "httpMethod": "POST",
  1156  	//   "id": "storage.bucketAccessControls.insert",
  1157  	//   "parameterOrder": [
  1158  	//     "bucket"
  1159  	//   ],
  1160  	//   "parameters": {
  1161  	//     "bucket": {
  1162  	//       "description": "Name of a bucket.",
  1163  	//       "location": "path",
  1164  	//       "required": true,
  1165  	//       "type": "string"
  1166  	//     }
  1167  	//   },
  1168  	//   "path": "b/{bucket}/acl",
  1169  	//   "request": {
  1170  	//     "$ref": "BucketAccessControl"
  1171  	//   },
  1172  	//   "response": {
  1173  	//     "$ref": "BucketAccessControl"
  1174  	//   },
  1175  	//   "scopes": [
  1176  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  1177  	//   ]
  1178  	// }
  1179  
  1180  }
  1181  
  1182  // method id "storage.bucketAccessControls.list":
  1183  
  1184  type BucketAccessControlsListCall struct {
  1185  	s            *Service
  1186  	bucket       string
  1187  	urlParams_   gensupport.URLParams
  1188  	ifNoneMatch_ string
  1189  	ctx_         context.Context
  1190  	header_      http.Header
  1191  }
  1192  
  1193  // List: Retrieves ACL entries on the specified bucket.
  1194  func (r *BucketAccessControlsService) List(bucket string) *BucketAccessControlsListCall {
  1195  	c := &BucketAccessControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1196  	c.bucket = bucket
  1197  	return c
  1198  }
  1199  
  1200  // Fields allows partial responses to be retrieved. See
  1201  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1202  // for more information.
  1203  func (c *BucketAccessControlsListCall) Fields(s ...googleapi.Field) *BucketAccessControlsListCall {
  1204  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1205  	return c
  1206  }
  1207  
  1208  // IfNoneMatch sets the optional parameter which makes the operation
  1209  // fail if the object's ETag matches the given value. This is useful for
  1210  // getting updates only after the object has changed since the last
  1211  // request. Use googleapi.IsNotModified to check whether the response
  1212  // error from Do is the result of In-None-Match.
  1213  func (c *BucketAccessControlsListCall) IfNoneMatch(entityTag string) *BucketAccessControlsListCall {
  1214  	c.ifNoneMatch_ = entityTag
  1215  	return c
  1216  }
  1217  
  1218  // Context sets the context to be used in this call's Do method. Any
  1219  // pending HTTP request will be aborted if the provided context is
  1220  // canceled.
  1221  func (c *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall {
  1222  	c.ctx_ = ctx
  1223  	return c
  1224  }
  1225  
  1226  // Header returns an http.Header that can be modified by the caller to
  1227  // add HTTP headers to the request.
  1228  func (c *BucketAccessControlsListCall) Header() http.Header {
  1229  	if c.header_ == nil {
  1230  		c.header_ = make(http.Header)
  1231  	}
  1232  	return c.header_
  1233  }
  1234  
  1235  func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
  1236  	reqHeaders := make(http.Header)
  1237  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1238  	for k, v := range c.header_ {
  1239  		reqHeaders[k] = v
  1240  	}
  1241  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1242  	if c.ifNoneMatch_ != "" {
  1243  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1244  	}
  1245  	var body io.Reader = nil
  1246  	c.urlParams_.Set("alt", alt)
  1247  	c.urlParams_.Set("prettyPrint", "false")
  1248  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl")
  1249  	urls += "?" + c.urlParams_.Encode()
  1250  	req, err := http.NewRequest("GET", urls, body)
  1251  	if err != nil {
  1252  		return nil, err
  1253  	}
  1254  	req.Header = reqHeaders
  1255  	googleapi.Expand(req.URL, map[string]string{
  1256  		"bucket": c.bucket,
  1257  	})
  1258  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1259  }
  1260  
  1261  // Do executes the "storage.bucketAccessControls.list" call.
  1262  // Exactly one of *BucketAccessControls or error will be non-nil. Any
  1263  // non-2xx status code is an error. Response headers are in either
  1264  // *BucketAccessControls.ServerResponse.Header or (if a response was
  1265  // returned at all) in error.(*googleapi.Error).Header. Use
  1266  // googleapi.IsNotModified to check whether the returned error was
  1267  // because http.StatusNotModified was returned.
  1268  func (c *BucketAccessControlsListCall) Do(opts ...googleapi.CallOption) (*BucketAccessControls, error) {
  1269  	gensupport.SetOptions(c.urlParams_, opts...)
  1270  	res, err := c.doRequest("json")
  1271  	if res != nil && res.StatusCode == http.StatusNotModified {
  1272  		if res.Body != nil {
  1273  			res.Body.Close()
  1274  		}
  1275  		return nil, &googleapi.Error{
  1276  			Code:   res.StatusCode,
  1277  			Header: res.Header,
  1278  		}
  1279  	}
  1280  	if err != nil {
  1281  		return nil, err
  1282  	}
  1283  	defer googleapi.CloseBody(res)
  1284  	if err := googleapi.CheckResponse(res); err != nil {
  1285  		return nil, err
  1286  	}
  1287  	ret := &BucketAccessControls{
  1288  		ServerResponse: googleapi.ServerResponse{
  1289  			Header:         res.Header,
  1290  			HTTPStatusCode: res.StatusCode,
  1291  		},
  1292  	}
  1293  	target := &ret
  1294  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1295  		return nil, err
  1296  	}
  1297  	return ret, nil
  1298  	// {
  1299  	//   "description": "Retrieves ACL entries on the specified bucket.",
  1300  	//   "httpMethod": "GET",
  1301  	//   "id": "storage.bucketAccessControls.list",
  1302  	//   "parameterOrder": [
  1303  	//     "bucket"
  1304  	//   ],
  1305  	//   "parameters": {
  1306  	//     "bucket": {
  1307  	//       "description": "Name of a bucket.",
  1308  	//       "location": "path",
  1309  	//       "required": true,
  1310  	//       "type": "string"
  1311  	//     }
  1312  	//   },
  1313  	//   "path": "b/{bucket}/acl",
  1314  	//   "response": {
  1315  	//     "$ref": "BucketAccessControls"
  1316  	//   },
  1317  	//   "scopes": [
  1318  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  1319  	//   ]
  1320  	// }
  1321  
  1322  }
  1323  
  1324  // method id "storage.bucketAccessControls.patch":
  1325  
  1326  type BucketAccessControlsPatchCall struct {
  1327  	s                   *Service
  1328  	bucket              string
  1329  	entity              string
  1330  	bucketaccesscontrol *BucketAccessControl
  1331  	urlParams_          gensupport.URLParams
  1332  	ctx_                context.Context
  1333  	header_             http.Header
  1334  }
  1335  
  1336  // Patch: Updates an ACL entry on the specified bucket. This method
  1337  // supports patch semantics.
  1338  func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsPatchCall {
  1339  	c := &BucketAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1340  	c.bucket = bucket
  1341  	c.entity = entity
  1342  	c.bucketaccesscontrol = bucketaccesscontrol
  1343  	return c
  1344  }
  1345  
  1346  // Fields allows partial responses to be retrieved. See
  1347  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1348  // for more information.
  1349  func (c *BucketAccessControlsPatchCall) Fields(s ...googleapi.Field) *BucketAccessControlsPatchCall {
  1350  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1351  	return c
  1352  }
  1353  
  1354  // Context sets the context to be used in this call's Do method. Any
  1355  // pending HTTP request will be aborted if the provided context is
  1356  // canceled.
  1357  func (c *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall {
  1358  	c.ctx_ = ctx
  1359  	return c
  1360  }
  1361  
  1362  // Header returns an http.Header that can be modified by the caller to
  1363  // add HTTP headers to the request.
  1364  func (c *BucketAccessControlsPatchCall) Header() http.Header {
  1365  	if c.header_ == nil {
  1366  		c.header_ = make(http.Header)
  1367  	}
  1368  	return c.header_
  1369  }
  1370  
  1371  func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
  1372  	reqHeaders := make(http.Header)
  1373  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1374  	for k, v := range c.header_ {
  1375  		reqHeaders[k] = v
  1376  	}
  1377  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1378  	var body io.Reader = nil
  1379  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
  1380  	if err != nil {
  1381  		return nil, err
  1382  	}
  1383  	reqHeaders.Set("Content-Type", "application/json")
  1384  	c.urlParams_.Set("alt", alt)
  1385  	c.urlParams_.Set("prettyPrint", "false")
  1386  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}")
  1387  	urls += "?" + c.urlParams_.Encode()
  1388  	req, err := http.NewRequest("PATCH", urls, body)
  1389  	if err != nil {
  1390  		return nil, err
  1391  	}
  1392  	req.Header = reqHeaders
  1393  	googleapi.Expand(req.URL, map[string]string{
  1394  		"bucket": c.bucket,
  1395  		"entity": c.entity,
  1396  	})
  1397  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1398  }
  1399  
  1400  // Do executes the "storage.bucketAccessControls.patch" call.
  1401  // Exactly one of *BucketAccessControl or error will be non-nil. Any
  1402  // non-2xx status code is an error. Response headers are in either
  1403  // *BucketAccessControl.ServerResponse.Header or (if a response was
  1404  // returned at all) in error.(*googleapi.Error).Header. Use
  1405  // googleapi.IsNotModified to check whether the returned error was
  1406  // because http.StatusNotModified was returned.
  1407  func (c *BucketAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) {
  1408  	gensupport.SetOptions(c.urlParams_, opts...)
  1409  	res, err := c.doRequest("json")
  1410  	if res != nil && res.StatusCode == http.StatusNotModified {
  1411  		if res.Body != nil {
  1412  			res.Body.Close()
  1413  		}
  1414  		return nil, &googleapi.Error{
  1415  			Code:   res.StatusCode,
  1416  			Header: res.Header,
  1417  		}
  1418  	}
  1419  	if err != nil {
  1420  		return nil, err
  1421  	}
  1422  	defer googleapi.CloseBody(res)
  1423  	if err := googleapi.CheckResponse(res); err != nil {
  1424  		return nil, err
  1425  	}
  1426  	ret := &BucketAccessControl{
  1427  		ServerResponse: googleapi.ServerResponse{
  1428  			Header:         res.Header,
  1429  			HTTPStatusCode: res.StatusCode,
  1430  		},
  1431  	}
  1432  	target := &ret
  1433  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1434  		return nil, err
  1435  	}
  1436  	return ret, nil
  1437  	// {
  1438  	//   "description": "Updates an ACL entry on the specified bucket. This method supports patch semantics.",
  1439  	//   "httpMethod": "PATCH",
  1440  	//   "id": "storage.bucketAccessControls.patch",
  1441  	//   "parameterOrder": [
  1442  	//     "bucket",
  1443  	//     "entity"
  1444  	//   ],
  1445  	//   "parameters": {
  1446  	//     "bucket": {
  1447  	//       "description": "Name of a bucket.",
  1448  	//       "location": "path",
  1449  	//       "required": true,
  1450  	//       "type": "string"
  1451  	//     },
  1452  	//     "entity": {
  1453  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  1454  	//       "location": "path",
  1455  	//       "required": true,
  1456  	//       "type": "string"
  1457  	//     }
  1458  	//   },
  1459  	//   "path": "b/{bucket}/acl/{entity}",
  1460  	//   "request": {
  1461  	//     "$ref": "BucketAccessControl"
  1462  	//   },
  1463  	//   "response": {
  1464  	//     "$ref": "BucketAccessControl"
  1465  	//   },
  1466  	//   "scopes": [
  1467  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  1468  	//   ]
  1469  	// }
  1470  
  1471  }
  1472  
  1473  // method id "storage.bucketAccessControls.update":
  1474  
  1475  type BucketAccessControlsUpdateCall struct {
  1476  	s                   *Service
  1477  	bucket              string
  1478  	entity              string
  1479  	bucketaccesscontrol *BucketAccessControl
  1480  	urlParams_          gensupport.URLParams
  1481  	ctx_                context.Context
  1482  	header_             http.Header
  1483  }
  1484  
  1485  // Update: Updates an ACL entry on the specified bucket.
  1486  func (r *BucketAccessControlsService) Update(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsUpdateCall {
  1487  	c := &BucketAccessControlsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1488  	c.bucket = bucket
  1489  	c.entity = entity
  1490  	c.bucketaccesscontrol = bucketaccesscontrol
  1491  	return c
  1492  }
  1493  
  1494  // Fields allows partial responses to be retrieved. See
  1495  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1496  // for more information.
  1497  func (c *BucketAccessControlsUpdateCall) Fields(s ...googleapi.Field) *BucketAccessControlsUpdateCall {
  1498  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1499  	return c
  1500  }
  1501  
  1502  // Context sets the context to be used in this call's Do method. Any
  1503  // pending HTTP request will be aborted if the provided context is
  1504  // canceled.
  1505  func (c *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall {
  1506  	c.ctx_ = ctx
  1507  	return c
  1508  }
  1509  
  1510  // Header returns an http.Header that can be modified by the caller to
  1511  // add HTTP headers to the request.
  1512  func (c *BucketAccessControlsUpdateCall) Header() http.Header {
  1513  	if c.header_ == nil {
  1514  		c.header_ = make(http.Header)
  1515  	}
  1516  	return c.header_
  1517  }
  1518  
  1519  func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
  1520  	reqHeaders := make(http.Header)
  1521  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1522  	for k, v := range c.header_ {
  1523  		reqHeaders[k] = v
  1524  	}
  1525  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1526  	var body io.Reader = nil
  1527  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
  1528  	if err != nil {
  1529  		return nil, err
  1530  	}
  1531  	reqHeaders.Set("Content-Type", "application/json")
  1532  	c.urlParams_.Set("alt", alt)
  1533  	c.urlParams_.Set("prettyPrint", "false")
  1534  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/acl/{entity}")
  1535  	urls += "?" + c.urlParams_.Encode()
  1536  	req, err := http.NewRequest("PUT", urls, body)
  1537  	if err != nil {
  1538  		return nil, err
  1539  	}
  1540  	req.Header = reqHeaders
  1541  	googleapi.Expand(req.URL, map[string]string{
  1542  		"bucket": c.bucket,
  1543  		"entity": c.entity,
  1544  	})
  1545  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1546  }
  1547  
  1548  // Do executes the "storage.bucketAccessControls.update" call.
  1549  // Exactly one of *BucketAccessControl or error will be non-nil. Any
  1550  // non-2xx status code is an error. Response headers are in either
  1551  // *BucketAccessControl.ServerResponse.Header or (if a response was
  1552  // returned at all) in error.(*googleapi.Error).Header. Use
  1553  // googleapi.IsNotModified to check whether the returned error was
  1554  // because http.StatusNotModified was returned.
  1555  func (c *BucketAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*BucketAccessControl, error) {
  1556  	gensupport.SetOptions(c.urlParams_, opts...)
  1557  	res, err := c.doRequest("json")
  1558  	if res != nil && res.StatusCode == http.StatusNotModified {
  1559  		if res.Body != nil {
  1560  			res.Body.Close()
  1561  		}
  1562  		return nil, &googleapi.Error{
  1563  			Code:   res.StatusCode,
  1564  			Header: res.Header,
  1565  		}
  1566  	}
  1567  	if err != nil {
  1568  		return nil, err
  1569  	}
  1570  	defer googleapi.CloseBody(res)
  1571  	if err := googleapi.CheckResponse(res); err != nil {
  1572  		return nil, err
  1573  	}
  1574  	ret := &BucketAccessControl{
  1575  		ServerResponse: googleapi.ServerResponse{
  1576  			Header:         res.Header,
  1577  			HTTPStatusCode: res.StatusCode,
  1578  		},
  1579  	}
  1580  	target := &ret
  1581  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1582  		return nil, err
  1583  	}
  1584  	return ret, nil
  1585  	// {
  1586  	//   "description": "Updates an ACL entry on the specified bucket.",
  1587  	//   "httpMethod": "PUT",
  1588  	//   "id": "storage.bucketAccessControls.update",
  1589  	//   "parameterOrder": [
  1590  	//     "bucket",
  1591  	//     "entity"
  1592  	//   ],
  1593  	//   "parameters": {
  1594  	//     "bucket": {
  1595  	//       "description": "Name of a bucket.",
  1596  	//       "location": "path",
  1597  	//       "required": true,
  1598  	//       "type": "string"
  1599  	//     },
  1600  	//     "entity": {
  1601  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  1602  	//       "location": "path",
  1603  	//       "required": true,
  1604  	//       "type": "string"
  1605  	//     }
  1606  	//   },
  1607  	//   "path": "b/{bucket}/acl/{entity}",
  1608  	//   "request": {
  1609  	//     "$ref": "BucketAccessControl"
  1610  	//   },
  1611  	//   "response": {
  1612  	//     "$ref": "BucketAccessControl"
  1613  	//   },
  1614  	//   "scopes": [
  1615  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  1616  	//   ]
  1617  	// }
  1618  
  1619  }
  1620  
  1621  // method id "storage.buckets.delete":
  1622  
  1623  type BucketsDeleteCall struct {
  1624  	s          *Service
  1625  	bucket     string
  1626  	urlParams_ gensupport.URLParams
  1627  	ctx_       context.Context
  1628  	header_    http.Header
  1629  }
  1630  
  1631  // Delete: Deletes an empty bucket.
  1632  func (r *BucketsService) Delete(bucket string) *BucketsDeleteCall {
  1633  	c := &BucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1634  	c.bucket = bucket
  1635  	return c
  1636  }
  1637  
  1638  // Fields allows partial responses to be retrieved. See
  1639  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1640  // for more information.
  1641  func (c *BucketsDeleteCall) Fields(s ...googleapi.Field) *BucketsDeleteCall {
  1642  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1643  	return c
  1644  }
  1645  
  1646  // Context sets the context to be used in this call's Do method. Any
  1647  // pending HTTP request will be aborted if the provided context is
  1648  // canceled.
  1649  func (c *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall {
  1650  	c.ctx_ = ctx
  1651  	return c
  1652  }
  1653  
  1654  // Header returns an http.Header that can be modified by the caller to
  1655  // add HTTP headers to the request.
  1656  func (c *BucketsDeleteCall) Header() http.Header {
  1657  	if c.header_ == nil {
  1658  		c.header_ = make(http.Header)
  1659  	}
  1660  	return c.header_
  1661  }
  1662  
  1663  func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1664  	reqHeaders := make(http.Header)
  1665  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1666  	for k, v := range c.header_ {
  1667  		reqHeaders[k] = v
  1668  	}
  1669  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1670  	var body io.Reader = nil
  1671  	c.urlParams_.Set("alt", alt)
  1672  	c.urlParams_.Set("prettyPrint", "false")
  1673  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}")
  1674  	urls += "?" + c.urlParams_.Encode()
  1675  	req, err := http.NewRequest("DELETE", urls, body)
  1676  	if err != nil {
  1677  		return nil, err
  1678  	}
  1679  	req.Header = reqHeaders
  1680  	googleapi.Expand(req.URL, map[string]string{
  1681  		"bucket": c.bucket,
  1682  	})
  1683  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1684  }
  1685  
  1686  // Do executes the "storage.buckets.delete" call.
  1687  func (c *BucketsDeleteCall) Do(opts ...googleapi.CallOption) error {
  1688  	gensupport.SetOptions(c.urlParams_, opts...)
  1689  	res, err := c.doRequest("json")
  1690  	if err != nil {
  1691  		return err
  1692  	}
  1693  	defer googleapi.CloseBody(res)
  1694  	if err := googleapi.CheckResponse(res); err != nil {
  1695  		return err
  1696  	}
  1697  	return nil
  1698  	// {
  1699  	//   "description": "Deletes an empty bucket.",
  1700  	//   "httpMethod": "DELETE",
  1701  	//   "id": "storage.buckets.delete",
  1702  	//   "parameterOrder": [
  1703  	//     "bucket"
  1704  	//   ],
  1705  	//   "parameters": {
  1706  	//     "bucket": {
  1707  	//       "description": "Name of a bucket.",
  1708  	//       "location": "path",
  1709  	//       "required": true,
  1710  	//       "type": "string"
  1711  	//     }
  1712  	//   },
  1713  	//   "path": "b/{bucket}",
  1714  	//   "scopes": [
  1715  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  1716  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  1717  	//   ]
  1718  	// }
  1719  
  1720  }
  1721  
  1722  // method id "storage.buckets.get":
  1723  
  1724  type BucketsGetCall struct {
  1725  	s            *Service
  1726  	bucket       string
  1727  	urlParams_   gensupport.URLParams
  1728  	ifNoneMatch_ string
  1729  	ctx_         context.Context
  1730  	header_      http.Header
  1731  }
  1732  
  1733  // Get: Returns metadata for the specified bucket.
  1734  func (r *BucketsService) Get(bucket string) *BucketsGetCall {
  1735  	c := &BucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1736  	c.bucket = bucket
  1737  	return c
  1738  }
  1739  
  1740  // Projection sets the optional parameter "projection": Set of
  1741  // properties to return. Defaults to no_acl.
  1742  //
  1743  // Possible values:
  1744  //
  1745  //	"full" - Include all properties.
  1746  //	"no_acl" - Omit acl and defaultObjectAcl properties.
  1747  func (c *BucketsGetCall) Projection(projection string) *BucketsGetCall {
  1748  	c.urlParams_.Set("projection", projection)
  1749  	return c
  1750  }
  1751  
  1752  // Fields allows partial responses to be retrieved. See
  1753  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1754  // for more information.
  1755  func (c *BucketsGetCall) Fields(s ...googleapi.Field) *BucketsGetCall {
  1756  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1757  	return c
  1758  }
  1759  
  1760  // IfNoneMatch sets the optional parameter which makes the operation
  1761  // fail if the object's ETag matches the given value. This is useful for
  1762  // getting updates only after the object has changed since the last
  1763  // request. Use googleapi.IsNotModified to check whether the response
  1764  // error from Do is the result of In-None-Match.
  1765  func (c *BucketsGetCall) IfNoneMatch(entityTag string) *BucketsGetCall {
  1766  	c.ifNoneMatch_ = entityTag
  1767  	return c
  1768  }
  1769  
  1770  // Context sets the context to be used in this call's Do method. Any
  1771  // pending HTTP request will be aborted if the provided context is
  1772  // canceled.
  1773  func (c *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall {
  1774  	c.ctx_ = ctx
  1775  	return c
  1776  }
  1777  
  1778  // Header returns an http.Header that can be modified by the caller to
  1779  // add HTTP headers to the request.
  1780  func (c *BucketsGetCall) Header() http.Header {
  1781  	if c.header_ == nil {
  1782  		c.header_ = make(http.Header)
  1783  	}
  1784  	return c.header_
  1785  }
  1786  
  1787  func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
  1788  	reqHeaders := make(http.Header)
  1789  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1790  	for k, v := range c.header_ {
  1791  		reqHeaders[k] = v
  1792  	}
  1793  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1794  	if c.ifNoneMatch_ != "" {
  1795  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1796  	}
  1797  	var body io.Reader = nil
  1798  	c.urlParams_.Set("alt", alt)
  1799  	c.urlParams_.Set("prettyPrint", "false")
  1800  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}")
  1801  	urls += "?" + c.urlParams_.Encode()
  1802  	req, err := http.NewRequest("GET", urls, body)
  1803  	if err != nil {
  1804  		return nil, err
  1805  	}
  1806  	req.Header = reqHeaders
  1807  	googleapi.Expand(req.URL, map[string]string{
  1808  		"bucket": c.bucket,
  1809  	})
  1810  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1811  }
  1812  
  1813  // Do executes the "storage.buckets.get" call.
  1814  // Exactly one of *Bucket or error will be non-nil. Any non-2xx status
  1815  // code is an error. Response headers are in either
  1816  // *Bucket.ServerResponse.Header or (if a response was returned at all)
  1817  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1818  // check whether the returned error was because http.StatusNotModified
  1819  // was returned.
  1820  func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
  1821  	gensupport.SetOptions(c.urlParams_, opts...)
  1822  	res, err := c.doRequest("json")
  1823  	if res != nil && res.StatusCode == http.StatusNotModified {
  1824  		if res.Body != nil {
  1825  			res.Body.Close()
  1826  		}
  1827  		return nil, &googleapi.Error{
  1828  			Code:   res.StatusCode,
  1829  			Header: res.Header,
  1830  		}
  1831  	}
  1832  	if err != nil {
  1833  		return nil, err
  1834  	}
  1835  	defer googleapi.CloseBody(res)
  1836  	if err := googleapi.CheckResponse(res); err != nil {
  1837  		return nil, err
  1838  	}
  1839  	ret := &Bucket{
  1840  		ServerResponse: googleapi.ServerResponse{
  1841  			Header:         res.Header,
  1842  			HTTPStatusCode: res.StatusCode,
  1843  		},
  1844  	}
  1845  	target := &ret
  1846  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1847  		return nil, err
  1848  	}
  1849  	return ret, nil
  1850  	// {
  1851  	//   "description": "Returns metadata for the specified bucket.",
  1852  	//   "httpMethod": "GET",
  1853  	//   "id": "storage.buckets.get",
  1854  	//   "parameterOrder": [
  1855  	//     "bucket"
  1856  	//   ],
  1857  	//   "parameters": {
  1858  	//     "bucket": {
  1859  	//       "description": "Name of a bucket.",
  1860  	//       "location": "path",
  1861  	//       "required": true,
  1862  	//       "type": "string"
  1863  	//     },
  1864  	//     "projection": {
  1865  	//       "description": "Set of properties to return. Defaults to no_acl.",
  1866  	//       "enum": [
  1867  	//         "full",
  1868  	//         "no_acl"
  1869  	//       ],
  1870  	//       "enumDescriptions": [
  1871  	//         "Include all properties.",
  1872  	//         "Omit acl and defaultObjectAcl properties."
  1873  	//       ],
  1874  	//       "location": "query",
  1875  	//       "type": "string"
  1876  	//     }
  1877  	//   },
  1878  	//   "path": "b/{bucket}",
  1879  	//   "response": {
  1880  	//     "$ref": "Bucket"
  1881  	//   },
  1882  	//   "scopes": [
  1883  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  1884  	//     "https://www.googleapis.com/auth/devstorage.read_only",
  1885  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  1886  	//   ]
  1887  	// }
  1888  
  1889  }
  1890  
  1891  // method id "storage.buckets.insert":
  1892  
  1893  type BucketsInsertCall struct {
  1894  	s          *Service
  1895  	bucket     *Bucket
  1896  	urlParams_ gensupport.URLParams
  1897  	ctx_       context.Context
  1898  	header_    http.Header
  1899  }
  1900  
  1901  // Insert: Creates a new bucket.
  1902  func (r *BucketsService) Insert(bucket *Bucket) *BucketsInsertCall {
  1903  	c := &BucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1904  	c.bucket = bucket
  1905  	return c
  1906  }
  1907  
  1908  // Projection sets the optional parameter "projection": Set of
  1909  // properties to return. Defaults to no_acl, unless the bucket resource
  1910  // specifies acl or defaultObjectAcl properties, when it defaults to
  1911  // full.
  1912  //
  1913  // Possible values:
  1914  //
  1915  //	"full" - Include all properties.
  1916  //	"no_acl" - Omit acl and defaultObjectAcl properties.
  1917  func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall {
  1918  	c.urlParams_.Set("projection", projection)
  1919  	return c
  1920  }
  1921  
  1922  // Fields allows partial responses to be retrieved. See
  1923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1924  // for more information.
  1925  func (c *BucketsInsertCall) Fields(s ...googleapi.Field) *BucketsInsertCall {
  1926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1927  	return c
  1928  }
  1929  
  1930  // Context sets the context to be used in this call's Do method. Any
  1931  // pending HTTP request will be aborted if the provided context is
  1932  // canceled.
  1933  func (c *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall {
  1934  	c.ctx_ = ctx
  1935  	return c
  1936  }
  1937  
  1938  // Header returns an http.Header that can be modified by the caller to
  1939  // add HTTP headers to the request.
  1940  func (c *BucketsInsertCall) Header() http.Header {
  1941  	if c.header_ == nil {
  1942  		c.header_ = make(http.Header)
  1943  	}
  1944  	return c.header_
  1945  }
  1946  
  1947  func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
  1948  	reqHeaders := make(http.Header)
  1949  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  1950  	for k, v := range c.header_ {
  1951  		reqHeaders[k] = v
  1952  	}
  1953  	reqHeaders.Set("User-Agent", c.s.userAgent())
  1954  	var body io.Reader = nil
  1955  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket)
  1956  	if err != nil {
  1957  		return nil, err
  1958  	}
  1959  	reqHeaders.Set("Content-Type", "application/json")
  1960  	c.urlParams_.Set("alt", alt)
  1961  	c.urlParams_.Set("prettyPrint", "false")
  1962  	urls := googleapi.ResolveRelative(c.s.BasePath, "b")
  1963  	urls += "?" + c.urlParams_.Encode()
  1964  	req, err := http.NewRequest("POST", urls, body)
  1965  	if err != nil {
  1966  		return nil, err
  1967  	}
  1968  	req.Header = reqHeaders
  1969  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1970  }
  1971  
  1972  // Do executes the "storage.buckets.insert" call.
  1973  // Exactly one of *Bucket or error will be non-nil. Any non-2xx status
  1974  // code is an error. Response headers are in either
  1975  // *Bucket.ServerResponse.Header or (if a response was returned at all)
  1976  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1977  // check whether the returned error was because http.StatusNotModified
  1978  // was returned.
  1979  func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
  1980  	gensupport.SetOptions(c.urlParams_, opts...)
  1981  	res, err := c.doRequest("json")
  1982  	if res != nil && res.StatusCode == http.StatusNotModified {
  1983  		if res.Body != nil {
  1984  			res.Body.Close()
  1985  		}
  1986  		return nil, &googleapi.Error{
  1987  			Code:   res.StatusCode,
  1988  			Header: res.Header,
  1989  		}
  1990  	}
  1991  	if err != nil {
  1992  		return nil, err
  1993  	}
  1994  	defer googleapi.CloseBody(res)
  1995  	if err := googleapi.CheckResponse(res); err != nil {
  1996  		return nil, err
  1997  	}
  1998  	ret := &Bucket{
  1999  		ServerResponse: googleapi.ServerResponse{
  2000  			Header:         res.Header,
  2001  			HTTPStatusCode: res.StatusCode,
  2002  		},
  2003  	}
  2004  	target := &ret
  2005  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2006  		return nil, err
  2007  	}
  2008  	return ret, nil
  2009  	// {
  2010  	//   "description": "Creates a new bucket.",
  2011  	//   "httpMethod": "POST",
  2012  	//   "id": "storage.buckets.insert",
  2013  	//   "parameters": {
  2014  	//     "projection": {
  2015  	//       "description": "Set of properties to return. Defaults to no_acl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.",
  2016  	//       "enum": [
  2017  	//         "full",
  2018  	//         "no_acl"
  2019  	//       ],
  2020  	//       "enumDescriptions": [
  2021  	//         "Include all properties.",
  2022  	//         "Omit acl and defaultObjectAcl properties."
  2023  	//       ],
  2024  	//       "location": "query",
  2025  	//       "type": "string"
  2026  	//     }
  2027  	//   },
  2028  	//   "path": "b",
  2029  	//   "request": {
  2030  	//     "$ref": "Bucket"
  2031  	//   },
  2032  	//   "response": {
  2033  	//     "$ref": "Bucket"
  2034  	//   },
  2035  	//   "scopes": [
  2036  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  2037  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  2038  	//   ]
  2039  	// }
  2040  
  2041  }
  2042  
  2043  // method id "storage.buckets.list":
  2044  
  2045  type BucketsListCall struct {
  2046  	s            *Service
  2047  	urlParams_   gensupport.URLParams
  2048  	ifNoneMatch_ string
  2049  	ctx_         context.Context
  2050  	header_      http.Header
  2051  }
  2052  
  2053  // List: Retrieves a list of buckets for a given project.
  2054  func (r *BucketsService) List(projectId uint64) *BucketsListCall {
  2055  	c := &BucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2056  	c.urlParams_.Set("projectId", fmt.Sprint(projectId))
  2057  	return c
  2058  }
  2059  
  2060  // MaxResults sets the optional parameter "max-results": Maximum number
  2061  // of buckets to return.
  2062  func (c *BucketsListCall) MaxResults(maxResults int64) *BucketsListCall {
  2063  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  2064  	return c
  2065  }
  2066  
  2067  // PageToken sets the optional parameter "pageToken": A
  2068  // previously-returned page token representing part of the larger set of
  2069  // results to view.
  2070  func (c *BucketsListCall) PageToken(pageToken string) *BucketsListCall {
  2071  	c.urlParams_.Set("pageToken", pageToken)
  2072  	return c
  2073  }
  2074  
  2075  // Projection sets the optional parameter "projection": Set of
  2076  // properties to return. Defaults to no_acl.
  2077  //
  2078  // Possible values:
  2079  //
  2080  //	"full" - Include all properties.
  2081  //	"no_acl" - Omit acl and defaultObjectAcl properties.
  2082  func (c *BucketsListCall) Projection(projection string) *BucketsListCall {
  2083  	c.urlParams_.Set("projection", projection)
  2084  	return c
  2085  }
  2086  
  2087  // Fields allows partial responses to be retrieved. See
  2088  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2089  // for more information.
  2090  func (c *BucketsListCall) Fields(s ...googleapi.Field) *BucketsListCall {
  2091  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2092  	return c
  2093  }
  2094  
  2095  // IfNoneMatch sets the optional parameter which makes the operation
  2096  // fail if the object's ETag matches the given value. This is useful for
  2097  // getting updates only after the object has changed since the last
  2098  // request. Use googleapi.IsNotModified to check whether the response
  2099  // error from Do is the result of In-None-Match.
  2100  func (c *BucketsListCall) IfNoneMatch(entityTag string) *BucketsListCall {
  2101  	c.ifNoneMatch_ = entityTag
  2102  	return c
  2103  }
  2104  
  2105  // Context sets the context to be used in this call's Do method. Any
  2106  // pending HTTP request will be aborted if the provided context is
  2107  // canceled.
  2108  func (c *BucketsListCall) Context(ctx context.Context) *BucketsListCall {
  2109  	c.ctx_ = ctx
  2110  	return c
  2111  }
  2112  
  2113  // Header returns an http.Header that can be modified by the caller to
  2114  // add HTTP headers to the request.
  2115  func (c *BucketsListCall) Header() http.Header {
  2116  	if c.header_ == nil {
  2117  		c.header_ = make(http.Header)
  2118  	}
  2119  	return c.header_
  2120  }
  2121  
  2122  func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
  2123  	reqHeaders := make(http.Header)
  2124  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2125  	for k, v := range c.header_ {
  2126  		reqHeaders[k] = v
  2127  	}
  2128  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2129  	if c.ifNoneMatch_ != "" {
  2130  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2131  	}
  2132  	var body io.Reader = nil
  2133  	c.urlParams_.Set("alt", alt)
  2134  	c.urlParams_.Set("prettyPrint", "false")
  2135  	urls := googleapi.ResolveRelative(c.s.BasePath, "b")
  2136  	urls += "?" + c.urlParams_.Encode()
  2137  	req, err := http.NewRequest("GET", urls, body)
  2138  	if err != nil {
  2139  		return nil, err
  2140  	}
  2141  	req.Header = reqHeaders
  2142  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2143  }
  2144  
  2145  // Do executes the "storage.buckets.list" call.
  2146  // Exactly one of *Buckets or error will be non-nil. Any non-2xx status
  2147  // code is an error. Response headers are in either
  2148  // *Buckets.ServerResponse.Header or (if a response was returned at all)
  2149  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2150  // check whether the returned error was because http.StatusNotModified
  2151  // was returned.
  2152  func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error) {
  2153  	gensupport.SetOptions(c.urlParams_, opts...)
  2154  	res, err := c.doRequest("json")
  2155  	if res != nil && res.StatusCode == http.StatusNotModified {
  2156  		if res.Body != nil {
  2157  			res.Body.Close()
  2158  		}
  2159  		return nil, &googleapi.Error{
  2160  			Code:   res.StatusCode,
  2161  			Header: res.Header,
  2162  		}
  2163  	}
  2164  	if err != nil {
  2165  		return nil, err
  2166  	}
  2167  	defer googleapi.CloseBody(res)
  2168  	if err := googleapi.CheckResponse(res); err != nil {
  2169  		return nil, err
  2170  	}
  2171  	ret := &Buckets{
  2172  		ServerResponse: googleapi.ServerResponse{
  2173  			Header:         res.Header,
  2174  			HTTPStatusCode: res.StatusCode,
  2175  		},
  2176  	}
  2177  	target := &ret
  2178  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2179  		return nil, err
  2180  	}
  2181  	return ret, nil
  2182  	// {
  2183  	//   "description": "Retrieves a list of buckets for a given project.",
  2184  	//   "httpMethod": "GET",
  2185  	//   "id": "storage.buckets.list",
  2186  	//   "parameterOrder": [
  2187  	//     "projectId"
  2188  	//   ],
  2189  	//   "parameters": {
  2190  	//     "max-results": {
  2191  	//       "description": "Maximum number of buckets to return.",
  2192  	//       "format": "uint32",
  2193  	//       "location": "query",
  2194  	//       "minimum": "0",
  2195  	//       "type": "integer"
  2196  	//     },
  2197  	//     "pageToken": {
  2198  	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
  2199  	//       "location": "query",
  2200  	//       "type": "string"
  2201  	//     },
  2202  	//     "projectId": {
  2203  	//       "description": "A valid API project identifier.",
  2204  	//       "format": "uint64",
  2205  	//       "location": "query",
  2206  	//       "required": true,
  2207  	//       "type": "string"
  2208  	//     },
  2209  	//     "projection": {
  2210  	//       "description": "Set of properties to return. Defaults to no_acl.",
  2211  	//       "enum": [
  2212  	//         "full",
  2213  	//         "no_acl"
  2214  	//       ],
  2215  	//       "enumDescriptions": [
  2216  	//         "Include all properties.",
  2217  	//         "Omit acl and defaultObjectAcl properties."
  2218  	//       ],
  2219  	//       "location": "query",
  2220  	//       "type": "string"
  2221  	//     }
  2222  	//   },
  2223  	//   "path": "b",
  2224  	//   "response": {
  2225  	//     "$ref": "Buckets"
  2226  	//   },
  2227  	//   "scopes": [
  2228  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  2229  	//     "https://www.googleapis.com/auth/devstorage.read_only",
  2230  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  2231  	//   ]
  2232  	// }
  2233  
  2234  }
  2235  
  2236  // Pages invokes f for each page of results.
  2237  // A non-nil error returned from f will halt the iteration.
  2238  // The provided context supersedes any context provided to the Context method.
  2239  func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) error {
  2240  	c.ctx_ = ctx
  2241  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2242  	for {
  2243  		x, err := c.Do()
  2244  		if err != nil {
  2245  			return err
  2246  		}
  2247  		if err := f(x); err != nil {
  2248  			return err
  2249  		}
  2250  		if x.NextPageToken == "" {
  2251  			return nil
  2252  		}
  2253  		c.PageToken(x.NextPageToken)
  2254  	}
  2255  }
  2256  
  2257  // method id "storage.buckets.patch":
  2258  
  2259  type BucketsPatchCall struct {
  2260  	s          *Service
  2261  	bucket     string
  2262  	bucket2    *Bucket
  2263  	urlParams_ gensupport.URLParams
  2264  	ctx_       context.Context
  2265  	header_    http.Header
  2266  }
  2267  
  2268  // Patch: Updates a bucket. This method supports patch semantics.
  2269  func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall {
  2270  	c := &BucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2271  	c.bucket = bucket
  2272  	c.bucket2 = bucket2
  2273  	return c
  2274  }
  2275  
  2276  // Projection sets the optional parameter "projection": Set of
  2277  // properties to return. Defaults to full.
  2278  //
  2279  // Possible values:
  2280  //
  2281  //	"full" - Include all properties.
  2282  //	"no_acl" - Omit acl and defaultObjectAcl properties.
  2283  func (c *BucketsPatchCall) Projection(projection string) *BucketsPatchCall {
  2284  	c.urlParams_.Set("projection", projection)
  2285  	return c
  2286  }
  2287  
  2288  // Fields allows partial responses to be retrieved. See
  2289  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2290  // for more information.
  2291  func (c *BucketsPatchCall) Fields(s ...googleapi.Field) *BucketsPatchCall {
  2292  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2293  	return c
  2294  }
  2295  
  2296  // Context sets the context to be used in this call's Do method. Any
  2297  // pending HTTP request will be aborted if the provided context is
  2298  // canceled.
  2299  func (c *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall {
  2300  	c.ctx_ = ctx
  2301  	return c
  2302  }
  2303  
  2304  // Header returns an http.Header that can be modified by the caller to
  2305  // add HTTP headers to the request.
  2306  func (c *BucketsPatchCall) Header() http.Header {
  2307  	if c.header_ == nil {
  2308  		c.header_ = make(http.Header)
  2309  	}
  2310  	return c.header_
  2311  }
  2312  
  2313  func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
  2314  	reqHeaders := make(http.Header)
  2315  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2316  	for k, v := range c.header_ {
  2317  		reqHeaders[k] = v
  2318  	}
  2319  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2320  	var body io.Reader = nil
  2321  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
  2322  	if err != nil {
  2323  		return nil, err
  2324  	}
  2325  	reqHeaders.Set("Content-Type", "application/json")
  2326  	c.urlParams_.Set("alt", alt)
  2327  	c.urlParams_.Set("prettyPrint", "false")
  2328  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}")
  2329  	urls += "?" + c.urlParams_.Encode()
  2330  	req, err := http.NewRequest("PATCH", urls, body)
  2331  	if err != nil {
  2332  		return nil, err
  2333  	}
  2334  	req.Header = reqHeaders
  2335  	googleapi.Expand(req.URL, map[string]string{
  2336  		"bucket": c.bucket,
  2337  	})
  2338  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2339  }
  2340  
  2341  // Do executes the "storage.buckets.patch" call.
  2342  // Exactly one of *Bucket or error will be non-nil. Any non-2xx status
  2343  // code is an error. Response headers are in either
  2344  // *Bucket.ServerResponse.Header or (if a response was returned at all)
  2345  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2346  // check whether the returned error was because http.StatusNotModified
  2347  // was returned.
  2348  func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
  2349  	gensupport.SetOptions(c.urlParams_, opts...)
  2350  	res, err := c.doRequest("json")
  2351  	if res != nil && res.StatusCode == http.StatusNotModified {
  2352  		if res.Body != nil {
  2353  			res.Body.Close()
  2354  		}
  2355  		return nil, &googleapi.Error{
  2356  			Code:   res.StatusCode,
  2357  			Header: res.Header,
  2358  		}
  2359  	}
  2360  	if err != nil {
  2361  		return nil, err
  2362  	}
  2363  	defer googleapi.CloseBody(res)
  2364  	if err := googleapi.CheckResponse(res); err != nil {
  2365  		return nil, err
  2366  	}
  2367  	ret := &Bucket{
  2368  		ServerResponse: googleapi.ServerResponse{
  2369  			Header:         res.Header,
  2370  			HTTPStatusCode: res.StatusCode,
  2371  		},
  2372  	}
  2373  	target := &ret
  2374  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2375  		return nil, err
  2376  	}
  2377  	return ret, nil
  2378  	// {
  2379  	//   "description": "Updates a bucket. This method supports patch semantics.",
  2380  	//   "httpMethod": "PATCH",
  2381  	//   "id": "storage.buckets.patch",
  2382  	//   "parameterOrder": [
  2383  	//     "bucket"
  2384  	//   ],
  2385  	//   "parameters": {
  2386  	//     "bucket": {
  2387  	//       "description": "Name of a bucket.",
  2388  	//       "location": "path",
  2389  	//       "required": true,
  2390  	//       "type": "string"
  2391  	//     },
  2392  	//     "projection": {
  2393  	//       "description": "Set of properties to return. Defaults to full.",
  2394  	//       "enum": [
  2395  	//         "full",
  2396  	//         "no_acl"
  2397  	//       ],
  2398  	//       "enumDescriptions": [
  2399  	//         "Include all properties.",
  2400  	//         "Omit acl and defaultObjectAcl properties."
  2401  	//       ],
  2402  	//       "location": "query",
  2403  	//       "type": "string"
  2404  	//     }
  2405  	//   },
  2406  	//   "path": "b/{bucket}",
  2407  	//   "request": {
  2408  	//     "$ref": "Bucket"
  2409  	//   },
  2410  	//   "response": {
  2411  	//     "$ref": "Bucket"
  2412  	//   },
  2413  	//   "scopes": [
  2414  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  2415  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  2416  	//   ]
  2417  	// }
  2418  
  2419  }
  2420  
  2421  // method id "storage.buckets.update":
  2422  
  2423  type BucketsUpdateCall struct {
  2424  	s          *Service
  2425  	bucket     string
  2426  	bucket2    *Bucket
  2427  	urlParams_ gensupport.URLParams
  2428  	ctx_       context.Context
  2429  	header_    http.Header
  2430  }
  2431  
  2432  // Update: Updates a bucket.
  2433  func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCall {
  2434  	c := &BucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2435  	c.bucket = bucket
  2436  	c.bucket2 = bucket2
  2437  	return c
  2438  }
  2439  
  2440  // Projection sets the optional parameter "projection": Set of
  2441  // properties to return. Defaults to full.
  2442  //
  2443  // Possible values:
  2444  //
  2445  //	"full" - Include all properties.
  2446  //	"no_acl" - Omit acl and defaultObjectAcl properties.
  2447  func (c *BucketsUpdateCall) Projection(projection string) *BucketsUpdateCall {
  2448  	c.urlParams_.Set("projection", projection)
  2449  	return c
  2450  }
  2451  
  2452  // Fields allows partial responses to be retrieved. See
  2453  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2454  // for more information.
  2455  func (c *BucketsUpdateCall) Fields(s ...googleapi.Field) *BucketsUpdateCall {
  2456  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2457  	return c
  2458  }
  2459  
  2460  // Context sets the context to be used in this call's Do method. Any
  2461  // pending HTTP request will be aborted if the provided context is
  2462  // canceled.
  2463  func (c *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall {
  2464  	c.ctx_ = ctx
  2465  	return c
  2466  }
  2467  
  2468  // Header returns an http.Header that can be modified by the caller to
  2469  // add HTTP headers to the request.
  2470  func (c *BucketsUpdateCall) Header() http.Header {
  2471  	if c.header_ == nil {
  2472  		c.header_ = make(http.Header)
  2473  	}
  2474  	return c.header_
  2475  }
  2476  
  2477  func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
  2478  	reqHeaders := make(http.Header)
  2479  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2480  	for k, v := range c.header_ {
  2481  		reqHeaders[k] = v
  2482  	}
  2483  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2484  	var body io.Reader = nil
  2485  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
  2486  	if err != nil {
  2487  		return nil, err
  2488  	}
  2489  	reqHeaders.Set("Content-Type", "application/json")
  2490  	c.urlParams_.Set("alt", alt)
  2491  	c.urlParams_.Set("prettyPrint", "false")
  2492  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}")
  2493  	urls += "?" + c.urlParams_.Encode()
  2494  	req, err := http.NewRequest("PUT", urls, body)
  2495  	if err != nil {
  2496  		return nil, err
  2497  	}
  2498  	req.Header = reqHeaders
  2499  	googleapi.Expand(req.URL, map[string]string{
  2500  		"bucket": c.bucket,
  2501  	})
  2502  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2503  }
  2504  
  2505  // Do executes the "storage.buckets.update" call.
  2506  // Exactly one of *Bucket or error will be non-nil. Any non-2xx status
  2507  // code is an error. Response headers are in either
  2508  // *Bucket.ServerResponse.Header or (if a response was returned at all)
  2509  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2510  // check whether the returned error was because http.StatusNotModified
  2511  // was returned.
  2512  func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) {
  2513  	gensupport.SetOptions(c.urlParams_, opts...)
  2514  	res, err := c.doRequest("json")
  2515  	if res != nil && res.StatusCode == http.StatusNotModified {
  2516  		if res.Body != nil {
  2517  			res.Body.Close()
  2518  		}
  2519  		return nil, &googleapi.Error{
  2520  			Code:   res.StatusCode,
  2521  			Header: res.Header,
  2522  		}
  2523  	}
  2524  	if err != nil {
  2525  		return nil, err
  2526  	}
  2527  	defer googleapi.CloseBody(res)
  2528  	if err := googleapi.CheckResponse(res); err != nil {
  2529  		return nil, err
  2530  	}
  2531  	ret := &Bucket{
  2532  		ServerResponse: googleapi.ServerResponse{
  2533  			Header:         res.Header,
  2534  			HTTPStatusCode: res.StatusCode,
  2535  		},
  2536  	}
  2537  	target := &ret
  2538  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2539  		return nil, err
  2540  	}
  2541  	return ret, nil
  2542  	// {
  2543  	//   "description": "Updates a bucket.",
  2544  	//   "httpMethod": "PUT",
  2545  	//   "id": "storage.buckets.update",
  2546  	//   "parameterOrder": [
  2547  	//     "bucket"
  2548  	//   ],
  2549  	//   "parameters": {
  2550  	//     "bucket": {
  2551  	//       "description": "Name of a bucket.",
  2552  	//       "location": "path",
  2553  	//       "required": true,
  2554  	//       "type": "string"
  2555  	//     },
  2556  	//     "projection": {
  2557  	//       "description": "Set of properties to return. Defaults to full.",
  2558  	//       "enum": [
  2559  	//         "full",
  2560  	//         "no_acl"
  2561  	//       ],
  2562  	//       "enumDescriptions": [
  2563  	//         "Include all properties.",
  2564  	//         "Omit acl and defaultObjectAcl properties."
  2565  	//       ],
  2566  	//       "location": "query",
  2567  	//       "type": "string"
  2568  	//     }
  2569  	//   },
  2570  	//   "path": "b/{bucket}",
  2571  	//   "request": {
  2572  	//     "$ref": "Bucket"
  2573  	//   },
  2574  	//   "response": {
  2575  	//     "$ref": "Bucket"
  2576  	//   },
  2577  	//   "scopes": [
  2578  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  2579  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  2580  	//   ]
  2581  	// }
  2582  
  2583  }
  2584  
  2585  // method id "storage.objectAccessControls.delete":
  2586  
  2587  type ObjectAccessControlsDeleteCall struct {
  2588  	s          *Service
  2589  	bucket     string
  2590  	object     string
  2591  	entity     string
  2592  	urlParams_ gensupport.URLParams
  2593  	ctx_       context.Context
  2594  	header_    http.Header
  2595  }
  2596  
  2597  // Delete: Deletes the ACL entry for the specified entity on the
  2598  // specified object.
  2599  func (r *ObjectAccessControlsService) Delete(bucket string, object string, entity string) *ObjectAccessControlsDeleteCall {
  2600  	c := &ObjectAccessControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2601  	c.bucket = bucket
  2602  	c.object = object
  2603  	c.entity = entity
  2604  	return c
  2605  }
  2606  
  2607  // Fields allows partial responses to be retrieved. See
  2608  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2609  // for more information.
  2610  func (c *ObjectAccessControlsDeleteCall) Fields(s ...googleapi.Field) *ObjectAccessControlsDeleteCall {
  2611  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2612  	return c
  2613  }
  2614  
  2615  // Context sets the context to be used in this call's Do method. Any
  2616  // pending HTTP request will be aborted if the provided context is
  2617  // canceled.
  2618  func (c *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall {
  2619  	c.ctx_ = ctx
  2620  	return c
  2621  }
  2622  
  2623  // Header returns an http.Header that can be modified by the caller to
  2624  // add HTTP headers to the request.
  2625  func (c *ObjectAccessControlsDeleteCall) Header() http.Header {
  2626  	if c.header_ == nil {
  2627  		c.header_ = make(http.Header)
  2628  	}
  2629  	return c.header_
  2630  }
  2631  
  2632  func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2633  	reqHeaders := make(http.Header)
  2634  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2635  	for k, v := range c.header_ {
  2636  		reqHeaders[k] = v
  2637  	}
  2638  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2639  	var body io.Reader = nil
  2640  	c.urlParams_.Set("alt", alt)
  2641  	c.urlParams_.Set("prettyPrint", "false")
  2642  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}")
  2643  	urls += "?" + c.urlParams_.Encode()
  2644  	req, err := http.NewRequest("DELETE", urls, body)
  2645  	if err != nil {
  2646  		return nil, err
  2647  	}
  2648  	req.Header = reqHeaders
  2649  	googleapi.Expand(req.URL, map[string]string{
  2650  		"bucket": c.bucket,
  2651  		"object": c.object,
  2652  		"entity": c.entity,
  2653  	})
  2654  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2655  }
  2656  
  2657  // Do executes the "storage.objectAccessControls.delete" call.
  2658  func (c *ObjectAccessControlsDeleteCall) Do(opts ...googleapi.CallOption) error {
  2659  	gensupport.SetOptions(c.urlParams_, opts...)
  2660  	res, err := c.doRequest("json")
  2661  	if err != nil {
  2662  		return err
  2663  	}
  2664  	defer googleapi.CloseBody(res)
  2665  	if err := googleapi.CheckResponse(res); err != nil {
  2666  		return err
  2667  	}
  2668  	return nil
  2669  	// {
  2670  	//   "description": "Deletes the ACL entry for the specified entity on the specified object.",
  2671  	//   "httpMethod": "DELETE",
  2672  	//   "id": "storage.objectAccessControls.delete",
  2673  	//   "parameterOrder": [
  2674  	//     "bucket",
  2675  	//     "object",
  2676  	//     "entity"
  2677  	//   ],
  2678  	//   "parameters": {
  2679  	//     "bucket": {
  2680  	//       "description": "Name of a bucket.",
  2681  	//       "location": "path",
  2682  	//       "required": true,
  2683  	//       "type": "string"
  2684  	//     },
  2685  	//     "entity": {
  2686  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  2687  	//       "location": "path",
  2688  	//       "required": true,
  2689  	//       "type": "string"
  2690  	//     },
  2691  	//     "object": {
  2692  	//       "description": "Name of the object.",
  2693  	//       "location": "path",
  2694  	//       "required": true,
  2695  	//       "type": "string"
  2696  	//     }
  2697  	//   },
  2698  	//   "path": "b/{bucket}/o/{object}/acl/{entity}",
  2699  	//   "scopes": [
  2700  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  2701  	//   ]
  2702  	// }
  2703  
  2704  }
  2705  
  2706  // method id "storage.objectAccessControls.get":
  2707  
  2708  type ObjectAccessControlsGetCall struct {
  2709  	s            *Service
  2710  	bucket       string
  2711  	object       string
  2712  	entity       string
  2713  	urlParams_   gensupport.URLParams
  2714  	ifNoneMatch_ string
  2715  	ctx_         context.Context
  2716  	header_      http.Header
  2717  }
  2718  
  2719  // Get: Returns the ACL entry for the specified entity on the specified
  2720  // object.
  2721  func (r *ObjectAccessControlsService) Get(bucket string, object string, entity string) *ObjectAccessControlsGetCall {
  2722  	c := &ObjectAccessControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2723  	c.bucket = bucket
  2724  	c.object = object
  2725  	c.entity = entity
  2726  	return c
  2727  }
  2728  
  2729  // Fields allows partial responses to be retrieved. See
  2730  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2731  // for more information.
  2732  func (c *ObjectAccessControlsGetCall) Fields(s ...googleapi.Field) *ObjectAccessControlsGetCall {
  2733  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2734  	return c
  2735  }
  2736  
  2737  // IfNoneMatch sets the optional parameter which makes the operation
  2738  // fail if the object's ETag matches the given value. This is useful for
  2739  // getting updates only after the object has changed since the last
  2740  // request. Use googleapi.IsNotModified to check whether the response
  2741  // error from Do is the result of In-None-Match.
  2742  func (c *ObjectAccessControlsGetCall) IfNoneMatch(entityTag string) *ObjectAccessControlsGetCall {
  2743  	c.ifNoneMatch_ = entityTag
  2744  	return c
  2745  }
  2746  
  2747  // Context sets the context to be used in this call's Do method. Any
  2748  // pending HTTP request will be aborted if the provided context is
  2749  // canceled.
  2750  func (c *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall {
  2751  	c.ctx_ = ctx
  2752  	return c
  2753  }
  2754  
  2755  // Header returns an http.Header that can be modified by the caller to
  2756  // add HTTP headers to the request.
  2757  func (c *ObjectAccessControlsGetCall) Header() http.Header {
  2758  	if c.header_ == nil {
  2759  		c.header_ = make(http.Header)
  2760  	}
  2761  	return c.header_
  2762  }
  2763  
  2764  func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
  2765  	reqHeaders := make(http.Header)
  2766  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2767  	for k, v := range c.header_ {
  2768  		reqHeaders[k] = v
  2769  	}
  2770  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2771  	if c.ifNoneMatch_ != "" {
  2772  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2773  	}
  2774  	var body io.Reader = nil
  2775  	c.urlParams_.Set("alt", alt)
  2776  	c.urlParams_.Set("prettyPrint", "false")
  2777  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}")
  2778  	urls += "?" + c.urlParams_.Encode()
  2779  	req, err := http.NewRequest("GET", urls, body)
  2780  	if err != nil {
  2781  		return nil, err
  2782  	}
  2783  	req.Header = reqHeaders
  2784  	googleapi.Expand(req.URL, map[string]string{
  2785  		"bucket": c.bucket,
  2786  		"object": c.object,
  2787  		"entity": c.entity,
  2788  	})
  2789  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2790  }
  2791  
  2792  // Do executes the "storage.objectAccessControls.get" call.
  2793  // Exactly one of *ObjectAccessControl or error will be non-nil. Any
  2794  // non-2xx status code is an error. Response headers are in either
  2795  // *ObjectAccessControl.ServerResponse.Header or (if a response was
  2796  // returned at all) in error.(*googleapi.Error).Header. Use
  2797  // googleapi.IsNotModified to check whether the returned error was
  2798  // because http.StatusNotModified was returned.
  2799  func (c *ObjectAccessControlsGetCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) {
  2800  	gensupport.SetOptions(c.urlParams_, opts...)
  2801  	res, err := c.doRequest("json")
  2802  	if res != nil && res.StatusCode == http.StatusNotModified {
  2803  		if res.Body != nil {
  2804  			res.Body.Close()
  2805  		}
  2806  		return nil, &googleapi.Error{
  2807  			Code:   res.StatusCode,
  2808  			Header: res.Header,
  2809  		}
  2810  	}
  2811  	if err != nil {
  2812  		return nil, err
  2813  	}
  2814  	defer googleapi.CloseBody(res)
  2815  	if err := googleapi.CheckResponse(res); err != nil {
  2816  		return nil, err
  2817  	}
  2818  	ret := &ObjectAccessControl{
  2819  		ServerResponse: googleapi.ServerResponse{
  2820  			Header:         res.Header,
  2821  			HTTPStatusCode: res.StatusCode,
  2822  		},
  2823  	}
  2824  	target := &ret
  2825  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2826  		return nil, err
  2827  	}
  2828  	return ret, nil
  2829  	// {
  2830  	//   "description": "Returns the ACL entry for the specified entity on the specified object.",
  2831  	//   "httpMethod": "GET",
  2832  	//   "id": "storage.objectAccessControls.get",
  2833  	//   "parameterOrder": [
  2834  	//     "bucket",
  2835  	//     "object",
  2836  	//     "entity"
  2837  	//   ],
  2838  	//   "parameters": {
  2839  	//     "bucket": {
  2840  	//       "description": "Name of a bucket.",
  2841  	//       "location": "path",
  2842  	//       "required": true,
  2843  	//       "type": "string"
  2844  	//     },
  2845  	//     "entity": {
  2846  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  2847  	//       "location": "path",
  2848  	//       "required": true,
  2849  	//       "type": "string"
  2850  	//     },
  2851  	//     "object": {
  2852  	//       "description": "Name of the object.",
  2853  	//       "location": "path",
  2854  	//       "required": true,
  2855  	//       "type": "string"
  2856  	//     }
  2857  	//   },
  2858  	//   "path": "b/{bucket}/o/{object}/acl/{entity}",
  2859  	//   "response": {
  2860  	//     "$ref": "ObjectAccessControl"
  2861  	//   },
  2862  	//   "scopes": [
  2863  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  2864  	//   ]
  2865  	// }
  2866  
  2867  }
  2868  
  2869  // method id "storage.objectAccessControls.insert":
  2870  
  2871  type ObjectAccessControlsInsertCall struct {
  2872  	s                   *Service
  2873  	bucket              string
  2874  	object              string
  2875  	objectaccesscontrol *ObjectAccessControl
  2876  	urlParams_          gensupport.URLParams
  2877  	ctx_                context.Context
  2878  	header_             http.Header
  2879  }
  2880  
  2881  // Insert: Creates a new ACL entry on the specified object.
  2882  func (r *ObjectAccessControlsService) Insert(bucket string, object string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsInsertCall {
  2883  	c := &ObjectAccessControlsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2884  	c.bucket = bucket
  2885  	c.object = object
  2886  	c.objectaccesscontrol = objectaccesscontrol
  2887  	return c
  2888  }
  2889  
  2890  // Fields allows partial responses to be retrieved. See
  2891  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2892  // for more information.
  2893  func (c *ObjectAccessControlsInsertCall) Fields(s ...googleapi.Field) *ObjectAccessControlsInsertCall {
  2894  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2895  	return c
  2896  }
  2897  
  2898  // Context sets the context to be used in this call's Do method. Any
  2899  // pending HTTP request will be aborted if the provided context is
  2900  // canceled.
  2901  func (c *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall {
  2902  	c.ctx_ = ctx
  2903  	return c
  2904  }
  2905  
  2906  // Header returns an http.Header that can be modified by the caller to
  2907  // add HTTP headers to the request.
  2908  func (c *ObjectAccessControlsInsertCall) Header() http.Header {
  2909  	if c.header_ == nil {
  2910  		c.header_ = make(http.Header)
  2911  	}
  2912  	return c.header_
  2913  }
  2914  
  2915  func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
  2916  	reqHeaders := make(http.Header)
  2917  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  2918  	for k, v := range c.header_ {
  2919  		reqHeaders[k] = v
  2920  	}
  2921  	reqHeaders.Set("User-Agent", c.s.userAgent())
  2922  	var body io.Reader = nil
  2923  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
  2924  	if err != nil {
  2925  		return nil, err
  2926  	}
  2927  	reqHeaders.Set("Content-Type", "application/json")
  2928  	c.urlParams_.Set("alt", alt)
  2929  	c.urlParams_.Set("prettyPrint", "false")
  2930  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl")
  2931  	urls += "?" + c.urlParams_.Encode()
  2932  	req, err := http.NewRequest("POST", urls, body)
  2933  	if err != nil {
  2934  		return nil, err
  2935  	}
  2936  	req.Header = reqHeaders
  2937  	googleapi.Expand(req.URL, map[string]string{
  2938  		"bucket": c.bucket,
  2939  		"object": c.object,
  2940  	})
  2941  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2942  }
  2943  
  2944  // Do executes the "storage.objectAccessControls.insert" call.
  2945  // Exactly one of *ObjectAccessControl or error will be non-nil. Any
  2946  // non-2xx status code is an error. Response headers are in either
  2947  // *ObjectAccessControl.ServerResponse.Header or (if a response was
  2948  // returned at all) in error.(*googleapi.Error).Header. Use
  2949  // googleapi.IsNotModified to check whether the returned error was
  2950  // because http.StatusNotModified was returned.
  2951  func (c *ObjectAccessControlsInsertCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) {
  2952  	gensupport.SetOptions(c.urlParams_, opts...)
  2953  	res, err := c.doRequest("json")
  2954  	if res != nil && res.StatusCode == http.StatusNotModified {
  2955  		if res.Body != nil {
  2956  			res.Body.Close()
  2957  		}
  2958  		return nil, &googleapi.Error{
  2959  			Code:   res.StatusCode,
  2960  			Header: res.Header,
  2961  		}
  2962  	}
  2963  	if err != nil {
  2964  		return nil, err
  2965  	}
  2966  	defer googleapi.CloseBody(res)
  2967  	if err := googleapi.CheckResponse(res); err != nil {
  2968  		return nil, err
  2969  	}
  2970  	ret := &ObjectAccessControl{
  2971  		ServerResponse: googleapi.ServerResponse{
  2972  			Header:         res.Header,
  2973  			HTTPStatusCode: res.StatusCode,
  2974  		},
  2975  	}
  2976  	target := &ret
  2977  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2978  		return nil, err
  2979  	}
  2980  	return ret, nil
  2981  	// {
  2982  	//   "description": "Creates a new ACL entry on the specified object.",
  2983  	//   "httpMethod": "POST",
  2984  	//   "id": "storage.objectAccessControls.insert",
  2985  	//   "parameterOrder": [
  2986  	//     "bucket",
  2987  	//     "object"
  2988  	//   ],
  2989  	//   "parameters": {
  2990  	//     "bucket": {
  2991  	//       "description": "Name of a bucket.",
  2992  	//       "location": "path",
  2993  	//       "required": true,
  2994  	//       "type": "string"
  2995  	//     },
  2996  	//     "object": {
  2997  	//       "description": "Name of the object.",
  2998  	//       "location": "path",
  2999  	//       "required": true,
  3000  	//       "type": "string"
  3001  	//     }
  3002  	//   },
  3003  	//   "path": "b/{bucket}/o/{object}/acl",
  3004  	//   "request": {
  3005  	//     "$ref": "ObjectAccessControl"
  3006  	//   },
  3007  	//   "response": {
  3008  	//     "$ref": "ObjectAccessControl"
  3009  	//   },
  3010  	//   "scopes": [
  3011  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  3012  	//   ]
  3013  	// }
  3014  
  3015  }
  3016  
  3017  // method id "storage.objectAccessControls.list":
  3018  
  3019  type ObjectAccessControlsListCall struct {
  3020  	s            *Service
  3021  	bucket       string
  3022  	object       string
  3023  	urlParams_   gensupport.URLParams
  3024  	ifNoneMatch_ string
  3025  	ctx_         context.Context
  3026  	header_      http.Header
  3027  }
  3028  
  3029  // List: Retrieves ACL entries on the specified object.
  3030  func (r *ObjectAccessControlsService) List(bucket string, object string) *ObjectAccessControlsListCall {
  3031  	c := &ObjectAccessControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3032  	c.bucket = bucket
  3033  	c.object = object
  3034  	return c
  3035  }
  3036  
  3037  // Fields allows partial responses to be retrieved. See
  3038  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3039  // for more information.
  3040  func (c *ObjectAccessControlsListCall) Fields(s ...googleapi.Field) *ObjectAccessControlsListCall {
  3041  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3042  	return c
  3043  }
  3044  
  3045  // IfNoneMatch sets the optional parameter which makes the operation
  3046  // fail if the object's ETag matches the given value. This is useful for
  3047  // getting updates only after the object has changed since the last
  3048  // request. Use googleapi.IsNotModified to check whether the response
  3049  // error from Do is the result of In-None-Match.
  3050  func (c *ObjectAccessControlsListCall) IfNoneMatch(entityTag string) *ObjectAccessControlsListCall {
  3051  	c.ifNoneMatch_ = entityTag
  3052  	return c
  3053  }
  3054  
  3055  // Context sets the context to be used in this call's Do method. Any
  3056  // pending HTTP request will be aborted if the provided context is
  3057  // canceled.
  3058  func (c *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall {
  3059  	c.ctx_ = ctx
  3060  	return c
  3061  }
  3062  
  3063  // Header returns an http.Header that can be modified by the caller to
  3064  // add HTTP headers to the request.
  3065  func (c *ObjectAccessControlsListCall) Header() http.Header {
  3066  	if c.header_ == nil {
  3067  		c.header_ = make(http.Header)
  3068  	}
  3069  	return c.header_
  3070  }
  3071  
  3072  func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
  3073  	reqHeaders := make(http.Header)
  3074  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3075  	for k, v := range c.header_ {
  3076  		reqHeaders[k] = v
  3077  	}
  3078  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3079  	if c.ifNoneMatch_ != "" {
  3080  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3081  	}
  3082  	var body io.Reader = nil
  3083  	c.urlParams_.Set("alt", alt)
  3084  	c.urlParams_.Set("prettyPrint", "false")
  3085  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl")
  3086  	urls += "?" + c.urlParams_.Encode()
  3087  	req, err := http.NewRequest("GET", urls, body)
  3088  	if err != nil {
  3089  		return nil, err
  3090  	}
  3091  	req.Header = reqHeaders
  3092  	googleapi.Expand(req.URL, map[string]string{
  3093  		"bucket": c.bucket,
  3094  		"object": c.object,
  3095  	})
  3096  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3097  }
  3098  
  3099  // Do executes the "storage.objectAccessControls.list" call.
  3100  // Exactly one of *ObjectAccessControls or error will be non-nil. Any
  3101  // non-2xx status code is an error. Response headers are in either
  3102  // *ObjectAccessControls.ServerResponse.Header or (if a response was
  3103  // returned at all) in error.(*googleapi.Error).Header. Use
  3104  // googleapi.IsNotModified to check whether the returned error was
  3105  // because http.StatusNotModified was returned.
  3106  func (c *ObjectAccessControlsListCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControls, error) {
  3107  	gensupport.SetOptions(c.urlParams_, opts...)
  3108  	res, err := c.doRequest("json")
  3109  	if res != nil && res.StatusCode == http.StatusNotModified {
  3110  		if res.Body != nil {
  3111  			res.Body.Close()
  3112  		}
  3113  		return nil, &googleapi.Error{
  3114  			Code:   res.StatusCode,
  3115  			Header: res.Header,
  3116  		}
  3117  	}
  3118  	if err != nil {
  3119  		return nil, err
  3120  	}
  3121  	defer googleapi.CloseBody(res)
  3122  	if err := googleapi.CheckResponse(res); err != nil {
  3123  		return nil, err
  3124  	}
  3125  	ret := &ObjectAccessControls{
  3126  		ServerResponse: googleapi.ServerResponse{
  3127  			Header:         res.Header,
  3128  			HTTPStatusCode: res.StatusCode,
  3129  		},
  3130  	}
  3131  	target := &ret
  3132  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3133  		return nil, err
  3134  	}
  3135  	return ret, nil
  3136  	// {
  3137  	//   "description": "Retrieves ACL entries on the specified object.",
  3138  	//   "httpMethod": "GET",
  3139  	//   "id": "storage.objectAccessControls.list",
  3140  	//   "parameterOrder": [
  3141  	//     "bucket",
  3142  	//     "object"
  3143  	//   ],
  3144  	//   "parameters": {
  3145  	//     "bucket": {
  3146  	//       "description": "Name of a bucket.",
  3147  	//       "location": "path",
  3148  	//       "required": true,
  3149  	//       "type": "string"
  3150  	//     },
  3151  	//     "object": {
  3152  	//       "description": "Name of the object.",
  3153  	//       "location": "path",
  3154  	//       "required": true,
  3155  	//       "type": "string"
  3156  	//     }
  3157  	//   },
  3158  	//   "path": "b/{bucket}/o/{object}/acl",
  3159  	//   "response": {
  3160  	//     "$ref": "ObjectAccessControls"
  3161  	//   },
  3162  	//   "scopes": [
  3163  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  3164  	//   ]
  3165  	// }
  3166  
  3167  }
  3168  
  3169  // method id "storage.objectAccessControls.patch":
  3170  
  3171  type ObjectAccessControlsPatchCall struct {
  3172  	s                   *Service
  3173  	bucket              string
  3174  	object              string
  3175  	entity              string
  3176  	objectaccesscontrol *ObjectAccessControl
  3177  	urlParams_          gensupport.URLParams
  3178  	ctx_                context.Context
  3179  	header_             http.Header
  3180  }
  3181  
  3182  // Patch: Updates an ACL entry on the specified object. This method
  3183  // supports patch semantics.
  3184  func (r *ObjectAccessControlsService) Patch(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsPatchCall {
  3185  	c := &ObjectAccessControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3186  	c.bucket = bucket
  3187  	c.object = object
  3188  	c.entity = entity
  3189  	c.objectaccesscontrol = objectaccesscontrol
  3190  	return c
  3191  }
  3192  
  3193  // Fields allows partial responses to be retrieved. See
  3194  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3195  // for more information.
  3196  func (c *ObjectAccessControlsPatchCall) Fields(s ...googleapi.Field) *ObjectAccessControlsPatchCall {
  3197  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3198  	return c
  3199  }
  3200  
  3201  // Context sets the context to be used in this call's Do method. Any
  3202  // pending HTTP request will be aborted if the provided context is
  3203  // canceled.
  3204  func (c *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall {
  3205  	c.ctx_ = ctx
  3206  	return c
  3207  }
  3208  
  3209  // Header returns an http.Header that can be modified by the caller to
  3210  // add HTTP headers to the request.
  3211  func (c *ObjectAccessControlsPatchCall) Header() http.Header {
  3212  	if c.header_ == nil {
  3213  		c.header_ = make(http.Header)
  3214  	}
  3215  	return c.header_
  3216  }
  3217  
  3218  func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
  3219  	reqHeaders := make(http.Header)
  3220  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3221  	for k, v := range c.header_ {
  3222  		reqHeaders[k] = v
  3223  	}
  3224  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3225  	var body io.Reader = nil
  3226  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
  3227  	if err != nil {
  3228  		return nil, err
  3229  	}
  3230  	reqHeaders.Set("Content-Type", "application/json")
  3231  	c.urlParams_.Set("alt", alt)
  3232  	c.urlParams_.Set("prettyPrint", "false")
  3233  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}")
  3234  	urls += "?" + c.urlParams_.Encode()
  3235  	req, err := http.NewRequest("PATCH", urls, body)
  3236  	if err != nil {
  3237  		return nil, err
  3238  	}
  3239  	req.Header = reqHeaders
  3240  	googleapi.Expand(req.URL, map[string]string{
  3241  		"bucket": c.bucket,
  3242  		"object": c.object,
  3243  		"entity": c.entity,
  3244  	})
  3245  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3246  }
  3247  
  3248  // Do executes the "storage.objectAccessControls.patch" call.
  3249  // Exactly one of *ObjectAccessControl or error will be non-nil. Any
  3250  // non-2xx status code is an error. Response headers are in either
  3251  // *ObjectAccessControl.ServerResponse.Header or (if a response was
  3252  // returned at all) in error.(*googleapi.Error).Header. Use
  3253  // googleapi.IsNotModified to check whether the returned error was
  3254  // because http.StatusNotModified was returned.
  3255  func (c *ObjectAccessControlsPatchCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) {
  3256  	gensupport.SetOptions(c.urlParams_, opts...)
  3257  	res, err := c.doRequest("json")
  3258  	if res != nil && res.StatusCode == http.StatusNotModified {
  3259  		if res.Body != nil {
  3260  			res.Body.Close()
  3261  		}
  3262  		return nil, &googleapi.Error{
  3263  			Code:   res.StatusCode,
  3264  			Header: res.Header,
  3265  		}
  3266  	}
  3267  	if err != nil {
  3268  		return nil, err
  3269  	}
  3270  	defer googleapi.CloseBody(res)
  3271  	if err := googleapi.CheckResponse(res); err != nil {
  3272  		return nil, err
  3273  	}
  3274  	ret := &ObjectAccessControl{
  3275  		ServerResponse: googleapi.ServerResponse{
  3276  			Header:         res.Header,
  3277  			HTTPStatusCode: res.StatusCode,
  3278  		},
  3279  	}
  3280  	target := &ret
  3281  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3282  		return nil, err
  3283  	}
  3284  	return ret, nil
  3285  	// {
  3286  	//   "description": "Updates an ACL entry on the specified object. This method supports patch semantics.",
  3287  	//   "httpMethod": "PATCH",
  3288  	//   "id": "storage.objectAccessControls.patch",
  3289  	//   "parameterOrder": [
  3290  	//     "bucket",
  3291  	//     "object",
  3292  	//     "entity"
  3293  	//   ],
  3294  	//   "parameters": {
  3295  	//     "bucket": {
  3296  	//       "description": "Name of a bucket.",
  3297  	//       "location": "path",
  3298  	//       "required": true,
  3299  	//       "type": "string"
  3300  	//     },
  3301  	//     "entity": {
  3302  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  3303  	//       "location": "path",
  3304  	//       "required": true,
  3305  	//       "type": "string"
  3306  	//     },
  3307  	//     "object": {
  3308  	//       "description": "Name of the object.",
  3309  	//       "location": "path",
  3310  	//       "required": true,
  3311  	//       "type": "string"
  3312  	//     }
  3313  	//   },
  3314  	//   "path": "b/{bucket}/o/{object}/acl/{entity}",
  3315  	//   "request": {
  3316  	//     "$ref": "ObjectAccessControl"
  3317  	//   },
  3318  	//   "response": {
  3319  	//     "$ref": "ObjectAccessControl"
  3320  	//   },
  3321  	//   "scopes": [
  3322  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  3323  	//   ]
  3324  	// }
  3325  
  3326  }
  3327  
  3328  // method id "storage.objectAccessControls.update":
  3329  
  3330  type ObjectAccessControlsUpdateCall struct {
  3331  	s                   *Service
  3332  	bucket              string
  3333  	object              string
  3334  	entity              string
  3335  	objectaccesscontrol *ObjectAccessControl
  3336  	urlParams_          gensupport.URLParams
  3337  	ctx_                context.Context
  3338  	header_             http.Header
  3339  }
  3340  
  3341  // Update: Updates an ACL entry on the specified object.
  3342  func (r *ObjectAccessControlsService) Update(bucket string, object string, entity string, objectaccesscontrol *ObjectAccessControl) *ObjectAccessControlsUpdateCall {
  3343  	c := &ObjectAccessControlsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3344  	c.bucket = bucket
  3345  	c.object = object
  3346  	c.entity = entity
  3347  	c.objectaccesscontrol = objectaccesscontrol
  3348  	return c
  3349  }
  3350  
  3351  // Fields allows partial responses to be retrieved. See
  3352  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3353  // for more information.
  3354  func (c *ObjectAccessControlsUpdateCall) Fields(s ...googleapi.Field) *ObjectAccessControlsUpdateCall {
  3355  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3356  	return c
  3357  }
  3358  
  3359  // Context sets the context to be used in this call's Do method. Any
  3360  // pending HTTP request will be aborted if the provided context is
  3361  // canceled.
  3362  func (c *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall {
  3363  	c.ctx_ = ctx
  3364  	return c
  3365  }
  3366  
  3367  // Header returns an http.Header that can be modified by the caller to
  3368  // add HTTP headers to the request.
  3369  func (c *ObjectAccessControlsUpdateCall) Header() http.Header {
  3370  	if c.header_ == nil {
  3371  		c.header_ = make(http.Header)
  3372  	}
  3373  	return c.header_
  3374  }
  3375  
  3376  func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
  3377  	reqHeaders := make(http.Header)
  3378  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3379  	for k, v := range c.header_ {
  3380  		reqHeaders[k] = v
  3381  	}
  3382  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3383  	var body io.Reader = nil
  3384  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
  3385  	if err != nil {
  3386  		return nil, err
  3387  	}
  3388  	reqHeaders.Set("Content-Type", "application/json")
  3389  	c.urlParams_.Set("alt", alt)
  3390  	c.urlParams_.Set("prettyPrint", "false")
  3391  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}/acl/{entity}")
  3392  	urls += "?" + c.urlParams_.Encode()
  3393  	req, err := http.NewRequest("PUT", urls, body)
  3394  	if err != nil {
  3395  		return nil, err
  3396  	}
  3397  	req.Header = reqHeaders
  3398  	googleapi.Expand(req.URL, map[string]string{
  3399  		"bucket": c.bucket,
  3400  		"object": c.object,
  3401  		"entity": c.entity,
  3402  	})
  3403  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3404  }
  3405  
  3406  // Do executes the "storage.objectAccessControls.update" call.
  3407  // Exactly one of *ObjectAccessControl or error will be non-nil. Any
  3408  // non-2xx status code is an error. Response headers are in either
  3409  // *ObjectAccessControl.ServerResponse.Header or (if a response was
  3410  // returned at all) in error.(*googleapi.Error).Header. Use
  3411  // googleapi.IsNotModified to check whether the returned error was
  3412  // because http.StatusNotModified was returned.
  3413  func (c *ObjectAccessControlsUpdateCall) Do(opts ...googleapi.CallOption) (*ObjectAccessControl, error) {
  3414  	gensupport.SetOptions(c.urlParams_, opts...)
  3415  	res, err := c.doRequest("json")
  3416  	if res != nil && res.StatusCode == http.StatusNotModified {
  3417  		if res.Body != nil {
  3418  			res.Body.Close()
  3419  		}
  3420  		return nil, &googleapi.Error{
  3421  			Code:   res.StatusCode,
  3422  			Header: res.Header,
  3423  		}
  3424  	}
  3425  	if err != nil {
  3426  		return nil, err
  3427  	}
  3428  	defer googleapi.CloseBody(res)
  3429  	if err := googleapi.CheckResponse(res); err != nil {
  3430  		return nil, err
  3431  	}
  3432  	ret := &ObjectAccessControl{
  3433  		ServerResponse: googleapi.ServerResponse{
  3434  			Header:         res.Header,
  3435  			HTTPStatusCode: res.StatusCode,
  3436  		},
  3437  	}
  3438  	target := &ret
  3439  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3440  		return nil, err
  3441  	}
  3442  	return ret, nil
  3443  	// {
  3444  	//   "description": "Updates an ACL entry on the specified object.",
  3445  	//   "httpMethod": "PUT",
  3446  	//   "id": "storage.objectAccessControls.update",
  3447  	//   "parameterOrder": [
  3448  	//     "bucket",
  3449  	//     "object",
  3450  	//     "entity"
  3451  	//   ],
  3452  	//   "parameters": {
  3453  	//     "bucket": {
  3454  	//       "description": "Name of a bucket.",
  3455  	//       "location": "path",
  3456  	//       "required": true,
  3457  	//       "type": "string"
  3458  	//     },
  3459  	//     "entity": {
  3460  	//       "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
  3461  	//       "location": "path",
  3462  	//       "required": true,
  3463  	//       "type": "string"
  3464  	//     },
  3465  	//     "object": {
  3466  	//       "description": "Name of the object.",
  3467  	//       "location": "path",
  3468  	//       "required": true,
  3469  	//       "type": "string"
  3470  	//     }
  3471  	//   },
  3472  	//   "path": "b/{bucket}/o/{object}/acl/{entity}",
  3473  	//   "request": {
  3474  	//     "$ref": "ObjectAccessControl"
  3475  	//   },
  3476  	//   "response": {
  3477  	//     "$ref": "ObjectAccessControl"
  3478  	//   },
  3479  	//   "scopes": [
  3480  	//     "https://www.googleapis.com/auth/devstorage.full_control"
  3481  	//   ]
  3482  	// }
  3483  
  3484  }
  3485  
  3486  // method id "storage.objects.delete":
  3487  
  3488  type ObjectsDeleteCall struct {
  3489  	s          *Service
  3490  	bucket     string
  3491  	object     string
  3492  	urlParams_ gensupport.URLParams
  3493  	ctx_       context.Context
  3494  	header_    http.Header
  3495  }
  3496  
  3497  // Delete: Deletes data blobs and associated metadata.
  3498  func (r *ObjectsService) Delete(bucket string, object string) *ObjectsDeleteCall {
  3499  	c := &ObjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3500  	c.bucket = bucket
  3501  	c.object = object
  3502  	return c
  3503  }
  3504  
  3505  // Fields allows partial responses to be retrieved. See
  3506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3507  // for more information.
  3508  func (c *ObjectsDeleteCall) Fields(s ...googleapi.Field) *ObjectsDeleteCall {
  3509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3510  	return c
  3511  }
  3512  
  3513  // Context sets the context to be used in this call's Do method. Any
  3514  // pending HTTP request will be aborted if the provided context is
  3515  // canceled.
  3516  func (c *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall {
  3517  	c.ctx_ = ctx
  3518  	return c
  3519  }
  3520  
  3521  // Header returns an http.Header that can be modified by the caller to
  3522  // add HTTP headers to the request.
  3523  func (c *ObjectsDeleteCall) Header() http.Header {
  3524  	if c.header_ == nil {
  3525  		c.header_ = make(http.Header)
  3526  	}
  3527  	return c.header_
  3528  }
  3529  
  3530  func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3531  	reqHeaders := make(http.Header)
  3532  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3533  	for k, v := range c.header_ {
  3534  		reqHeaders[k] = v
  3535  	}
  3536  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3537  	var body io.Reader = nil
  3538  	c.urlParams_.Set("alt", alt)
  3539  	c.urlParams_.Set("prettyPrint", "false")
  3540  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}")
  3541  	urls += "?" + c.urlParams_.Encode()
  3542  	req, err := http.NewRequest("DELETE", urls, body)
  3543  	if err != nil {
  3544  		return nil, err
  3545  	}
  3546  	req.Header = reqHeaders
  3547  	googleapi.Expand(req.URL, map[string]string{
  3548  		"bucket": c.bucket,
  3549  		"object": c.object,
  3550  	})
  3551  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3552  }
  3553  
  3554  // Do executes the "storage.objects.delete" call.
  3555  func (c *ObjectsDeleteCall) Do(opts ...googleapi.CallOption) error {
  3556  	gensupport.SetOptions(c.urlParams_, opts...)
  3557  	res, err := c.doRequest("json")
  3558  	if err != nil {
  3559  		return err
  3560  	}
  3561  	defer googleapi.CloseBody(res)
  3562  	if err := googleapi.CheckResponse(res); err != nil {
  3563  		return err
  3564  	}
  3565  	return nil
  3566  	// {
  3567  	//   "description": "Deletes data blobs and associated metadata.",
  3568  	//   "httpMethod": "DELETE",
  3569  	//   "id": "storage.objects.delete",
  3570  	//   "parameterOrder": [
  3571  	//     "bucket",
  3572  	//     "object"
  3573  	//   ],
  3574  	//   "parameters": {
  3575  	//     "bucket": {
  3576  	//       "description": "Name of the bucket in which the object resides.",
  3577  	//       "location": "path",
  3578  	//       "required": true,
  3579  	//       "type": "string"
  3580  	//     },
  3581  	//     "object": {
  3582  	//       "description": "Name of the object.",
  3583  	//       "location": "path",
  3584  	//       "required": true,
  3585  	//       "type": "string"
  3586  	//     }
  3587  	//   },
  3588  	//   "path": "b/{bucket}/o/{object}",
  3589  	//   "scopes": [
  3590  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  3591  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  3592  	//   ]
  3593  	// }
  3594  
  3595  }
  3596  
  3597  // method id "storage.objects.get":
  3598  
  3599  type ObjectsGetCall struct {
  3600  	s            *Service
  3601  	bucket       string
  3602  	object       string
  3603  	urlParams_   gensupport.URLParams
  3604  	ifNoneMatch_ string
  3605  	ctx_         context.Context
  3606  	header_      http.Header
  3607  }
  3608  
  3609  // Get: Retrieves objects or their associated metadata.
  3610  func (r *ObjectsService) Get(bucket string, object string) *ObjectsGetCall {
  3611  	c := &ObjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3612  	c.bucket = bucket
  3613  	c.object = object
  3614  	return c
  3615  }
  3616  
  3617  // Projection sets the optional parameter "projection": Set of
  3618  // properties to return. Defaults to no_acl.
  3619  //
  3620  // Possible values:
  3621  //
  3622  //	"full" - Include all properties.
  3623  //	"no_acl" - Omit the acl property.
  3624  func (c *ObjectsGetCall) Projection(projection string) *ObjectsGetCall {
  3625  	c.urlParams_.Set("projection", projection)
  3626  	return c
  3627  }
  3628  
  3629  // Fields allows partial responses to be retrieved. See
  3630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3631  // for more information.
  3632  func (c *ObjectsGetCall) Fields(s ...googleapi.Field) *ObjectsGetCall {
  3633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3634  	return c
  3635  }
  3636  
  3637  // IfNoneMatch sets the optional parameter which makes the operation
  3638  // fail if the object's ETag matches the given value. This is useful for
  3639  // getting updates only after the object has changed since the last
  3640  // request. Use googleapi.IsNotModified to check whether the response
  3641  // error from Do is the result of In-None-Match.
  3642  func (c *ObjectsGetCall) IfNoneMatch(entityTag string) *ObjectsGetCall {
  3643  	c.ifNoneMatch_ = entityTag
  3644  	return c
  3645  }
  3646  
  3647  // Context sets the context to be used in this call's Do and Download
  3648  // methods. Any pending HTTP request will be aborted if the provided
  3649  // context is canceled.
  3650  func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall {
  3651  	c.ctx_ = ctx
  3652  	return c
  3653  }
  3654  
  3655  // Header returns an http.Header that can be modified by the caller to
  3656  // add HTTP headers to the request.
  3657  func (c *ObjectsGetCall) Header() http.Header {
  3658  	if c.header_ == nil {
  3659  		c.header_ = make(http.Header)
  3660  	}
  3661  	return c.header_
  3662  }
  3663  
  3664  func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
  3665  	reqHeaders := make(http.Header)
  3666  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3667  	for k, v := range c.header_ {
  3668  		reqHeaders[k] = v
  3669  	}
  3670  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3671  	if c.ifNoneMatch_ != "" {
  3672  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3673  	}
  3674  	var body io.Reader = nil
  3675  	c.urlParams_.Set("alt", alt)
  3676  	c.urlParams_.Set("prettyPrint", "false")
  3677  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}")
  3678  	urls += "?" + c.urlParams_.Encode()
  3679  	req, err := http.NewRequest("GET", urls, body)
  3680  	if err != nil {
  3681  		return nil, err
  3682  	}
  3683  	req.Header = reqHeaders
  3684  	googleapi.Expand(req.URL, map[string]string{
  3685  		"bucket": c.bucket,
  3686  		"object": c.object,
  3687  	})
  3688  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3689  }
  3690  
  3691  // Download fetches the API endpoint's "media" value, instead of the normal
  3692  // API response value. If the returned error is nil, the Response is guaranteed to
  3693  // have a 2xx status code. Callers must close the Response.Body as usual.
  3694  func (c *ObjectsGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  3695  	gensupport.SetOptions(c.urlParams_, opts...)
  3696  	res, err := c.doRequest("media")
  3697  	if err != nil {
  3698  		return nil, err
  3699  	}
  3700  	if err := googleapi.CheckMediaResponse(res); err != nil {
  3701  		res.Body.Close()
  3702  		return nil, err
  3703  	}
  3704  	return res, nil
  3705  }
  3706  
  3707  // Do executes the "storage.objects.get" call.
  3708  // Exactly one of *Object or error will be non-nil. Any non-2xx status
  3709  // code is an error. Response headers are in either
  3710  // *Object.ServerResponse.Header or (if a response was returned at all)
  3711  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3712  // check whether the returned error was because http.StatusNotModified
  3713  // was returned.
  3714  func (c *ObjectsGetCall) Do(opts ...googleapi.CallOption) (*Object, error) {
  3715  	gensupport.SetOptions(c.urlParams_, opts...)
  3716  	res, err := c.doRequest("json")
  3717  	if res != nil && res.StatusCode == http.StatusNotModified {
  3718  		if res.Body != nil {
  3719  			res.Body.Close()
  3720  		}
  3721  		return nil, &googleapi.Error{
  3722  			Code:   res.StatusCode,
  3723  			Header: res.Header,
  3724  		}
  3725  	}
  3726  	if err != nil {
  3727  		return nil, err
  3728  	}
  3729  	defer googleapi.CloseBody(res)
  3730  	if err := googleapi.CheckResponse(res); err != nil {
  3731  		return nil, err
  3732  	}
  3733  	ret := &Object{
  3734  		ServerResponse: googleapi.ServerResponse{
  3735  			Header:         res.Header,
  3736  			HTTPStatusCode: res.StatusCode,
  3737  		},
  3738  	}
  3739  	target := &ret
  3740  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3741  		return nil, err
  3742  	}
  3743  	return ret, nil
  3744  	// {
  3745  	//   "description": "Retrieves objects or their associated metadata.",
  3746  	//   "httpMethod": "GET",
  3747  	//   "id": "storage.objects.get",
  3748  	//   "parameterOrder": [
  3749  	//     "bucket",
  3750  	//     "object"
  3751  	//   ],
  3752  	//   "parameters": {
  3753  	//     "bucket": {
  3754  	//       "description": "Name of the bucket in which the object resides.",
  3755  	//       "location": "path",
  3756  	//       "required": true,
  3757  	//       "type": "string"
  3758  	//     },
  3759  	//     "object": {
  3760  	//       "description": "Name of the object.",
  3761  	//       "location": "path",
  3762  	//       "required": true,
  3763  	//       "type": "string"
  3764  	//     },
  3765  	//     "projection": {
  3766  	//       "description": "Set of properties to return. Defaults to no_acl.",
  3767  	//       "enum": [
  3768  	//         "full",
  3769  	//         "no_acl"
  3770  	//       ],
  3771  	//       "enumDescriptions": [
  3772  	//         "Include all properties.",
  3773  	//         "Omit the acl property."
  3774  	//       ],
  3775  	//       "location": "query",
  3776  	//       "type": "string"
  3777  	//     }
  3778  	//   },
  3779  	//   "path": "b/{bucket}/o/{object}",
  3780  	//   "response": {
  3781  	//     "$ref": "Object"
  3782  	//   },
  3783  	//   "scopes": [
  3784  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  3785  	//     "https://www.googleapis.com/auth/devstorage.read_only",
  3786  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  3787  	//   ],
  3788  	//   "supportsMediaDownload": true
  3789  	// }
  3790  
  3791  }
  3792  
  3793  // method id "storage.objects.insert":
  3794  
  3795  type ObjectsInsertCall struct {
  3796  	s          *Service
  3797  	bucket     string
  3798  	object     *Object
  3799  	urlParams_ gensupport.URLParams
  3800  	mediaInfo_ *gensupport.MediaInfo
  3801  	ctx_       context.Context
  3802  	header_    http.Header
  3803  }
  3804  
  3805  // Insert: Stores new data blobs and associated metadata.
  3806  func (r *ObjectsService) Insert(bucket string, object *Object) *ObjectsInsertCall {
  3807  	c := &ObjectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3808  	c.bucket = bucket
  3809  	c.object = object
  3810  	return c
  3811  }
  3812  
  3813  // Name sets the optional parameter "name": Name of the object. Required
  3814  // when the object metadata is not otherwise provided. Overrides the
  3815  // object metadata's name value, if any.
  3816  func (c *ObjectsInsertCall) Name(name string) *ObjectsInsertCall {
  3817  	c.urlParams_.Set("name", name)
  3818  	return c
  3819  }
  3820  
  3821  // Projection sets the optional parameter "projection": Set of
  3822  // properties to return. Defaults to no_acl, unless the object resource
  3823  // specifies the acl property, when it defaults to full.
  3824  //
  3825  // Possible values:
  3826  //
  3827  //	"full" - Include all properties.
  3828  //	"no_acl" - Omit the acl property.
  3829  func (c *ObjectsInsertCall) Projection(projection string) *ObjectsInsertCall {
  3830  	c.urlParams_.Set("projection", projection)
  3831  	return c
  3832  }
  3833  
  3834  // Media specifies the media to upload in one or more chunks. The chunk
  3835  // size may be controlled by supplying a MediaOption generated by
  3836  // googleapi.ChunkSize. The chunk size defaults to
  3837  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the
  3838  // upload request will be determined by sniffing the contents of r,
  3839  // unless a MediaOption generated by googleapi.ContentType is
  3840  // supplied.
  3841  // At most one of Media and ResumableMedia may be set.
  3842  func (c *ObjectsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ObjectsInsertCall {
  3843  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  3844  	return c
  3845  }
  3846  
  3847  // ResumableMedia specifies the media to upload in chunks and can be
  3848  // canceled with ctx.
  3849  //
  3850  // Deprecated: use Media instead.
  3851  //
  3852  // At most one of Media and ResumableMedia may be set. mediaType
  3853  // identifies the MIME media type of the upload, such as "image/png". If
  3854  // mediaType is "", it will be auto-detected. The provided ctx will
  3855  // supersede any context previously provided to the Context method.
  3856  func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
  3857  	c.ctx_ = ctx
  3858  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  3859  	return c
  3860  }
  3861  
  3862  // ProgressUpdater provides a callback function that will be called
  3863  // after every chunk. It should be a low-latency function in order to
  3864  // not slow down the upload operation. This should only be called when
  3865  // using ResumableMedia (as opposed to Media).
  3866  func (c *ObjectsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ObjectsInsertCall {
  3867  	c.mediaInfo_.SetProgressUpdater(pu)
  3868  	return c
  3869  }
  3870  
  3871  // Fields allows partial responses to be retrieved. See
  3872  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3873  // for more information.
  3874  func (c *ObjectsInsertCall) Fields(s ...googleapi.Field) *ObjectsInsertCall {
  3875  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3876  	return c
  3877  }
  3878  
  3879  // Context sets the context to be used in this call's Do method. Any
  3880  // pending HTTP request will be aborted if the provided context is
  3881  // canceled.
  3882  // This context will supersede any context previously provided to the
  3883  // ResumableMedia method.
  3884  func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall {
  3885  	c.ctx_ = ctx
  3886  	return c
  3887  }
  3888  
  3889  // Header returns an http.Header that can be modified by the caller to
  3890  // add HTTP headers to the request.
  3891  func (c *ObjectsInsertCall) Header() http.Header {
  3892  	if c.header_ == nil {
  3893  		c.header_ = make(http.Header)
  3894  	}
  3895  	return c.header_
  3896  }
  3897  
  3898  func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
  3899  	reqHeaders := make(http.Header)
  3900  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3901  	for k, v := range c.header_ {
  3902  		reqHeaders[k] = v
  3903  	}
  3904  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3905  	var body io.Reader = nil
  3906  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
  3907  	if err != nil {
  3908  		return nil, err
  3909  	}
  3910  	reqHeaders.Set("Content-Type", "application/json")
  3911  	c.urlParams_.Set("alt", alt)
  3912  	c.urlParams_.Set("prettyPrint", "false")
  3913  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o")
  3914  	if c.mediaInfo_ != nil {
  3915  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/storage/v1beta1/b/{bucket}/o")
  3916  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  3917  	}
  3918  	if body == nil {
  3919  		body = new(bytes.Buffer)
  3920  		reqHeaders.Set("Content-Type", "application/json")
  3921  	}
  3922  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  3923  	defer cleanup()
  3924  	urls += "?" + c.urlParams_.Encode()
  3925  	req, err := http.NewRequest("POST", urls, body)
  3926  	if err != nil {
  3927  		return nil, err
  3928  	}
  3929  	req.Header = reqHeaders
  3930  	req.GetBody = getBody
  3931  	googleapi.Expand(req.URL, map[string]string{
  3932  		"bucket": c.bucket,
  3933  	})
  3934  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3935  }
  3936  
  3937  // Do executes the "storage.objects.insert" call.
  3938  // Exactly one of *Object or error will be non-nil. Any non-2xx status
  3939  // code is an error. Response headers are in either
  3940  // *Object.ServerResponse.Header or (if a response was returned at all)
  3941  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3942  // check whether the returned error was because http.StatusNotModified
  3943  // was returned.
  3944  func (c *ObjectsInsertCall) Do(opts ...googleapi.CallOption) (*Object, error) {
  3945  	gensupport.SetOptions(c.urlParams_, opts...)
  3946  	res, err := c.doRequest("json")
  3947  	if res != nil && res.StatusCode == http.StatusNotModified {
  3948  		if res.Body != nil {
  3949  			res.Body.Close()
  3950  		}
  3951  		return nil, &googleapi.Error{
  3952  			Code:   res.StatusCode,
  3953  			Header: res.Header,
  3954  		}
  3955  	}
  3956  	if err != nil {
  3957  		return nil, err
  3958  	}
  3959  	defer googleapi.CloseBody(res)
  3960  	if err := googleapi.CheckResponse(res); err != nil {
  3961  		return nil, err
  3962  	}
  3963  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  3964  	if rx != nil {
  3965  		rx.Client = c.s.client
  3966  		rx.UserAgent = c.s.userAgent()
  3967  		ctx := c.ctx_
  3968  		if ctx == nil {
  3969  			ctx = context.TODO()
  3970  		}
  3971  		res, err = rx.Upload(ctx)
  3972  		if err != nil {
  3973  			return nil, err
  3974  		}
  3975  		defer res.Body.Close()
  3976  		if err := googleapi.CheckResponse(res); err != nil {
  3977  			return nil, err
  3978  		}
  3979  	}
  3980  	ret := &Object{
  3981  		ServerResponse: googleapi.ServerResponse{
  3982  			Header:         res.Header,
  3983  			HTTPStatusCode: res.StatusCode,
  3984  		},
  3985  	}
  3986  	target := &ret
  3987  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3988  		return nil, err
  3989  	}
  3990  	return ret, nil
  3991  	// {
  3992  	//   "description": "Stores new data blobs and associated metadata.",
  3993  	//   "httpMethod": "POST",
  3994  	//   "id": "storage.objects.insert",
  3995  	//   "mediaUpload": {
  3996  	//     "accept": [
  3997  	//       "*/*"
  3998  	//     ],
  3999  	//     "protocols": {
  4000  	//       "resumable": {
  4001  	//         "multipart": true,
  4002  	//         "path": "/resumable/upload/storage/v1beta1/b/{bucket}/o"
  4003  	//       },
  4004  	//       "simple": {
  4005  	//         "multipart": true,
  4006  	//         "path": "/upload/storage/v1beta1/b/{bucket}/o"
  4007  	//       }
  4008  	//     }
  4009  	//   },
  4010  	//   "parameterOrder": [
  4011  	//     "bucket"
  4012  	//   ],
  4013  	//   "parameters": {
  4014  	//     "bucket": {
  4015  	//       "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
  4016  	//       "location": "path",
  4017  	//       "required": true,
  4018  	//       "type": "string"
  4019  	//     },
  4020  	//     "name": {
  4021  	//       "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
  4022  	//       "location": "query",
  4023  	//       "type": "string"
  4024  	//     },
  4025  	//     "projection": {
  4026  	//       "description": "Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl property, when it defaults to full.",
  4027  	//       "enum": [
  4028  	//         "full",
  4029  	//         "no_acl"
  4030  	//       ],
  4031  	//       "enumDescriptions": [
  4032  	//         "Include all properties.",
  4033  	//         "Omit the acl property."
  4034  	//       ],
  4035  	//       "location": "query",
  4036  	//       "type": "string"
  4037  	//     }
  4038  	//   },
  4039  	//   "path": "b/{bucket}/o",
  4040  	//   "request": {
  4041  	//     "$ref": "Object"
  4042  	//   },
  4043  	//   "response": {
  4044  	//     "$ref": "Object"
  4045  	//   },
  4046  	//   "scopes": [
  4047  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  4048  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  4049  	//   ],
  4050  	//   "supportsMediaDownload": true,
  4051  	//   "supportsMediaUpload": true
  4052  	// }
  4053  
  4054  }
  4055  
  4056  // method id "storage.objects.list":
  4057  
  4058  type ObjectsListCall struct {
  4059  	s            *Service
  4060  	bucket       string
  4061  	urlParams_   gensupport.URLParams
  4062  	ifNoneMatch_ string
  4063  	ctx_         context.Context
  4064  	header_      http.Header
  4065  }
  4066  
  4067  // List: Retrieves a list of objects matching the criteria.
  4068  func (r *ObjectsService) List(bucket string) *ObjectsListCall {
  4069  	c := &ObjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4070  	c.bucket = bucket
  4071  	return c
  4072  }
  4073  
  4074  // Delimiter sets the optional parameter "delimiter": Returns results in
  4075  // a directory-like mode. items will contain only objects whose names,
  4076  // aside from the prefix, do not contain delimiter. Objects whose names,
  4077  // aside from the prefix, contain delimiter will have their name,
  4078  // truncated after the delimiter, returned in prefixes. Duplicate
  4079  // prefixes are omitted.
  4080  func (c *ObjectsListCall) Delimiter(delimiter string) *ObjectsListCall {
  4081  	c.urlParams_.Set("delimiter", delimiter)
  4082  	return c
  4083  }
  4084  
  4085  // MaxResults sets the optional parameter "max-results": Maximum number
  4086  // of items plus prefixes to return. As duplicate prefixes are omitted,
  4087  // fewer total results may be returned than requested.
  4088  func (c *ObjectsListCall) MaxResults(maxResults int64) *ObjectsListCall {
  4089  	c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
  4090  	return c
  4091  }
  4092  
  4093  // PageToken sets the optional parameter "pageToken": A
  4094  // previously-returned page token representing part of the larger set of
  4095  // results to view.
  4096  func (c *ObjectsListCall) PageToken(pageToken string) *ObjectsListCall {
  4097  	c.urlParams_.Set("pageToken", pageToken)
  4098  	return c
  4099  }
  4100  
  4101  // Prefix sets the optional parameter "prefix": Filter results to
  4102  // objects whose names begin with this prefix.
  4103  func (c *ObjectsListCall) Prefix(prefix string) *ObjectsListCall {
  4104  	c.urlParams_.Set("prefix", prefix)
  4105  	return c
  4106  }
  4107  
  4108  // Projection sets the optional parameter "projection": Set of
  4109  // properties to return. Defaults to no_acl.
  4110  //
  4111  // Possible values:
  4112  //
  4113  //	"full" - Include all properties.
  4114  //	"no_acl" - Omit the acl property.
  4115  func (c *ObjectsListCall) Projection(projection string) *ObjectsListCall {
  4116  	c.urlParams_.Set("projection", projection)
  4117  	return c
  4118  }
  4119  
  4120  // Fields allows partial responses to be retrieved. See
  4121  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4122  // for more information.
  4123  func (c *ObjectsListCall) Fields(s ...googleapi.Field) *ObjectsListCall {
  4124  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4125  	return c
  4126  }
  4127  
  4128  // IfNoneMatch sets the optional parameter which makes the operation
  4129  // fail if the object's ETag matches the given value. This is useful for
  4130  // getting updates only after the object has changed since the last
  4131  // request. Use googleapi.IsNotModified to check whether the response
  4132  // error from Do is the result of In-None-Match.
  4133  func (c *ObjectsListCall) IfNoneMatch(entityTag string) *ObjectsListCall {
  4134  	c.ifNoneMatch_ = entityTag
  4135  	return c
  4136  }
  4137  
  4138  // Context sets the context to be used in this call's Do method. Any
  4139  // pending HTTP request will be aborted if the provided context is
  4140  // canceled.
  4141  func (c *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall {
  4142  	c.ctx_ = ctx
  4143  	return c
  4144  }
  4145  
  4146  // Header returns an http.Header that can be modified by the caller to
  4147  // add HTTP headers to the request.
  4148  func (c *ObjectsListCall) Header() http.Header {
  4149  	if c.header_ == nil {
  4150  		c.header_ = make(http.Header)
  4151  	}
  4152  	return c.header_
  4153  }
  4154  
  4155  func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
  4156  	reqHeaders := make(http.Header)
  4157  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4158  	for k, v := range c.header_ {
  4159  		reqHeaders[k] = v
  4160  	}
  4161  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4162  	if c.ifNoneMatch_ != "" {
  4163  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4164  	}
  4165  	var body io.Reader = nil
  4166  	c.urlParams_.Set("alt", alt)
  4167  	c.urlParams_.Set("prettyPrint", "false")
  4168  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o")
  4169  	urls += "?" + c.urlParams_.Encode()
  4170  	req, err := http.NewRequest("GET", urls, body)
  4171  	if err != nil {
  4172  		return nil, err
  4173  	}
  4174  	req.Header = reqHeaders
  4175  	googleapi.Expand(req.URL, map[string]string{
  4176  		"bucket": c.bucket,
  4177  	})
  4178  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4179  }
  4180  
  4181  // Do executes the "storage.objects.list" call.
  4182  // Exactly one of *Objects or error will be non-nil. Any non-2xx status
  4183  // code is an error. Response headers are in either
  4184  // *Objects.ServerResponse.Header or (if a response was returned at all)
  4185  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4186  // check whether the returned error was because http.StatusNotModified
  4187  // was returned.
  4188  func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, error) {
  4189  	gensupport.SetOptions(c.urlParams_, opts...)
  4190  	res, err := c.doRequest("json")
  4191  	if res != nil && res.StatusCode == http.StatusNotModified {
  4192  		if res.Body != nil {
  4193  			res.Body.Close()
  4194  		}
  4195  		return nil, &googleapi.Error{
  4196  			Code:   res.StatusCode,
  4197  			Header: res.Header,
  4198  		}
  4199  	}
  4200  	if err != nil {
  4201  		return nil, err
  4202  	}
  4203  	defer googleapi.CloseBody(res)
  4204  	if err := googleapi.CheckResponse(res); err != nil {
  4205  		return nil, err
  4206  	}
  4207  	ret := &Objects{
  4208  		ServerResponse: googleapi.ServerResponse{
  4209  			Header:         res.Header,
  4210  			HTTPStatusCode: res.StatusCode,
  4211  		},
  4212  	}
  4213  	target := &ret
  4214  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4215  		return nil, err
  4216  	}
  4217  	return ret, nil
  4218  	// {
  4219  	//   "description": "Retrieves a list of objects matching the criteria.",
  4220  	//   "httpMethod": "GET",
  4221  	//   "id": "storage.objects.list",
  4222  	//   "parameterOrder": [
  4223  	//     "bucket"
  4224  	//   ],
  4225  	//   "parameters": {
  4226  	//     "bucket": {
  4227  	//       "description": "Name of the bucket in which to look for objects.",
  4228  	//       "location": "path",
  4229  	//       "required": true,
  4230  	//       "type": "string"
  4231  	//     },
  4232  	//     "delimiter": {
  4233  	//       "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.",
  4234  	//       "location": "query",
  4235  	//       "type": "string"
  4236  	//     },
  4237  	//     "max-results": {
  4238  	//       "description": "Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested.",
  4239  	//       "format": "uint32",
  4240  	//       "location": "query",
  4241  	//       "minimum": "0",
  4242  	//       "type": "integer"
  4243  	//     },
  4244  	//     "pageToken": {
  4245  	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
  4246  	//       "location": "query",
  4247  	//       "type": "string"
  4248  	//     },
  4249  	//     "prefix": {
  4250  	//       "description": "Filter results to objects whose names begin with this prefix.",
  4251  	//       "location": "query",
  4252  	//       "type": "string"
  4253  	//     },
  4254  	//     "projection": {
  4255  	//       "description": "Set of properties to return. Defaults to no_acl.",
  4256  	//       "enum": [
  4257  	//         "full",
  4258  	//         "no_acl"
  4259  	//       ],
  4260  	//       "enumDescriptions": [
  4261  	//         "Include all properties.",
  4262  	//         "Omit the acl property."
  4263  	//       ],
  4264  	//       "location": "query",
  4265  	//       "type": "string"
  4266  	//     }
  4267  	//   },
  4268  	//   "path": "b/{bucket}/o",
  4269  	//   "response": {
  4270  	//     "$ref": "Objects"
  4271  	//   },
  4272  	//   "scopes": [
  4273  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  4274  	//     "https://www.googleapis.com/auth/devstorage.read_only",
  4275  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  4276  	//   ],
  4277  	//   "supportsSubscription": true
  4278  	// }
  4279  
  4280  }
  4281  
  4282  // Pages invokes f for each page of results.
  4283  // A non-nil error returned from f will halt the iteration.
  4284  // The provided context supersedes any context provided to the Context method.
  4285  func (c *ObjectsListCall) Pages(ctx context.Context, f func(*Objects) error) error {
  4286  	c.ctx_ = ctx
  4287  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4288  	for {
  4289  		x, err := c.Do()
  4290  		if err != nil {
  4291  			return err
  4292  		}
  4293  		if err := f(x); err != nil {
  4294  			return err
  4295  		}
  4296  		if x.NextPageToken == "" {
  4297  			return nil
  4298  		}
  4299  		c.PageToken(x.NextPageToken)
  4300  	}
  4301  }
  4302  
  4303  // method id "storage.objects.patch":
  4304  
  4305  type ObjectsPatchCall struct {
  4306  	s          *Service
  4307  	bucket     string
  4308  	object     string
  4309  	object2    *Object
  4310  	urlParams_ gensupport.URLParams
  4311  	ctx_       context.Context
  4312  	header_    http.Header
  4313  }
  4314  
  4315  // Patch: Updates a data blob's associated metadata. This method
  4316  // supports patch semantics.
  4317  func (r *ObjectsService) Patch(bucket string, object string, object2 *Object) *ObjectsPatchCall {
  4318  	c := &ObjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4319  	c.bucket = bucket
  4320  	c.object = object
  4321  	c.object2 = object2
  4322  	return c
  4323  }
  4324  
  4325  // Projection sets the optional parameter "projection": Set of
  4326  // properties to return. Defaults to full.
  4327  //
  4328  // Possible values:
  4329  //
  4330  //	"full" - Include all properties.
  4331  //	"no_acl" - Omit the acl property.
  4332  func (c *ObjectsPatchCall) Projection(projection string) *ObjectsPatchCall {
  4333  	c.urlParams_.Set("projection", projection)
  4334  	return c
  4335  }
  4336  
  4337  // Fields allows partial responses to be retrieved. See
  4338  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4339  // for more information.
  4340  func (c *ObjectsPatchCall) Fields(s ...googleapi.Field) *ObjectsPatchCall {
  4341  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4342  	return c
  4343  }
  4344  
  4345  // Context sets the context to be used in this call's Do method. Any
  4346  // pending HTTP request will be aborted if the provided context is
  4347  // canceled.
  4348  func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall {
  4349  	c.ctx_ = ctx
  4350  	return c
  4351  }
  4352  
  4353  // Header returns an http.Header that can be modified by the caller to
  4354  // add HTTP headers to the request.
  4355  func (c *ObjectsPatchCall) Header() http.Header {
  4356  	if c.header_ == nil {
  4357  		c.header_ = make(http.Header)
  4358  	}
  4359  	return c.header_
  4360  }
  4361  
  4362  func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
  4363  	reqHeaders := make(http.Header)
  4364  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4365  	for k, v := range c.header_ {
  4366  		reqHeaders[k] = v
  4367  	}
  4368  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4369  	var body io.Reader = nil
  4370  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
  4371  	if err != nil {
  4372  		return nil, err
  4373  	}
  4374  	reqHeaders.Set("Content-Type", "application/json")
  4375  	c.urlParams_.Set("alt", alt)
  4376  	c.urlParams_.Set("prettyPrint", "false")
  4377  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}")
  4378  	urls += "?" + c.urlParams_.Encode()
  4379  	req, err := http.NewRequest("PATCH", urls, body)
  4380  	if err != nil {
  4381  		return nil, err
  4382  	}
  4383  	req.Header = reqHeaders
  4384  	googleapi.Expand(req.URL, map[string]string{
  4385  		"bucket": c.bucket,
  4386  		"object": c.object,
  4387  	})
  4388  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4389  }
  4390  
  4391  // Do executes the "storage.objects.patch" call.
  4392  // Exactly one of *Object or error will be non-nil. Any non-2xx status
  4393  // code is an error. Response headers are in either
  4394  // *Object.ServerResponse.Header or (if a response was returned at all)
  4395  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4396  // check whether the returned error was because http.StatusNotModified
  4397  // was returned.
  4398  func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) {
  4399  	gensupport.SetOptions(c.urlParams_, opts...)
  4400  	res, err := c.doRequest("json")
  4401  	if res != nil && res.StatusCode == http.StatusNotModified {
  4402  		if res.Body != nil {
  4403  			res.Body.Close()
  4404  		}
  4405  		return nil, &googleapi.Error{
  4406  			Code:   res.StatusCode,
  4407  			Header: res.Header,
  4408  		}
  4409  	}
  4410  	if err != nil {
  4411  		return nil, err
  4412  	}
  4413  	defer googleapi.CloseBody(res)
  4414  	if err := googleapi.CheckResponse(res); err != nil {
  4415  		return nil, err
  4416  	}
  4417  	ret := &Object{
  4418  		ServerResponse: googleapi.ServerResponse{
  4419  			Header:         res.Header,
  4420  			HTTPStatusCode: res.StatusCode,
  4421  		},
  4422  	}
  4423  	target := &ret
  4424  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4425  		return nil, err
  4426  	}
  4427  	return ret, nil
  4428  	// {
  4429  	//   "description": "Updates a data blob's associated metadata. This method supports patch semantics.",
  4430  	//   "httpMethod": "PATCH",
  4431  	//   "id": "storage.objects.patch",
  4432  	//   "parameterOrder": [
  4433  	//     "bucket",
  4434  	//     "object"
  4435  	//   ],
  4436  	//   "parameters": {
  4437  	//     "bucket": {
  4438  	//       "description": "Name of the bucket in which the object resides.",
  4439  	//       "location": "path",
  4440  	//       "required": true,
  4441  	//       "type": "string"
  4442  	//     },
  4443  	//     "object": {
  4444  	//       "description": "Name of the object.",
  4445  	//       "location": "path",
  4446  	//       "required": true,
  4447  	//       "type": "string"
  4448  	//     },
  4449  	//     "projection": {
  4450  	//       "description": "Set of properties to return. Defaults to full.",
  4451  	//       "enum": [
  4452  	//         "full",
  4453  	//         "no_acl"
  4454  	//       ],
  4455  	//       "enumDescriptions": [
  4456  	//         "Include all properties.",
  4457  	//         "Omit the acl property."
  4458  	//       ],
  4459  	//       "location": "query",
  4460  	//       "type": "string"
  4461  	//     }
  4462  	//   },
  4463  	//   "path": "b/{bucket}/o/{object}",
  4464  	//   "request": {
  4465  	//     "$ref": "Object"
  4466  	//   },
  4467  	//   "response": {
  4468  	//     "$ref": "Object"
  4469  	//   },
  4470  	//   "scopes": [
  4471  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  4472  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  4473  	//   ]
  4474  	// }
  4475  
  4476  }
  4477  
  4478  // method id "storage.objects.update":
  4479  
  4480  type ObjectsUpdateCall struct {
  4481  	s          *Service
  4482  	bucket     string
  4483  	object     string
  4484  	object2    *Object
  4485  	urlParams_ gensupport.URLParams
  4486  	ctx_       context.Context
  4487  	header_    http.Header
  4488  }
  4489  
  4490  // Update: Updates a data blob's associated metadata.
  4491  func (r *ObjectsService) Update(bucket string, object string, object2 *Object) *ObjectsUpdateCall {
  4492  	c := &ObjectsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4493  	c.bucket = bucket
  4494  	c.object = object
  4495  	c.object2 = object2
  4496  	return c
  4497  }
  4498  
  4499  // Projection sets the optional parameter "projection": Set of
  4500  // properties to return. Defaults to full.
  4501  //
  4502  // Possible values:
  4503  //
  4504  //	"full" - Include all properties.
  4505  //	"no_acl" - Omit the acl property.
  4506  func (c *ObjectsUpdateCall) Projection(projection string) *ObjectsUpdateCall {
  4507  	c.urlParams_.Set("projection", projection)
  4508  	return c
  4509  }
  4510  
  4511  // Fields allows partial responses to be retrieved. See
  4512  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4513  // for more information.
  4514  func (c *ObjectsUpdateCall) Fields(s ...googleapi.Field) *ObjectsUpdateCall {
  4515  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4516  	return c
  4517  }
  4518  
  4519  // Context sets the context to be used in this call's Do and Download
  4520  // methods. Any pending HTTP request will be aborted if the provided
  4521  // context is canceled.
  4522  func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall {
  4523  	c.ctx_ = ctx
  4524  	return c
  4525  }
  4526  
  4527  // Header returns an http.Header that can be modified by the caller to
  4528  // add HTTP headers to the request.
  4529  func (c *ObjectsUpdateCall) Header() http.Header {
  4530  	if c.header_ == nil {
  4531  		c.header_ = make(http.Header)
  4532  	}
  4533  	return c.header_
  4534  }
  4535  
  4536  func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
  4537  	reqHeaders := make(http.Header)
  4538  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4539  	for k, v := range c.header_ {
  4540  		reqHeaders[k] = v
  4541  	}
  4542  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4543  	var body io.Reader = nil
  4544  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
  4545  	if err != nil {
  4546  		return nil, err
  4547  	}
  4548  	reqHeaders.Set("Content-Type", "application/json")
  4549  	c.urlParams_.Set("alt", alt)
  4550  	c.urlParams_.Set("prettyPrint", "false")
  4551  	urls := googleapi.ResolveRelative(c.s.BasePath, "b/{bucket}/o/{object}")
  4552  	urls += "?" + c.urlParams_.Encode()
  4553  	req, err := http.NewRequest("PUT", urls, body)
  4554  	if err != nil {
  4555  		return nil, err
  4556  	}
  4557  	req.Header = reqHeaders
  4558  	googleapi.Expand(req.URL, map[string]string{
  4559  		"bucket": c.bucket,
  4560  		"object": c.object,
  4561  	})
  4562  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4563  }
  4564  
  4565  // Download fetches the API endpoint's "media" value, instead of the normal
  4566  // API response value. If the returned error is nil, the Response is guaranteed to
  4567  // have a 2xx status code. Callers must close the Response.Body as usual.
  4568  func (c *ObjectsUpdateCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  4569  	gensupport.SetOptions(c.urlParams_, opts...)
  4570  	res, err := c.doRequest("media")
  4571  	if err != nil {
  4572  		return nil, err
  4573  	}
  4574  	if err := googleapi.CheckMediaResponse(res); err != nil {
  4575  		res.Body.Close()
  4576  		return nil, err
  4577  	}
  4578  	return res, nil
  4579  }
  4580  
  4581  // Do executes the "storage.objects.update" call.
  4582  // Exactly one of *Object or error will be non-nil. Any non-2xx status
  4583  // code is an error. Response headers are in either
  4584  // *Object.ServerResponse.Header or (if a response was returned at all)
  4585  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4586  // check whether the returned error was because http.StatusNotModified
  4587  // was returned.
  4588  func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) {
  4589  	gensupport.SetOptions(c.urlParams_, opts...)
  4590  	res, err := c.doRequest("json")
  4591  	if res != nil && res.StatusCode == http.StatusNotModified {
  4592  		if res.Body != nil {
  4593  			res.Body.Close()
  4594  		}
  4595  		return nil, &googleapi.Error{
  4596  			Code:   res.StatusCode,
  4597  			Header: res.Header,
  4598  		}
  4599  	}
  4600  	if err != nil {
  4601  		return nil, err
  4602  	}
  4603  	defer googleapi.CloseBody(res)
  4604  	if err := googleapi.CheckResponse(res); err != nil {
  4605  		return nil, err
  4606  	}
  4607  	ret := &Object{
  4608  		ServerResponse: googleapi.ServerResponse{
  4609  			Header:         res.Header,
  4610  			HTTPStatusCode: res.StatusCode,
  4611  		},
  4612  	}
  4613  	target := &ret
  4614  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4615  		return nil, err
  4616  	}
  4617  	return ret, nil
  4618  	// {
  4619  	//   "description": "Updates a data blob's associated metadata.",
  4620  	//   "httpMethod": "PUT",
  4621  	//   "id": "storage.objects.update",
  4622  	//   "parameterOrder": [
  4623  	//     "bucket",
  4624  	//     "object"
  4625  	//   ],
  4626  	//   "parameters": {
  4627  	//     "bucket": {
  4628  	//       "description": "Name of the bucket in which the object resides.",
  4629  	//       "location": "path",
  4630  	//       "required": true,
  4631  	//       "type": "string"
  4632  	//     },
  4633  	//     "object": {
  4634  	//       "description": "Name of the object.",
  4635  	//       "location": "path",
  4636  	//       "required": true,
  4637  	//       "type": "string"
  4638  	//     },
  4639  	//     "projection": {
  4640  	//       "description": "Set of properties to return. Defaults to full.",
  4641  	//       "enum": [
  4642  	//         "full",
  4643  	//         "no_acl"
  4644  	//       ],
  4645  	//       "enumDescriptions": [
  4646  	//         "Include all properties.",
  4647  	//         "Omit the acl property."
  4648  	//       ],
  4649  	//       "location": "query",
  4650  	//       "type": "string"
  4651  	//     }
  4652  	//   },
  4653  	//   "path": "b/{bucket}/o/{object}",
  4654  	//   "request": {
  4655  	//     "$ref": "Object"
  4656  	//   },
  4657  	//   "response": {
  4658  	//     "$ref": "Object"
  4659  	//   },
  4660  	//   "scopes": [
  4661  	//     "https://www.googleapis.com/auth/devstorage.full_control",
  4662  	//     "https://www.googleapis.com/auth/devstorage.read_write"
  4663  	//   ],
  4664  	//   "supportsMediaDownload": true
  4665  	// }
  4666  
  4667  }
  4668  

View as plain text