Class: Google::Apis::CloudsearchV1::FilterOptions

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

Overview

Filter options to be applied on query.

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) ⇒ FilterOptions

Returns a new instance of FilterOptions



1165
1166
1167
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1165

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

Instance Attribute Details

#filterGoogle::Apis::CloudsearchV1::Filter

A generic way of expressing filters in a query, which supports two approaches:

1. Setting a ValueFilter. The name must match an operator_name defined in the schema for your data source.
2. Setting a CompositeFilter. The filters are evaluated using the logical operator. The top-level operators can only be either an AND or a NOT. AND can appear only at the top-most level. OR can appear only under a top-level AND. Corresponds to the JSON property filter



1156
1157
1158
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1156

def filter
  @filter
end

#object_typeString

If object_type is set, only objects of that type are returned. This should correspond to the name of the object that was registered within the definition of schema. The maximum length is 256 characters. Corresponds to the JSON property objectType

Returns:

  • (String)


1163
1164
1165
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1163

def object_type
  @object_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1170
1171
1172
1173
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1170

def update!(**args)
  @filter = args[:filter] if args.key?(:filter)
  @object_type = args[:object_type] if args.key?(:object_type)
end