Google Cloud BigQuery C++ Client  2.1.0
A C++ Client Library for Google Cloud BigQuery
Public Member Functions | Friends | List of all members
google::cloud::bigquery::ModelServiceClient Class Reference

ModelServiceClient. More...

#include <google/cloud/bigquery/model_client.h>

Public Member Functions

 ModelServiceClient (std::shared_ptr< ModelServiceConnection > connection, Options opts={})
 
 ~ModelServiceClient ()
 
 ModelServiceClient (ModelServiceClient const &)=default
 
ModelServiceClientoperator= (ModelServiceClient const &)=default
 
 ModelServiceClient (ModelServiceClient &&)=default
 
ModelServiceClientoperator= (ModelServiceClient &&)=default
 
StatusOr< google::cloud::bigquery::v2::Model > GetModel (std::string const &project_id, std::string const &dataset_id, std::string const &model_id, Options opts={})
 Gets the specified model resource by model ID. More...
 
StatusOr< google::cloud::bigquery::v2::Model > GetModel (google::cloud::bigquery::v2::GetModelRequest const &request, Options opts={})
 Gets the specified model resource by model ID. More...
 
StatusOr< google::cloud::bigquery::v2::ListModelsResponse > ListModels (std::string const &project_id, std::string const &dataset_id, google::protobuf::UInt32Value const &max_results, Options opts={})
 Lists all models in the specified dataset. More...
 
StatusOr< google::cloud::bigquery::v2::ListModelsResponse > ListModels (google::cloud::bigquery::v2::ListModelsRequest const &request, Options opts={})
 Lists all models in the specified dataset. More...
 
StatusOr< google::cloud::bigquery::v2::Model > PatchModel (std::string const &project_id, std::string const &dataset_id, std::string const &model_id, google::cloud::bigquery::v2::Model const &model, Options opts={})
 Patch specific fields in the specified model. More...
 
StatusOr< google::cloud::bigquery::v2::Model > PatchModel (google::cloud::bigquery::v2::PatchModelRequest const &request, Options opts={})
 Patch specific fields in the specified model. More...
 
Status DeleteModel (std::string const &project_id, std::string const &dataset_id, std::string const &model_id, Options opts={})
 Deletes the model specified by modelId from the dataset. More...
 
Status DeleteModel (google::cloud::bigquery::v2::DeleteModelRequest const &request, Options opts={})
 Deletes the model specified by modelId from the dataset. More...
 

Friends

bool operator== (ModelServiceClient const &a, ModelServiceClient const &b)
 
bool operator!= (ModelServiceClient const &a, ModelServiceClient const &b)
 

Detailed Description

ModelServiceClient.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Definition at line 62 of file model_client.h.

Constructor & Destructor Documentation

◆ ModelServiceClient() [1/3]

google::cloud::bigquery::ModelServiceClient::ModelServiceClient ( std::shared_ptr< ModelServiceConnection connection,
Options  opts = {} 
)
explicit

◆ ~ModelServiceClient()

google::cloud::bigquery::ModelServiceClient::~ModelServiceClient ( )

◆ ModelServiceClient() [2/3]

google::cloud::bigquery::ModelServiceClient::ModelServiceClient ( ModelServiceClient const &  )
default

◆ ModelServiceClient() [3/3]

google::cloud::bigquery::ModelServiceClient::ModelServiceClient ( ModelServiceClient &&  )
default

Member Function Documentation

◆ DeleteModel() [1/2]

Status google::cloud::bigquery::ModelServiceClient::DeleteModel ( google::cloud::bigquery::v2::DeleteModelRequest const &  request,
Options  opts = {} 
)

Deletes the model specified by modelId from the dataset.

Parameters
requestgoogle::cloud::bigquery::v2::DeleteModelRequest
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ DeleteModel() [2/2]

Status google::cloud::bigquery::ModelServiceClient::DeleteModel ( std::string const &  project_id,
std::string const &  dataset_id,
std::string const &  model_id,
Options  opts = {} 
)

