Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
google::cloud::storage::NativeIamPolicy Class Reference

Represent the result of a GetIamPolicy or SetIamPolicy request. More...

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

Public Member Functions

 NativeIamPolicy (std::vector< NativeIamBinding > bindings, std::string etag="", std::int32_t version=0)
 
 NativeIamPolicy (NativeIamPolicy const &other)
 
 ~NativeIamPolicy ()
 
std::string ToJson () const
 
NativeIamPolicyoperator= (NativeIamPolicy const &other)
 
std::int32_t version () const
 
void set_version (std::int32_t version)
 
std::string etag () const
 
void set_etag (std::string etag)
 
std::vector< NativeIamBinding > & bindings ()
 
std::vector< NativeIamBinding > const & bindings () const
 

Static Public Member Functions

static StatusOr< NativeIamPolicyCreateFromJson (std::string const &json_rep)
 

Friends

bool operator== (NativeIamPolicy const &a, NativeIamPolicy const &b) noexcept
 
bool operator!= (NativeIamPolicy const &a, NativeIamPolicy const &b) noexcept
 

Detailed Description

Represent the result of a GetIamPolicy or SetIamPolicy request.

See also
https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy for more information about IAM policies.
https://tools.ietf.org/html/rfc7232#section-2.3 for more information about ETags.

Compared to IamPolicy, NativeIamPolicy is a more future-proof solution - it gracefully tolerates changes in the underlying protocol. If IamPolicy is extended with additional fields in the future, NativeIamPolicy will preserve them (contrary to IamPolicy).

Constructor & Destructor Documentation

◆ NativeIamPolicy() [1/2]

google::cloud::storage::NativeIamPolicy::NativeIamPolicy ( std::vector< NativeIamBinding bindings,
std::string  etag = "",
std::int32_t  version = 0 
)
explicit

◆ NativeIamPolicy() [2/2]

google::cloud::storage::NativeIamPolicy::NativeIamPolicy ( NativeIamPolicy const &  other)

◆ ~NativeIamPolicy()

google::cloud::storage::NativeIamPolicy::~NativeIamPolicy ( )

Member Function Documentation

◆ bindings() [1/2]

std::vector< NativeIamBinding > & google::cloud::storage::NativeIamPolicy::bindings ( )

◆ bindings() [2/2]

std::vector< NativeIamBinding > const & google::cloud::storage::NativeIamPolicy::bindings ( ) const

◆ CreateFromJson()

static StatusOr< NativeIamPolicy > google::cloud::storage::NativeIamPolicy::CreateFromJson ( std::string const &  json_rep)
static

◆ etag()

std::string google::cloud::storage::NativeIamPolicy::etag ( ) const

◆ operator=()

NativeIamPolicy & google::cloud::storage::NativeIamPolicy::operator= ( NativeIamPolicy const &  other)

◆ set_etag()

void google::cloud::storage::NativeIamPolicy::set_etag ( std::string  etag)

◆ set_version()

void google::cloud::storage::NativeIamPolicy::set_version ( std::int32_t  version)

◆ ToJson()

std::string google::cloud::storage::NativeIamPolicy::ToJson ( ) const

◆ version()

std::int32_t google::cloud::storage::NativeIamPolicy::version ( ) const

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( NativeIamPolicy const &  a,
NativeIamPolicy const &  b 
)
friend

◆ operator==

bool operator== ( NativeIamPolicy const &  a,
NativeIamPolicy const &  b 
)
friend