public sealed class CommentServiceClientImpl : CommentServiceClient
Reference documentation and code samples for the Google Cloud Support v2 API class CommentServiceClientImpl.
CommentService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Support.V2Assembly
Google.Cloud.Support.V2.dll
Remarks
A service to manage comments on cases.
Constructors
CommentServiceClientImpl(CommentServiceClient, CommentServiceSettings, ILogger)
public CommentServiceClientImpl(CommentService.CommentServiceClient grpcClient, CommentServiceSettings settings, ILogger logger)
Constructs a client wrapper for the CommentService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient |
CommentServiceCommentServiceClient The underlying gRPC client. |
settings |
CommentServiceSettings The base CommentServiceSettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override CommentService.CommentServiceClient GrpcClient { get; }
The underlying gRPC CommentService client
Property Value | |
---|---|
Type | Description |
CommentServiceCommentServiceClient |
Methods
CreateComment(CreateCommentRequest, CallSettings)
public override Comment CreateComment(CreateCommentRequest request, CallSettings callSettings = null)
Add a new comment to a case.
The comment must have the following fields set: body
.
EXAMPLES:
cURL:
case="projects/some-project/cases/43591344"
curl \
--request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
--header 'Content-Type: application/json' \
--data '{
"body": "This is a test comment."
}' \
"https://cloudsupport.googleapis.com/v2/$case/comments"
Python:
import googleapiclient.discovery
api_version = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
)
request = (
supportApiService.cases()
.comments()
.create(
parent="projects/some-project/cases/43595344",
body={"body": "This is a test comment."},
)
)
print(request.execute())
Parameters | |
---|---|
Name | Description |
request |
CreateCommentRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Comment |
The RPC response. |
CreateCommentAsync(CreateCommentRequest, CallSettings)
public override Task<Comment> CreateCommentAsync(CreateCommentRequest request, CallSettings callSettings = null)
Add a new comment to a case.
The comment must have the following fields set: body
.
EXAMPLES:
cURL:
case="projects/some-project/cases/43591344"
curl \
--request POST \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
--header 'Content-Type: application/json' \
--data '{
"body": "This is a test comment."
}' \
"https://cloudsupport.googleapis.com/v2/$case/comments"
Python:
import googleapiclient.discovery
api_version = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
)
request = (
supportApiService.cases()
.comments()
.create(
parent="projects/some-project/cases/43595344",
body={"body": "This is a test comment."},
)
)
print(request.execute())
Parameters | |
---|---|
Name | Description |
request |
CreateCommentRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskComment |
A Task containing the RPC response. |
ListComments(ListCommentsRequest, CallSettings)
public override PagedEnumerable<ListCommentsResponse, Comment> ListComments(ListCommentsRequest request, CallSettings callSettings = null)
List all the comments associated with a case.
EXAMPLES:
cURL:
case="projects/some-project/cases/43595344"
curl \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://cloudsupport.googleapis.com/v2/$case/comments"
Python:
import googleapiclient.discovery
api_version = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
)
request = (
supportApiService.cases()
.comments()
.list(parent="projects/some-project/cases/43595344")
)
print(request.execute())
Parameters | |
---|---|
Name | Description |
request |
ListCommentsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListCommentsResponseComment |
A pageable sequence of Comment resources. |
ListCommentsAsync(ListCommentsRequest, CallSettings)
public override PagedAsyncEnumerable<ListCommentsResponse, Comment> ListCommentsAsync(ListCommentsRequest request, CallSettings callSettings = null)
List all the comments associated with a case.
EXAMPLES:
cURL:
case="projects/some-project/cases/43595344"
curl \
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://cloudsupport.googleapis.com/v2/$case/comments"
Python:
import googleapiclient.discovery
api_version = "v2"
supportApiService = googleapiclient.discovery.build(
serviceName="cloudsupport",
version=api_version,
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
)
request = (
supportApiService.cases()
.comments()
.list(parent="projects/some-project/cases/43595344")
)
print(request.execute())
Parameters | |
---|---|
Name | Description |
request |
ListCommentsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListCommentsResponseComment |
A pageable asynchronous sequence of Comment resources. |