Class: Google::Apis::CloudsearchV1::PropertyDefinition

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

Overview

The definition of a property within an object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PropertyDefinition

Returns a new instance of PropertyDefinition.



3809
3810
3811
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3809

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

Instance Attribute Details

#boolean_property_optionsGoogle::Apis::CloudsearchV1::BooleanPropertyOptions

The options for boolean properties. Corresponds to the JSON property booleanPropertyOptions



3689
3690
3691
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3689

def boolean_property_options
  @boolean_property_options
end

#date_property_optionsGoogle::Apis::CloudsearchV1::DatePropertyOptions

The options for date properties. Corresponds to the JSON property datePropertyOptions



3694
3695
3696
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3694

def date_property_options
  @date_property_options
end

#display_optionsGoogle::Apis::CloudsearchV1::PropertyDisplayOptions

The display options for a property. Corresponds to the JSON property displayOptions



3699
3700
3701
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3699

def display_options
  @display_options
end

#double_property_optionsGoogle::Apis::CloudsearchV1::DoublePropertyOptions

The options for double properties. Corresponds to the JSON property doublePropertyOptions



3704
3705
3706
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3704

def double_property_options
  @double_property_options
end

#enum_property_optionsGoogle::Apis::CloudsearchV1::EnumPropertyOptions

The options for enum properties, which allow you to define a restricted set of strings to match user queries, set rankings for those string values, and define an operator name to be paired with those strings so that users can narrow results to only items with a specific value. For example, for items in a request tracking system with priority information, you could define p0 as an allowable enum value and tie this enum to the operator name priority so that search users could add priority:p0 to their query to restrict the set of results to only those items indexed with the value p0. Corresponds to the JSON property enumPropertyOptions



3716
3717
3718
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3716

def enum_property_options
  @enum_property_options
end

#html_property_optionsGoogle::Apis::CloudsearchV1::HtmlPropertyOptions

The options for html properties. Corresponds to the JSON property htmlPropertyOptions



3721
3722
3723
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3721

def html_property_options
  @html_property_options
end

#integer_property_optionsGoogle::Apis::CloudsearchV1::IntegerPropertyOptions

The options for integer properties. Corresponds to the JSON property integerPropertyOptions



3726
3727
3728
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3726

def integer_property_options
  @integer_property_options
end

#is_facetableBoolean Also known as: is_facetable?

Indicates that the property can be used for generating facets. Cannot be true for properties whose type is object. IsReturnable must be true to set this option. Only supported for boolean, enum, and text properties. Corresponds to the JSON property isFacetable

Returns:

  • (Boolean)


3733
3734
3735
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3733

def is_facetable
  @is_facetable
end

#is_repeatableBoolean Also known as: is_repeatable?

Indicates that multiple values are allowed for the property. For example, a document only has one description but can have multiple comments. Cannot be true for properties whose type is a boolean. If set to false, properties that contain more than one value cause the indexing request for that item to be rejected. Corresponds to the JSON property isRepeatable

Returns:

  • (Boolean)


3743
3744
3745
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3743

def is_repeatable
  @is_repeatable
end

#is_returnableBoolean Also known as: is_returnable?

Indicates that the property identifies data that should be returned in search results via the Query API. If set to true, indicates that Query API users can use matching property fields in results. However, storing fields requires more space allocation and uses more bandwidth for search queries, which impacts performance over large datasets. Set to true here only if the field is needed for search results. Cannot be true for properties whose type is an object. Corresponds to the JSON property isReturnable

Returns:

  • (Boolean)


3755
3756
3757
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3755

def is_returnable
  @is_returnable
end

#is_sortableBoolean Also known as: is_sortable?

Indicates that the property can be used for sorting. Cannot be true for properties that are repeatable. Cannot be true for properties whose type is object. IsReturnable must be true to set this option. Only supported for boolean, date, double, integer, and timestamp properties. Corresponds to the JSON property isSortable

Returns:

  • (Boolean)


3764
3765
3766
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3764

def is_sortable
  @is_sortable
end

#is_suggestableBoolean Also known as: is_suggestable?

Indicates that the property can be used for generating query suggestions. Corresponds to the JSON property isSuggestable

Returns:

  • (Boolean)


3770
3771
3772
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3770

def is_suggestable
  @is_suggestable
end

#is_wildcard_searchableBoolean Also known as: is_wildcard_searchable?

Indicates that users can perform wildcard search for this property. Only supported for Text properties. IsReturnable must be true to set this option. In a given datasource maximum of 5 properties can be marked as is_wildcard_searchable. Corresponds to the JSON property isWildcardSearchable

Returns:

  • (Boolean)


3779
3780
3781
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3779

def is_wildcard_searchable
  @is_wildcard_searchable
end

#nameString

The name of the property. Item indexing requests sent to the Indexing API should set the property name equal to this value. For example, if name is * subject_line*, then indexing requests for document items with subject fields should set the name for that field equal to subject_line. Use the name as the identifier for the object property. Once registered as a property for an object, you cannot re-use this name for another property within that object. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The maximum length is 256 characters. Corresponds to the JSON property name

Returns:

  • (String)


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

def name
  @name
end

#object_property_optionsGoogle::Apis::CloudsearchV1::ObjectPropertyOptions

The options for object properties. Corresponds to the JSON property objectPropertyOptions



3797
3798
3799
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3797

def object_property_options
  @object_property_options
end

#text_property_optionsGoogle::Apis::CloudsearchV1::TextPropertyOptions

The options for text properties. Corresponds to the JSON property textPropertyOptions



3802
3803
3804
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3802

def text_property_options
  @text_property_options
end

#timestamp_property_optionsGoogle::Apis::CloudsearchV1::TimestampPropertyOptions

The options for timestamp properties. Corresponds to the JSON property timestampPropertyOptions



3807
3808
3809
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3807

def timestamp_property_options
  @timestamp_property_options
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3814

def update!(**args)
  @boolean_property_options = args[:boolean_property_options] if args.key?(:boolean_property_options)
  @date_property_options = args[:date_property_options] if args.key?(:date_property_options)
  @display_options = args[:display_options] if args.key?(:display_options)
  @double_property_options = args[:double_property_options] if args.key?(:double_property_options)
  @enum_property_options = args[:enum_property_options] if args.key?(:enum_property_options)
  @html_property_options = args[:html_property_options] if args.key?(:html_property_options)
  @integer_property_options = args[:integer_property_options] if args.key?(:integer_property_options)
  @is_facetable = args[:is_facetable] if args.key?(:is_facetable)
  @is_repeatable = args[:is_repeatable] if args.key?(:is_repeatable)
  @is_returnable = args[:is_returnable] if args.key?(:is_returnable)
  @is_sortable = args[:is_sortable] if args.key?(:is_sortable)
  @is_suggestable = args[:is_suggestable] if args.key?(:is_suggestable)
  @is_wildcard_searchable = args[:is_wildcard_searchable] if args.key?(:is_wildcard_searchable)
  @name = args[:name] if args.key?(:name)
  @object_property_options = args[:object_property_options] if args.key?(:object_property_options)
  @text_property_options = args[:text_property_options] if args.key?(:text_property_options)
  @timestamp_property_options = args[:timestamp_property_options] if args.key?(:timestamp_property_options)
end