1.8.0 (latest) 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [CommentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient) \> CommentServiceClientImpl

## Inherited Members

[CommentServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_DefaultEndpoint) [CommentServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_DefaultScopes) [CommentServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ServiceMetadata) [CommentServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateAsync_System_Threading_CancellationToken_) [CommentServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_Create) [CommentServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ShutdownDefaultChannelsAsync) [CommentServiceClient.ListComments(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListComments_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.ListCommentsAsync(string, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListCommentsAsync_System_String_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.ListComments(CaseName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListComments_Google_Cloud_Support_V2_CaseName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.ListCommentsAsync(CaseName, string, int?, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListCommentsAsync_Google_Cloud_Support_V2_CaseName_System_String_System_Nullable_System_Int32__Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.CreateCommentAsync(CreateCommentRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_Google_Cloud_Support_V2_CreateCommentRequest_System_Threading_CancellationToken_) [CommentServiceClient.CreateComment(string, Comment, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateComment_System_String_Google_Cloud_Support_V2_Comment_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.CreateCommentAsync(string, Comment, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_System_String_Google_Cloud_Support_V2_Comment_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.CreateCommentAsync(string, Comment, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_System_String_Google_Cloud_Support_V2_Comment_System_Threading_CancellationToken_) [CommentServiceClient.CreateComment(CaseName, Comment, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateComment_Google_Cloud_Support_V2_CaseName_Google_Cloud_Support_V2_Comment_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.CreateCommentAsync(CaseName, Comment, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_Google_Cloud_Support_V2_CaseName_Google_Cloud_Support_V2_Comment_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.CreateCommentAsync(CaseName, Comment, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_Google_Cloud_Support_V2_CaseName_Google_Cloud_Support_V2_Comment_System_Threading_CancellationToken_) [CommentServiceClient.GetCommentAsync(GetCommentRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_Google_Cloud_Support_V2_GetCommentRequest_System_Threading_CancellationToken_) [CommentServiceClient.GetComment(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetComment_System_String_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.GetCommentAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.GetCommentAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_System_String_System_Threading_CancellationToken_) [CommentServiceClient.GetComment(CommentName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetComment_Google_Cloud_Support_V2_CommentName_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.GetCommentAsync(CommentName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_Google_Cloud_Support_V2_CommentName_Google_Api_Gax_Grpc_CallSettings_) [CommentServiceClient.GetCommentAsync(CommentName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_Google_Cloud_Support_V2_CommentName_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Support.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2)

## Assembly

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentService.CommentServiceClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceSettings` The base [CommentServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override CommentService.CommentServiceClient GrpcClient { get; }

The underlying gRPC CommentService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentService.CommentServiceClient` |   |

**Overrides** [CommentServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GrpcClient)

## 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`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CreateCommentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | The RPC response. |

**Overrides** [CommentServiceClient.CreateComment(CreateCommentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateComment_Google_Cloud_Support_V2_CreateCommentRequest_Google_Api_Gax_Grpc_CallSettings_)

### 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`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CreateCommentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | A Task containing the RPC response. |

**Overrides** [CommentServiceClient.CreateCommentAsync(CreateCommentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_CreateCommentAsync_Google_Cloud_Support_V2_CreateCommentRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetComment(GetCommentRequest, CallSettings)

    public override Comment GetComment(GetCommentRequest request, CallSettings callSettings = null)

Retrieve a comment.

EXAMPLES:

cURL:

    comment="projects/some-project/cases/43595344/comments/234567890"
    curl \
    --header "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://cloudsupport.googleapis.com/v2/$comment"

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().get(
    name="projects/some-project/cases/43595344/comments/234567890",
    )
    print(request.execute())

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.GetCommentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | The RPC response. |

**Overrides** [CommentServiceClient.GetComment(GetCommentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetComment_Google_Cloud_Support_V2_GetCommentRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetCommentAsync(GetCommentRequest, CallSettings)

    public override Task<Comment> GetCommentAsync(GetCommentRequest request, CallSettings callSettings = null)

Retrieve a comment.

EXAMPLES:

cURL:

    comment="projects/some-project/cases/43595344/comments/234567890"
    curl \
    --header "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://cloudsupport.googleapis.com/v2/$comment"

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().get(
    name="projects/some-project/cases/43595344/comments/234567890",
    )
    print(request.execute())

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.GetCommentRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | A Task containing the RPC response. |

**Overrides** [CommentServiceClient.GetCommentAsync(GetCommentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_GetCommentAsync_Google_Cloud_Support_V2_GetCommentRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListComments(ListCommentsRequest, CallSettings)

    public override PagedEnumerable<ListCommentsResponse, Comment> ListComments(ListCommentsRequest request, CallSettings callSettings = null)

List all the comments associated with a case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.ListCommentsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.ListCommentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | A pageable sequence of [Comment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment) resources. |

**Overrides** [CommentServiceClient.ListComments(ListCommentsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListComments_Google_Cloud_Support_V2_ListCommentsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListCommentsAsync(ListCommentsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListCommentsResponse, Comment> ListCommentsAsync(ListCommentsRequest request, CallSettings callSettings = null)

List all the comments associated with a case.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.ListCommentsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.ListCommentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment` | A pageable asynchronous sequence of [Comment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.Comment) resources. |

**Overrides** [CommentServiceClient.ListCommentsAsync(ListCommentsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Support.V2/latest/Google.Cloud.Support.V2.CommentServiceClient#Google_Cloud_Support_V2_CommentServiceClient_ListCommentsAsync_Google_Cloud_Support_V2_ListCommentsRequest_Google_Api_Gax_Grpc_CallSettings_)