Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

A specification for configuring snippets in a search response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec

Returns a new instance of GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec.



3803
3804
3805
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3803

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_snippet_countFixnum

[DEPRECATED] This field is deprecated. To control snippet return, use return_snippet field. For backwards compatibility, we will return snippet if max_snippet_count > 0. Corresponds to the JSON property maxSnippetCount

Returns:

  • (Fixnum)


3787
3788
3789
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3787

def max_snippet_count
  @max_snippet_count
end

#reference_onlyBoolean Also known as: reference_only?

[DEPRECATED] This field is deprecated and will have no affect on the snippet. Corresponds to the JSON property referenceOnly

Returns:

  • (Boolean)


3792
3793
3794
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3792

def reference_only
  @reference_only
end

#return_snippetBoolean Also known as: return_snippet?

If true, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A snippet_status with SUCCESS or NO_SNIPPET_AVAILABLE will also be returned. Corresponds to the JSON property returnSnippet

Returns:

  • (Boolean)


3800
3801
3802
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3800

def return_snippet
  @return_snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3808
3809
3810
3811
3812
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3808

def update!(**args)
  @max_snippet_count = args[:max_snippet_count] if args.key?(:max_snippet_count)
  @reference_only = args[:reference_only] if args.key?(:reference_only)
  @return_snippet = args[:return_snippet] if args.key?(:return_snippet)
end