# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest (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::GenerateGroundedContentRequest.

Top-level message sent by the client for the `GenerateGroundedContent`
method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #contents

    def contents() -> ::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent>

**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)\>) --- Content of the current conversation with the model.


  For single-turn queries, this is a single instance. For multi-turn queries,
  this is a repeated field that contains conversation history + latest
  request.

### #contents=

    def contents=(value) -> ::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent>

**Parameter**

- **value** (::Array\<[::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)\>) --- Content of the current conversation with the model.


  For single-turn queries, this is a single instance. For multi-turn queries,
  this is a repeated field that contains conversation history + latest
  request.
**Returns**

- (::Array\<[::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)\>) --- Content of the current conversation with the model.


  For single-turn queries, this is a single instance. For multi-turn queries,
  this is a repeated field that contains conversation history + latest
  request.

### #generation_spec

    def generation_spec() -> ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GenerationSpec)) --- Content generation specification.

### #generation_spec=

    def generation_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GenerationSpec)) --- Content generation specification.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GenerationSpec)) --- Content generation specification.

### #grounding_spec

    def grounding_spec() -> ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GroundingSpec)) --- Grounding specification.

### #grounding_spec=

    def grounding_spec=(value) -> ::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GroundingSpec)) --- Grounding specification.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GenerateGroundedContentRequest-GroundingSpec)) --- Grounding specification.

### #location

    def location() -> ::String

**Returns**

- (::String) --- Required. Location resource.

  Format: `projects/{project}/locations/{location}`.

### #location=

    def location=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Location resource.


  Format: `projects/{project}/locations/{location}`.
**Returns**

- (::String) --- Required. Location resource.

  Format: `projects/{project}/locations/{location}`.

### #system_instruction

    def system_instruction() -> ::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)) --- Content of the system instruction for the current API.


  These instructions will take priority over any other prompt instructions
  if the selected model is supporting them.

### #system_instruction=

    def system_instruction=(value) -> ::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)) --- Content of the system instruction for the current API.


  These instructions will take priority over any other prompt instructions
  if the selected model is supporting them.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GroundedGenerationContent)) --- Content of the system instruction for the current API.


  These instructions will take priority over any other prompt instructions
  if the selected model is supporting them.

### #user_labels

    def user_labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- The user labels applied to a resource must meet the following requirements:

  - Each resource can have multiple labels, up to a maximum of 64.
  - Each label must be a key-value pair.
  - Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  - Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  - The key portion of a label must be unique. However, you can use the same key with multiple resources.
  - Keys must start with a lowercase letter or international character.

  See [Google Cloud
  Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
  for more details.

### #user_labels=

    def user_labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- The user labels applied to a resource must meet the following requirements:


  - Each resource can have multiple labels, up to a maximum of 64.
  - Each label must be a key-value pair.
  - Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  - Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  - The key portion of a label must be unique. However, you can use the same key with multiple resources.
  - Keys must start with a lowercase letter or international character.

  See [Google Cloud
  Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
  for more details.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- The user labels applied to a resource must meet the following requirements:

  - Each resource can have multiple labels, up to a maximum of 64.
  - Each label must be a key-value pair.
  - Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  - Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  - The key portion of a label must be unique. However, you can use the same key with multiple resources.
  - Keys must start with a lowercase letter or international character.

  See [Google Cloud
  Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
  for more details.