storage

package
v0.218.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2025 License: BSD-3-Clause Imports: 19 Imported by: 1,056

Documentation

Overview

Package storage provides access to the Cloud Storage JSON API.

This package is DEPRECATED. Use package cloud.google.com/go/storage instead.

For product documentation, see: https://developers.google.com/storage/docs/json_api/

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/storage/v1"
...
ctx := context.Background()
storageService, err := storage.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:

storageService, err := storage.NewService(ctx, option.WithScopes(storage.DevstorageReadWriteScope))

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

storageService, err := storage.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
storageService, err := storage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

	// View your data across Google Cloud Platform services
	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"

	// Manage your data and permissions in Google Cloud Storage
	DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"

	// View your data in Google Cloud Storage
	DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"

	// Manage your data in Google Cloud Storage
	DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvanceRelocateBucketOperationRequest added in v0.201.0

type AdvanceRelocateBucketOperationRequest struct {
	// ExpireTime: Specifies the time when the relocation will revert to the sync
	// stage if the relocation hasn't succeeded.
	ExpireTime string `json:"expireTime,omitempty"`
	// Ttl: Specifies the duration after which the relocation will revert to the
	// sync stage if the relocation hasn't succeeded. Optional, if not supplied, a
	// default value of 12h will be used.
	Ttl string `json:"ttl,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ExpireTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ExpireTime") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AdvanceRelocateBucketOperationRequest: An AdvanceRelocateBucketOperation request.

func (AdvanceRelocateBucketOperationRequest) MarshalJSON added in v0.201.0

func (s AdvanceRelocateBucketOperationRequest) MarshalJSON() ([]byte, error)

type AnywhereCache added in v0.150.0

type AnywhereCache struct {
	// AdmissionPolicy: The cache-level entry admission policy.
	AdmissionPolicy string `json:"admissionPolicy,omitempty"`
	// AnywhereCacheId: The ID of the Anywhere cache instance.
	AnywhereCacheId string `json:"anywhereCacheId,omitempty"`
	// Bucket: The name of the bucket containing this cache instance.
	Bucket string `json:"bucket,omitempty"`
	// CreateTime: The creation time of the cache instance in RFC 3339 format.
	CreateTime string `json:"createTime,omitempty"`
	// Id: The ID of the resource, including the project number, bucket name and
	// anywhere cache ID.
	Id string `json:"id,omitempty"`
	// Kind: The kind of item this is. For Anywhere Cache, this is always
	// storage#anywhereCache.
	Kind string `json:"kind,omitempty"`
	// PendingUpdate: True if the cache instance has an active Update long-running
	// operation.
	PendingUpdate bool `json:"pendingUpdate,omitempty"`
	// SelfLink: The link to this cache instance.
	SelfLink string `json:"selfLink,omitempty"`
	// State: The current state of the cache instance.
	State string `json:"state,omitempty"`
	// Ttl: The TTL of all cache entries in whole seconds. e.g., "7200s".
	Ttl string `json:"ttl,omitempty"`
	// UpdateTime: The modification time of the cache instance metadata in RFC 3339
	// format.
	UpdateTime string `json:"updateTime,omitempty"`
	// Zone: The zone in which the cache instance is running. For example,
	// us-central1-a.
	Zone string `json:"zone,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "AdmissionPolicy") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AdmissionPolicy") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AnywhereCache: An Anywhere Cache instance.

func (AnywhereCache) MarshalJSON added in v0.150.0

func (s AnywhereCache) MarshalJSON() ([]byte, error)

type AnywhereCaches added in v0.150.0

type AnywhereCaches struct {
	// Items: The list of items.
	Items []*AnywhereCache `json:"items,omitempty"`
	// Kind: The kind of item this is. For lists of Anywhere Caches, this is always
	// storage#anywhereCaches.
	Kind string `json:"kind,omitempty"`
	// NextPageToken: The continuation token, used to page through large result
	// sets. Provide this value in a subsequent request to return the next page of
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AnywhereCaches: A list of Anywhere Caches.

func (AnywhereCaches) MarshalJSON added in v0.150.0

func (s AnywhereCaches) MarshalJSON() ([]byte, error)

type AnywhereCachesDisableCall added in v0.156.0

type AnywhereCachesDisableCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesDisableCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesDisableCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.disable" call. Any non-2xx status code is an error. Response headers are in either *AnywhereCache.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesDisableCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesDisableCall) Header added in v0.156.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

type AnywhereCachesGetCall added in v0.156.0

type AnywhereCachesGetCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesGetCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesGetCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.get" call. Any non-2xx status code is an error. Response headers are in either *AnywhereCache.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesGetCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesGetCall) Header added in v0.156.0

func (c *AnywhereCachesGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*AnywhereCachesGetCall) IfNoneMatch added in v0.156.0

func (c *AnywhereCachesGetCall) IfNoneMatch(entityTag string) *AnywhereCachesGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type AnywhereCachesInsertCall added in v0.156.0

type AnywhereCachesInsertCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesInsertCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesInsertCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.insert" call. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesInsertCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesInsertCall) Header added in v0.156.0

func (c *AnywhereCachesInsertCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type AnywhereCachesListCall added in v0.156.0

type AnywhereCachesListCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesListCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesListCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.list" call. Any non-2xx status code is an error. Response headers are in either *AnywhereCaches.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesListCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesListCall) Header added in v0.156.0

func (c *AnywhereCachesListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*AnywhereCachesListCall) IfNoneMatch added in v0.156.0

func (c *AnywhereCachesListCall) IfNoneMatch(entityTag string) *AnywhereCachesListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*AnywhereCachesListCall) PageSize added in v0.156.0

func (c *AnywhereCachesListCall) PageSize(pageSize int64) *AnywhereCachesListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return in a single page of responses. Maximum 1000.

func (*AnywhereCachesListCall) PageToken added in v0.156.0

func (c *AnywhereCachesListCall) PageToken(pageToken string) *AnywhereCachesListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*AnywhereCachesListCall) Pages added in v0.156.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type AnywhereCachesPauseCall added in v0.156.0

type AnywhereCachesPauseCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesPauseCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesPauseCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.pause" call. Any non-2xx status code is an error. Response headers are in either *AnywhereCache.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesPauseCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesPauseCall) Header added in v0.156.0

