Google Cloud C++ Client 2.10.1
C++ Client Library for Google Cloud Platform
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
google::cloud::Project Class Reference

This class identifies a Cloud Project. More...

#include <google/cloud/project.h>

Public Member Functions

 Project (std::string project_id)
 Constructs a Project object identified by the given project_id. More...
 
std::string const & project_id () const
 Returns the Project ID. More...
 
std::string FullName () const
 Returns the fully qualified project name as a string of the form: "projects/<project-id>". More...
 
Copy and move
 Project (Project const &)=default
 
Projectoperator= (Project const &)=default
 
 Project (Project &&)=default
 
Projectoperator= (Project &&)=default
 

Friends

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

Detailed Description

This class identifies a Cloud Project.

A Cloud project is identified by its project_id.

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

For more info about the project_id format, see https://cloud.google.com/resource-manager/docs/creating-managing-projects

Constructor & Destructor Documentation

◆ Project() [1/3]

google::cloud::Project::Project ( std::string  project_id)
explicit

Constructs a Project object identified by the given project_id.

◆ Project() [2/3]

google::cloud::Project::Project ( Project const &  )
default

◆ Project() [3/3]

google::cloud::Project::Project ( Project &&  )
default

Member Function Documentation

◆ FullName()

std::string google::cloud::Project::FullName ( ) const

Returns the fully qualified project name as a string of the form: "projects/<project-id>".

◆ operator=() [1/2]

Project & google::cloud::Project::operator= ( Project &&  )
default

◆ operator=() [2/2]

Project & google::cloud::Project::operator= ( Project const &  )
default

◆ project_id()

std::string const & google::cloud::Project::project_id ( ) const
inline

Returns the Project ID.

Friends And Related Function Documentation

◆ operator!=

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

◆ operator<<

std::ostream & operator<< ( std::ostream &  ,
Project const &   
)
friend

Output the FullName() format.

◆ operator==

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