Class TimeseriesInsightsControllerClient (2.33.0-rc)

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.

Constructors

TimeseriesInsightsControllerClient(TimeseriesInsightsControllerClient const &)

Copy and move support

Parameter
Name Description
TimeseriesInsightsControllerClient const &

TimeseriesInsightsControllerClient(TimeseriesInsightsControllerClient &&)

Copy and move support

Parameter
Name Description
TimeseriesInsightsControllerClient &&

TimeseriesInsightsControllerClient(std::shared_ptr< TimeseriesInsightsControllerConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< TimeseriesInsightsControllerConnection >
opts Options

Operators

operator=(TimeseriesInsightsControllerClient const &)

Copy and move support

Parameter
Name Description
TimeseriesInsightsControllerClient const &
Returns
Type Description
TimeseriesInsightsControllerClient &

operator=(TimeseriesInsightsControllerClient &&)

Copy and move support

Parameter
Name Description
TimeseriesInsightsControllerClient &&
Returns
Type Description
TimeseriesInsightsControllerClient &

Functions

ListDataSets(std::string const &, Options)

Lists DataSets under the project.

The order of the results is unspecified but deterministic. Newly created DataSets will not necessarily be added to the end of this list.

Parameters
Name Description
parent std::string const &

Required. Project owning the DataSet in the format of "projects/{project}".

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::timeseriesinsights::v1::DataSet >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.timeseriesinsights.v1.DataSet, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListDataSets(google::cloud::timeseriesinsights::v1::ListDataSetsRequest, Options)

Lists DataSets under the project.

The order of the results is unspecified but deterministic. Newly created DataSets will not necessarily be added to the end of this list.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::ListDataSetsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.ListDataSetsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::timeseriesinsights::v1::DataSet >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.timeseriesinsights.v1.DataSet, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateDataSet(std::string const &, google::cloud::timeseriesinsights::v1::DataSet const &, Options)

Create a DataSet from data stored on Cloud Storage.

The data must stay immutable while we process the DataSet creation; otherwise, undefined outcomes might result. For more information, see DataSet.

Parameters
Name Description
parent std::string const &

Required. Client project name which will own this DataSet in the format of 'projects/{project}'.

dataset google::cloud::timeseriesinsights::v1::DataSet const &

Required. Dataset to be loaded.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::DataSet >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.DataSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateDataSet(google::cloud::timeseriesinsights::v1::CreateDataSetRequest const &, Options)

Create a DataSet from data stored on Cloud Storage.

The data must stay immutable while we process the DataSet creation; otherwise, undefined outcomes might result. For more information, see DataSet.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::CreateDataSetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.CreateDataSetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::DataSet >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.DataSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteDataSet(std::string const &, Options)

Delete a DataSet from the system.

NOTE: If the DataSet is still being processed, it will be aborted and deleted.

Parameters
Name Description
name std::string const &

Required. Dataset name in the format of "projects/{project}/datasets/{dataset}"

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteDataSet(google::cloud::timeseriesinsights::v1::DeleteDataSetRequest const &, Options)

Delete a DataSet from the system.

NOTE: If the DataSet is still being processed, it will be aborted and deleted.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::DeleteDataSetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.DeleteDataSetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

AppendEvents(std::string const &, std::vector< google::cloud::timeseriesinsights::v1::Event > const &, Options)

Append events to a LOADEDDataSet.

Parameters
Name Description
dataset std::string const &

Required. The DataSet to which we want to append to in the format of "projects/{project}/datasets/{dataset}"

events std::vector< google::cloud::timeseriesinsights::v1::Event > const &

Events to be appended.
Note:

  1. The DataSet must be shown in a LOADED state in the results of list method; otherwise, all events from the append request will be dropped, and a NOT_FOUND status will be returned. 0. All events in a single request must have the same groupId if set; otherwise, an INVALID_ARGUMENT status will be returned. 0. If groupId is not set (or 0), there should be only 1 event; otherwise, an INVALID_ARGUMENT status will be returned. 0. The events must be newer than the current time minus DataSet TTL or they will be dropped.
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::AppendEventsResponse >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.AppendEventsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

AppendEvents(google::cloud::timeseriesinsights::v1::AppendEventsRequest const &, Options)

Append events to a LOADEDDataSet.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::AppendEventsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.AppendEventsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::AppendEventsResponse >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.AppendEventsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

QueryDataSet(google::cloud::timeseriesinsights::v1::QueryDataSetRequest const &, Options)

Execute a Timeseries Insights query over a loaded DataSet.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::QueryDataSetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.QueryDataSetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::QueryDataSetResponse >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.QueryDataSetResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

EvaluateSlice(google::cloud::timeseriesinsights::v1::EvaluateSliceRequest const &, Options)

Evaluate an explicit slice from a loaded DataSet.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::EvaluateSliceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.EvaluateSliceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::EvaluatedSlice >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.EvaluatedSlice) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

EvaluateTimeseries(google::cloud::timeseriesinsights::v1::EvaluateTimeseriesRequest const &, Options)

Evaluate an explicit timeseries.

Parameters
Name Description
request google::cloud::timeseriesinsights::v1::EvaluateTimeseriesRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.timeseriesinsights.v1.EvaluateTimeseriesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::timeseriesinsights::v1::EvaluatedSlice >

the result of the RPC. The response message type (google.cloud.timeseriesinsights.v1.EvaluatedSlice) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.