# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::Session (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::Session.

External session proto definition.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Optional. The display name of the session.

  This field is used to identify the session in the UI.
  By default, the display name is the first turn query text in the session.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The display name of the session.


  This field is used to identify the session in the UI.
  By default, the display name is the first turn query text in the session.
**Returns**

- (::String) --- Optional. The display name of the session.

  This field is used to identify the session in the UI.
  By default, the display name is the first turn query text in the session.

### #end_time

    def end_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time the session finished.

### #is_pinned

    def is_pinned() -> ::Boolean

**Returns**

- (::Boolean) --- Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.

### #is_pinned=

    def is_pinned=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
**Returns**

- (::Boolean) --- Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.

### #labels

    def labels() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. The labels for the session. Can be set as filter in ListSessionsRequest.

### #labels=

    def labels=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
**Returns**

- (::Array\<::String\>) --- Optional. The labels for the session. Can be set as filter in ListSessionsRequest.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
**Returns**

- (::String) --- Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`

### #start_time

    def start_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time the session started.

### #state

    def state() -> ::Google::Cloud::DiscoveryEngine::V1::Session::State

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Session::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-State)) --- The state of the session.

### #state=

    def state=(value) -> ::Google::Cloud::DiscoveryEngine::V1::Session::State

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::Session::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-State)) --- The state of the session.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Session::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-State)) --- The state of the session.

### #turns

    def turns() -> ::Array<::Google::Cloud::DiscoveryEngine::V1::Session::Turn>

**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Session::Turn](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-Turn)\>) --- Turns.

### #turns=

    def turns=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::Session::Turn>

**Parameter**

- **value** (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Session::Turn](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-Turn)\>) --- Turns.
**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::Session::Turn](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Session-Turn)\>) --- Turns.

### #user_pseudo_id

    def user_pseudo_id() -> ::String

**Returns**

- (::String) --- A unique identifier for tracking users.

### #user_pseudo_id=

    def user_pseudo_id=(value) -> ::String

**Parameter**

- **value** (::String) --- A unique identifier for tracking users.
**Returns**

- (::String) --- A unique identifier for tracking users.