func (c *AnywhereCachesPauseCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type AnywhereCachesResumeCall added in v0.156.0

type AnywhereCachesResumeCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesResumeCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesResumeCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.resume" call. Any non-2xx status code is an error. Response headers are in either *AnywhereCache.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesResumeCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesResumeCall) Header added in v0.156.0

func (c *AnywhereCachesResumeCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type AnywhereCachesService added in v0.156.0

type AnywhereCachesService struct {
	// contains filtered or unexported fields
}

func NewAnywhereCachesService added in v0.156.0

func NewAnywhereCachesService(s *Service) *AnywhereCachesService

func (*AnywhereCachesService) Disable added in v0.156.0

func (r *AnywhereCachesService) Disable(bucket string, anywhereCacheId string) *AnywhereCachesDisableCall

Disable: Disables an Anywhere Cache instance.

- anywhereCacheId: The ID of requested Anywhere Cache instance. - bucket: Name of the parent bucket.

func (*AnywhereCachesService) Get added in v0.156.0

func (r *AnywhereCachesService) Get(bucket string, anywhereCacheId string) *AnywhereCachesGetCall

Get: Returns the metadata of an Anywhere Cache instance.

- anywhereCacheId: The ID of requested Anywhere Cache instance. - bucket: Name of the parent bucket.

func (*AnywhereCachesService) Insert added in v0.156.0

func (r *AnywhereCachesService) Insert(bucket string, anywherecache *AnywhereCache) *AnywhereCachesInsertCall

Insert: Creates an Anywhere Cache instance.

- bucket: Name of the parent bucket.

func (*AnywhereCachesService) List added in v0.156.0

List: Returns a list of Anywhere Cache instances of the bucket matching the criteria.

- bucket: Name of the parent bucket.

func (*AnywhereCachesService) Pause added in v0.156.0

func (r *AnywhereCachesService) Pause(bucket string, anywhereCacheId string) *AnywhereCachesPauseCall

Pause: Pauses an Anywhere Cache instance.

- anywhereCacheId: The ID of requested Anywhere Cache instance. - bucket: Name of the parent bucket.

func (*AnywhereCachesService) Resume added in v0.156.0

func (r *AnywhereCachesService) Resume(bucket string, anywhereCacheId string) *AnywhereCachesResumeCall

Resume: Resumes a paused or disabled Anywhere Cache instance.

- anywhereCacheId: The ID of requested Anywhere Cache instance. - bucket: Name of the parent bucket.

func (*AnywhereCachesService) Update added in v0.156.0

func (r *AnywhereCachesService) Update(bucket string, anywhereCacheId string, anywherecache *AnywhereCache) *AnywhereCachesUpdateCall

Update: Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.

- anywhereCacheId: The ID of requested Anywhere Cache instance. - bucket: Name of the parent bucket.

type AnywhereCachesUpdateCall added in v0.156.0

type AnywhereCachesUpdateCall struct {
	// contains filtered or unexported fields
}

func (*AnywhereCachesUpdateCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*AnywhereCachesUpdateCall) Do added in v0.156.0

Do executes the "storage.anywhereCaches.update" call. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AnywhereCachesUpdateCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*AnywhereCachesUpdateCall) Header added in v0.156.0

func (c *AnywhereCachesUpdateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type Bucket

type Bucket struct {
	// Acl: Access controls on the bucket.
	Acl []*BucketAccessControl `json:"acl,omitempty"`
	// Autoclass: The bucket's Autoclass configuration.
	Autoclass *BucketAutoclass `json:"autoclass,omitempty"`
	// Billing: The bucket's billing configuration.
	Billing *BucketBilling `json:"billing,omitempty"`
	// Cors: The bucket's Cross-Origin Resource Sharing (CORS) configuration.
	Cors []*BucketCors `json:"cors,omitempty"`
	// CustomPlacementConfig: The bucket's custom placement configuration for
	// Custom Dual Regions.
	CustomPlacementConfig *BucketCustomPlacementConfig `json:"customPlacementConfig,omitempty"`
	// DefaultEventBasedHold: The default value for event-based hold on newly
	// created objects in this bucket. Event-based hold is a way to retain objects
	// indefinitely until an event occurs, signified by the hold's release. After
	// being released, such objects will be subject to bucket-level retention (if
	// any). One sample use case of this flag is for banks to hold loan documents
	// for at least 3 years after loan is paid in full. Here, bucket-level
	// retention is 3 years and the event is loan being paid in full. In this
	// example, these objects will be held intact for any number of years until the
	// event has occurred (event-based hold on the object is released) and then 3
	// more years after that. That means retention duration of the objects begins
	// from the moment event-based hold transitioned from true to false. Objects
	// under event-based hold cannot be deleted, overwritten or archived until the
	// hold is removed.
	DefaultEventBasedHold bool `json:"defaultEventBasedHold,omitempty"`
	// DefaultObjectAcl: Default access controls to apply to new objects when no
	// ACL is provided.
	DefaultObjectAcl []*ObjectAccessControl `json:"defaultObjectAcl,omitempty"`
	// Encryption: Encryption configuration for a bucket.
	Encryption *BucketEncryption `json:"encryption,omitempty"`
	// Etag: HTTP 1.1 Entity tag for the bucket.
	Etag string `json:"etag,omitempty"`
	// Generation: The generation of this bucket.
	Generation int64 `json:"generation,omitempty,string"`
	// HardDeleteTime: The hard delete time of the bucket in RFC 3339 format.
	HardDeleteTime string `json:"hardDeleteTime,omitempty"`
	// HierarchicalNamespace: The bucket's hierarchical namespace configuration.
	HierarchicalNamespace *BucketHierarchicalNamespace `json:"hierarchicalNamespace,omitempty"`
	// IamConfiguration: The bucket's IAM configuration.
	IamConfiguration *BucketIamConfiguration `json:"iamConfiguration,omitempty"`
	// Id: The ID of the bucket. For buckets, the id and name properties are the
	// same.
	Id string `json:"id,omitempty"`
	// IpFilter: The bucket's IP filter configuration. Specifies the network
	// sources that are allowed to access the operations on the bucket, as well as
	// its underlying objects. Only enforced when the mode is set to 'Enabled'.
	IpFilter *BucketIpFilter `json:"ipFilter,omitempty"`
	// Kind: The kind of item this is. For buckets, this is always storage#bucket.
	Kind string `json:"kind,omitempty"`
	// Labels: User-provided labels, in key/value pairs.
	Labels map[string]string `json:"labels,omitempty"`
	// Lifecycle: The bucket's lifecycle configuration. See Lifecycle Management
	// (https://cloud.google.com/storage/docs/lifecycle) for more information.
	Lifecycle *BucketLifecycle `json:"lifecycle,omitempty"`
	// Location: The location of the bucket. Object data for objects in the bucket
	// resides in physical storage within this region. Defaults to US. See the
	// Developer's Guide (https://cloud.google.com/storage/docs/locations) for the
	// authoritative list.
	Location string `json:"location,omitempty"`
	// LocationType: The type of the bucket location.
	LocationType string `json:"locationType,omitempty"`
	// Logging: The bucket's logging configuration, which defines the destination
	// bucket and optional name prefix for the current bucket's logs.
	Logging *BucketLogging `json:"logging,omitempty"`
	// Metageneration: The metadata generation of this bucket.
	Metageneration int64 `json:"metageneration,omitempty,string"`
	// Name: The name of the bucket.
	Name string `json:"name,omitempty"`
	// ObjectRetention: The bucket's object retention config.
	ObjectRetention *BucketObjectRetention `json:"objectRetention,omitempty"`
	// Owner: The owner of the bucket. This is always the project team's owner
	// group.
	Owner *BucketOwner `json:"owner,omitempty"`
	// ProjectNumber: The project number of the project the bucket belongs to.
	ProjectNumber uint64 `json:"projectNumber,omitempty,string"`
	// RetentionPolicy: The bucket's retention policy. The retention policy
	// enforces a minimum retention time for all objects contained in the bucket,
	// based on their creation time. Any attempt to overwrite or delete objects
	// younger than the retention period will result in a PERMISSION_DENIED error.
	// An unlocked retention policy can be modified or removed from the bucket via
	// a storage.buckets.update operation. A locked retention policy cannot be
	// removed or shortened in duration for the lifetime of the bucket. Attempting
	// to remove or decrease period of a locked retention policy will result in a
	// PERMISSION_DENIED error.
	RetentionPolicy *BucketRetentionPolicy `json:"retentionPolicy,omitempty"`
	// Rpo: The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO
	// to turn on Turbo Replication on a bucket.
	Rpo string `json:"rpo,omitempty"`
	// SatisfiesPZI: Reserved for future use.
	SatisfiesPZI bool `json:"satisfiesPZI,omitempty"`
	// SatisfiesPZS: Reserved for future use.
	SatisfiesPZS bool `json:"satisfiesPZS,omitempty"`
	// SelfLink: The URI of this bucket.
	SelfLink string `json:"selfLink,omitempty"`
	// SoftDeletePolicy: The bucket's soft delete policy, which defines the period
	// of time that soft-deleted objects will be retained, and cannot be
	// permanently deleted.
	SoftDeletePolicy *BucketSoftDeletePolicy `json:"softDeletePolicy,omitempty"`
	// SoftDeleteTime: The soft delete time of the bucket in RFC 3339 format.
	SoftDeleteTime string `json:"softDeleteTime,omitempty"`
	// StorageClass: The bucket's default storage class, used whenever no
	// storageClass is specified for a newly-created object. This defines how
	// objects in the bucket are stored and determines the SLA and the cost of
	// storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE,
	// COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not
	// specified when the bucket is created, it will default to STANDARD. For more
	// information, see Storage Classes
	// (https://cloud.google.com/storage/docs/storage-classes).
	StorageClass string `json:"storageClass,omitempty"`
	// TimeCreated: The creation time of the bucket in RFC 3339 format.
	TimeCreated string `json:"timeCreated,omitempty"`
	// Updated: The modification time of the bucket in RFC 3339 format.
	Updated string `json:"updated,omitempty"`
	// Versioning: The bucket's versioning configuration.
	Versioning *BucketVersioning `json:"versioning,omitempty"`
	// Website: The bucket's website configuration, controlling how the service
	// behaves when accessing bucket contents as a web site. See the Static Website
	// Examples (https://cloud.google.com/storage/docs/static-website) for more
	// information.
	Website *BucketWebsite `json:"website,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Acl") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Acl") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Bucket: A bucket.

func (Bucket) MarshalJSON

func (s Bucket) MarshalJSON() ([]byte, error)

type BucketAccessControl

type BucketAccessControl struct {
	// Bucket: The name of the bucket.
	Bucket string `json:"bucket,omitempty"`
	// Domain: The domain associated with the entity, if any.
	Domain string `json:"domain,omitempty"`
	// Email: The email address associated with the entity, if any.
	Email string `json:"email,omitempty"`
	// Entity: The entity holding the permission, in one of the following forms:
	// - user-userId
	// - user-email
	// - group-groupId
	// - group-email
	// - domain-domain
	// - project-team-projectId
	// - allUsers
	// - allAuthenticatedUsers Examples:
	// - The user liz@example.com would be user-liz@example.com.
	// - The group example@googlegroups.com would be
	// group-example@googlegroups.com.
	// - To refer to all members of the Google Apps for Business domain
	// example.com, the entity would be domain-example.com.
	Entity string `json:"entity,omitempty"`
	// EntityId: The ID for the entity, if any.
	EntityId string `json:"entityId,omitempty"`
	// Etag: HTTP 1.1 Entity tag for the access-control entry.
	Etag string `json:"etag,omitempty"`
	// Id: The ID of the access-control entry.
	Id string `json:"id,omitempty"`
	// Kind: The kind of item this is. For bucket access control entries, this is
	// always storage#bucketAccessControl.
	Kind string `json:"kind,omitempty"`
	// ProjectTeam: The project team associated with the entity, if any.
	ProjectTeam *BucketAccessControlProjectTeam `json:"projectTeam,omitempty"`
	// Role: The access permission for the entity.
	Role string `json:"role,omitempty"`
	// SelfLink: The link to this access-control entry.
	SelfLink string `json:"selfLink,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Bucket") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketAccessControl: An access-control entry.

func (BucketAccessControl) MarshalJSON

func (s BucketAccessControl) MarshalJSON() ([]byte, error)

type BucketAccessControlProjectTeam

type BucketAccessControlProjectTeam struct {
	// ProjectNumber: The project number.
	ProjectNumber string `json:"projectNumber,omitempty"`
	// Team: The team.
	Team string `json:"team,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ProjectNumber") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ProjectNumber") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketAccessControlProjectTeam: The project team associated with the entity, if any.

func (BucketAccessControlProjectTeam) MarshalJSON

func (s BucketAccessControlProjectTeam) MarshalJSON() ([]byte, error)

type BucketAccessControls

type BucketAccessControls struct {
	// Items: The list of items.
	Items []*BucketAccessControl `json:"items,omitempty"`
	// Kind: The kind of item this is. For lists of bucket access control entries,
	// this is always storage#bucketAccessControls.
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketAccessControls: An access-control list.

func (BucketAccessControls) MarshalJSON

func (s BucketAccessControls) MarshalJSON() ([]byte, error)

type BucketAccessControlsDeleteCall

type BucketAccessControlsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsDeleteCall) Do

Do executes the "storage.bucketAccessControls.delete" call.

func (*BucketAccessControlsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsDeleteCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAccessControlsGetCall

type BucketAccessControlsGetCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsGetCall) Do

Do executes the "storage.bucketAccessControls.get" call. Any non-2xx status code is an error. Response headers are in either *BucketAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketAccessControlsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketAccessControlsGetCall) UserProject

func (c *BucketAccessControlsGetCall) UserProject(userProject string) *BucketAccessControlsGetCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAccessControlsInsertCall

type BucketAccessControlsInsertCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsInsertCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsInsertCall) Do

Do executes the "storage.bucketAccessControls.insert" call. Any non-2xx status code is an error. Response headers are in either *BucketAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketAccessControlsInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsInsertCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsInsertCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAccessControlsListCall

type BucketAccessControlsListCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsListCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsListCall) Do

Do executes the "storage.bucketAccessControls.list" call. Any non-2xx status code is an error. Response headers are in either *BucketAccessControls.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketAccessControlsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketAccessControlsListCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAccessControlsPatchCall

type BucketAccessControlsPatchCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsPatchCall) Do

Do executes the "storage.bucketAccessControls.patch" call. Any non-2xx status code is an error. Response headers are in either *BucketAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketAccessControlsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsPatchCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAccessControlsService

type BucketAccessControlsService struct {
	// contains filtered or unexported fields
}

func NewBucketAccessControlsService

func NewBucketAccessControlsService(s *Service) *BucketAccessControlsService

func (*BucketAccessControlsService) Delete

Delete: Permanently deletes the ACL entry for the specified entity on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*BucketAccessControlsService) Get

Get: Returns the ACL entry for the specified entity on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*BucketAccessControlsService) Insert

Insert: Creates a new ACL entry on the specified bucket.

- bucket: Name of a bucket.

func (*BucketAccessControlsService) List

List: Retrieves ACL entries on the specified bucket.

- bucket: Name of a bucket.

func (*BucketAccessControlsService) Patch

func (r *BucketAccessControlsService) Patch(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsPatchCall

Patch: Patches an ACL entry on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*BucketAccessControlsService) Update

func (r *BucketAccessControlsService) Update(bucket string, entity string, bucketaccesscontrol *BucketAccessControl) *BucketAccessControlsUpdateCall

Update: Updates an ACL entry on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

type BucketAccessControlsUpdateCall

type BucketAccessControlsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*BucketAccessControlsUpdateCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketAccessControlsUpdateCall) Do

Do executes the "storage.bucketAccessControls.update" call. Any non-2xx status code is an error. Response headers are in either *BucketAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketAccessControlsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketAccessControlsUpdateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketAccessControlsUpdateCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketAutoclass added in v0.60.0

type BucketAutoclass struct {
	// Enabled: Whether or not Autoclass is enabled on this bucket
	Enabled bool `json:"enabled,omitempty"`
	// TerminalStorageClass: The storage class that objects in the bucket
	// eventually transition to if they are not read for a certain length of time.
	// Valid values are NEARLINE and ARCHIVE.
	TerminalStorageClass string `json:"terminalStorageClass,omitempty"`
	// TerminalStorageClassUpdateTime: A date and time in RFC 3339 format
	// representing the time of the most recent update to "terminalStorageClass".
	TerminalStorageClassUpdateTime string `json:"terminalStorageClassUpdateTime,omitempty"`
	// ToggleTime: A date and time in RFC 3339 format representing the instant at
	// which "enabled" was last toggled.
	ToggleTime string `json:"toggleTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketAutoclass: The bucket's Autoclass configuration.

func (BucketAutoclass) MarshalJSON added in v0.60.0

func (s BucketAutoclass) MarshalJSON() ([]byte, error)

type BucketBilling

type BucketBilling struct {
	// RequesterPays: When set to true, Requester Pays is enabled for this bucket.
	RequesterPays bool `json:"requesterPays,omitempty"`
	// ForceSendFields is a list of field names (e.g. "RequesterPays") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "RequesterPays") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketBilling: The bucket's billing configuration.

func (BucketBilling) MarshalJSON

func (s BucketBilling) MarshalJSON() ([]byte, error)

type BucketCors

type BucketCors struct {
	// MaxAgeSeconds: The value, in seconds, to return in the
	// Access-Control-Max-Age header used in preflight responses.
	MaxAgeSeconds int64 `json:"maxAgeSeconds,omitempty"`
	// Method: The list of HTTP methods on which to include CORS response headers,
	// (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and
	// means "any method".
	Method []string `json:"method,omitempty"`
	// Origin: The list of Origins eligible to receive CORS response headers. Note:
	// "*" is permitted in the list of origins, and means "any Origin".
	Origin []string `json:"origin,omitempty"`
	// ResponseHeader: The list of HTTP headers other than the simple response
	// headers to give permission for the user-agent to share across domains.
	ResponseHeader []string `json:"responseHeader,omitempty"`
	// ForceSendFields is a list of field names (e.g. "MaxAgeSeconds") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "MaxAgeSeconds") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (BucketCors) MarshalJSON

func (s BucketCors) MarshalJSON() ([]byte, error)

type BucketCustomPlacementConfig added in v0.58.0

type BucketCustomPlacementConfig struct {
	// DataLocations: The list of regional locations in which data is placed.
	DataLocations []string `json:"dataLocations,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DataLocations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DataLocations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketCustomPlacementConfig: The bucket's custom placement configuration for Custom Dual Regions.

func (BucketCustomPlacementConfig) MarshalJSON added in v0.58.0

func (s BucketCustomPlacementConfig) MarshalJSON() ([]byte, error)

type BucketEncryption

type BucketEncryption struct {
	// DefaultKmsKeyName: A Cloud KMS key that will be used to encrypt objects
	// inserted into this bucket, if no encryption method is specified.
	DefaultKmsKeyName string `json:"defaultKmsKeyName,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DefaultKmsKeyName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DefaultKmsKeyName") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketEncryption: Encryption configuration for a bucket.

func (BucketEncryption) MarshalJSON

func (s BucketEncryption) MarshalJSON() ([]byte, error)

type BucketHierarchicalNamespace added in v0.156.0

type BucketHierarchicalNamespace struct {
	// Enabled: When set to true, hierarchical namespace is enabled for this
	// bucket.
	Enabled bool `json:"enabled,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketHierarchicalNamespace: The bucket's hierarchical namespace configuration.

func (BucketHierarchicalNamespace) MarshalJSON added in v0.156.0

func (s BucketHierarchicalNamespace) MarshalJSON() ([]byte, error)

type BucketIamConfiguration

type BucketIamConfiguration struct {
	// BucketPolicyOnly: The bucket's uniform bucket-level access configuration.
	// The feature was formerly known as Bucket Policy Only. For backward
	// compatibility, this field will be populated with identical information as
	// the uniformBucketLevelAccess field. We recommend using the
	// uniformBucketLevelAccess field to enable and disable the feature.
	BucketPolicyOnly *BucketIamConfigurationBucketPolicyOnly `json:"bucketPolicyOnly,omitempty"`
	// PublicAccessPrevention: The bucket's Public Access Prevention configuration.
	// Currently, 'inherited' and 'enforced' are supported.
	PublicAccessPrevention string `json:"publicAccessPrevention,omitempty"`
	// UniformBucketLevelAccess: The bucket's uniform bucket-level access
	// configuration.
	UniformBucketLevelAccess *BucketIamConfigurationUniformBucketLevelAccess `json:"uniformBucketLevelAccess,omitempty"`
	// ForceSendFields is a list of field names (e.g. "BucketPolicyOnly") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "BucketPolicyOnly") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketIamConfiguration: The bucket's IAM configuration.

func (BucketIamConfiguration) MarshalJSON

func (s BucketIamConfiguration) MarshalJSON() ([]byte, error)

type BucketIamConfigurationBucketPolicyOnly

type BucketIamConfigurationBucketPolicyOnly struct {
	// Enabled: If set, access is controlled only by bucket-level or above IAM
	// policies.
	Enabled bool `json:"enabled,omitempty"`
	// LockedTime: The deadline for changing
	// iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339
	// format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true
	// to false until the locked time, after which the field is immutable.
	LockedTime string `json:"lockedTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketIamConfigurationBucketPolicyOnly: The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.

func (BucketIamConfigurationBucketPolicyOnly) MarshalJSON

func (s BucketIamConfigurationBucketPolicyOnly) MarshalJSON() ([]byte, error)

type BucketIamConfigurationUniformBucketLevelAccess added in v0.8.0

type BucketIamConfigurationUniformBucketLevelAccess struct {
	// Enabled: If set, access is controlled only by bucket-level or above IAM
	// policies.
	Enabled bool `json:"enabled,omitempty"`
	// LockedTime: The deadline for changing
	// iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC
	// 3339  format. iamConfiguration.uniformBucketLevelAccess.enabled may be
	// changed from true to false until the locked time, after which the field is
	// immutable.
	LockedTime string `json:"lockedTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketIamConfigurationUniformBucketLevelAccess: The bucket's uniform bucket-level access configuration.

func (BucketIamConfigurationUniformBucketLevelAccess) MarshalJSON added in v0.8.0

type BucketIpFilter added in v0.189.0

type BucketIpFilter struct {
	// Mode: The mode of the IP filter. Valid values are 'Enabled' and 'Disabled'.
	Mode string `json:"mode,omitempty"`
	// PublicNetworkSource: The public network source of the bucket's IP filter.
	PublicNetworkSource *BucketIpFilterPublicNetworkSource `json:"publicNetworkSource,omitempty"`
	// VpcNetworkSources: The list of VPC network
	// (https://cloud.google.com/vpc/docs/vpc) sources of the bucket's IP filter.
	VpcNetworkSources []*BucketIpFilterVpcNetworkSources `json:"vpcNetworkSources,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Mode") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketIpFilter: The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'.

func (BucketIpFilter) MarshalJSON added in v0.189.0

func (s BucketIpFilter) MarshalJSON() ([]byte, error)

type BucketIpFilterPublicNetworkSource added in v0.189.0

type BucketIpFilterPublicNetworkSource struct {
	// AllowedIpCidrRanges: The list of public IPv4, IPv6 cidr ranges that are
	// allowed to access the bucket.
	AllowedIpCidrRanges []string `json:"allowedIpCidrRanges,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowedIpCidrRanges") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowedIpCidrRanges") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketIpFilterPublicNetworkSource: The public network source of the bucket's IP filter.

func (BucketIpFilterPublicNetworkSource) MarshalJSON added in v0.189.0

func (s BucketIpFilterPublicNetworkSource) MarshalJSON() ([]byte, error)

type BucketIpFilterVpcNetworkSources added in v0.189.0

type BucketIpFilterVpcNetworkSources struct {
	// AllowedIpCidrRanges: The list of IPv4, IPv6 cidr ranges subnetworks that are
	// allowed to access the bucket.
	AllowedIpCidrRanges []string `json:"allowedIpCidrRanges,omitempty"`
	// Network: Name of the network. Format:
	// projects/{PROJECT_ID}/global/networks/{NETWORK_NAME}
	Network string `json:"network,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowedIpCidrRanges") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowedIpCidrRanges") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (BucketIpFilterVpcNetworkSources) MarshalJSON added in v0.189.0

func (s BucketIpFilterVpcNetworkSources) MarshalJSON() ([]byte, error)

type BucketLifecycle

type BucketLifecycle struct {
	// Rule: A lifecycle management rule, which is made of an action to take and
	// the condition(s) under which the action will be taken.
	Rule []*BucketLifecycleRule `json:"rule,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Rule") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Rule") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketLifecycle: The bucket's lifecycle configuration. See Lifecycle Management (https://cloud.google.com/storage/docs/lifecycle) for more information.

func (BucketLifecycle) MarshalJSON

func (s BucketLifecycle) MarshalJSON() ([]byte, error)

type BucketLifecycleRule

type BucketLifecycleRule struct {
	// Action: The action to take.
	Action *BucketLifecycleRuleAction `json:"action,omitempty"`
	// Condition: The condition(s) under which the action will be taken.
	Condition *BucketLifecycleRuleCondition `json:"condition,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Action") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (BucketLifecycleRule) MarshalJSON

func (s BucketLifecycleRule) MarshalJSON() ([]byte, error)

type BucketLifecycleRuleAction

type BucketLifecycleRuleAction struct {
	// StorageClass: Target storage class. Required iff the type of the action is
	// SetStorageClass.
	StorageClass string `json:"storageClass,omitempty"`
	// Type: Type of the action. Currently, only Delete, SetStorageClass, and
	// AbortIncompleteMultipartUpload are supported.
	Type string `json:"type,omitempty"`
	// ForceSendFields is a list of field names (e.g. "StorageClass") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "StorageClass") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketLifecycleRuleAction: The action to take.

func (BucketLifecycleRuleAction) MarshalJSON

func (s BucketLifecycleRuleAction) MarshalJSON() ([]byte, error)

type BucketLifecycleRuleCondition

type BucketLifecycleRuleCondition struct {
	// Age: Age of an object (in days). This condition is satisfied when an object
	// reaches the specified age.
	Age *int64 `json:"age,omitempty"`
	// CreatedBefore: A date in RFC 3339 format with only the date part (for
	// instance, "2013-01-15"). This condition is satisfied when an object is
	// created before midnight of the specified date in UTC.
	CreatedBefore string `json:"createdBefore,omitempty"`
	// CustomTimeBefore: A date in RFC 3339 format with only the date part (for
	// instance, "2013-01-15"). This condition is satisfied when the custom time on
	// an object is before this date in UTC.
	CustomTimeBefore string `json:"customTimeBefore,omitempty"`
	// DaysSinceCustomTime: Number of days elapsed since the user-specified
	// timestamp set on an object. The condition is satisfied if the days elapsed
	// is at least this number. If no custom timestamp is specified on an object,
	// the condition does not apply.
	DaysSinceCustomTime int64 `json:"daysSinceCustomTime,omitempty"`
	// DaysSinceNoncurrentTime: Number of days elapsed since the noncurrent
	// timestamp of an object. The condition is satisfied if the days elapsed is at
	// least this number. This condition is relevant only for versioned objects.
	// The value of the field must be a nonnegative integer. If it's zero, the
	// object version will become eligible for Lifecycle action as soon as it
	// becomes noncurrent.
	DaysSinceNoncurrentTime int64 `json:"daysSinceNoncurrentTime,omitempty"`
	// IsLive: Relevant only for versioned objects. If the value is true, this
	// condition matches live objects; if the value is false, it matches archived
	// objects.
	IsLive *bool `json:"isLive,omitempty"`
	// MatchesPattern: A regular expression that satisfies the RE2 syntax. This
	// condition is satisfied when the name of the object matches the RE2 pattern.
	// Note: This feature is currently in the "Early Access" launch stage and is
	// only available to a whitelisted set of users; that means that this feature
	// may be changed in backward-incompatible ways and that it is not guaranteed
	// to be released.
	MatchesPattern string `json:"matchesPattern,omitempty"`
	// MatchesPrefix: List of object name prefixes. This condition will be
	// satisfied when at least one of the prefixes exactly matches the beginning of
	// the object name.
	MatchesPrefix []string `json:"matchesPrefix,omitempty"`
	// MatchesStorageClass: Objects having any of the storage classes specified by
	// this condition will be matched. Values include MULTI_REGIONAL, REGIONAL,
	// NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.
	MatchesStorageClass []string `json:"matchesStorageClass,omitempty"`
	// MatchesSuffix: List of object name suffixes. This condition will be
	// satisfied when at least one of the suffixes exactly matches the end of the
	// object name.
	MatchesSuffix []string `json:"matchesSuffix,omitempty"`
	// NoncurrentTimeBefore: A date in RFC 3339 format with only the date part (for
	// instance, "2013-01-15"). This condition is satisfied when the noncurrent
	// time on an object is before this date in UTC. This condition is relevant
	// only for versioned objects.
	NoncurrentTimeBefore string `json:"noncurrentTimeBefore,omitempty"`
	// NumNewerVersions: Relevant only for versioned objects. If the value is N,
	// this condition is satisfied when there are at least N versions (including
	// the live version) newer than this version of the object.
	NumNewerVersions int64 `json:"numNewerVersions,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Age") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Age") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketLifecycleRuleCondition: The condition(s) under which the action will be taken.

func (BucketLifecycleRuleCondition) MarshalJSON

func (s BucketLifecycleRuleCondition) MarshalJSON() ([]byte, error)

type BucketLogging

type BucketLogging struct {
	// LogBucket: The destination bucket where the current bucket's logs should be
	// placed.
	LogBucket string `json:"logBucket,omitempty"`
	// LogObjectPrefix: A prefix for log object names.
	LogObjectPrefix string `json:"logObjectPrefix,omitempty"`
	// ForceSendFields is a list of field names (e.g. "LogBucket") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "LogBucket") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketLogging: The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.

func (BucketLogging) MarshalJSON

func (s BucketLogging) MarshalJSON() ([]byte, error)

type BucketObjectRetention added in v0.142.0

type BucketObjectRetention struct {
	// Mode: The bucket's object retention mode. Can be Enabled.
	Mode string `json:"mode,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Mode") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketObjectRetention: The bucket's object retention config.

func (BucketObjectRetention) MarshalJSON added in v0.142.0

func (s BucketObjectRetention) MarshalJSON() ([]byte, error)

type BucketOwner

type BucketOwner struct {
	// Entity: The entity, in the form project-owner-projectId.
	Entity string `json:"entity,omitempty"`
	// EntityId: The ID for the entity.
	EntityId string `json:"entityId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Entity") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Entity") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketOwner: The owner of the bucket. This is always the project team's owner group.

func (BucketOwner) MarshalJSON

func (s BucketOwner) MarshalJSON() ([]byte, error)

type BucketRetentionPolicy

type BucketRetentionPolicy struct {
	// EffectiveTime: Server-determined value that indicates the time from which
	// policy was enforced and effective. This value is in RFC 3339 format.
	EffectiveTime string `json:"effectiveTime,omitempty"`
	// IsLocked: Once locked, an object retention policy cannot be modified.
	IsLocked bool `json:"isLocked,omitempty"`
	// RetentionPeriod: The duration in seconds that objects need to be retained.
	// Retention duration must be greater than zero and less than 100 years. Note
	// that enforcement of retention periods less than a day is not guaranteed.
	// Such periods should only be used for testing purposes.
	RetentionPeriod int64 `json:"retentionPeriod,omitempty,string"`
	// ForceSendFields is a list of field names (e.g. "EffectiveTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "EffectiveTime") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketRetentionPolicy: The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.

func (BucketRetentionPolicy) MarshalJSON

func (s BucketRetentionPolicy) MarshalJSON() ([]byte, error)

type BucketSoftDeletePolicy added in v0.142.0

type BucketSoftDeletePolicy struct {
	// EffectiveTime: Server-determined value that indicates the time from which
	// the policy, or one with a greater retention, was effective. This value is in
	// RFC 3339 format.
	EffectiveTime string `json:"effectiveTime,omitempty"`
	// RetentionDurationSeconds: The duration in seconds that soft-deleted objects
	// in the bucket will be retained and cannot be permanently deleted.
	RetentionDurationSeconds int64 `json:"retentionDurationSeconds,omitempty,string"`
	// ForceSendFields is a list of field names (e.g. "EffectiveTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "EffectiveTime") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketSoftDeletePolicy: The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.

func (BucketSoftDeletePolicy) MarshalJSON added in v0.142.0

func (s BucketSoftDeletePolicy) MarshalJSON() ([]byte, error)

type BucketStorageLayout added in v0.182.0

type BucketStorageLayout struct {
	// Bucket: The name of the bucket.
	Bucket string `json:"bucket,omitempty"`
	// CustomPlacementConfig: The bucket's custom placement configuration for
	// Custom Dual Regions.
	CustomPlacementConfig *BucketStorageLayoutCustomPlacementConfig `json:"customPlacementConfig,omitempty"`
	// HierarchicalNamespace: The bucket's hierarchical namespace configuration.
	HierarchicalNamespace *BucketStorageLayoutHierarchicalNamespace `json:"hierarchicalNamespace,omitempty"`
	// Kind: The kind of item this is. For storage layout, this is always
	// storage#storageLayout.
	Kind string `json:"kind,omitempty"`
	// Location: The location of the bucket.
	Location string `json:"location,omitempty"`
	// LocationType: The type of the bucket location.
	LocationType string `json:"locationType,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Bucket") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketStorageLayout: The storage layout configuration of a bucket.

func (BucketStorageLayout) MarshalJSON added in v0.182.0

func (s BucketStorageLayout) MarshalJSON() ([]byte, error)

type BucketStorageLayoutCustomPlacementConfig added in v0.182.0

type BucketStorageLayoutCustomPlacementConfig struct {
	// DataLocations: The list of regional locations in which data is placed.
	DataLocations []string `json:"dataLocations,omitempty"`
	// ForceSendFields is a list of field names (e.g. "DataLocations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DataLocations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketStorageLayoutCustomPlacementConfig: The bucket's custom placement configuration for Custom Dual Regions.

func (BucketStorageLayoutCustomPlacementConfig) MarshalJSON added in v0.182.0

type BucketStorageLayoutHierarchicalNamespace added in v0.182.0

type BucketStorageLayoutHierarchicalNamespace struct {
	// Enabled: When set to true, hierarchical namespace is enabled for this
	// bucket.
	Enabled bool `json:"enabled,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketStorageLayoutHierarchicalNamespace: The bucket's hierarchical namespace configuration.

func (BucketStorageLayoutHierarchicalNamespace) MarshalJSON added in v0.182.0

type BucketVersioning

type BucketVersioning struct {
	// Enabled: While set to true, versioning is fully enabled for this bucket.
	Enabled bool `json:"enabled,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Enabled") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketVersioning: The bucket's versioning configuration.

func (BucketVersioning) MarshalJSON

func (s BucketVersioning) MarshalJSON() ([]byte, error)

type BucketWebsite

type BucketWebsite struct {
	// MainPageSuffix: If the requested object path is missing, the service will
	// ensure the path has a trailing '/', append this suffix, and attempt to
	// retrieve the resulting object. This allows the creation of index.html
	// objects to represent directory pages.
	MainPageSuffix string `json:"mainPageSuffix,omitempty"`
	// NotFoundPage: If the requested object path is missing, and any
	// mainPageSuffix object is missing, if applicable, the service will return the
	// named object from this bucket as the content for a 404 Not Found result.
	NotFoundPage string `json:"notFoundPage,omitempty"`
	// ForceSendFields is a list of field names (e.g. "MainPageSuffix") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "MainPageSuffix") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BucketWebsite: The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples (https://cloud.google.com/storage/docs/static-website) for more information.

func (BucketWebsite) MarshalJSON

func (s BucketWebsite) MarshalJSON() ([]byte, error)

type Buckets

type Buckets struct {
	// Items: The list of items.
	Items []*Bucket `json:"items,omitempty"`
	// Kind: The kind of item this is. For lists of buckets, this is always
	// storage#buckets.
	Kind string `json:"kind,omitempty"`
	// NextPageToken: The continuation token, used to page through large result
	// sets. Provide this value in a subsequent request to return the next page of
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Buckets: A list of buckets.

func (Buckets) MarshalJSON

func (s Buckets) MarshalJSON() ([]byte, error)

type BucketsDeleteCall

type BucketsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*BucketsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsDeleteCall) Do

Do executes the "storage.buckets.delete" call.

func (*BucketsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsDeleteCall) Header

func (c *BucketsDeleteCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsDeleteCall) IfMetagenerationMatch

func (c *BucketsDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsDeleteCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": If set, only deletes the bucket if its metageneration matches this value.

func (*BucketsDeleteCall) IfMetagenerationNotMatch

func (c *BucketsDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsDeleteCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": If set, only deletes the bucket if its metageneration does not match this value.

func (*BucketsDeleteCall) UserProject

func (c *BucketsDeleteCall) UserProject(userProject string) *BucketsDeleteCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsGetCall

type BucketsGetCall struct {
	// contains filtered or unexported fields
}

func (*BucketsGetCall) Context

func (c *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall

Context sets the context to be used in this call's Do method.

func (*BucketsGetCall) Do

func (c *BucketsGetCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.get" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsGetCall) Fields

func (c *BucketsGetCall) Fields(s ...googleapi.Field) *BucketsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsGetCall) Generation added in v0.192.0

func (c *BucketsGetCall) Generation(generation int64) *BucketsGetCall

Generation sets the optional parameter "generation": If present, specifies the generation of the bucket. This is required if softDeleted is true.

func (*BucketsGetCall) Header

func (c *BucketsGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsGetCall) IfMetagenerationMatch

func (c *BucketsGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsGetCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

func (*BucketsGetCall) IfMetagenerationNotMatch

func (c *BucketsGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsGetCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

func (*BucketsGetCall) IfNoneMatch

func (c *BucketsGetCall) IfNoneMatch(entityTag string) *BucketsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketsGetCall) Projection

func (c *BucketsGetCall) Projection(projection string) *BucketsGetCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to noAcl.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsGetCall) SoftDeleted added in v0.192.0

func (c *BucketsGetCall) SoftDeleted(softDeleted bool) *BucketsGetCall

SoftDeleted sets the optional parameter "softDeleted": If true, return the soft-deleted version of this bucket. The default is false. For more information, see Soft Delete (https://cloud.google.com/storage/docs/soft-delete).

func (*BucketsGetCall) UserProject

func (c *BucketsGetCall) UserProject(userProject string) *BucketsGetCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsGetIamPolicyCall

type BucketsGetIamPolicyCall struct {
	// contains filtered or unexported fields
}

func (*BucketsGetIamPolicyCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsGetIamPolicyCall) Do

Do executes the "storage.buckets.getIamPolicy" call. Any non-2xx status code is an error. Response headers are in either *Policy.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsGetIamPolicyCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsGetIamPolicyCall) Header

func (c *BucketsGetIamPolicyCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsGetIamPolicyCall) IfNoneMatch

func (c *BucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BucketsGetIamPolicyCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketsGetIamPolicyCall) OptionsRequestedPolicyVersion added in v0.10.0

func (c *BucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BucketsGetIamPolicyCall

OptionsRequestedPolicyVersion sets the optional parameter "optionsRequestedPolicyVersion": The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.

func (*BucketsGetIamPolicyCall) UserProject

func (c *BucketsGetIamPolicyCall) UserProject(userProject string) *BucketsGetIamPolicyCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsGetStorageLayoutCall added in v0.182.0

type BucketsGetStorageLayoutCall struct {
	// contains filtered or unexported fields
}

func (*BucketsGetStorageLayoutCall) Context added in v0.182.0

Context sets the context to be used in this call's Do method.

func (*BucketsGetStorageLayoutCall) Do added in v0.182.0

Do executes the "storage.buckets.getStorageLayout" call. Any non-2xx status code is an error. Response headers are in either *BucketStorageLayout.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsGetStorageLayoutCall) Fields added in v0.182.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsGetStorageLayoutCall) Header added in v0.182.0

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsGetStorageLayoutCall) IfNoneMatch added in v0.182.0

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketsGetStorageLayoutCall) Prefix added in v0.182.0

Prefix sets the optional parameter "prefix": An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix.

type BucketsInsertCall

type BucketsInsertCall struct {
	// contains filtered or unexported fields
}

func (*BucketsInsertCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsInsertCall) Do

func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.insert" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsInsertCall) EnableObjectRetention added in v0.142.0

func (c *BucketsInsertCall) EnableObjectRetention(enableObjectRetention bool) *BucketsInsertCall

EnableObjectRetention sets the optional parameter "enableObjectRetention": When set to true, object retention is enabled for this bucket.

func (*BucketsInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsInsertCall) Header

func (c *BucketsInsertCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsInsertCall) PredefinedAcl

func (c *BucketsInsertCall) PredefinedAcl(predefinedAcl string) *BucketsInsertCall

PredefinedAcl sets the optional parameter "predefinedAcl": Apply a predefined set of access controls to this bucket.

Possible values:

"authenticatedRead" - Project team owners get OWNER access, and

allAuthenticatedUsers get READER access.

"private" - Project team owners get OWNER access.
"projectPrivate" - Project team members get access according to their

roles.

"publicRead" - Project team owners get OWNER access, and allUsers get

READER access.

"publicReadWrite" - Project team owners get OWNER access, and allUsers get

WRITER access.

func (*BucketsInsertCall) PredefinedDefaultObjectAcl

func (c *BucketsInsertCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsInsertCall

PredefinedDefaultObjectAcl sets the optional parameter "predefinedDefaultObjectAcl": Apply a predefined set of default object access controls to this bucket.

Possible values:

"authenticatedRead" - Object owner gets OWNER access, and

allAuthenticatedUsers get READER access.

"bucketOwnerFullControl" - Object owner gets OWNER access, and project

team owners get OWNER access.

"bucketOwnerRead" - Object owner gets OWNER access, and project team

owners get READER access.

"private" - Object owner gets OWNER access.
"projectPrivate" - Object owner gets OWNER access, and project team

members get access according to their roles.

"publicRead" - Object owner gets OWNER access, and allUsers get READER

access.

func (*BucketsInsertCall) Projection

func (c *BucketsInsertCall) Projection(projection string) *BucketsInsertCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsInsertCall) UserProject

func (c *BucketsInsertCall) UserProject(userProject string) *BucketsInsertCall

UserProject sets the optional parameter "userProject": The project to be billed for this request.

type BucketsListCall

type BucketsListCall struct {
	// contains filtered or unexported fields
}

func (*BucketsListCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsListCall) Do

func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, error)

Do executes the "storage.buckets.list" call. Any non-2xx status code is an error. Response headers are in either *Buckets.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsListCall) Header

func (c *BucketsListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsListCall) IfNoneMatch

func (c *BucketsListCall) IfNoneMatch(entityTag string) *BucketsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketsListCall) MaxResults

func (c *BucketsListCall) MaxResults(maxResults int64) *BucketsListCall

MaxResults sets the optional parameter "maxResults": Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.

func (*BucketsListCall) PageToken

func (c *BucketsListCall) PageToken(pageToken string) *BucketsListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*BucketsListCall) Pages

func (c *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*BucketsListCall) Prefix

func (c *BucketsListCall) Prefix(prefix string) *BucketsListCall

Prefix sets the optional parameter "prefix": Filter results to buckets whose names begin with this prefix.

func (*BucketsListCall) Projection

func (c *BucketsListCall) Projection(projection string) *BucketsListCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to noAcl.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsListCall) SoftDeleted added in v0.192.0

func (c *BucketsListCall) SoftDeleted(softDeleted bool) *BucketsListCall

SoftDeleted sets the optional parameter "softDeleted": If true, only soft-deleted bucket versions will be returned. The default is false. For more information, see Soft Delete (https://cloud.google.com/storage/docs/soft-delete).

func (*BucketsListCall) UserProject

func (c *BucketsListCall) UserProject(userProject string) *BucketsListCall

UserProject sets the optional parameter "userProject": The project to be billed for this request.

type BucketsLockRetentionPolicyCall

type BucketsLockRetentionPolicyCall struct {
	// contains filtered or unexported fields
}

func (*BucketsLockRetentionPolicyCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsLockRetentionPolicyCall) Do

Do executes the "storage.buckets.lockRetentionPolicy" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsLockRetentionPolicyCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsLockRetentionPolicyCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsLockRetentionPolicyCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsPatchCall

type BucketsPatchCall struct {
	// contains filtered or unexported fields
}

func (*BucketsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsPatchCall) Do

func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.patch" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsPatchCall) Header

func (c *BucketsPatchCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsPatchCall) IfMetagenerationMatch

func (c *BucketsPatchCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsPatchCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

func (*BucketsPatchCall) IfMetagenerationNotMatch

func (c *BucketsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsPatchCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

func (*BucketsPatchCall) PredefinedAcl

func (c *BucketsPatchCall) PredefinedAcl(predefinedAcl string) *BucketsPatchCall

PredefinedAcl sets the optional parameter "predefinedAcl": Apply a predefined set of access controls to this bucket.

Possible values:

"authenticatedRead" - Project team owners get OWNER access, and

allAuthenticatedUsers get READER access.

"private" - Project team owners get OWNER access.
"projectPrivate" - Project team members get access according to their

roles.

"publicRead" - Project team owners get OWNER access, and allUsers get

READER access.

"publicReadWrite" - Project team owners get OWNER access, and allUsers get

WRITER access.

func (*BucketsPatchCall) PredefinedDefaultObjectAcl

func (c *BucketsPatchCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsPatchCall

PredefinedDefaultObjectAcl sets the optional parameter "predefinedDefaultObjectAcl": Apply a predefined set of default object access controls to this bucket.

Possible values:

"authenticatedRead" - Object owner gets OWNER access, and

allAuthenticatedUsers get READER access.

"bucketOwnerFullControl" - Object owner gets OWNER access, and project

team owners get OWNER access.

"bucketOwnerRead" - Object owner gets OWNER access, and project team

owners get READER access.

"private" - Object owner gets OWNER access.
"projectPrivate" - Object owner gets OWNER access, and project team

members get access according to their roles.

"publicRead" - Object owner gets OWNER access, and allUsers get READER

access.

func (*BucketsPatchCall) Projection

func (c *BucketsPatchCall) Projection(projection string) *BucketsPatchCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to full.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsPatchCall) UserProject

func (c *BucketsPatchCall) UserProject(userProject string) *BucketsPatchCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsRelocateCall added in v0.200.0

type BucketsRelocateCall struct {
	// contains filtered or unexported fields
}

func (*BucketsRelocateCall) Context added in v0.200.0

Context sets the context to be used in this call's Do method.

func (*BucketsRelocateCall) Do added in v0.200.0

Do executes the "storage.buckets.relocate" call. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsRelocateCall) Fields added in v0.200.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsRelocateCall) Header added in v0.200.0

func (c *BucketsRelocateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type BucketsRestoreCall added in v0.192.0

type BucketsRestoreCall struct {
	// contains filtered or unexported fields
}

func (*BucketsRestoreCall) Context added in v0.192.0

Context sets the context to be used in this call's Do method.

func (*BucketsRestoreCall) Do added in v0.192.0

func (c *BucketsRestoreCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.restore" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsRestoreCall) Fields added in v0.192.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsRestoreCall) Header added in v0.192.0

func (c *BucketsRestoreCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsRestoreCall) Projection added in v0.207.0

func (c *BucketsRestoreCall) Projection(projection string) *BucketsRestoreCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to full.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsRestoreCall) UserProject added in v0.192.0

func (c *BucketsRestoreCall) UserProject(userProject string) *BucketsRestoreCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsService

type BucketsService struct {
	// contains filtered or unexported fields
}

func NewBucketsService

func NewBucketsService(s *Service) *BucketsService

func (*BucketsService) Delete

func (r *BucketsService) Delete(bucket string) *BucketsDeleteCall

Delete: Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket.

- bucket: Name of a bucket.

func (*BucketsService) Get

func (r *BucketsService) Get(bucket string) *BucketsGetCall

Get: Returns metadata for the specified bucket.

- bucket: Name of a bucket.

func (*BucketsService) GetIamPolicy

func (r *BucketsService) GetIamPolicy(bucket string) *BucketsGetIamPolicyCall

GetIamPolicy: Returns an IAM policy for the specified bucket.

- bucket: Name of a bucket.

func (*BucketsService) GetStorageLayout added in v0.182.0

func (r *BucketsService) GetStorageLayout(bucket string) *BucketsGetStorageLayoutCall

GetStorageLayout: Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.

- bucket: Name of a bucket.

func (*BucketsService) Insert

func (r *BucketsService) Insert(projectid string, bucket *Bucket) *BucketsInsertCall

Insert: Creates a new bucket.

- project: A valid API project identifier.

func (*BucketsService) List

func (r *BucketsService) List(projectid string) *BucketsListCall

List: Retrieves a list of buckets for a given project.

- project: A valid API project identifier.

func (*BucketsService) LockRetentionPolicy

func (r *BucketsService) LockRetentionPolicy(bucket string, ifMetagenerationMatch int64) *BucketsLockRetentionPolicyCall

LockRetentionPolicy: Locks retention policy on a bucket.

  • bucket: Name of a bucket.
  • ifMetagenerationMatch: Makes the operation conditional on whether bucket's current metageneration matches the given value.

func (*BucketsService) Patch

func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall

Patch: Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

- bucket: Name of a bucket.

func (*BucketsService) Relocate added in v0.200.0

func (r *BucketsService) Relocate(bucket string, relocatebucketrequest *RelocateBucketRequest) *BucketsRelocateCall

Relocate: Initiates a long-running Relocate Bucket operation on the specified bucket.

- bucket: Name of the bucket to be moved.

func (*BucketsService) Restore added in v0.192.0

func (r *BucketsService) Restore(bucket string, generation int64) *BucketsRestoreCall

Restore: Restores a soft-deleted bucket.

- bucket: Name of a bucket. - generation: Generation of a bucket.

func (*BucketsService) SetIamPolicy

func (r *BucketsService) SetIamPolicy(bucket string, policy *Policy) *BucketsSetIamPolicyCall

SetIamPolicy: Updates an IAM policy for the specified bucket.

- bucket: Name of a bucket.

func (*BucketsService) TestIamPermissions

func (r *BucketsService) TestIamPermissions(bucket string, permissions []string) *BucketsTestIamPermissionsCall

TestIamPermissions: Tests a set of permissions on the given bucket to see which, if any, are held by the caller.

- bucket: Name of a bucket. - permissions: Permissions to test.

func (*BucketsService) Update

func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCall

Update: Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

- bucket: Name of a bucket.

type BucketsSetIamPolicyCall

type BucketsSetIamPolicyCall struct {
	// contains filtered or unexported fields
}

func (*BucketsSetIamPolicyCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsSetIamPolicyCall) Do

Do executes the "storage.buckets.setIamPolicy" call. Any non-2xx status code is an error. Response headers are in either *Policy.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsSetIamPolicyCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsSetIamPolicyCall) Header

func (c *BucketsSetIamPolicyCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsSetIamPolicyCall) UserProject

func (c *BucketsSetIamPolicyCall) UserProject(userProject string) *BucketsSetIamPolicyCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsTestIamPermissionsCall

type BucketsTestIamPermissionsCall struct {
	// contains filtered or unexported fields
}

func (*BucketsTestIamPermissionsCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsTestIamPermissionsCall) Do

Do executes the "storage.buckets.testIamPermissions" call. Any non-2xx status code is an error. Response headers are in either *TestIamPermissionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsTestIamPermissionsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsTestIamPermissionsCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsTestIamPermissionsCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*BucketsTestIamPermissionsCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BucketsUpdateCall

type BucketsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*BucketsUpdateCall) Context

Context sets the context to be used in this call's Do method.

func (*BucketsUpdateCall) Do

func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error)

Do executes the "storage.buckets.update" call. Any non-2xx status code is an error. Response headers are in either *Bucket.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BucketsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*BucketsUpdateCall) Header

func (c *BucketsUpdateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*BucketsUpdateCall) IfMetagenerationMatch

func (c *BucketsUpdateCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *BucketsUpdateCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

func (*BucketsUpdateCall) IfMetagenerationNotMatch

func (c *BucketsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *BucketsUpdateCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

func (*BucketsUpdateCall) PredefinedAcl

func (c *BucketsUpdateCall) PredefinedAcl(predefinedAcl string) *BucketsUpdateCall

PredefinedAcl sets the optional parameter "predefinedAcl": Apply a predefined set of access controls to this bucket.

Possible values:

"authenticatedRead" - Project team owners get OWNER access, and

allAuthenticatedUsers get READER access.

"private" - Project team owners get OWNER access.
"projectPrivate" - Project team members get access according to their

roles.

"publicRead" - Project team owners get OWNER access, and allUsers get

READER access.

"publicReadWrite" - Project team owners get OWNER access, and allUsers get

WRITER access.

func (*BucketsUpdateCall) PredefinedDefaultObjectAcl

func (c *BucketsUpdateCall) PredefinedDefaultObjectAcl(predefinedDefaultObjectAcl string) *BucketsUpdateCall

PredefinedDefaultObjectAcl sets the optional parameter "predefinedDefaultObjectAcl": Apply a predefined set of default object access controls to this bucket.

Possible values:

"authenticatedRead" - Object owner gets OWNER access, and

allAuthenticatedUsers get READER access.

"bucketOwnerFullControl" - Object owner gets OWNER access, and project

team owners get OWNER access.

"bucketOwnerRead" - Object owner gets OWNER access, and project team

owners get READER access.

"private" - Object owner gets OWNER access.
"projectPrivate" - Object owner gets OWNER access, and project team

members get access according to their roles.

"publicRead" - Object owner gets OWNER access, and allUsers get READER

access.

func (*BucketsUpdateCall) Projection

func (c *BucketsUpdateCall) Projection(projection string) *BucketsUpdateCall

Projection sets the optional parameter "projection": Set of properties to return. Defaults to full.

Possible values:

"full" - Include all properties.
"noAcl" - Omit owner, acl and defaultObjectAcl properties.

func (*BucketsUpdateCall) UserProject

func (c *BucketsUpdateCall) UserProject(userProject string) *BucketsUpdateCall

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type BulkRestoreObjectsRequest added in v0.141.0

type BulkRestoreObjectsRequest struct {
	// AllowOverwrite: If false (default), the restore will not overwrite live
	// objects with the same name at the destination. This means some deleted
	// objects may be skipped. If true, live objects will be overwritten resulting
	// in a noncurrent object (if versioning is enabled). If versioning is not
	// enabled, overwriting the object will result in a soft-deleted object. In
	// either case, if a noncurrent object already exists with the same name, a
	// live version can be written without issue.
	AllowOverwrite bool `json:"allowOverwrite,omitempty"`
	// CopySourceAcl: If true, copies the source object's ACL; otherwise, uses the
	// bucket's default object ACL. The default is false.
	CopySourceAcl bool `json:"copySourceAcl,omitempty"`
	// MatchGlobs: Restores only the objects matching any of the specified glob(s).
	// If this parameter is not specified, all objects will be restored within the
	// specified time range.
	MatchGlobs []string `json:"matchGlobs,omitempty"`
	// SoftDeletedAfterTime: Restores only the objects that were soft-deleted after
	// this time.
	SoftDeletedAfterTime string `json:"softDeletedAfterTime,omitempty"`
	// SoftDeletedBeforeTime: Restores only the objects that were soft-deleted
	// before this time.
	SoftDeletedBeforeTime string `json:"softDeletedBeforeTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowOverwrite") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowOverwrite") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

BulkRestoreObjectsRequest: A bulk restore objects request.

func (BulkRestoreObjectsRequest) MarshalJSON added in v0.141.0

func (s BulkRestoreObjectsRequest) MarshalJSON() ([]byte, error)

type Channel

type Channel struct {
	// Address: The address where notifications are delivered for this channel.
	Address string `json:"address,omitempty"`
	// Expiration: Date and time of notification channel expiration, expressed as a
	// Unix timestamp, in milliseconds. Optional.
	Expiration int64 `json:"expiration,omitempty,string"`
	// Id: A UUID or similar unique string that identifies this channel.
	Id string `json:"id,omitempty"`
	// Kind: Identifies this as a notification channel used to watch for changes to
	// a resource, which is "api#channel".
	Kind string `json:"kind,omitempty"`
	// Params: Additional parameters controlling delivery channel behavior.
	// Optional.
	Params map[string]string `json:"params,omitempty"`
	// Payload: A Boolean value to indicate whether payload is wanted. Optional.
	Payload bool `json:"payload,omitempty"`
	// ResourceId: An opaque ID that identifies the resource being watched on this
	// channel. Stable across different API versions.
	ResourceId string `json:"resourceId,omitempty"`
	// ResourceUri: A version-specific identifier for the watched resource.
	ResourceUri string `json:"resourceUri,omitempty"`
	// Token: An arbitrary string delivered to the target address with each
	// notification delivered over this channel. Optional.
	Token string `json:"token,omitempty"`
	// Type: The type of delivery mechanism used for this channel.
	Type string `json:"type,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Address") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Channel: An notification channel used to watch for resource changes.

func (Channel) MarshalJSON

func (s Channel) MarshalJSON() ([]byte, error)

type ChannelsService

type ChannelsService struct {
	// contains filtered or unexported fields
}

func NewChannelsService

func NewChannelsService(s *Service) *ChannelsService

func (*ChannelsService) Stop

func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall

Stop: Stop watching resources through this channel

type ChannelsStopCall

type ChannelsStopCall struct {
	// contains filtered or unexported fields
}

func (*ChannelsStopCall) Context

Context sets the context to be used in this call's Do method.

func (*ChannelsStopCall) Do

func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error

Do executes the "storage.channels.stop" call.

func (*ChannelsStopCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ChannelsStopCall) Header

func (c *ChannelsStopCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type ComposeRequest

type ComposeRequest struct {
	// Destination: Properties of the resulting object.
	Destination *Object `json:"destination,omitempty"`
	// Kind: The kind of item this is.
	Kind string `json:"kind,omitempty"`
	// SourceObjects: The list of source objects that will be concatenated into a
	// single object.
	SourceObjects []*ComposeRequestSourceObjects `json:"sourceObjects,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Destination") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Destination") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ComposeRequest: A Compose request.

func (ComposeRequest) MarshalJSON

func (s ComposeRequest) MarshalJSON() ([]byte, error)

type ComposeRequestSourceObjects

type ComposeRequestSourceObjects struct {
	// Generation: The generation of this object to use as the source.
	Generation int64 `json:"generation,omitempty,string"`
	// Name: The source object's name. All source objects must reside in the same
	// bucket.
	Name string `json:"name,omitempty"`
	// ObjectPreconditions: Conditions that must be met for this operation to
	// execute.
	ObjectPreconditions *ComposeRequestSourceObjectsObjectPreconditions `json:"objectPreconditions,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Generation") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Generation") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

func (ComposeRequestSourceObjects) MarshalJSON

func (s ComposeRequestSourceObjects) MarshalJSON() ([]byte, error)

type ComposeRequestSourceObjectsObjectPreconditions

type ComposeRequestSourceObjectsObjectPreconditions struct {
	// IfGenerationMatch: Only perform the composition if the generation of the
	// source object that would be used matches this value. If this value and a
	// generation are both specified, they must be the same value or the call will
	// fail.
	IfGenerationMatch int64 `json:"ifGenerationMatch,omitempty,string"`
	// ForceSendFields is a list of field names (e.g. "IfGenerationMatch") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "IfGenerationMatch") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ComposeRequestSourceObjectsObjectPreconditions: Conditions that must be met for this operation to execute.

func (ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON

type DefaultObjectAccessControlsDeleteCall

type DefaultObjectAccessControlsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsDeleteCall) Do

Do executes the "storage.defaultObjectAccessControls.delete" call.

func (*DefaultObjectAccessControlsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsDeleteCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type DefaultObjectAccessControlsGetCall

type DefaultObjectAccessControlsGetCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsGetCall) Do

Do executes the "storage.defaultObjectAccessControls.get" call. Any non-2xx status code is an error. Response headers are in either *ObjectAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DefaultObjectAccessControlsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*DefaultObjectAccessControlsGetCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type DefaultObjectAccessControlsInsertCall

type DefaultObjectAccessControlsInsertCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsInsertCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsInsertCall) Do

Do executes the "storage.defaultObjectAccessControls.insert" call. Any non-2xx status code is an error. Response headers are in either *ObjectAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DefaultObjectAccessControlsInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsInsertCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsInsertCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type DefaultObjectAccessControlsListCall

type DefaultObjectAccessControlsListCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsListCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsListCall) Do

Do executes the "storage.defaultObjectAccessControls.list" call. Any non-2xx status code is an error. Response headers are in either *ObjectAccessControls.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DefaultObjectAccessControlsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsListCall) IfMetagenerationMatch

func (c *DefaultObjectAccessControlsListCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *DefaultObjectAccessControlsListCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": If present, only return default ACL listing if the bucket's current metageneration matches this value.

func (*DefaultObjectAccessControlsListCall) IfMetagenerationNotMatch

func (c *DefaultObjectAccessControlsListCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *DefaultObjectAccessControlsListCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": If present, only return default ACL listing if the bucket's current metageneration does not match the given value.

func (*DefaultObjectAccessControlsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*DefaultObjectAccessControlsListCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type DefaultObjectAccessControlsPatchCall

type DefaultObjectAccessControlsPatchCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsPatchCall) Do

Do executes the "storage.defaultObjectAccessControls.patch" call. Any non-2xx status code is an error. Response headers are in either *ObjectAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DefaultObjectAccessControlsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsPatchCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type DefaultObjectAccessControlsService

type DefaultObjectAccessControlsService struct {
	// contains filtered or unexported fields
}

func NewDefaultObjectAccessControlsService

func NewDefaultObjectAccessControlsService(s *Service) *DefaultObjectAccessControlsService

func (*DefaultObjectAccessControlsService) Delete

Delete: Permanently deletes the default object ACL entry for the specified entity on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*DefaultObjectAccessControlsService) Get

Get: Returns the default object ACL entry for the specified entity on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*DefaultObjectAccessControlsService) Insert

Insert: Creates a new default object ACL entry on the specified bucket.

- bucket: Name of a bucket.

func (*DefaultObjectAccessControlsService) List

List: Retrieves default object ACL entries on the specified bucket.

- bucket: Name of a bucket.

func (*DefaultObjectAccessControlsService) Patch

Patch: Patches a default object ACL entry on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

func (*DefaultObjectAccessControlsService) Update

Update: Updates a default object ACL entry on the specified bucket.

  • bucket: Name of a bucket.
  • entity: The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

type DefaultObjectAccessControlsUpdateCall

type DefaultObjectAccessControlsUpdateCall struct {
	// contains filtered or unexported fields
}

func (*DefaultObjectAccessControlsUpdateCall) Context

Context sets the context to be used in this call's Do method.

func (*DefaultObjectAccessControlsUpdateCall) Do

Do executes the "storage.defaultObjectAccessControls.update" call. Any non-2xx status code is an error. Response headers are in either *ObjectAccessControl.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DefaultObjectAccessControlsUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*DefaultObjectAccessControlsUpdateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*DefaultObjectAccessControlsUpdateCall) UserProject

UserProject sets the optional parameter "userProject": The project to be billed for this request. Required for Requester Pays buckets.

type Expr added in v0.2.0

type Expr struct {
	// Description: An optional description of the expression. This is a longer
	// text which describes the expression, e.g. when hovered over it in a UI.
	Description string `json:"description,omitempty"`
	// Expression: Textual representation of an expression in Common Expression
	// Language syntax. The application context of the containing message
	// determines which well-known feature set of CEL is supported.
	Expression string `json:"expression,omitempty"`
	// Location: An optional string indicating the location of the expression for
	// error reporting, e.g. a file name and a position in the file.
	Location string `json:"location,omitempty"`
	// Title: An optional title for the expression, i.e. a short string describing
	// its purpose. This can be used e.g. in UIs which allow to enter the
	// expression.
	Title string `json:"title,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Description") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Expr: Represents an expression text. Example: title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"

func (Expr) MarshalJSON added in v0.2.0

func (s Expr) MarshalJSON() ([]byte, error)

type Folder added in v0.156.0

type Folder struct {
	// Bucket: The name of the bucket containing this folder.
	Bucket string `json:"bucket,omitempty"`
	// CreateTime: The creation time of the folder in RFC 3339 format.
	CreateTime string `json:"createTime,omitempty"`
	// Id: The ID of the folder, including the bucket name, folder name.
	Id string `json:"id,omitempty"`
	// Kind: The kind of item this is. For folders, this is always storage#folder.
	Kind string `json:"kind,omitempty"`
	// Metageneration: The version of the metadata for this folder. Used for
	// preconditions and for detecting changes in metadata.
	Metageneration int64 `json:"metageneration,omitempty,string"`
	// Name: The name of the folder. Required if not specified by URL parameter.
	Name string `json:"name,omitempty"`
	// PendingRenameInfo: Only present if the folder is part of an ongoing rename
	// folder operation. Contains information which can be used to query the
	// operation status.
	PendingRenameInfo *FolderPendingRenameInfo `json:"pendingRenameInfo,omitempty"`
	// SelfLink: The link to this folder.
	SelfLink string `json:"selfLink,omitempty"`
	// UpdateTime: The modification time of the folder metadata in RFC 3339 format.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Bucket") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Folder: A folder. Only available in buckets with hierarchical namespace enabled.

func (Folder) MarshalJSON added in v0.156.0

func (s Folder) MarshalJSON() ([]byte, error)

type FolderPendingRenameInfo added in v0.156.0

type FolderPendingRenameInfo struct {
	// OperationId: The ID of the rename folder operation.
	OperationId string `json:"operationId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "OperationId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "OperationId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

FolderPendingRenameInfo: Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status.

func (FolderPendingRenameInfo) MarshalJSON added in v0.156.0

func (s FolderPendingRenameInfo) MarshalJSON() ([]byte, error)

type Folders added in v0.156.0

type Folders struct {
	// Items: The list of items.
	Items []*Folder `json:"items,omitempty"`
	// Kind: The kind of item this is. For lists of folders, this is always
	// storage#folders.
	Kind string `json:"kind,omitempty"`
	// NextPageToken: The continuation token, used to page through large result
	// sets. Provide this value in a subsequent request to return the next page of
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Folders: A list of folders.

func (Folders) MarshalJSON added in v0.156.0

func (s Folders) MarshalJSON() ([]byte, error)

type FoldersDeleteCall added in v0.156.0

type FoldersDeleteCall struct {
	// contains filtered or unexported fields
}

func (*FoldersDeleteCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*FoldersDeleteCall) Do added in v0.156.0

Do executes the "storage.folders.delete" call.

func (*FoldersDeleteCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*FoldersDeleteCall) Header added in v0.156.0

func (c *FoldersDeleteCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*FoldersDeleteCall) IfMetagenerationMatch added in v0.156.0

func (c *FoldersDeleteCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *FoldersDeleteCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": If set, only deletes the folder if its metageneration matches this value.

func (*FoldersDeleteCall) IfMetagenerationNotMatch added in v0.156.0

func (c *FoldersDeleteCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *FoldersDeleteCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": If set, only deletes the folder if its metageneration does not match this value.

type FoldersGetCall added in v0.156.0

type FoldersGetCall struct {
	// contains filtered or unexported fields
}

func (*FoldersGetCall) Context added in v0.156.0

func (c *FoldersGetCall) Context(ctx context.Context) *FoldersGetCall

Context sets the context to be used in this call's Do method.

func (*FoldersGetCall) Do added in v0.156.0

func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error)

Do executes the "storage.folders.get" call. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FoldersGetCall) Fields added in v0.156.0

func (c *FoldersGetCall) Fields(s ...googleapi.Field) *FoldersGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*FoldersGetCall) Header added in v0.156.0

func (c *FoldersGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*FoldersGetCall) IfMetagenerationMatch added in v0.156.0

func (c *FoldersGetCall) IfMetagenerationMatch(ifMetagenerationMatch int64) *FoldersGetCall

IfMetagenerationMatch sets the optional parameter "ifMetagenerationMatch": Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value.

func (*FoldersGetCall) IfMetagenerationNotMatch added in v0.156.0

func (c *FoldersGetCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int64) *FoldersGetCall

IfMetagenerationNotMatch sets the optional parameter "ifMetagenerationNotMatch": Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value.

func (*FoldersGetCall) IfNoneMatch added in v0.156.0

func (c *FoldersGetCall) IfNoneMatch(entityTag string) *FoldersGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type FoldersInsertCall added in v0.156.0

type FoldersInsertCall struct {
	// contains filtered or unexported fields
}

func (*FoldersInsertCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*FoldersInsertCall) Do added in v0.156.0

func (c *FoldersInsertCall) Do(opts ...googleapi.CallOption) (*Folder, error)

Do executes the "storage.folders.insert" call. Any non-2xx status code is an error. Response headers are in either *Folder.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FoldersInsertCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*FoldersInsertCall) Header added in v0.156.0

func (c *FoldersInsertCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*FoldersInsertCall) Recursive added in v0.156.0

func (c *FoldersInsertCall) Recursive(recursive bool) *FoldersInsertCall

Recursive sets the optional parameter "recursive": If true, any parent folder which doesn’t exist will be created automatically.

type FoldersListCall added in v0.156.0

type FoldersListCall struct {
	// contains filtered or unexported fields
}

func (*FoldersListCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*FoldersListCall) Delimiter added in v0.156.0

func (c *FoldersListCall) Delimiter(delimiter string) *FoldersListCall

Delimiter sets the optional parameter "delimiter": Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix.

func (*FoldersListCall) Do added in v0.156.0

func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*Folders, error)

Do executes the "storage.folders.list" call. Any non-2xx status code is an error. Response headers are in either *Folders.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FoldersListCall) EndOffset added in v0.156.0

func (c *FoldersListCall) EndOffset(endOffset string) *FoldersListCall

EndOffset sets the optional parameter "endOffset": Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).

func (*FoldersListCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*FoldersListCall) Header added in v0.156.0

func (c *FoldersListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*FoldersListCall) IfNoneMatch added in v0.156.0

func (c *FoldersListCall) IfNoneMatch(entityTag string) *FoldersListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*FoldersListCall) PageSize added in v0.156.0

func (c *FoldersListCall) PageSize(pageSize int64) *FoldersListCall

PageSize sets the optional parameter "pageSize": Maximum number of items to return in a single page of responses.

func (*FoldersListCall) PageToken added in v0.156.0

func (c *FoldersListCall) PageToken(pageToken string) *FoldersListCall

PageToken sets the optional parameter "pageToken": A previously-returned page token representing part of the larger set of results to view.

func (*FoldersListCall) Pages added in v0.156.0

func (c *FoldersListCall) Pages(ctx context.Context, f func(*Folders) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*FoldersListCall) Prefix added in v0.156.0

func (c *FoldersListCall) Prefix(prefix string) *FoldersListCall

Prefix sets the optional parameter "prefix": Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'.

func (*FoldersListCall) StartOffset added in v0.156.0

func (c *FoldersListCall) StartOffset(startOffset string) *FoldersListCall

