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

    [BindServiceMethod(typeof(Simulator), "BindService")]
    public abstract class Simulator.SimulatorBase

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

Base class for server-side implementations of Simulator

## Inheritance

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

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

### CreateReplay(CreateReplayRequest, ServerCallContext)

    public virtual Task<Operation> CreateReplay(CreateReplayRequest request, ServerCallContext context)

Creates and starts a \[Replay\]\[google.cloud.policysimulator.v1.Replay\] using
the given \[ReplayConfig\]\[google.cloud.policysimulator.v1.ReplayConfig\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateReplayRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **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.html` | The response to send back to the client (wrapped by a task). |

### GetReplay(GetReplayRequest, ServerCallContext)

    public virtual Task<Replay> GetReplay(GetReplayRequest request, ServerCallContext context)

Gets the specified \[Replay\]\[google.cloud.policysimulator.v1.Replay\]. Each
`Replay` 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.GetReplayRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **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.Replay` | The response to send back to the client (wrapped by a task). |

### ListReplayResults(ListReplayResultsRequest, ServerCallContext)

    public virtual Task<ListReplayResultsResponse> ListReplayResults(ListReplayResultsRequest request, ServerCallContext context)

Lists the results of running a
\[Replay\]\[google.cloud.policysimulator.v1.Replay\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListReplayResultsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **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.ListReplayResultsResponse` | The response to send back to the client (wrapped by a task). |