# Policy Simulator v1 API - Class Simulator (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.Simulator)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.Simulator)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.Simulator)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.Simulator)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.Simulator)

    public static class Simulator

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

Policy Simulator API service.

Policy Simulator is a collection of endpoints for creating, running, and
viewing a \[Replay\]\[google.cloud.policysimulator.v1.Replay\]. A
\[Replay\]\[google.cloud.policysimulator.v1.Replay\] is a type of simulation that
lets you see how your principals' access to resources might change if you
changed your IAM policy.

During a \[Replay\]\[google.cloud.policysimulator.v1.Replay\], Policy Simulator
re-evaluates, or replays, past access attempts under both the current policy
and your proposed policy, and compares those results to determine how your
principals' access might change under the proposed policy.

## Inheritance

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

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

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

## Methods

### BindService(SimulatorBase)

    public static ServerServiceDefinition BindService(Simulator.SimulatorBase serviceImpl)

Creates service definition that can be registered with a server

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.Simulatorhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.Simulator.SimulatorBase` An object implementing the server-side handling logic. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerServiceDefinition.html` |   |

### BindService(ServiceBinderBase, SimulatorBase)

    public static void BindService(ServiceBinderBase serviceBinder, Simulator.SimulatorBase serviceImpl)

Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `serviceBinder` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServiceBinderBase.html` Service methods will be bound by calling `AddMethod` on this object. |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.Simulatorhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.Simulator.SimulatorBase` An object implementing the server-side handling logic. |