StartOffset sets the optional parameter "startOffset": Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).

type FoldersRenameCall added in v0.156.0

type FoldersRenameCall struct {
	// contains filtered or unexported fields
}

func (*FoldersRenameCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method.

func (*FoldersRenameCall) Do added in v0.156.0

Do executes the "storage.folders.rename" call. Any non-2xx status code is an error. Response headers are in either *GoogleLongrunningOperation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*FoldersRenameCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*FoldersRenameCall) Header added in v0.156.0

func (c *FoldersRenameCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*FoldersRenameCall) IfSourceMetagenerationMatch added in v0.156.0

func (c *FoldersRenameCall) IfSourceMetagenerationMatch(ifSourceMetagenerationMatch int64) *FoldersRenameCall

IfSourceMetagenerationMatch sets the optional parameter "ifSourceMetagenerationMatch": Makes the operation conditional on whether the source object's current metageneration matches the given value.

func (*FoldersRenameCall) IfSourceMetagenerationNotMatch added in v0.156.0

func (c *FoldersRenameCall) IfSourceMetagenerationNotMatch(ifSourceMetagenerationNotMatch int64) *FoldersRenameCall

IfSourceMetagenerationNotMatch sets the optional parameter "ifSourceMetagenerationNotMatch": Makes the operation conditional on whether the source object's current metageneration does not match the given value.

