Class: Inttegro::Search::Request
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::Search::Request
- Defined in:
- lib/inttegro/search/request.rb
Overview
A resource-local search request. Send text, at least one filter, or both. Field names are
unqualified and depend on the endpoint. The application and resource type are derived by
Inttegro and cannot be supplied by the caller. To continue a search, repeat the same request
and add the returned next_cursor.
This generated model is immutable. Construct it with .new, or decode a string-keyed API
payload with .from_hash. #serialize produces a string-keyed hash using the original wire
field names and serialized enum values.
Instance Attribute Summary collapse
-
#cursor ⇒ String?
readonly
Opaque continuation value returned as
next_cursorby the preceding page. -
#facets ⇒ Array<Inttegro::Search::Facet>?
readonly
Value of the
facetsfield in the Inttegro API payload. -
#filters ⇒ Array<Inttegro::Search::Filter>?
readonly
Value of the
filtersfield in the Inttegro API payload. -
#page_size ⇒ Integer?
readonly
Value of the
page_sizefield in the Inttegro API payload. -
#sort ⇒ Inttegro::Search::Sort?
readonly
Value of the
sortfield in the Inttegro API payload. -
#text ⇒ String?
readonly
Words, identifiers, or names to search for.
Instance Attribute Details
#cursor ⇒ String? (readonly)
Opaque continuation value returned as next_cursor by the preceding page.
Optional in the API payload; omitted values default to nil. Wire name: cursor.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |
#facets ⇒ Array<Inttegro::Search::Facet>? (readonly)
Value of the facets field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: facets.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |
#filters ⇒ Array<Inttegro::Search::Filter>? (readonly)
Value of the filters field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: filters.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |
#page_size ⇒ Integer? (readonly)
Value of the page_size field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: page_size.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |
#sort ⇒ Inttegro::Search::Sort? (readonly)
Value of the sort field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: sort.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |
#text ⇒ String? (readonly)
Words, identifiers, or names to search for.
Optional in the API payload; omitted values default to nil. Wire name: text.
59 60 61 62 63 64 65 66 |
# File 'lib/inttegro/search/request.rb', line 59 class Request < T::Struct const :text, T.nilable(String), default: nil const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil const :sort, T.nilable(Inttegro::Search::Sort), default: nil const :page_size, T.nilable(Integer), default: nil const :cursor, T.nilable(String), default: nil end |