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

Reports error code and details from a remote request. More...

#include <google/cloud/status.h>

Public Member Functions

 Status ()=default
 
 Status (StatusCode status_code, std::string message)
 
bool ok () const
 
StatusCode code () const
 
std::string const & message () const
 

Detailed Description

Reports error code and details from a remote request.

This class is modeled after grpc::Status, it contains the status code and error message (if applicable) from a JSON request.

Definition at line 64 of file status.h.

Constructor & Destructor Documentation

◆ Status() [1/2]

google::cloud::v1::Status::Status ( )
default

◆ Status() [2/2]

google::cloud::v1::Status::Status ( StatusCode  status_code,
std::string  message 
)
inlineexplicit

Definition at line 68 of file status.h.

Member Function Documentation

◆ code()

StatusCode google::cloud::v1::Status::code ( ) const
inline

Definition at line 73 of file status.h.

◆ message()

std::string const& google::cloud::v1::Status::message ( ) const
inline

Definition at line 74 of file status.h.

◆ ok()

bool google::cloud::v1::Status::ok ( ) const
inline

Definition at line 71 of file status.h.