type FoldersService added in v0.156.0

type FoldersService struct {
	// contains filtered or unexported fields
}

func NewFoldersService added in v0.156.0

func NewFoldersService(s *Service) *FoldersService

func (*FoldersService) Delete added in v0.156.0

func (r *FoldersService) Delete(bucket string, folder string) *FoldersDeleteCall

Delete: Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled.

- bucket: Name of the bucket in which the folder resides. - folder: Name of a folder.

func (*FoldersService) Get added in v0.156.0

func (r *FoldersService) Get(bucket string, folder string) *FoldersGetCall

Get: Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.

- bucket: Name of the bucket in which the folder resides. - folder: Name of a folder.

func (*FoldersService) Insert added in v0.156.0

func (r *FoldersService) Insert(bucket string, folder *Folder) *FoldersInsertCall

Insert: Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.

- bucket: Name of the bucket in which the folder resides.

func (*FoldersService) List added in v0.156.0

func (r *FoldersService) List(bucket string) *FoldersListCall

List: Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled.

- bucket: Name of the bucket in which to look for folders.

func (*FoldersService) Rename added in v0.156.0

func (r *FoldersService) Rename(bucket string, sourceFolder string, destinationFolder string) *FoldersRenameCall

Rename: Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.

- bucket: Name of the bucket in which the folders are in. - destinationFolder: Name of the destination folder. - sourceFolder: Name of the source folder.

