2.6.0 (latest) 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.1.0 1.0.0

    public class EssentialContactsService.EssentialContactsServiceClient : ClientBase<EssentialContactsService.EssentialContactsServiceClient>

Reference documentation and code samples for the Essential Contacts v1 API class EssentialContactsService.EssentialContactsServiceClient.

Client for EssentialContactsService

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt)[EssentialContactsService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.EssentialContacts.V1/latest/Google.Cloud.EssentialContacts.V1.EssentialContactsService.md.txt)[EssentialContactsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.EssentialContacts.V1/latest/Google.Cloud.EssentialContacts.V1.EssentialContactsService.EssentialContactsServiceClient.md.txt) \> EssentialContactsService.EssentialContactsServiceClient

## Inherited Members

[ClientBase\<EssentialContactsService.EssentialContactsServiceClient\>.WithHost(string)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.EssentialContacts.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.EssentialContacts.V1/latest/Google.Cloud.EssentialContacts.V1.md.txt)

## Assembly

Google.Cloud.EssentialContacts.V1.dll

## Constructors

### EssentialContactsServiceClient()

    protected EssentialContactsServiceClient()

Protected parameterless constructor to allow creation of test doubles.

### EssentialContactsServiceClient(CallInvoker)

    public EssentialContactsServiceClient(CallInvoker callInvoker)

Creates a new client for EssentialContactsService that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `CallInvoker` The callInvoker to use to make remote calls. |

### EssentialContactsServiceClient(ChannelBase)

    public EssentialContactsServiceClient(ChannelBase channel)

Creates a new client for EssentialContactsService

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `ChannelBase` The channel to use to make remote calls. |

### EssentialContactsServiceClient(ClientBaseConfiguration)

    protected EssentialContactsServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` The client configuration. |

## Methods

### ComputeContacts(ComputeContactsRequest, CallOptions)

    public virtual ComputeContactsResponse ComputeContacts(ComputeContactsRequest request, CallOptions options)

Lists all contacts for the resource that are subscribed to the
specified notification categories, including contacts inherited from
any parent resources.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ComputeContactsRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ComputeContactsResponse` | The response received from the server. |

