Class CaseServiceClient (2.40.0-rc)

A service to manage Google Cloud support cases.

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

CaseServiceClient(CaseServiceClient const &)

Copy and move support

Parameter
Name Description
CaseServiceClient const &

CaseServiceClient(CaseServiceClient &&)

Copy and move support

Parameter
Name Description
CaseServiceClient &&

CaseServiceClient(std::shared_ptr< CaseServiceConnection >, Options)

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

Operators

operator=(CaseServiceClient const &)

Copy and move support

Parameter
Name Description
CaseServiceClient const &
Returns
Type Description
CaseServiceClient &

operator=(CaseServiceClient &&)

Copy and move support

Parameter
Name Description
CaseServiceClient &&
Returns
Type Description
CaseServiceClient &

Functions

GetCase(std::string const &, Options)

Retrieve a case.

Parameters
Name Description
name std::string const &

Required. The full name of a case to be retrieved.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::support::v2::Case >

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

GetCase(google::cloud::support::v2::GetCaseRequest const &, Options)

Retrieve a case.

Parameters
Name Description
request google::cloud::support::v2::GetCaseRequest 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.support.v2.GetCaseRequest. 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::support::v2::Case >

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

ListCases(std::string const &, Options)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use cases.search.

Parameters
Name Description
parent std::string const &

Required. The name of a parent to list cases under.

opts Options

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

Returns
Type Description
StreamRange< google::cloud::support::v2::Case >

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.support.v2.Case, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListCases(google::cloud::support::v2::ListCasesRequest, Options)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use cases.search.

Parameters
Name Description
request google::cloud::support::v2::ListCasesRequest

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.support.v2.ListCasesRequest. 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::support::v2::Case >

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.support.v2.Case, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

SearchCases(google::cloud::support::v2::SearchCasesRequest, Options)

Search for cases using a query.

Parameters
Name Description
request google::cloud::support::v2::SearchCasesRequest

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.support.v2.SearchCasesRequest. 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::support::v2::Case >

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.support.v2.Case, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateCase(std::string const &, google::cloud::support::v2::Case const &, Options)

Create a new case and associate it with a parent.

It must have the following fields set: display_name, description, classification, and priority. If you're just testing the API and don't want to route your case to an agent, set testCase=true.

Parameters
Name Description
parent std::string const &

Required. The name of the parent under which the case should be created.

case_ google::cloud::support::v2::Case const &

Required. The case to be created.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::support::v2::Case >

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

CreateCase(google::cloud::support::v2::CreateCaseRequest const &, Options)

Create a new case and associate it with a parent.

It must have the following fields set: display_name, description, classification, and priority. If you're just testing the API and don't want to route your case to an agent, set testCase=true.

Parameters
Name Description
request google::cloud::support::v2::CreateCaseRequest 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.support.v2.CreateCaseRequest. 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::support::v2::Case >

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

UpdateCase(google::cloud::support::v2::Case const &, google::protobuf::FieldMask const &, Options)

Update a case.

Only some fields can be updated.

Parameters
Name Description
case_ google::cloud::support::v2::Case const &

Required. The case to update.

update_mask google::protobuf::FieldMask const &

A list of attributes of the case that should be updated. Supported values are priority, display_name, and subscriber_email_addresses. If no fields are specified, all supported fields are updated.
Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and do not provide a value for subscriber_email_addresses, then subscriber_email_addresses is updated to empty.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::support::v2::Case >

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

UpdateCase(google::cloud::support::v2::UpdateCaseRequest const &, Options)

Update a case.

Only some fields can be updated.

Parameters
Name Description
request google::cloud::support::v2::UpdateCaseRequest 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.support.v2.UpdateCaseRequest. 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::support::v2::Case >

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

EscalateCase(google::cloud::support::v2::EscalateCaseRequest const &, Options)

Escalate a case, starting the Google Cloud Support escalation management process.

This operation is only available for some support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which ones let you do that.

Parameters
Name Description
request google::cloud::support::v2::EscalateCaseRequest 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.support.v2.EscalateCaseRequest. 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::support::v2::Case >

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

CloseCase(google::cloud::support::v2::CloseCaseRequest const &, Options)

Close a case.

Parameters
Name Description
request google::cloud::support::v2::CloseCaseRequest 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.support.v2.CloseCaseRequest. 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::support::v2::Case >

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

SearchCaseClassifications(google::cloud::support::v2::SearchCaseClassificationsRequest, Options)

Retrieve valid classifications to use when creating a support case.

Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by " > ". For example, "Technical Issue > Compute > Compute Engine".

Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, case.create requests using the classification will fail.

Parameters
Name Description
request google::cloud::support::v2::SearchCaseClassificationsRequest

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.support.v2.SearchCaseClassificationsRequest. 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::support::v2::CaseClassification >

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.support.v2.CaseClassification, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.