# Google Cloud Data Loss Prevention v2 API - Class DlpServiceClientBuilder (4.26.0)

4.26.0 (latest) 4.25.0 4.24.0 4.23.0 4.22.0 4.21.0 4.20.0 4.19.0 4.18.0 4.17.0 4.16.0 4.15.0 4.14.0 4.13.0 4.12.0 4.11.0 4.10.0 4.9.0 4.8.0 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.5.0 3.4.0 3.3.0 3.2.0 2.16.0 2.15.0

    public sealed class DlpServiceClientBuilder : ClientBuilderBase<DlpServiceClient>

Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class DlpServiceClientBuilder.

Builder class for [DlpServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.DlpServiceClient) to provide simple configuration of credentials, endpoint etc.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBuilderBase](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html)[DlpServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.DlpServiceClient) \> DlpServiceClientBuilder

## Inherited Members

[ClientBuilderBase\<DlpServiceClient\>.Build(IServiceProvider)](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Build_System_IServiceProvider_) [ClientBuilderBase\<DlpServiceClient\>.BuildAsync(IServiceProvider, CancellationToken)](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_BuildAsync_System_IServiceProvider_System_Threading_CancellationToken_) [ClientBuilderBase\<DlpServiceClient\>.UniverseDomain](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UniverseDomain) [ClientBuilderBase\<DlpServiceClient\>.Endpoint](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Endpoint) [ClientBuilderBase\<DlpServiceClient\>.Logger](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Logger) [ClientBuilderBase\<DlpServiceClient\>.Scopes](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Scopes) [ClientBuilderBase\<DlpServiceClient\>.ChannelCredentials](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_ChannelCredentials) [ClientBuilderBase\<DlpServiceClient\>.CredentialsPath](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_CredentialsPath) [ClientBuilderBase\<DlpServiceClient\>.JsonCredentials](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_JsonCredentials) [ClientBuilderBase\<DlpServiceClient\>.GoogleCredential](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GoogleCredential) [ClientBuilderBase\<DlpServiceClient\>.Credential](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_Credential) [ClientBuilderBase\<DlpServiceClient\>.TokenAccessMethod](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_TokenAccessMethod) [ClientBuilderBase\<DlpServiceClient\>.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_CallInvoker) [ClientBuilderBase\<DlpServiceClient\>.UserAgent](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UserAgent) [ClientBuilderBase\<DlpServiceClient\>.GrpcAdapter](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GrpcAdapter) [ClientBuilderBase\<DlpServiceClient\>.ApiKey](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_ApiKey) [ClientBuilderBase\<DlpServiceClient\>.QuotaProject](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_QuotaProject) [ClientBuilderBase\<DlpServiceClient\>.GrpcChannelOptions](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_GrpcChannelOptions) [ClientBuilderBase\<DlpServiceClient\>.LastCreatedChannel](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_LastCreatedChannel) [ClientBuilderBase\<DlpServiceClient\>.UseJwtAccessWithScopes](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ClientBuilderBase-1.html#Google_Api_Gax_Grpc_ClientBuilderBase_1_UseJwtAccessWithScopes) [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.Dlp.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2)

## Assembly

Google.Cloud.Dlp.V2.dll

## Constructors

### DlpServiceClientBuilder()

    public DlpServiceClientBuilder()

Creates a new builder with default settings.

## Properties

### Settings

    public DlpServiceSettings Settings { get; set; }

The settings to use for RPCs, or `null` for the default settings.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.DlpServiceSettings` |   |

## Methods

### Build()

    public override DlpServiceClient Build()

Builds the resulting client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.DlpServiceClient` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Dlp.V2.DlpServiceClient\>.Build()

### BuildAsync(CancellationToken)

    public override Task<DlpServiceClient> BuildAsync(CancellationToken cancellationToken = default)

Builds the resulting client asynchronously.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.DlpServiceClient` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Dlp.V2.DlpServiceClient\>.BuildAsync(System.Threading.CancellationToken)

### GetChannelPool()

    protected override ChannelPool GetChannelPool()

Returns the channel pool to use when no other options are specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ChannelPool.html` |   |

**Overrides** Google.Api.Gax.Grpc.ClientBuilderBase\<Google.Cloud.Dlp.V2.DlpServiceClient\>.GetChannelPool()