Class: AWSCDK::OpenSearchServerless::CfnIndex::PropertyMappingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpenSearchServerless::CfnIndex::PropertyMappingProperty
- Defined in:
- open_search_serverless/cfn_index.rb
Overview
Property mappings for the OpenSearch Serverless index.
Instance Attribute Summary collapse
-
#dimension ⇒ Numeric?
readonly
Dimension size for vector fields, defines the number of dimensions in the vector.
-
#index ⇒ Boolean, ...
readonly
Whether a field should be indexed.
-
#method ⇒ AWSCDK::IResolvable, ...
readonly
Configuration for k-NN search method.
-
#properties ⇒ AWSCDK::IResolvable, ...
readonly
Defines the fields within the mapping, including their types and configurations.
-
#type ⇒ String
readonly
The field data type.
-
#value ⇒ String?
readonly
Default value for the field when not specified in a document.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, dimension: nil, index: nil, method: nil, properties: nil, value: nil) ⇒ PropertyMappingProperty
constructor
A new instance of PropertyMappingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, dimension: nil, index: nil, method: nil, properties: nil, value: nil) ⇒ PropertyMappingProperty
Returns a new instance of PropertyMappingProperty.
773 774 775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'open_search_serverless/cfn_index.rb', line 773 def initialize(type:, dimension: nil, index: nil, method: nil, properties: nil, value: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @dimension = dimension Jsii::Type.check_type(@dimension, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "dimension") unless @dimension.nil? @index = index Jsii::Type.check_type(@index, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "index") unless @index.nil? @method = method.is_a?(Hash) ? ::AWSCDK::OpenSearchServerless::CfnIndex::MethodProperty.new(**method.transform_keys(&:to_sym)) : method Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcGVuc2VhcmNoc2VydmVybGVzcy5DZm5JbmRleC5NZXRob2RQcm9wZXJ0eSJ9XX19")), "method") unless @method.nil? @properties = properties Jsii::Type.check_type(@properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfb3BlbnNlYXJjaHNlcnZlcmxlc3MuQ2ZuSW5kZXguUHJvcGVydHlNYXBwaW5nUHJvcGVydHkifV19fSwia2luZCI6Im1hcCJ9fV19fQ==")), "properties") unless @properties.nil? @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil? end |
Instance Attribute Details
#dimension ⇒ Numeric? (readonly)
Dimension size for vector fields, defines the number of dimensions in the vector.
799 800 801 |
# File 'open_search_serverless/cfn_index.rb', line 799 def dimension @dimension end |
#index ⇒ Boolean, ... (readonly)
Whether a field should be indexed.
804 805 806 |
# File 'open_search_serverless/cfn_index.rb', line 804 def index @index end |
#method ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration for k-NN search method.
809 810 811 |
# File 'open_search_serverless/cfn_index.rb', line 809 def method @method end |
#properties ⇒ AWSCDK::IResolvable, ... (readonly)
Defines the fields within the mapping, including their types and configurations.
814 815 816 |
# File 'open_search_serverless/cfn_index.rb', line 814 def properties @properties end |
#type ⇒ String (readonly)
The field data type.
Must be a valid OpenSearch field type.
794 795 796 |
# File 'open_search_serverless/cfn_index.rb', line 794 def type @type end |
#value ⇒ String? (readonly)
Default value for the field when not specified in a document.
819 820 821 |
# File 'open_search_serverless/cfn_index.rb', line 819 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
821 822 823 824 825 826 827 828 829 830 |
# File 'open_search_serverless/cfn_index.rb', line 821 def self.jsii_properties { :type => "type", :dimension => "dimension", :index => "index", :method => "method", :properties => "properties", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'open_search_serverless/cfn_index.rb', line 832 def to_jsii result = {} result.merge!({ "type" => @type, "dimension" => @dimension, "index" => @index, "method" => @method, "properties" => @properties, "value" => @value, }) result.compact end |