Class: Google::Cloud::DiscoveryEngine::V1beta::Answer

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/answer.rb

Overview

Defines an answer.

Defined Under Namespace

Modules: AnswerSkippedReason, State Classes: Citation, CitationSource, QueryUnderstandingInfo, Reference, Step

Instance Attribute Summary collapse

Instance Attribute Details

#answer_skipped_reasons::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::AnswerSkippedReason>

Returns Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#answer_text::String

Returns The textual answer.

Returns:

  • (::String)

    The textual answer.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#citations::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Citation>

Returns Citations.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#complete_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. Answer completed timestamp.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#create_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. Answer creation timestamp.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#name::String

Returns Immutable. Fully qualified name project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*.

Returns:

  • (::String)

    Immutable. Fully qualified name project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#query_understanding_info::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo

Returns Query understanding information.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#references::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference>

Returns References.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

Returns Suggested related questions.

Returns:

  • (::Array<::String>)

    Suggested related questions.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#state::Google::Cloud::DiscoveryEngine::V1beta::Answer::State

Returns The state of the answer generation.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end

#steps::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step>

Returns Answer generation steps.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'proto_docs/google/cloud/discoveryengine/v1beta/answer.rb', line 60

class Answer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes (UTF-8
  #     unicode).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_id
  #   @return [::String]
  #     ID of the citation source.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Reference.
  # @!attribute [rw] unstructured_document_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
  #     Unstructured document information.
  # @!attribute [rw] chunk_info
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
  #     Chunk information.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Unstructured document information.
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] chunk_contents
    #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
    #     List of cited chunk contents derived from document content.
    class UnstructuredDocumentInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Chunk content.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class ChunkContent
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end

    # Chunk information.
    # @!attribute [rw] chunk
    #   @return [::String]
    #     Chunk resource name.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] relevance_score
    #   @return [::Float]
    #     Relevance score.
    # @!attribute [rw] document_metadata
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
    #     Document metadata.
    class ChunkInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Document metadata.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] page_identifier
      #   @return [::String]
      #     Page identifier.
      class DocumentMetadata
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end

  # Step information.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
  #     The state of the step.
  # @!attribute [rw] description
  #   @return [::String]
  #     The description of the step.
  # @!attribute [rw] thought
  #   @return [::String]
  #     The thought of the step.
  # @!attribute [rw] actions
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
  #     Actions.
  class Step
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Action.
    # @!attribute [rw] search_action
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
    #     Search action.
    # @!attribute [rw] observation
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
    #     Observation.
    class Action
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Search action.
      # @!attribute [rw] query
      #   @return [::String]
      #     The query to search.
      class SearchAction
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Observation.
      # @!attribute [rw] search_results
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
      #     Search results observed by the search action, it can be snippets info
      #     or chunk info, depending on the citation type set by the user.
      class Observation
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # @!attribute [rw] document
        #   @return [::String]
        #     Document resource name.
        # @!attribute [rw] uri
        #   @return [::String]
        #     URI for the document.
        # @!attribute [rw] title
        #   @return [::String]
        #     Title.
        # @!attribute [rw] snippet_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
        #     If citation_type is DOCUMENT_LEVEL_CITATION, populate document
        #     level snippets.
        # @!attribute [rw] chunk_info
        #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
        #     If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
        #     populate chunk info.
        class SearchResult
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Snippet information.
          # @!attribute [rw] snippet
          #   @return [::String]
          #     Snippet content.
          # @!attribute [rw] snippet_status
          #   @return [::String]
          #     Status of the snippet defined by the search team.
          class SnippetInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Chunk information.
          # @!attribute [rw] chunk
          #   @return [::String]
          #     Chunk resource name.
          # @!attribute [rw] content
          #   @return [::String]
          #     Chunk textual content.
          # @!attribute [rw] relevance_score
          #   @return [::Float]
          #     Relevance score.
          class ChunkInfo
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end
      end
    end

    # Enumeration of the state of the step.
    module State
      # Unknown.
      STATE_UNSPECIFIED = 0

      # Step is currently in progress.
      IN_PROGRESS = 1

      # Step currently failed.
      FAILED = 2

      # Step has succeeded.
      SUCCEEDED = 3
    end
  end

  # Query understanding information.
  # @!attribute [rw] query_classification_info
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
  #     Query classification information.
  class QueryUnderstandingInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Query classification information.
    # @!attribute [rw] type
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
    #     Query classification type.
    # @!attribute [rw] positive
    #   @return [::Boolean]
    #     Classification output.
    class QueryClassificationInfo
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Query classification types.
      module Type
        # Unspecified query classification type.
        TYPE_UNSPECIFIED = 0

        # Adversarial query classification type.
        ADVERSARIAL_QUERY = 1

        # Non-answer-seeking query classification type.
        NON_ANSWER_SEEKING_QUERY = 2
      end
    end
  end

  # Enumeration of the state of the answer generation.
  module State
    # Unknown.
    STATE_UNSPECIFIED = 0

    # Answer generation is currently in progress.
    IN_PROGRESS = 1

    # Answer generation currently failed.
    FAILED = 2

    # Answer generation has succeeded.
    SUCCEEDED = 3
  end

  # An enum for answer skipped reasons.
  module AnswerSkippedReason
    # Default value. The answer skipped reason is not specified.
    ANSWER_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-answer seeking query ignored case.
    NON_ANSWER_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the answer if there are no high-relevance search results.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the answer if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4
  end
end