A service to manage comments on 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
CommentServiceClient(CommentServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CommentServiceClient const &
|
CommentServiceClient(CommentServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CommentServiceClient &&
|
CommentServiceClient(std::shared_ptr< CommentServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< CommentServiceConnection >
|
opts |
Options
|
Operators
operator=(CommentServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CommentServiceClient const &
|
Returns | |
---|---|
Type | Description |
CommentServiceClient & |
operator=(CommentServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
CommentServiceClient &&
|
Returns | |
---|---|
Type | Description |
CommentServiceClient & |
Functions
ListComments(std::string const &, Options)
Retrieve all Comments associated with the Case object.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of Case object for which comments should be listed. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::support::v2::Comment > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListComments(google::cloud::support::v2::ListCommentsRequest, Options)
Retrieve all Comments associated with the Case object.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::support::v2::ListCommentsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::support::v2::Comment > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
CreateComment(std::string const &, google::cloud::support::v2::Comment const &, Options)
Add a new comment to the specified Case.
The comment object must have the following fields set: body.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of Case to which this comment should be added. |
comment |
google::cloud::support::v2::Comment const &
Required. The Comment object to be added to this Case. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::support::v2::Comment > |
the result of the RPC. The response message type (google.cloud.support.v2.Comment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateComment(google::cloud::support::v2::CreateCommentRequest const &, Options)
Add a new comment to the specified Case.
The comment object must have the following fields set: body.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::support::v2::CreateCommentRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::support::v2::Comment > |
the result of the RPC. The response message type (google.cloud.support.v2.Comment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |