# Policy Simulator v1 API - Class OrgPolicyViolationsPreviewServiceClient (1.4.0)

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

- [1.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient)

    public abstract class OrgPolicyViolationsPreviewServiceClient

Reference documentation and code samples for the Policy Simulator v1 API class OrgPolicyViolationsPreviewServiceClient.

OrgPolicyViolationsPreviewService client wrapper, for convenient use.

## Inheritance

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

## 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

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

## Namespace

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

## Assembly

Google.Cloud.PolicySimulator.V1.dll

## Remarks

Violations Preview API service for OrgPolicy.

An
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is a preview of the violations that will exist as soon as a proposed
OrgPolicy change is submitted. To create an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\],
the API user specifies the changes they wish to make and requests the
generation of a preview via \[GenerateViolationsPreview\]\[\]. the OrgPolicy
Simulator service then scans the API user's currently existing resources to
determine these resources violate the newly set OrgPolicy.

## Properties

### CreateOrgPolicyViolationsPreviewOperationsClient

    public virtual OperationsClient CreateOrgPolicyViolationsPreviewOperationsClient { get; }

The long-running operations client for `CreateOrgPolicyViolationsPreview`.

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

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the OrgPolicyViolationsPreviewService service, which is a host of
"policysimulator.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 OrgPolicyViolationsPreviewService 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 OrgPolicyViolationsPreviewService scopes are:

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

<br />

### GrpcClient

    public virtual OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceClient GrpcClient { get; }

The underlying gRPC OrgPolicyViolationsPreviewService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceClient` |   |

### 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 OrgPolicyViolationsPreviewServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient` | The task representing the created [OrgPolicyViolationsPreviewServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient). |

