Google Cloud Pub/Sub C++ Client  1.32.1
A C++ Client Library for Google Cloud Pub/Sub
Public Member Functions | List of all members
google::cloud::pubsub::v1::Schema Class Reference

Objects of this class identify a Cloud Pub/Sub schema. More...

#include <google/cloud/pubsub/schema.h>

Public Member Functions

 Schema (std::string project_id, std::string schema_id)
 
Copy and move
 Schema (Schema const &)=default
 Returns the Project ID. More...
 
Schemaoperator= (Schema const &)=default
 Returns the Project ID. More...
 
 Schema (Schema &&)=default
 Returns the Project ID. More...
 
Schemaoperator= (Schema &&)=default
 Returns the Project ID. More...
 
std::string const & project_id () const
 Returns the Project ID. More...
 
std::string const & schema_id () const
 Returns the Schema ID. More...
 
std::string FullName () const
 Returns the fully qualified schema name as a string of the form: "projects/<project-id>/schemas/<schema-id>". More...
 

Equality operators

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

Detailed Description

Objects of this class identify a Cloud Pub/Sub schema.

Note
This class makes no effort to validate the ids provided. The application should verify that any ids passed to this application conform to the Cloud Pub/Sub resource name restrictions.

Definition at line 38 of file schema.h.

Constructor & Destructor Documentation

◆ Schema() [1/3]

google::cloud::pubsub::v1::Schema::Schema ( std::string  project_id,
std::string  schema_id 
)
inline

Definition at line 40 of file schema.h.

◆ Schema() [2/3]

google::cloud::pubsub::v1::Schema::Schema ( Schema const &  )
default

Returns the Project ID.

◆ Schema() [3/3]

google::cloud::pubsub::v1::Schema::Schema ( Schema &&  )
default

Returns the Project ID.

Member Function Documentation

◆ FullName()

std::string google::cloud::pubsub::v1::Schema::FullName ( ) const

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

Definition at line 22 of file schema.cc.

◆ operator=() [1/2]

Schema& google::cloud::pubsub::v1::Schema::operator= ( Schema &&  )
default

Returns the Project ID.

◆ operator=() [2/2]

Schema& google::cloud::pubsub::v1::Schema::operator= ( Schema const &  )
default

Returns the Project ID.

◆ project_id()

std::string const& google::cloud::pubsub::v1::Schema::project_id ( ) const
inline

Returns the Project ID.

Definition at line 52 of file schema.h.

◆ schema_id()

std::string const& google::cloud::pubsub::v1::Schema::schema_id ( ) const
inline

Returns the Schema ID.

Definition at line 55 of file schema.h.

Friends And Related Function Documentation

◆ operator!=

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

Output the FullName() format.

Definition at line 66 of file schema.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
Schema const &  rhs 
)
friend

Output the FullName() format.

Definition at line 30 of file schema.cc.

◆ operator==

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

Output the FullName() format.

Definition at line 26 of file schema.cc.