### ComputeContacts(ComputeContactsRequest, Metadata, DateTime?, CancellationToken)

    public virtual ComputeContactsResponse ComputeContacts(ComputeContactsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all contacts for the resource that are subscribed to the
specified notification categories, including contacts inherited from
any parent resources.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ComputeContactsRequest` 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** |
| `ComputeContactsResponse` | The response received from the server. |

### ComputeContactsAsync(ComputeContactsRequest, CallOptions)

    public virtual AsyncUnaryCall<ComputeContactsResponse> ComputeContactsAsync(ComputeContactsRequest request, CallOptions options)

Lists all contacts for the resource that are subscribed to the
specified notification categories, including contacts inherited from
any parent resources.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ComputeContactsRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallComputeContactsResponse` | The call object. |

### ComputeContactsAsync(ComputeContactsRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ComputeContactsResponse> ComputeContactsAsync(ComputeContactsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all contacts for the resource that are subscribed to the
specified notification categories, including contacts inherited from
any parent resources.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ComputeContactsRequest` 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** |
| `AsyncUnaryCallComputeContactsResponse` | The call object. |

### CreateContact(CreateContactRequest, CallOptions)

    public virtual Contact CreateContact(CreateContactRequest request, CallOptions options)

Adds a new contact for a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Contact` | The response received from the server. |

### CreateContact(CreateContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual Contact CreateContact(CreateContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Adds a new contact for a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateContactRequest` 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** |
| `Contact` | The response received from the server. |

### CreateContactAsync(CreateContactRequest, CallOptions)

    public virtual AsyncUnaryCall<Contact> CreateContactAsync(CreateContactRequest request, CallOptions options)

Adds a new contact for a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallContact` | The call object. |

### CreateContactAsync(CreateContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Contact> CreateContactAsync(CreateContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Adds a new contact for a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateContactRequest` 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** |
| `AsyncUnaryCallContact` | The call object. |

### DeleteContact(DeleteContactRequest, CallOptions)

    public virtual Empty DeleteContact(DeleteContactRequest request, CallOptions options)

Deletes a contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Empty` | The response received from the server. |

### DeleteContact(DeleteContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual Empty DeleteContact(DeleteContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteContactRequest` 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** |
| `Empty` | The response received from the server. |

### DeleteContactAsync(DeleteContactRequest, CallOptions)

    public virtual AsyncUnaryCall<Empty> DeleteContactAsync(DeleteContactRequest request, CallOptions options)

Deletes a contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallEmpty` | The call object. |

### DeleteContactAsync(DeleteContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Empty> DeleteContactAsync(DeleteContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteContactRequest` 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** |
| `AsyncUnaryCallEmpty` | The call object. |

### GetContact(GetContactRequest, CallOptions)

    public virtual Contact GetContact(GetContactRequest request, CallOptions options)

Gets a single contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Contact` | The response received from the server. |

### GetContact(GetContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual Contact GetContact(GetContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetContactRequest` 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** |
| `Contact` | The response received from the server. |

### GetContactAsync(GetContactRequest, CallOptions)

    public virtual AsyncUnaryCall<Contact> GetContactAsync(GetContactRequest request, CallOptions options)

Gets a single contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallContact` | The call object. |

### GetContactAsync(GetContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Contact> GetContactAsync(GetContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a single contact.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetContactRequest` 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** |
| `AsyncUnaryCallContact` | The call object. |

### ListContacts(ListContactsRequest, CallOptions)

    public virtual ListContactsResponse ListContacts(ListContactsRequest request, CallOptions options)

Lists the contacts that have been set on a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListContactsRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ListContactsResponse` | The response received from the server. |

### ListContacts(ListContactsRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListContactsResponse ListContacts(ListContactsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the contacts that have been set on a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListContactsRequest` 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** |
| `ListContactsResponse` | The response received from the server. |

### ListContactsAsync(ListContactsRequest, CallOptions)

    public virtual AsyncUnaryCall<ListContactsResponse> ListContactsAsync(ListContactsRequest request, CallOptions options)

Lists the contacts that have been set on a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListContactsRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallListContactsResponse` | The call object. |

### ListContactsAsync(ListContactsRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListContactsResponse> ListContactsAsync(ListContactsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the contacts that have been set on a resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListContactsRequest` 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** |
| `AsyncUnaryCallListContactsResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override EssentialContactsService.EssentialContactsServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `EssentialContactsServiceEssentialContactsServiceClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.EssentialContacts.V1.EssentialContactsService.EssentialContactsServiceClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### SendTestMessage(SendTestMessageRequest, CallOptions)

    public virtual Empty SendTestMessage(SendTestMessageRequest request, CallOptions options)

Allows a contact admin to send a test message to contact to verify that it
has been configured correctly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SendTestMessageRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Empty` | The response received from the server. |

### SendTestMessage(SendTestMessageRequest, Metadata, DateTime?, CancellationToken)

    public virtual Empty SendTestMessage(SendTestMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Allows a contact admin to send a test message to contact to verify that it
has been configured correctly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SendTestMessageRequest` 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** |
| `Empty` | The response received from the server. |

### SendTestMessageAsync(SendTestMessageRequest, CallOptions)

    public virtual AsyncUnaryCall<Empty> SendTestMessageAsync(SendTestMessageRequest request, CallOptions options)

Allows a contact admin to send a test message to contact to verify that it
has been configured correctly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SendTestMessageRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallEmpty` | The call object. |

### SendTestMessageAsync(SendTestMessageRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Empty> SendTestMessageAsync(SendTestMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Allows a contact admin to send a test message to contact to verify that it
has been configured correctly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `SendTestMessageRequest` 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** |
| `AsyncUnaryCallEmpty` | The call object. |

### UpdateContact(UpdateContactRequest, CallOptions)

    public virtual Contact UpdateContact(UpdateContactRequest request, CallOptions options)

Updates a contact.
Note: A contact's email address cannot be changed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Contact` | The response received from the server. |

### UpdateContact(UpdateContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual Contact UpdateContact(UpdateContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a contact.
Note: A contact's email address cannot be changed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateContactRequest` 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** |
| `Contact` | The response received from the server. |

### UpdateContactAsync(UpdateContactRequest, CallOptions)

    public virtual AsyncUnaryCall<Contact> UpdateContactAsync(UpdateContactRequest request, CallOptions options)

Updates a contact.
Note: A contact's email address cannot be changed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateContactRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallContact` | The call object. |

### UpdateContactAsync(UpdateContactRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Contact> UpdateContactAsync(UpdateContactRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a contact.
Note: A contact's email address cannot be changed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateContactRequest` 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** |
| `AsyncUnaryCallContact` | The call object. |