### CreateOrgPolicyViolationsPreview(CreateOrgPolicyViolationsPreviewRequest, CallSettings)

    public virtual Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> CreateOrgPolicyViolationsPreview(CreateOrgPolicyViolationsPreviewRequest request, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | The RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    CreateOrgPolicyViolationsPreviewRequest request = new CreateOrgPolicyViolationsPreviewRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        OrgPolicyViolationsPreview = new OrgPolicyViolationsPreview(),
        OrgPolicyViolationsPreviewId = "",
    };
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreview(request);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreview(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreview(OrganizationLocationName, OrgPolicyViolationsPreview, string, CallSettings)

    public virtual Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> CreateOrgPolicyViolationsPreview(OrganizationLocationName parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrganizationLocationName` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | The RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreview(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreview(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreview(string, OrgPolicyViolationsPreview, string, CallSettings)

    public virtual Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> CreateOrgPolicyViolationsPreview(string parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | The RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreview(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreview(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(CreateOrgPolicyViolationsPreviewRequest, CallSettings)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(CreateOrgPolicyViolationsPreviewRequest request, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateOrgPolicyViolationsPreviewRequest request = new CreateOrgPolicyViolationsPreviewRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        OrgPolicyViolationsPreview = new OrgPolicyViolationsPreview(),
        OrgPolicyViolationsPreviewId = "",
    };
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(CreateOrgPolicyViolationsPreviewRequest, CancellationToken)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(CreateOrgPolicyViolationsPreviewRequest request, CancellationToken cancellationToken)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewRequest` 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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateOrgPolicyViolationsPreviewRequest request = new CreateOrgPolicyViolationsPreviewRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        OrgPolicyViolationsPreview = new OrgPolicyViolationsPreview(),
        OrgPolicyViolationsPreviewId = "",
    };
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(OrganizationLocationName, OrgPolicyViolationsPreview, string, CallSettings)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(OrganizationLocationName parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrganizationLocationName` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(OrganizationLocationName, OrgPolicyViolationsPreview, string, CancellationToken)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(OrganizationLocationName parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CancellationToken cancellationToken)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrganizationLocationName` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(string, OrgPolicyViolationsPreview, string, CallSettings)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(string parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CallSettings callSettings = null)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### CreateOrgPolicyViolationsPreviewAsync(string, OrgPolicyViolationsPreview, string, CancellationToken)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> CreateOrgPolicyViolationsPreviewAsync(string parent, OrgPolicyViolationsPreview orgPolicyViolationsPreview, string orgPolicyViolationsPreviewId, CancellationToken cancellationToken)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The organization under which this \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] will be created. Example: `organizations/my-example-org/locations/global` |
| `orgPolicyViolationsPreview` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` Required. The \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\] to generate. |
| `orgPolicyViolationsPreviewId` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional user-specified ID for the \[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]. If not provided, a random ID will be generated. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    OrgPolicyViolationsPreview orgPolicyViolationsPreview = new OrgPolicyViolationsPreview();
    string orgPolicyViolationsPreviewId = "";
    // Make the request
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> response = await orgPolicyViolationsPreviewServiceClient.CreateOrgPolicyViolationsPreviewAsync(parent, orgPolicyViolationsPreview, orgPolicyViolationsPreviewId);

    // Poll until the returned long-running operation is complete
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    OrgPolicyViolationsPreview result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> retrievedResponse = await orgPolicyViolationsPreviewServiceClient.PollOnceCreateOrgPolicyViolationsPreviewAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        OrgPolicyViolationsPreview retrievedResult = retrievedResponse.Result;
    }

### GetOrgPolicyViolationsPreview(GetOrgPolicyViolationsPreviewRequest, CallSettings)

    public virtual OrgPolicyViolationsPreview GetOrgPolicyViolationsPreview(GetOrgPolicyViolationsPreviewRequest request, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

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

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    GetOrgPolicyViolationsPreviewRequest request = new GetOrgPolicyViolationsPreviewRequest
    {
        OrgPolicyViolationsPreviewName = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]"),
    };
    // Make the request
    OrgPolicyViolationsPreview response = orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreview(request);

### GetOrgPolicyViolationsPreview(OrgPolicyViolationsPreviewName, CallSettings)

    public virtual OrgPolicyViolationsPreview GetOrgPolicyViolationsPreview(OrgPolicyViolationsPreviewName name, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewName` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | The RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    OrgPolicyViolationsPreviewName name = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]");
    // Make the request
    OrgPolicyViolationsPreview response = orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreview(name);

### GetOrgPolicyViolationsPreview(string, CallSettings)

    public virtual OrgPolicyViolationsPreview GetOrgPolicyViolationsPreview(string name, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | The RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/orgPolicyViolationsPreviews/[ORG_POLICY_VIOLATIONS_PREVIEW]";
    // Make the request
    OrgPolicyViolationsPreview response = orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreview(name);

### GetOrgPolicyViolationsPreviewAsync(GetOrgPolicyViolationsPreviewRequest, CallSettings)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(GetOrgPolicyViolationsPreviewRequest request, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

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

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetOrgPolicyViolationsPreviewRequest request = new GetOrgPolicyViolationsPreviewRequest
    {
        OrgPolicyViolationsPreviewName = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]"),
    };
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(request);

### GetOrgPolicyViolationsPreviewAsync(GetOrgPolicyViolationsPreviewRequest, CancellationToken)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(GetOrgPolicyViolationsPreviewRequest request, CancellationToken cancellationToken)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

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

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetOrgPolicyViolationsPreviewRequest request = new GetOrgPolicyViolationsPreviewRequest
    {
        OrgPolicyViolationsPreviewName = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]"),
    };
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(request);

### GetOrgPolicyViolationsPreviewAsync(OrgPolicyViolationsPreviewName, CallSettings)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(OrgPolicyViolationsPreviewName name, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewName` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrgPolicyViolationsPreviewName name = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]");
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(name);

### GetOrgPolicyViolationsPreviewAsync(OrgPolicyViolationsPreviewName, CancellationToken)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(OrgPolicyViolationsPreviewName name, CancellationToken cancellationToken)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewName` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrgPolicyViolationsPreviewName name = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]");
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(name);

### GetOrgPolicyViolationsPreviewAsync(string, CallSettings)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(string name, CallSettings callSettings = null)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/orgPolicyViolationsPreviews/[ORG_POLICY_VIOLATIONS_PREVIEW]";
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(name);

### GetOrgPolicyViolationsPreviewAsync(string, CancellationToken)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreviewAsync(string name, CancellationToken cancellationToken)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the OrgPolicyViolationsPreview to get. |
| `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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A Task containing the RPC response. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/orgPolicyViolationsPreviews/[ORG_POLICY_VIOLATIONS_PREVIEW]";
    // Make the request
    OrgPolicyViolationsPreview response = await orgPolicyViolationsPreviewServiceClient.GetOrgPolicyViolationsPreviewAsync(name);

### ListOrgPolicyViolations(ListOrgPolicyViolationsRequest, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolations(ListOrgPolicyViolationsRequest request, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    ListOrgPolicyViolationsRequest request = new ListOrgPolicyViolationsRequest
    {
        ParentAsOrgPolicyViolationsPreviewName = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]"),
    };
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolations(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolation item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolations(OrgPolicyViolationsPreviewName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolations(OrgPolicyViolationsPreviewName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewName` Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview} |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    OrgPolicyViolationsPreviewName parent = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]");
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolations(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolation item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolations(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview} |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]/orgPolicyViolationsPreviews/[ORG_POLICY_VIOLATIONS_PREVIEW]";
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolations(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolation item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsAsync(ListOrgPolicyViolationsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolationsAsync(ListOrgPolicyViolationsRequest request, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable asynchronous sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListOrgPolicyViolationsRequest request = new ListOrgPolicyViolationsRequest
    {
        ParentAsOrgPolicyViolationsPreviewName = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolation item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsAsync(OrgPolicyViolationsPreviewName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolationsAsync(OrgPolicyViolationsPreviewName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewName` Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview} |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable asynchronous sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrgPolicyViolationsPreviewName parent = OrgPolicyViolationsPreviewName.FromOrganizationLocationOrgPolicyViolationsPreview("[ORGANIZATION]", "[LOCATION]", "[ORG_POLICY_VIOLATIONS_PREVIEW]");
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolation item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> ListOrgPolicyViolationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview} |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation` | A pageable asynchronous sequence of [OrgPolicyViolation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]/orgPolicyViolationsPreviews/[ORG_POLICY_VIOLATIONS_PREVIEW]";
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsResponse, OrgPolicyViolation> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolation item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolation item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolation> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolation item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviews(ListOrgPolicyViolationsPreviewsRequest, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviews(ListOrgPolicyViolationsPreviewsRequest request, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    ListOrgPolicyViolationsPreviewsRequest request = new ListOrgPolicyViolationsPreviewsRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviews(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolationsPreview item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsPreviewsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviews(OrganizationLocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviews(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrganizationLocationName` Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviews(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolationsPreview item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsPreviewsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviews(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviews(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = OrgPolicyViolationsPreviewServiceClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviews(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (OrgPolicyViolationsPreview item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListOrgPolicyViolationsPreviewsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviewsAsync(ListOrgPolicyViolationsPreviewsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviewsAsync(ListOrgPolicyViolationsPreviewsRequest request, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsRequest` 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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable asynchronous sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListOrgPolicyViolationsPreviewsRequest request = new ListOrgPolicyViolationsPreviewsRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviewsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolationsPreview item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsPreviewsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviewsAsync(OrganizationLocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviewsAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrganizationLocationName` Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable asynchronous sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviewsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolationsPreview item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsPreviewsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListOrgPolicyViolationsPreviewsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> ListOrgPolicyViolationsPreviewsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | A pageable asynchronous sequence of [OrgPolicyViolationsPreview](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview) resources. |

**Example**

    // Create client
    OrgPolicyViolationsPreviewServiceClient orgPolicyViolationsPreviewServiceClient = await OrgPolicyViolationsPreviewServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListOrgPolicyViolationsPreviewsResponse, OrgPolicyViolationsPreview> response = orgPolicyViolationsPreviewServiceClient.ListOrgPolicyViolationsPreviewsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((OrgPolicyViolationsPreview item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListOrgPolicyViolationsPreviewsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (OrgPolicyViolationsPreview item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<OrgPolicyViolationsPreview> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (OrgPolicyViolationsPreview item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceCreateOrgPolicyViolationsPreview(string, CallSettings)

    public virtual Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata> PollOnceCreateOrgPolicyViolationsPreview(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`CreateOrgPolicyViolationsPreview`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | The result of polling the operation. |

### PollOnceCreateOrgPolicyViolationsPreviewAsync(string, CallSettings)

    public virtual Task<Operation<OrgPolicyViolationsPreview, CreateOrgPolicyViolationsPreviewOperationMetadata>> PollOnceCreateOrgPolicyViolationsPreviewAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`CreateOrgPolicyViolationsPreview`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewOperationMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient#Google_Cloud_PolicySimulator_V1_OrgPolicyViolationsPreviewServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient#Google_Cloud_PolicySimulator_V1_OrgPolicyViolationsPreviewServiceClient_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.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient#Google_Cloud_PolicySimulator_V1_OrgPolicyViolationsPreviewServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServiceClient#Google_Cloud_PolicySimulator_V1_OrgPolicyViolationsPreviewServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.