Class: Google::Apis::KgsearchV1::SearchResponse

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

Overview

Response message includes the context and a list of matching results which contain the detail of associated entities.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SearchResponse

Returns a new instance of SearchResponse.


46
47
48
# File 'generated/google/apis/kgsearch_v1/classes.rb', line 46

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

Instance Attribute Details

#contextObject

The local context applicable for the response. See more details at http://www. w3.org/TR/json-ld/#context-definitions. Corresponds to the JSON property context

Returns:

  • (Object)

34
35
36
# File 'generated/google/apis/kgsearch_v1/classes.rb', line 34

def context
  @context
end

#item_list_elementArray<Object>

The item list of search results. Corresponds to the JSON property itemListElement

Returns:

  • (Array<Object>)

44
45
46
# File 'generated/google/apis/kgsearch_v1/classes.rb', line 44

def item_list_element
  @item_list_element
end

#typeObject

The schema type of top-level JSON-LD object, e.g. ItemList. Corresponds to the JSON property type

Returns:

  • (Object)

39
40
41
# File 'generated/google/apis/kgsearch_v1/classes.rb', line 39

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


51
52
53
54
55
# File 'generated/google/apis/kgsearch_v1/classes.rb', line 51

def update!(**args)
  @context = args[:context] if args.key?(:context)
  @type = args[:type] if args.key?(:type)
  @item_list_element = args[:item_list_element] if args.key?(:item_list_element)
end