Class: Google::Apis::CloudsearchV1::QueryInterpretation

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/google/apis/cloudsearch_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QueryInterpretation

Returns a new instance of QueryInterpretation.



3269
3270
3271
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3269

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

Instance Attribute Details

#interpretation_typeString

Corresponds to the JSON property interpretationType

Returns:

  • (String)


3253
3254
3255
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3253

def interpretation_type
  @interpretation_type
end

#interpreted_queryString

The interpretation of the query used in search. For example, queries with natural language intent like "email from john" will be interpreted as "from:john source:mail". This field will not be filled when the reason is NOT_ENOUGH_RESULTS_FOUND_FOR_USER_QUERY. Corresponds to the JSON property interpretedQuery

Returns:

  • (String)


3261
3262
3263
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3261

def interpreted_query
  @interpreted_query
end

#reasonString

The reason for interpretation of the query. This field will not be UNSPECIFIED if the interpretation type is not NONE. Corresponds to the JSON property reason

Returns:

  • (String)


3267
3268
3269
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3267

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3274
3275
3276
3277
3278
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3274

def update!(**args)
  @interpretation_type = args[:interpretation_type] if args.key?(:interpretation_type)
  @interpreted_query = args[:interpreted_query] if args.key?(:interpreted_query)
  @reason = args[:reason] if args.key?(:reason)
end