# Binary Authorization v1 API - Class ValidationHelperV1Client (2.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.5.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.4.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.3.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.2.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.1.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/2.0.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/1.0.0/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client)

    public abstract class ValidationHelperV1Client

Reference documentation and code samples for the Binary Authorization v1 API class ValidationHelperV1Client.

ValidationHelperV1 client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ValidationHelperV1Client

## Inherited Members

[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)

## Derived Types

[ValidationHelperV1ClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1ClientImpl)

## Namespace

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

## Assembly

Google.Cloud.BinaryAuthorization.V1.dll

## Remarks

BinAuthz Attestor verification

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ValidationHelperV1 service, which is a host of
"binaryauthorization.googleapis.com" and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ValidationHelperV1 scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default ValidationHelperV1 scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ValidationHelperV1.ValidationHelperV1Client GrpcClient { get; }

The underlying gRPC ValidationHelperV1 client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1.ValidationHelperV1Client` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

## Methods

### Create()

    public static ValidationHelperV1Client Create()

Synchronously creates a [ValidationHelperV1Client](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ValidationHelperV1ClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1ClientBuilder)
.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client` | The created [ValidationHelperV1Client](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client). |

### CreateAsync(CancellationToken)

    public static Task<ValidationHelperV1Client> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ValidationHelperV1Client](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ValidationHelperV1ClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1ClientBuilder)
.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client` | The task representing the created [ValidationHelperV1Client](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client). |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client#Google_Cloud_BinaryAuthorization_V1_ValidationHelperV1Client_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client#Google_Cloud_BinaryAuthorization_V1_ValidationHelperV1Client_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client#Google_Cloud_BinaryAuthorization_V1_ValidationHelperV1Client_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidationHelperV1Client#Google_Cloud_BinaryAuthorization_V1_ValidationHelperV1Client_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### ValidateAttestationOccurrence(ValidateAttestationOccurrenceRequest, CallSettings)

    public virtual ValidateAttestationOccurrenceResponse ValidateAttestationOccurrence(ValidateAttestationOccurrenceRequest request, CallSettings callSettings = null)

Returns whether the given Attestation for the given image URI
was signed by the given Attestor

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidateAttestationOccurrenceRequest` 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.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidateAttestationOccurrenceResponse` | The RPC response. |

**Example**

    // Create client
    ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.Create();
    // Initialize request argument(s)
    ValidateAttestationOccurrenceRequest request = new ValidateAttestationOccurrenceRequest
    {
        Attestor = "",
        Attestation = new AttestationOccurrence(),
        OccurrenceNote = "",
        OccurrenceResourceUri = "",
    };
    // Make the request
    ValidateAttestationOccurrenceResponse response = validationHelperV1Client.ValidateAttestationOccurrence(request);

### ValidateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest, CallSettings)

    public virtual Task<ValidateAttestationOccurrenceResponse> ValidateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest request, CallSettings callSettings = null)

Returns whether the given Attestation for the given image URI
was signed by the given Attestor

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidateAttestationOccurrenceRequest` 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.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidateAttestationOccurrenceResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ValidationHelperV1Client validationHelperV1Client = await ValidationHelperV1Client.CreateAsync();
    // Initialize request argument(s)
    ValidateAttestationOccurrenceRequest request = new ValidateAttestationOccurrenceRequest
    {
        Attestor = "",
        Attestation = new AttestationOccurrence(),
        OccurrenceNote = "",
        OccurrenceResourceUri = "",
    };
    // Make the request
    ValidateAttestationOccurrenceResponse response = await validationHelperV1Client.ValidateAttestationOccurrenceAsync(request);

### ValidateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest, CancellationToken)

    public virtual Task<ValidateAttestationOccurrenceResponse> ValidateAttestationOccurrenceAsync(ValidateAttestationOccurrenceRequest request, CancellationToken cancellationToken)

Returns whether the given Attestation for the given image URI
was signed by the given Attestor

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BinaryAuthorization.V1/latest/Google.Cloud.BinaryAuthorization.V1.ValidateAttestationOccurrenceRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

    // Create client
    ValidationHelperV1Client validationHelperV1Client = await ValidationHelperV1Client.CreateAsync();
    // Initialize request argument(s)
    ValidateAttestationOccurrenceRequest request = new ValidateAttestationOccurrenceRequest
    {
        Attestor = "",
        Attestation = new AttestationOccurrence(),
        OccurrenceNote = "",
        OccurrenceResourceUri = "",
    };
    // Make the request
    ValidateAttestationOccurrenceResponse response = await validationHelperV1Client.ValidateAttestationOccurrenceAsync(request);