Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
|
Represents a Google Cloud Storage Bucket Metadata object. More...
#include <google/cloud/storage/bucket_metadata.h>
Public Member Functions | |
BucketMetadata ()=default | |
std::string const & | etag () const |
BucketMetadata & | set_etag (std::string v) |
std::string const & | id () const |
Return the bucket id. More... | |
BucketMetadata & | set_id (std::string v) |
std::string const & | kind () const |
BucketMetadata & | set_kind (std::string v) |
std::string const & | location () const |
Return the bucket location. More... | |
BucketMetadata & | set_location (std::string v) |
Set the bucket location. Only applicable when creating buckets. More... | |
std::string const & | location_type () const |
Returns the location type (e.g. regional vs. dual region). More... | |
BucketMetadata & | set_location_type (std::string v) |
std::int64_t | metageneration () const |
The bucket metageneration. More... | |
BucketMetadata & | set_metageneration (std::int64_t v) |
std::string const & | name () const |
The bucket name. More... | |
BucketMetadata & | set_name (std::string v) |
Changes the name. More... | |
bool | has_owner () const |
Returns true if the bucket owner attribute is present. More... | |
Owner const & | owner () const |
Returns the owner. More... | |
BucketMetadata & | set_owner (Owner v) |
BucketMetadata & | reset_owner () |
std::int64_t const & | project_number () const |
BucketMetadata & | set_project_number (std::int64_t v) |
std::string const & | self_link () const |
Returns a HTTP link to retrieve the bucket metadata. More... | |
BucketMetadata & | set_self_link (std::string v) |
std::chrono::system_clock::time_point | time_created () const |
Returns the bucket creation timestamp. More... | |
BucketMetadata & | set_time_created (std::chrono::system_clock::time_point v) |
std::chrono::system_clock::time_point | updated () const |
Returns the timestamp for the last bucket metadata update. More... | |
BucketMetadata & | set_updated (std::chrono::system_clock::time_point v) |
Get and set Bucket Access Control Lists. | |
std::vector< BucketAccessControl > const & | acl () const |
std::vector< BucketAccessControl > & | mutable_acl () |
BucketMetadata & | set_acl (std::vector< BucketAccessControl > acl) |
Accessors and modifiers for Autoclass configuration. | |
bool | has_autoclass () const |
BucketAutoclass const & | autoclass () const |
absl::optional< BucketAutoclass > const & | autoclass_as_optional () const |
BucketMetadata & | set_autoclass (BucketAutoclass v) |
BucketMetadata & | reset_autoclass () |
Get and set billing configuration for the Bucket. | |
bool | has_billing () const |
BucketBilling const & | billing () const |
absl::optional< BucketBilling > const & | billing_as_optional () const |
BucketMetadata & | set_billing (BucketBilling const &v) |
BucketMetadata & | reset_billing () |
Get and set the default event based hold for the Bucket. | |
Objects may have an event-based hold associated with them. If a Bucket has the
| |
bool | default_event_based_hold () const |
BucketMetadata & | set_default_event_based_hold (bool v) |
Get and set CORS configuration for the Bucket. | |
| |
std::vector< CorsEntry > const & | cors () const |
std::vector< CorsEntry > & | mutable_cors () |
BucketMetadata & | set_cors (std::vector< CorsEntry > cors) |
Get and set the Default Object Access Control Lists. | |
| |
std::vector< ObjectAccessControl > const & | default_acl () const |
std::vector< ObjectAccessControl > & | mutable_default_acl () |
BucketMetadata & | set_default_acl (std::vector< ObjectAccessControl > acl) |
bool | has_encryption () const |
BucketEncryption const & | encryption () const |
absl::optional< BucketEncryption > const & | encryption_as_optional () const |
BucketMetadata & | set_encryption (BucketEncryption v) |
BucketMetadata & | reset_encryption () |
Get and set the IAM configuration. | |
| |
bool | has_iam_configuration () const |
BucketIamConfiguration const & | iam_configuration () const |
absl::optional< BucketIamConfiguration > const & | iam_configuration_as_optional () const |
BucketMetadata & | set_iam_configuration (BucketIamConfiguration v) |
BucketMetadata & | reset_iam_configuration () |
Accessors and modifiers to the <tt>labels</tt>. | |
bool | has_label (std::string const &key) const |
Returns true if the key is present in the Bucket's metadata labels. More... | |
std::string const & | label (std::string const &key) const |
Returns the value of key in the Bucket's metadata labels. More... | |
BucketMetadata & | delete_label (std::string const &key) |
Delete a label. This is a no-op if the key does not exist. More... | |
BucketMetadata & | upsert_label (std::string key, std::string value) |
Insert or update the label entry. More... | |
std::map< std::string, std::string > const & | labels () const |
Returns all the Bucket's labels. More... | |
std::map< std::string, std::string > & | mutable_labels () |
Returns all the Bucket's labels. More... | |
Accessors and modifiers for object lifecycle rules. | |
| |
bool | has_lifecycle () const |
BucketLifecycle const & | lifecycle () const |
absl::optional< BucketLifecycle > const & | lifecycle_as_optional () const |
BucketMetadata & | set_lifecycle (BucketLifecycle v) |
BucketMetadata & | reset_lifecycle () |
Accessors and modifiers for logging configuration. | |
bool | has_logging () const |
BucketLogging const & | logging () const |
absl::optional< BucketLogging > const & | logging_as_optional () const |
BucketMetadata & | set_logging (BucketLogging v) |
BucketMetadata & | reset_logging () |
Accessors and modifiers for retention policy configuration. | |
bool | has_retention_policy () const |
Sets the retention period. More... | |
BucketRetentionPolicy const & | retention_policy () const |
Sets the retention period. More... | |
absl::optional< BucketRetentionPolicy > const & | retention_policy_as_optional () const |
Sets the retention period. More... | |
BucketMetadata & | set_retention_policy (BucketRetentionPolicy v) |
Sets the retention period. More... | |
BucketMetadata & | set_retention_policy (std::chrono::seconds retention_period) |
Sets the retention period. More... | |
BucketMetadata & | reset_retention_policy () |
Sets the retention period. More... | |
Accessors and modifiers for the Recovery Point Objective. | |
std::string const & | rpo () const |
BucketMetadata & | set_rpo (std::string v) |
Access and modify the default storage class attribute. | |
std::string const & | storage_class () const |
BucketMetadata & | set_storage_class (std::string v) |
Accessors and modifiers for versioning configuration. | |
absl::optional< BucketVersioning > const & | versioning () const |
bool | has_versioning () const |
BucketMetadata & | enable_versioning () |
BucketMetadata & | disable_versioning () |
BucketMetadata & | reset_versioning () |
BucketMetadata & | set_versioning (absl::optional< BucketVersioning > v) |
Accessors and modifiers for website configuration. | |
bool | has_website () const |
BucketWebsite const & | website () const |
absl::optional< BucketWebsite > const & | website_as_optional () const |
BucketMetadata & | set_website (BucketWebsite v) |
BucketMetadata & | reset_website () |
Accessors and modifiers for custom placement configuration. | |
bool | has_custom_placement_config () const |
Placement configuration can only be set when the bucket is created. More... | |
BucketCustomPlacementConfig const & | custom_placement_config () const |
Placement configuration can only be set when the bucket is created. More... | |
absl::optional< BucketCustomPlacementConfig > const & | custom_placement_config_as_optional () const |
Placement configuration can only be set when the bucket is created. More... | |
BucketMetadata & | set_custom_placement_config (BucketCustomPlacementConfig v) |
Placement configuration can only be set when the bucket is created. More... | |
BucketMetadata & | reset_custom_placement_config () |
Placement configuration can only be set when the bucket is created. More... | |
Friends | |
bool | operator== (BucketMetadata const &lhs, BucketMetadata const &rhs) |
bool | operator!= (BucketMetadata const &lhs, BucketMetadata const &rhs) |
std::ostream & | operator<< (std::ostream &os, BucketMetadata const &rhs) |
Represents a Google Cloud Storage Bucket Metadata object.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Placement configuration can only be set when the bucket is created.
|
inline |
Placement configuration can only be set when the bucket is created.
|
inline |
|
inline |
|
inline |
Delete a label. This is a no-op if the key does not exist.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Placement configuration can only be set when the bucket is created.
|
inline |
|
inline |
|
inline |
Returns true
if the key is present in the Bucket's metadata labels.
|
inline |
|
inline |
|
inline |
Returns true if the bucket owner
attribute is present.
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the bucket id.
|
inline |
|
inline |
Returns the value of key
in the Bucket's metadata labels.
It is undefined behavior to call label(key)
if has_label(key) == false
.
|
inline |
Returns all the Bucket's labels.
|
inline |
|
inline |
|
inline |
Return the bucket location.
|
inline |
Returns the location type (e.g. regional vs. dual region).
|
inline |
|
inline |
|
inline |
The bucket metageneration.
|
inline |
|
inline |
|
inline |
|
inline |
Returns all the Bucket's labels.
|
inline |
The bucket name.
|
inline |
Returns the owner.
It is undefined behavior to call owner()
if has_owner()
is false.
|
inline |
|
inline |
|
inline |
|
inline |
Placement configuration can only be set when the bucket is created.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
|
inline |
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
|
inline |
Returns a HTTP link to retrieve the bucket metadata.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Placement configuration can only be set when the bucket is created.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the bucket location. Only applicable when creating buckets.
|
inline |
|
inline |
|
inline |
|
inline |
Changes the name.
BucketMetadata
object that changes some other attribute.
|
inline |
|
inline |
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
Sets the retention period.
The retention period is the only writable attribute in a retention policy. This function makes it easier to set the retention policy when the BucketMetadata
object is used to update or patch the bucket.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the bucket creation timestamp.
|
inline |
Returns the timestamp for the last bucket metadata update.
|
inline |
Insert or update the label entry.
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |