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::ObjectAccessControl Class Reference

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

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

Public Member Functions

 ObjectAccessControl ()=default
 
Accessors.
std::string const & bucket () const
 
std::string const & object () const
 
std::int64_t generation () 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.
ObjectAccessControlset_entity (std::string v)
 
ObjectAccessControlset_role (std::string v)
 
Testing modifiers.

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

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

ObjectAccessControlset_bucket (std::string v)
 
ObjectAccessControlset_object (std::string v)
 
ObjectAccessControlset_generation (std::int64_t v)
 
ObjectAccessControlset_domain (std::string v)
 
ObjectAccessControlset_email (std::string v)
 
ObjectAccessControlset_entity_id (std::string v)
 
ObjectAccessControlset_etag (std::string v)
 
ObjectAccessControlset_id (std::string v)
 
ObjectAccessControlset_kind (std::string v)
 
ObjectAccessControlset_project_team (ProjectTeam v)
 
ObjectAccessControlset_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== (ObjectAccessControl const &lhs, ObjectAccessControl const &rhs)
 
bool operator!= (ObjectAccessControl const &lhs, ObjectAccessControl const &rhs)
 

Detailed Description

Wraps the objectAccessControl resource in Google Cloud Storage.

objectAccessControl 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/objectAccessControls for an authoritative source of field definitions.

Definition at line 39 of file object_access_control.h.

Constructor & Destructor Documentation

◆ ObjectAccessControl()

google::cloud::storage::ObjectAccessControl::ObjectAccessControl ( )
default

Member Function Documentation

◆ bucket()

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

Definition at line 72 of file object_access_control.h.

◆ domain()

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

Definition at line 75 of file object_access_control.h.

◆ email()

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

Definition at line 76 of file object_access_control.h.

◆ entity()

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

Definition at line 77 of file object_access_control.h.

◆ entity_id()

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

Definition at line 78 of file object_access_control.h.

◆ etag()

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

Definition at line 79 of file object_access_control.h.

◆ generation()

std::int64_t google::cloud::storage::ObjectAccessControl::generation ( ) const
inline

Definition at line 74 of file object_access_control.h.

◆ has_project_team()

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

Definition at line 82 of file object_access_control.h.

◆ id()

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

Definition at line 80 of file object_access_control.h.

◆ kind()

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

Definition at line 81 of file object_access_control.h.

◆ object()

std::string const& google::cloud::storage::ObjectAccessControl::object ( ) const
inline

Definition at line 73 of file object_access_control.h.

◆ project_team()

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

Definition at line 83 of file object_access_control.h.

◆ project_team_as_optional()

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

Definition at line 84 of file object_access_control.h.

◆ role()

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

Definition at line 87 of file object_access_control.h.

◆ ROLE_OWNER()

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

Definition at line 51 of file object_access_control.h.

◆ ROLE_READER()

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

Definition at line 52 of file object_access_control.h.

◆ self_link()

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

Definition at line 88 of file object_access_control.h.

◆ set_bucket()

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

Definition at line 115 of file object_access_control.h.

◆ set_domain()

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

Definition at line 127 of file object_access_control.h.

◆ set_email()

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

Definition at line 131 of file object_access_control.h.

◆ set_entity()

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

Definition at line 97 of file object_access_control.h.

◆ set_entity_id()

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

Definition at line 135 of file object_access_control.h.

◆ set_etag()

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

Definition at line 139 of file object_access_control.h.

◆ set_generation()

ObjectAccessControl& google::cloud::storage::ObjectAccessControl::set_generation ( std::int64_t  v)
inline

Definition at line 123 of file object_access_control.h.

◆ set_id()

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

Definition at line 143 of file object_access_control.h.

◆ set_kind()

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

Definition at line 147 of file object_access_control.h.

◆ set_object()

ObjectAccessControl& google::cloud::storage::ObjectAccessControl::set_object ( std::string  v)
inline

Definition at line 119 of file object_access_control.h.

◆ set_project_team()

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

Definition at line 151 of file object_access_control.h.

◆ set_role()

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

Definition at line 101 of file object_access_control.h.

◆ set_self_link()

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

Definition at line 155 of file object_access_control.h.

◆ TEAM_EDITORS()

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

Definition at line 63 of file object_access_control.h.

◆ TEAM_OWNERS()

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

Definition at line 64 of file object_access_control.h.

◆ TEAM_VIEWERS()

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

Definition at line 65 of file object_access_control.h.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 163 of file object_access_control.h.

◆ operator==

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