5.29.0 (latest) 5.28.0 5.27.0 5.26.0 5.25.0 5.24.0 5.23.0 5.22.0 5.21.0 5.20.0 5.19.0 5.18.0 5.17.0 5.16.0 5.15.0 5.14.0 5.13.0 5.12.0 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.0.0 3.4.0 3.3.0 3.2.0 3.1.0

    public sealed class Session : IMessage<Session>, IEquatable<Session>, IDeepCloneable<Session>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Dataproc v1 API class Session.

A representation of a session.

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Session.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Session.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Session.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## 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.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

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

## Assembly

Google.Cloud.Dataproc.V1.dll

## Constructors

### Session()

    public Session()

### Session(Session)

    public Session(Session other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `Session` |

## Properties

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The time when the session was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### Creator

    public string Creator { get; set; }

Output only. The email address of the user who created the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### EnvironmentConfig

    public EnvironmentConfig EnvironmentConfig { get; set; }

Optional. Environment configuration for the session execution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `EnvironmentConfig` |   |

### JupyterSession

    public JupyterConfig JupyterSession { get; set; }

Optional. Jupyter session config.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `JupyterConfig` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. The labels to associate with the session.
Label **keys** must contain 1 to 63 characters, and must conform to
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
Label **values** may be empty, but, if present, must contain 1 to 63
characters, and must conform to [RFC
1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
associated with a session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MapFieldstringstring` |   |

### Name

    public string Name { get; set; }

Identifier. The resource name of the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### RuntimeConfig

    public RuntimeConfig RuntimeConfig { get; set; }

Optional. Runtime configuration for the session execution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RuntimeConfig` |   |

### RuntimeInfo

    public RuntimeInfo RuntimeInfo { get; set; }

Output only. Runtime information about session execution.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RuntimeInfo` |   |

### SessionConfigCase

    public Session.SessionConfigOneofCase SessionConfigCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SessionSessionConfigOneofCase` |   |

### SessionName

    public SessionName SessionName { get; set; }

[SessionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionName.md.txt)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Session.md.txt#Google_Cloud_Dataproc_V1_Session_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SessionName` |   |

### SessionTemplate

    public string SessionTemplate { get; set; }

Optional. The session template used by the session.

Only resource names, including project ID and location, are valid.

Example:

- `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]`
- `projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]`

The template must be in the same project and Dataproc region as the
session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### SessionTemplateAsSessionTemplateName

    public SessionTemplateName SessionTemplateAsSessionTemplateName { get; set; }

[SessionTemplateName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.SessionTemplateName.md.txt)-typed view over the [SessionTemplate](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataproc.V1/latest/Google.Cloud.Dataproc.V1.Session.md.txt#Google_Cloud_Dataproc_V1_Session_SessionTemplate) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SessionTemplateName` |   |

### SparkConnectSession

    public SparkConnectConfig SparkConnectSession { get; set; }

Optional. Spark connect session config.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SparkConnectConfig` |   |

### State

    public Session.Types.State State { get; set; }

Output only. A state of the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SessionTypesState` |   |

### StateHistory

    public RepeatedField<Session.Types.SessionStateHistory> StateHistory { get; }

Output only. Historical state information for the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldSessionTypesSessionStateHistory` |   |

### StateMessage

    public string StateMessage { get; set; }

Output only. Session state details, such as the failure
description if the state is `FAILED`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### StateTime

    public Timestamp StateTime { get; set; }

Output only. The time when the session entered the current state.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### User

    public string User { get; set; }

Optional. The email address of the user who owns the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Uuid

    public string Uuid { get; set; }

Output only. A session UUID (Unique Universal Identifier). The service
generates this value when it creates the session.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |