# Cloud Security Compliance v1 API - Class CmEnrollmentService.CmEnrollmentServiceClient (1.0.0-beta05)

1.0.0-beta05 (latest) 1.0.0-beta04

    public class CmEnrollmentService.CmEnrollmentServiceClient : ClientBase<CmEnrollmentService.CmEnrollmentServiceClient>

Reference documentation and code samples for the Cloud Security Compliance v1 API class CmEnrollmentService.CmEnrollmentServiceClient.

Client for CmEnrollmentService

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html)[CmEnrollmentService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentService)[CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentService.CmEnrollmentServiceClient) \> CmEnrollmentService.CmEnrollmentServiceClient

## Inherited Members

[ClientBase\<CmEnrollmentService.CmEnrollmentServiceClient\>.WithHost(string)](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html#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.CloudSecurityCompliance.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1)

## Assembly

Google.Cloud.CloudSecurityCompliance.V1.dll

## Constructors

### CmEnrollmentServiceClient()

    protected CmEnrollmentServiceClient()

Protected parameterless constructor to allow creation of test doubles.

### CmEnrollmentServiceClient(CallInvoker)

    public CmEnrollmentServiceClient(CallInvoker callInvoker)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker.html` The callInvoker to use to make remote calls. |

### CmEnrollmentServiceClient(ChannelBase)

    public CmEnrollmentServiceClient(ChannelBase channel)

Creates a new client for CmEnrollmentService

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase.html` The channel to use to make remote calls. |

### CmEnrollmentServiceClient(ClientBaseConfiguration)

    protected CmEnrollmentServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` The client configuration. |

## Methods

### CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest, CallOptions)

    public virtual CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest request, CallOptions options)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The response received from the server. |

### CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest, Metadata, DateTime?, CancellationToken)

    public virtual CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` 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` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The response received from the server. |

### CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CallOptions)

    public virtual AsyncUnaryCall<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest request, CallOptions options)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The call object. |

### CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Calculates the effective Compliance Manager enrollment for a resource.
An effective enrollment is either a direct enrollment of a
resource (if it exists), or an enrollment of the closest parent of a
resource that's enrolled in Compliance Manager.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` 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` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The call object. |

### CreateLocationsClient()

    public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html` | A new [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) for the same target as this client. |

### NewInstance(ClientBaseConfiguration)

    protected override CmEnrollmentService.CmEnrollmentServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentService.CmEnrollmentServiceClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentService.CmEnrollmentServiceClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### UpdateCmEnrollment(UpdateCmEnrollmentRequest, CallOptions)

    public virtual CmEnrollment UpdateCmEnrollment(UpdateCmEnrollmentRequest request, CallOptions options)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The response received from the server. |

### UpdateCmEnrollment(UpdateCmEnrollmentRequest, Metadata, DateTime?, CancellationToken)

    public virtual CmEnrollment UpdateCmEnrollment(UpdateCmEnrollmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` 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` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The response received from the server. |

### UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CallOptions)

    public virtual AsyncUnaryCall<CmEnrollment> UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest request, CallOptions options)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The call object. |

### UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<CmEnrollment> UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the Compliance Manager enrollment for a resource to facilitate
an audit.
Use this method to enroll a resource in Compliance Manager or to
create or update feature-specific configurations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.UpdateCmEnrollmentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` 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` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The call object. |