Google Cloud Storage C++ Client  1.31.1
A C++ Client Library for Google Cloud Storage
Classes | Public Member Functions | Static Public Member Functions | List of all members
google::cloud::storage::v1::NativeIamPolicy Class Reference

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

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

Classes

struct  Impl
 

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)
 

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).

Definition at line 143 of file iam_policy.h.

Constructor & Destructor Documentation

◆ NativeIamPolicy() [1/2]

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

Definition at line 360 of file iam_policy.cc.

◆ NativeIamPolicy() [2/2]

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

Definition at line 369 of file iam_policy.cc.

◆ ~NativeIamPolicy()

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

Member Function Documentation

◆ bindings() [1/2]

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

Definition at line 452 of file iam_policy.cc.

◆ bindings() [2/2]

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

Definition at line 457 of file iam_policy.cc.

◆ CreateFromJson()

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

Definition at line 377 of file iam_policy.cc.

◆ etag()

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

Definition at line 442 of file iam_policy.cc.

◆ operator=()

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

Definition at line 426 of file iam_policy.cc.

◆ set_etag()

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

Definition at line 447 of file iam_policy.cc.

◆ set_version()

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

Definition at line 437 of file iam_policy.cc.

◆ ToJson()

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

Definition at line 424 of file iam_policy.cc.

◆ version()

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

Definition at line 432 of file iam_policy.cc.