type GoogleLongrunningListOperationsResponse added in v0.141.0

type GoogleLongrunningListOperationsResponse struct {
	// Kind: The kind of item this is. For lists of operations, this is always
	// storage#operations.
	Kind string `json:"kind,omitempty"`
	// NextPageToken: The continuation token, used to page through large result
	// sets. Provide this value in a subsequent request to return the next page of
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Operations: A list of operations that matches the specified filter in the
	// request.
	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Kind") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleLongrunningListOperationsResponse: The response message for storage.buckets.operations.list.

func (GoogleLongrunningListOperationsResponse) MarshalJSON added in v0.141.0

func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error)

type GoogleLongrunningOperation added in v0.141.0

type GoogleLongrunningOperation struct {
	// Done: If the value is "false", it means the operation is still in progress.
	// If "true", the operation is completed, and either "error" or "response" is
	// available.
	Done bool `json:"done,omitempty"`
	// Error: The error result of the operation in case of failure or cancellation.
	Error *GoogleRpcStatus `json:"error,omitempty"`
	// Kind: The kind of item this is. For operations, this is always
	// storage#operation.
	Kind string `json:"kind,omitempty"`
	// Metadata: Service-specific metadata associated with the operation. It
	// typically contains progress information and common metadata such as create
	// time. Some services might not provide such metadata. Any method that returns
	// a long-running operation should document the metadata type, if any.
	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
	// Name: The server-assigned name, which is only unique within the same service
	// that originally returns it. If you use the default HTTP mapping, the "name"
	// should be a resource name ending with "operations/{operationId}".
	Name string `json:"name,omitempty"`
	// Response: The normal response of the operation in case of success. If the
	// original method returns no data on success, such as "Delete", the response
	// is google.protobuf.Empty. If the original method is standard
	// Get/Create/Update, the response should be the resource. For other methods,
	// the response should have the type "XxxResponse", where "Xxx" is the original
	// method name. For example, if the original method name is "TakeSnapshot()",
	// the inferred response type is "TakeSnapshotResponse".
	Response googleapi.RawMessage `json:"response,omitempty"`
	// SelfLink: The link to this long running operation.
	SelfLink string `json:"selfLink,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Done") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleLongrunningOperation: This resource represents a long-running operation that is the result of a network API call.

func (GoogleLongrunningOperation) MarshalJSON added in v0.141.0

func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error)

type GoogleRpcStatus added in v0.141.0

type GoogleRpcStatus struct {
	// Code: The status code, which should be an enum value of google.rpc.Code.
	Code int64 `json:"code,omitempty"`
	// Details: A list of messages that carry the error details. There is a common
	// set of message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`
	// Message: A developer-facing error message, which should be in English.
	Message string `json:"message,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Code") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleRpcStatus: The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).

func (GoogleRpcStatus) MarshalJSON added in v0.141.0

func (s GoogleRpcStatus) MarshalJSON() ([]byte, error)

type HmacKey added in v0.4.0

type HmacKey struct {
	// Kind: The kind of item this is. For HMAC keys, this is always
	// storage#hmacKey.
	Kind string `json:"kind,omitempty"`
	// Metadata: Key metadata.
	Metadata *HmacKeyMetadata `json:"metadata,omitempty"`
	// Secret: HMAC secret key material.
	Secret string `json:"secret,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Kind") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

HmacKey: JSON template to produce a JSON-style HMAC Key resource for Create responses.

func (HmacKey) MarshalJSON added in v0.4.0

func (s HmacKey) MarshalJSON() ([]byte, error)

type HmacKeyMetadata added in v0.4.0

type HmacKeyMetadata struct {
	// AccessId: The ID of the HMAC Key.
	AccessId string `json:"accessId,omitempty"`
	// Etag: HTTP 1.1 Entity tag for the HMAC key.
	Etag string `json:"etag,omitempty"`
	// Id: The ID of the HMAC key, including the Project ID and the Access ID.
	Id string `json:"id,omitempty"`
	// Kind: The kind of item this is. For HMAC Key metadata, this is always
	// storage#hmacKeyMetadata.
	Kind string `json:"kind,omitempty"`
	// ProjectId: Project ID owning the service account to which the key
	// authenticates.
	ProjectId string `json:"projectId,omitempty"`
	// SelfLink: The link to this resource.
	SelfLink string `json:"selfLink,omitempty"`
	// ServiceAccountEmail: The email address of the key's associated service
	// account.
	ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
	// State: The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.
	State string `json:"state,omitempty"`
	// TimeCreated: The creation time of the HMAC key in RFC 3339 format.
	TimeCreated string `json:"timeCreated,omitempty"`
	// Updated: The last modification time of the HMAC key metadata in RFC 3339
	// format.
	Updated string `json:"updated,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "AccessId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AccessId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

HmacKeyMetadata: JSON template to produce a JSON-style HMAC Key metadata resource.

func (HmacKeyMetadata) MarshalJSON added in v0.4.0

func (s HmacKeyMetadata) MarshalJSON() ([]byte, error)