Class: AWSCDK::Lex::CfnBot::OpensearchConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Contains details about the configuration of the Amazon OpenSearch Service database used for the AMAZON.QnAIntent .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(domain_endpoint: nil, exact_response: nil, exact_response_fields: nil, include_fields: nil, index_name: nil) ⇒ OpensearchConfigurationProperty

Returns a new instance of OpensearchConfigurationProperty.

Parameters:

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

    The endpoint of the Amazon OpenSearch Service domain.

  • exact_response (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether to return an exact response or to return an answer generated by the model using the fields you specify from the database.

  • exact_response_fields (AWSCDK::IResolvable, AWSCDK::Lex::CfnBot::ExactResponseFieldsProperty, nil) (defaults to: nil)

    Contains the names of the fields used for an exact response to the user.

  • include_fields (Array<String>, nil) (defaults to: nil)

    Contains a list of fields from the Amazon OpenSearch Service that the model can use to generate the answer to the query.

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

    The name of the Amazon OpenSearch Service index.



4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
# File 'lex/cfn_bot.rb', line 4107

def initialize(domain_endpoint: nil, exact_response: nil, exact_response_fields: nil, include_fields: nil, index_name: nil)
  @domain_endpoint = domain_endpoint
  Jsii::Type.check_type(@domain_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainEndpoint") unless @domain_endpoint.nil?
  @exact_response = exact_response
  Jsii::Type.check_type(@exact_response, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "exactResponse") unless @exact_response.nil?
  @exact_response_fields = exact_response_fields.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::ExactResponseFieldsProperty.new(**exact_response_fields.transform_keys(&:to_sym)) : exact_response_fields
  Jsii::Type.check_type(@exact_response_fields, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkV4YWN0UmVzcG9uc2VGaWVsZHNQcm9wZXJ0eSJ9XX19")), "exactResponseFields") unless @exact_response_fields.nil?
  @include_fields = include_fields
  Jsii::Type.check_type(@include_fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includeFields") unless @include_fields.nil?
  @index_name = index_name
  Jsii::Type.check_type(@index_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexName") unless @index_name.nil?
end

Instance Attribute Details

#domain_endpointString? (readonly)

The endpoint of the Amazon OpenSearch Service domain.



4124
4125
4126
# File 'lex/cfn_bot.rb', line 4124

def domain_endpoint
  @domain_endpoint
end

#exact_responseBoolean, ... (readonly)

Specifies whether to return an exact response or to return an answer generated by the model using the fields you specify from the database.



4129
4130
4131
# File 'lex/cfn_bot.rb', line 4129

def exact_response
  @exact_response
end

#exact_response_fieldsAWSCDK::IResolvable, ... (readonly)

Contains the names of the fields used for an exact response to the user.



4134
4135
4136
# File 'lex/cfn_bot.rb', line 4134

def exact_response_fields
  @exact_response_fields
end

#include_fieldsArray<String>? (readonly)

Contains a list of fields from the Amazon OpenSearch Service that the model can use to generate the answer to the query.



4139
4140
4141
# File 'lex/cfn_bot.rb', line 4139

def include_fields
  @include_fields
end

#index_nameString? (readonly)

The name of the Amazon OpenSearch Service index.



4144
4145
4146
# File 'lex/cfn_bot.rb', line 4144

def index_name
  @index_name
end

Class Method Details

.jsii_propertiesObject



4146
4147
4148
4149
4150
4151
4152
4153
4154
# File 'lex/cfn_bot.rb', line 4146

def self.jsii_properties
  {
    :domain_endpoint => "domainEndpoint",
    :exact_response => "exactResponse",
    :exact_response_fields => "exactResponseFields",
    :include_fields => "includeFields",
    :index_name => "indexName",
  }
end

Instance Method Details

#to_jsiiObject



4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
# File 'lex/cfn_bot.rb', line 4156

def to_jsii
  result = {}
  result.merge!({
    "domainEndpoint" => @domain_endpoint,
    "exactResponse" => @exact_response,
    "exactResponseFields" => @exact_response_fields,
    "includeFields" => @include_fields,
    "indexName" => @index_name,
  })
  result.compact
end