Google Cloud C++ Client  1.32.1
C++ Client Library for Google Cloud Platform
Public Member Functions | List of all members
google::cloud::v1::KmsKeyName Class Reference

This class identifies a Google Cloud KMS Key. More...

#include <google/cloud/kms_key_name.h>

Public Member Functions

 KmsKeyName (std::string const &project_id, std::string const &location, std::string const &key_ring, std::string const &kms_key_name)
 Constructs a KmsKeyName object identified by the given project_id, location, key_ring, and kms_key_name. More...
 
Copy and move
 KmsKeyName (KmsKeyName const &)=default
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 
KmsKeyNameoperator= (KmsKeyName const &)=default
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 
 KmsKeyName (KmsKeyName &&)=default
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 
KmsKeyNameoperator= (KmsKeyName &&)=default
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 
std::string const & FullName () const
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 

Equality operators

bool operator== (KmsKeyName const &a, KmsKeyName const &b)
 Output the FullName() format. More...
 
bool operator!= (KmsKeyName const &a, KmsKeyName const &b)
 Output the FullName() format. More...
 
std::ostream & operator<< (std::ostream &, KmsKeyName const &)
 Output the FullName() format. More...
 

Detailed Description

This class identifies a Google Cloud KMS Key.

A KMS key is identified by its project_id, location, key_ring, and kms_key_name.

Note
This class makes no effort to validate the components of the key, It is the application's responsibility to provide a valid project id, location, key ring, and KMS key name. Passing invalid values will not be checked until the key is used in a RPC.

See https://cloud.google.com/kms/docs for more information on KMS.

Definition at line 40 of file kms_key_name.h.

Constructor & Destructor Documentation

◆ KmsKeyName() [1/3]

google::cloud::v1::KmsKeyName::KmsKeyName ( std::string const &  project_id,
std::string const &  location,
std::string const &  key_ring,
std::string const &  kms_key_name 
)

Constructs a KmsKeyName object identified by the given project_id, location, key_ring, and kms_key_name.

Definition at line 23 of file kms_key_name.cc.

◆ KmsKeyName() [2/3]

google::cloud::v1::KmsKeyName::KmsKeyName ( KmsKeyName const &  )
default

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

◆ KmsKeyName() [3/3]

google::cloud::v1::KmsKeyName::KmsKeyName ( KmsKeyName &&  )
default

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

Member Function Documentation

◆ FullName()

std::string const& google::cloud::v1::KmsKeyName::FullName ( ) const
inline

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

Definition at line 62 of file kms_key_name.h.

◆ operator=() [1/2]

KmsKeyName& google::cloud::v1::KmsKeyName::operator= ( KmsKeyName &&  )
default

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

◆ operator=() [2/2]

KmsKeyName& google::cloud::v1::KmsKeyName::operator= ( KmsKeyName const &  )
default

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

Friends And Related Function Documentation

◆ operator!=

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

Output the FullName() format.

Definition at line 67 of file kms_key_name.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
KmsKeyName const &  key 
)
friend

Output the FullName() format.

Definition at line 33 of file kms_key_name.cc.

◆ operator==

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

Output the FullName() format.

Definition at line 29 of file kms_key_name.cc.