# Cloud Security Compliance v1 API - Class CmEnrollmentServiceClientImpl (1.0.0-beta05)

1.0.0-beta05 (latest) 1.0.0-beta04

    public sealed class CmEnrollmentServiceClientImpl : CmEnrollmentServiceClient

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

CmEnrollmentService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [CmEnrollmentServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient) \> CmEnrollmentServiceClientImpl

## Inherited Members

[CmEnrollmentServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_DefaultEndpoint) [CmEnrollmentServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_DefaultScopes) [CmEnrollmentServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_ServiceMetadata) [CmEnrollmentServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CreateAsync_System_Threading_CancellationToken_) [CmEnrollmentServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_Create) [CmEnrollmentServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_ShutdownDefaultChannelsAsync) [CmEnrollmentServiceClient.UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_UpdateCmEnrollmentRequest_System_Threading_CancellationToken_) [CmEnrollmentServiceClient.UpdateCmEnrollment(CmEnrollment, FieldMask, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollment_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollment_Google_Protobuf_WellKnownTypes_FieldMask_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.UpdateCmEnrollmentAsync(CmEnrollment, FieldMask, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollment_Google_Protobuf_WellKnownTypes_FieldMask_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.UpdateCmEnrollmentAsync(CmEnrollment, FieldMask, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollment_Google_Protobuf_WellKnownTypes_FieldMask_System_Threading_CancellationToken_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CalculateEffectiveCmEnrollmentRequest_System_Threading_CancellationToken_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollment_System_String_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_System_String_System_Threading_CancellationToken_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(CmEnrollmentName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollment_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentName_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentName_Google_Api_Gax_Grpc_CallSettings_) [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(CmEnrollmentName, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentName_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.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

## Remarks

Service describing CmEnrollment related RPCs for
complianceManager.

## Constructors

### CmEnrollmentServiceClientImpl(CmEnrollmentServiceClient, CmEnrollmentServiceSettings, ILogger)

    public CmEnrollmentServiceClientImpl(CmEnrollmentService.CmEnrollmentServiceClient grpcClient, CmEnrollmentServiceSettings settings, ILogger logger)

Constructs a client wrapper for the CmEnrollmentService service, with the specified gRPC client and
settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `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` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceSettings` The base [CmEnrollmentServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceSettings) 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 CmEnrollmentService.CmEnrollmentServiceClient GrpcClient { get; }

The underlying gRPC CmEnrollmentService client

| **Property Value** ||
|---|---|
| **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** [CmEnrollmentServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_GrpcClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [CmEnrollmentServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_LocationsClient)

## Methods

### CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest, CallSettings)

    public override CalculateEffectiveCmEnrollmentResponse CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest request, CallSettings callSettings = null)

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 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.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | The RPC response. |

**Overrides** [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollment(CalculateEffectiveCmEnrollmentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollment_Google_Cloud_CloudSecurityCompliance_V1_CalculateEffectiveCmEnrollmentRequest_Google_Api_Gax_Grpc_CallSettings_)

### CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CallSettings)

    public override Task<CalculateEffectiveCmEnrollmentResponse> CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest request, CallSettings callSettings = null)

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 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.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CalculateEffectiveCmEnrollmentResponse` | A Task containing the RPC response. |

**Overrides** [CmEnrollmentServiceClient.CalculateEffectiveCmEnrollmentAsync(CalculateEffectiveCmEnrollmentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_CalculateEffectiveCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_CalculateEffectiveCmEnrollmentRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateCmEnrollment(UpdateCmEnrollmentRequest, CallSettings)

    public override CmEnrollment UpdateCmEnrollment(UpdateCmEnrollmentRequest request, CallSettings callSettings = null)

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 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.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | The RPC response. |

**Overrides** [CmEnrollmentServiceClient.UpdateCmEnrollment(UpdateCmEnrollmentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollment_Google_Cloud_CloudSecurityCompliance_V1_UpdateCmEnrollmentRequest_Google_Api_Gax_Grpc_CallSettings_)

### UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CallSettings)

    public override Task<CmEnrollment> UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest request, CallSettings callSettings = null)

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 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.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollment` | A Task containing the RPC response. |

**Overrides** [CmEnrollmentServiceClient.UpdateCmEnrollmentAsync(UpdateCmEnrollmentRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudSecurityCompliance.V1/latest/Google.Cloud.CloudSecurityCompliance.V1.CmEnrollmentServiceClient#Google_Cloud_CloudSecurityCompliance_V1_CmEnrollmentServiceClient_UpdateCmEnrollmentAsync_Google_Cloud_CloudSecurityCompliance_V1_UpdateCmEnrollmentRequest_Google_Api_Gax_Grpc_CallSettings_)