# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::UserInfo (v0.28.0)

0.28.0 (latest) 0.27.0 0.26.0 0.25.0 0.24.0 0.23.1 0.22.0 0.21.0 0.20.1 0.19.1 0.18.0 0.17.0 0.16.0 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::UserInfo.

Information of an end user.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #precise_location

    def precise_location() -> ::Google::Cloud::DiscoveryEngine::V1beta::UserInfo::PreciseLocation

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::UserInfo::PreciseLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserInfo-PreciseLocation)) --- Optional. Input only. Precise location of the user. It is used in Custom Ranking to calculate the distance between the user and the relevant documents.

### #precise_location=

    def precise_location=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::UserInfo::PreciseLocation

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::UserInfo::PreciseLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserInfo-PreciseLocation)) --- Optional. Input only. Precise location of the user. It is used in Custom Ranking to calculate the distance between the user and the relevant documents.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::UserInfo::PreciseLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserInfo-PreciseLocation)) --- Optional. Input only. Precise location of the user. It is used in Custom Ranking to calculate the distance between the user and the relevant documents.

### #time_zone

    def time_zone() -> ::String

**Returns**

- (::String) --- Optional. IANA time zone, e.g. Europe/Budapest.

### #time_zone=

    def time_zone=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. IANA time zone, e.g. Europe/Budapest.
**Returns**

- (::String) --- Optional. IANA time zone, e.g. Europe/Budapest.

### #user_agent

    def user_agent() -> ::String

**Returns**

- (::String) --- User agent as included in the HTTP header.

  The field must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This should not be set when using the client side event reporting with
  GTM or JavaScript tag in
  [UserEventService.CollectUserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEventService-Client#Google__Cloud__DiscoveryEngine__V1beta__UserEventService__Client_collect_user_event_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Client#collect_user_event (method)")
  or if
  [UserEvent.direct_user_request](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEvent#Google__Cloud__DiscoveryEngine__V1beta__UserEvent_direct_user_request_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEvent#direct_user_request (method)")
  is set.

### #user_agent=

    def user_agent=(value) -> ::String

**Parameter**

- **value** (::String) --- User agent as included in the HTTP header.


  The field must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This should not be set when using the client side event reporting with
  GTM or JavaScript tag in
  [UserEventService.CollectUserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEventService-Client#Google__Cloud__DiscoveryEngine__V1beta__UserEventService__Client_collect_user_event_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Client#collect_user_event (method)")
  or if
  [UserEvent.direct_user_request](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEvent#Google__Cloud__DiscoveryEngine__V1beta__UserEvent_direct_user_request_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEvent#direct_user_request (method)")
  is set.
**Returns**

- (::String) --- User agent as included in the HTTP header.

  The field must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This should not be set when using the client side event reporting with
  GTM or JavaScript tag in
  [UserEventService.CollectUserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEventService-Client#Google__Cloud__DiscoveryEngine__V1beta__UserEventService__Client_collect_user_event_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Client#collect_user_event (method)")
  or if
  [UserEvent.direct_user_request](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-UserEvent#Google__Cloud__DiscoveryEngine__V1beta__UserEvent_direct_user_request_instance_ "Google::Cloud::DiscoveryEngine::V1beta::UserEvent#direct_user_request (method)")
  is set.

### #user_id

    def user_id() -> ::String

**Returns**

- (::String) --- Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users.

  Always use a hashed value for this ID.

  Don't set the field to the same fixed ID for different users. This mixes
  the event history of those users together, which results in degraded
  model quality.

  The field must be a UTF-8 encoded string with a length limit of 128
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  Represents an opaque ID to the Search API. The Search API doesn't
  interpret the value in any way. This field is used to associate events
  with a user across sessions if the events are being uploaded.

### #user_id=

    def user_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users.


  Always use a hashed value for this ID.

  Don't set the field to the same fixed ID for different users. This mixes
  the event history of those users together, which results in degraded
  model quality.

  The field must be a UTF-8 encoded string with a length limit of 128
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  Represents an opaque ID to the Search API. The Search API doesn't
  interpret the value in any way. This field is used to associate events
  with a user across sessions if the events are being uploaded.
**Returns**

- (::String) --- Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users.

  Always use a hashed value for this ID.

  Don't set the field to the same fixed ID for different users. This mixes
  the event history of those users together, which results in degraded
  model quality.

  The field must be a UTF-8 encoded string with a length limit of 128
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  Represents an opaque ID to the Search API. The Search API doesn't
  interpret the value in any way. This field is used to associate events
  with a user across sessions if the events are being uploaded.