Google Cloud Storage C++ Client  2.5.0
A C++ Client Library for Google Cloud Storage
Public Member Functions | Friends | List of all members
google::cloud::storage::BucketAccessControl Class Reference

Wraps the bucketAccessControl resource in Google Cloud Storage. More...

#include <google/cloud/storage/bucket_access_control.h>

Public Member Functions

 BucketAccessControl ()=default
 
Accessors.
std::string const & bucket () const
 
std::string const & domain () const
 
std::string const & email () const
 
std::string const & entity () const
 
std::string const & entity_id () const
 
std::string const & etag () const
 
std::string const & id () const
 
std::string const & kind () const
 
bool has_project_team () const
 
ProjectTeam const & project_team () const
 
absl::optional< ProjectTeam > const & project_team_as_optional () const
 
std::string const & role () const
 
std::string const & self_link () const
 
Modifiers for mutable attributes.
BucketAccessControlset_entity (std::string v)
 
BucketAccessControlset_role (std::string v)
 
Testing modifiers.

The following attributes cannot be changed when updating, creating, or patching an BucketAccessControl resource.

However, it is useful to change them in tests, e.g., when mocking the results from the C++ client library.

BucketAccessControlset_bucket (std::string v)
 
BucketAccessControlset_domain (std::string v)
 
BucketAccessControlset_email (std::string v)
 
BucketAccessControlset_entity_id (std::string v)
 
BucketAccessControlset_etag (std::string v)
 
BucketAccessControlset_id (std::string v)
 
BucketAccessControlset_kind (std::string v)
 
BucketAccessControlset_project_team (ProjectTeam v)
 
BucketAccessControlset_self_link (std::string v)
 

Static Public Member Functions

Well-known values for the role() field..
static std::string ROLE_OWNER ()
 
static std::string ROLE_READER ()
 
Well-known values for the project_team().team field..
static std::string TEAM_EDITORS ()
 
static std::string TEAM_OWNERS ()
 
static std::string TEAM_VIEWERS ()
 

Friends

bool operator== (BucketAccessControl const &lhs, BucketAccessControl const &rhs)
 
bool operator!= (BucketAccessControl const &lhs, BucketAccessControl const &rhs)
 

Detailed Description

Wraps the bucketAccessControl resource in Google Cloud Storage.

BucketAccessControl describes the access to a bucket for a single entity, where the entity might be a user, group, or other role.

See also
https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls for an authoritative source of field definitions.

Definition at line 39 of file bucket_access_control.h.

Constructor & Destructor Documentation

◆ BucketAccessControl()

google::cloud::storage::BucketAccessControl::BucketAccessControl ( )
default

Member Function Documentation

◆ bucket()

std::string const& google::cloud::storage::BucketAccessControl::bucket ( ) const
inline

Definition at line 72 of file bucket_access_control.h.

◆ domain()

std::string const& google::cloud::storage::BucketAccessControl::domain ( ) const
inline

Definition at line 73 of file bucket_access_control.h.

◆ email()

std::string const& google::cloud::storage::BucketAccessControl::email ( ) const
inline

Definition at line 74 of file bucket_access_control.h.

◆ entity()

std::string const& google::cloud::storage::BucketAccessControl::entity ( ) const
inline

Definition at line 75 of file bucket_access_control.h.

◆ entity_id()

std::string const& google::cloud::storage::BucketAccessControl::entity_id ( ) const
inline

Definition at line 76 of file bucket_access_control.h.

◆ etag()

std::string const& google::cloud::storage::BucketAccessControl::etag ( ) const
inline

Definition at line 77 of file bucket_access_control.h.

◆ has_project_team()

bool google::cloud::storage::BucketAccessControl::has_project_team ( ) const
inline

Definition at line 80 of file bucket_access_control.h.

◆ id()

std::string const& google::cloud::storage::BucketAccessControl::id ( ) const
inline

Definition at line 78 of file bucket_access_control.h.

◆ kind()

std::string const& google::cloud::storage::BucketAccessControl::kind ( ) const
inline

Definition at line 79 of file bucket_access_control.h.

◆ project_team()

ProjectTeam const& google::cloud::storage::BucketAccessControl::project_team ( ) const
inline

Definition at line 81 of file bucket_access_control.h.

◆ project_team_as_optional()

absl::optional<ProjectTeam> const& google::cloud::storage::BucketAccessControl::project_team_as_optional ( ) const
inline

Definition at line 82 of file bucket_access_control.h.

◆ role()

std::string const& google::cloud::storage::BucketAccessControl::role ( ) const
inline

Definition at line 85 of file bucket_access_control.h.

◆ ROLE_OWNER()

static std::string google::cloud::storage::BucketAccessControl::ROLE_OWNER ( )
inlinestatic

Definition at line 51 of file bucket_access_control.h.

◆ ROLE_READER()

static std::string google::cloud::storage::BucketAccessControl::ROLE_READER ( )
inlinestatic

Definition at line 52 of file bucket_access_control.h.

◆ self_link()

std::string const& google::cloud::storage::BucketAccessControl::self_link ( ) const
inline

Definition at line 86 of file bucket_access_control.h.

◆ set_bucket()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_bucket ( std::string  v)
inline

Definition at line 113 of file bucket_access_control.h.

◆ set_domain()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_domain ( std::string  v)
inline

Definition at line 117 of file bucket_access_control.h.

◆ set_email()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_email ( std::string  v)
inline

Definition at line 121 of file bucket_access_control.h.

◆ set_entity()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_entity ( std::string  v)
inline

Definition at line 95 of file bucket_access_control.h.

◆ set_entity_id()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_entity_id ( std::string  v)
inline

Definition at line 125 of file bucket_access_control.h.

◆ set_etag()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_etag ( std::string  v)
inline

Definition at line 129 of file bucket_access_control.h.

◆ set_id()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_id ( std::string  v)
inline

Definition at line 133 of file bucket_access_control.h.

◆ set_kind()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_kind ( std::string  v)
inline

Definition at line 137 of file bucket_access_control.h.

◆ set_project_team()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_project_team ( ProjectTeam  v)
inline

Definition at line 141 of file bucket_access_control.h.

◆ set_role()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_role ( std::string  v)
inline

Definition at line 99 of file bucket_access_control.h.

◆ set_self_link()

BucketAccessControl& google::cloud::storage::BucketAccessControl::set_self_link ( std::string  v)
inline

Definition at line 145 of file bucket_access_control.h.

◆ TEAM_EDITORS()

static std::string google::cloud::storage::BucketAccessControl::TEAM_EDITORS ( )
inlinestatic

Definition at line 63 of file bucket_access_control.h.

◆ TEAM_OWNERS()

static std::string google::cloud::storage::BucketAccessControl::TEAM_OWNERS ( )
inlinestatic

Definition at line 64 of file bucket_access_control.h.

◆ TEAM_VIEWERS()

static std::string google::cloud::storage::BucketAccessControl::TEAM_VIEWERS ( )
inlinestatic

Definition at line 65 of file bucket_access_control.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( BucketAccessControl const &  lhs,
BucketAccessControl const &  rhs 
)
friend

Definition at line 153 of file bucket_access_control.h.

◆ operator==

bool operator== ( BucketAccessControl const &  lhs,
BucketAccessControl const &  rhs 
)
friend