public class CommentService.CommentServiceClient : ClientBase<CommentService.CommentServiceClient>
Reference documentation and code samples for the Google Cloud Support v2 API class CommentService.CommentServiceClient.
Client for CommentService
Inheritance
object > ClientBase > ClientBaseCommentServiceCommentServiceClient > CommentService.CommentServiceClientNamespace
Google.Cloud.Support.V2Assembly
Google.Cloud.Support.V2.dll
Constructors
CommentServiceClient()
protected CommentServiceClient()
Protected parameterless constructor to allow creation of test doubles.
CommentServiceClient(CallInvoker)
public CommentServiceClient(CallInvoker callInvoker)
Creates a new client for CommentService that uses a custom CallInvoker
.
Parameter | |
---|---|
Name | Description |
callInvoker |
CallInvoker The callInvoker to use to make remote calls. |
CommentServiceClient(ChannelBase)
public CommentServiceClient(ChannelBase channel)
Creates a new client for CommentService
Parameter | |
---|---|
Name | Description |
channel |
ChannelBase The channel to use to make remote calls. |
CommentServiceClient(ClientBaseConfiguration)
protected CommentServiceClient(ClientBase.ClientBaseConfiguration configuration)
Protected constructor to allow creation of configured clients.
Parameter | |
---|---|
Name | Description |
configuration |
ClientBaseClientBaseConfiguration The client configuration. |
Methods
CreateComment(CreateCommentRequest, CallOptions)
public virtual Comment CreateComment(CreateCommentRequest request, CallOptions options)
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 to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Comment |
The response received from the server. |
CreateComment(CreateCommentRequest, Metadata, DateTime?, CancellationToken)
public virtual Comment CreateComment(CreateCommentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
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 to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Comment |
The response received from the server. |
CreateCommentAsync(CreateCommentRequest, CallOptions)
public virtual AsyncUnaryCall<Comment> CreateCommentAsync(CreateCommentRequest request, CallOptions options)
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 to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallComment |
The call object. |
CreateCommentAsync(CreateCommentRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<Comment> CreateCommentAsync(CreateCommentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
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 to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallComment |
The call object. |
ListComments(ListCommentsRequest, CallOptions)
public virtual ListCommentsResponse ListComments(ListCommentsRequest request, CallOptions options)
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 to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
ListCommentsResponse |
The response received from the server. |
ListComments(ListCommentsRequest, Metadata, DateTime?, CancellationToken)
public virtual ListCommentsResponse ListComments(ListCommentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
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 to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
ListCommentsResponse |
The response received from the server. |
ListCommentsAsync(ListCommentsRequest, CallOptions)
public virtual AsyncUnaryCall<ListCommentsResponse> ListCommentsAsync(ListCommentsRequest request, CallOptions options)
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 to send to the server. |
options |
CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListCommentsResponse |
The call object. |
ListCommentsAsync(ListCommentsRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<ListCommentsResponse> ListCommentsAsync(ListCommentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
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 to send to the server. |
headers |
Metadata The initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListCommentsResponse |
The call object. |
NewInstance(ClientBaseConfiguration)
protected override CommentService.CommentServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Creates a new instance of client from given ClientBaseConfiguration
.
Parameter | |
---|---|
Name | Description |
configuration |
ClientBaseClientBaseConfiguration |
Returns | |
---|---|
Type | Description |
CommentServiceCommentServiceClient |