Deletes the model specified by modelId from the dataset.

Parameters
project_idRequired. Project ID of the model to delete.
dataset_idRequired. Dataset ID of the model to delete.
model_idRequired. Model ID of the model to delete.
optsOptional. Override the class-level options, such as retry and backoff policies.

◆ GetModel() [1/2]

StatusOr<google::cloud::bigquery::v2::Model> google::cloud::bigquery::ModelServiceClient::GetModel ( google::cloud::bigquery::v2::GetModelRequest const &  request,
Options  opts = {} 
)

Gets the specified model resource by model ID.

Parameters
requestgoogle::cloud::bigquery::v2::GetModelRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::Model

◆ GetModel() [2/2]

StatusOr<google::cloud::bigquery::v2::Model> google::cloud::bigquery::ModelServiceClient::GetModel ( std::string const &  project_id,
std::string const &  dataset_id,
std::string const &  model_id,
Options  opts = {} 
)

Gets the specified model resource by model ID.

Parameters
project_idRequired. Project ID of the requested model.
dataset_idRequired. Dataset ID of the requested model.
model_idRequired. Model ID of the requested model.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::Model

◆ ListModels() [1/2]

StatusOr<google::cloud::bigquery::v2::ListModelsResponse> google::cloud::bigquery::ModelServiceClient::ListModels ( google::cloud::bigquery::v2::ListModelsRequest const &  request,
Options  opts = {} 
)

Lists all models in the specified dataset.

Requires the READER dataset role. After retrieving the list of models, you can get information about a particular model by calling the models.get method.

Parameters
requestgoogle::cloud::bigquery::v2::ListModelsRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::ListModelsResponse

◆ ListModels() [2/2]

StatusOr<google::cloud::bigquery::v2::ListModelsResponse> google::cloud::bigquery::ModelServiceClient::ListModels ( std::string const &  project_id,
std::string const &  dataset_id,
google::protobuf::UInt32Value const &  max_results,
Options  opts = {} 
)

Lists all models in the specified dataset.

Requires the READER dataset role. After retrieving the list of models, you can get information about a particular model by calling the models.get method.

Parameters
project_idRequired. Project ID of the models to list.
dataset_idRequired. Dataset ID of the models to list.
max_resultsThe maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::ListModelsResponse

◆ operator=() [1/2]

ModelServiceClient& google::cloud::bigquery::ModelServiceClient::operator= ( ModelServiceClient &&  )
default

◆ operator=() [2/2]

ModelServiceClient& google::cloud::bigquery::ModelServiceClient::operator= ( ModelServiceClient const &  )
default

◆ PatchModel() [1/2]

StatusOr<google::cloud::bigquery::v2::Model> google::cloud::bigquery::ModelServiceClient::PatchModel ( google::cloud::bigquery::v2::PatchModelRequest const &  request,
Options  opts = {} 
)

Patch specific fields in the specified model.

Parameters
requestgoogle::cloud::bigquery::v2::PatchModelRequest
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::Model

◆ PatchModel() [2/2]

StatusOr<google::cloud::bigquery::v2::Model> google::cloud::bigquery::ModelServiceClient::PatchModel ( std::string const &  project_id,
std::string const &  dataset_id,
std::string const &  model_id,
google::cloud::bigquery::v2::Model const &  model,
Options  opts = {} 
)

Patch specific fields in the specified model.

Parameters
project_idRequired. Project ID of the model to patch.
dataset_idRequired. Dataset ID of the model to patch.
model_idRequired. Model ID of the model to patch.
modelRequired. Patched model. Follows RFC5789 patch semantics. Missing fields are not updated. To clear a field, explicitly set to default value.
optsOptional. Override the class-level options, such as retry and backoff policies.
Returns
google::cloud::bigquery::v2::Model

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 82 of file model_client.h.

◆ operator==

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

Definition at line 78 of file model_client.h.