Class: AWSCDK::Kendra::CfnIndex::ValueImportanceItemProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_index.rb

Overview

Specifies a key-value pair of the search boost value for a document when the key is part of the metadata of a document.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key: nil, value: nil) ⇒ ValueImportanceItemProperty

Returns a new instance of ValueImportanceItemProperty.

Parameters:

  • key (String, nil) (defaults to: nil)

    The document metadata value used for the search boost.

  • value (Numeric, nil) (defaults to: nil)

    The boost value for a document when the key is part of the metadata of a document.



1173
1174
1175
1176
1177
1178
# File 'kendra/cfn_index.rb', line 1173

def initialize(key: nil, value: nil)
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") unless @key.nil?
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#keyString? (readonly)

The document metadata value used for the search boost.



1184
1185
1186
# File 'kendra/cfn_index.rb', line 1184

def key
  @key
end

#valueNumeric? (readonly)

The boost value for a document when the key is part of the metadata of a document.



1189
1190
1191
# File 'kendra/cfn_index.rb', line 1189

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1191
1192
1193
1194
1195
1196
# File 'kendra/cfn_index.rb', line 1191

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1198
1199
1200
1201
1202
1203
1204
1205
# File 'kendra/cfn_index.rb', line 1198

def to_jsii
  result = {}
  result.merge!({
    "key" => @key,
    "value" => @value,
  })
  result.compact
end