Class: AWSCDK::Kendra::CfnDataSource::SalesforceStandardObjectConfigurationProperty

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

Overview

Specifies configuration information for indexing a single standard object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document_data_field_name:, name:, document_title_field_name: nil, field_mappings: nil) ⇒ SalesforceStandardObjectConfigurationProperty

Returns a new instance of SalesforceStandardObjectConfigurationProperty.

Parameters:

  • document_data_field_name (String)

    The name of the field in the standard object table that contains the document contents.

  • name (String)

    The name of the standard object.

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

    The name of the field in the standard object table that contains the document title.

  • field_mappings (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::DataSourceToIndexFieldMappingProperty>, nil) (defaults to: nil)

    Maps attributes or field names of the standard object to Amazon Kendra index field names.



3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
# File 'kendra/cfn_data_source.rb', line 3116

def initialize(document_data_field_name:, name:, document_title_field_name: nil, field_mappings: nil)
  @document_data_field_name = document_data_field_name
  Jsii::Type.check_type(@document_data_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentDataFieldName")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @document_title_field_name = document_title_field_name
  Jsii::Type.check_type(@document_title_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentTitleFieldName") unless @document_title_field_name.nil?
  @field_mappings = field_mappings
  Jsii::Type.check_type(@field_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2VuZHJhLkNmbkRhdGFTb3VyY2UuRGF0YVNvdXJjZVRvSW5kZXhGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldMappings") unless @field_mappings.nil?
end

Instance Attribute Details

#document_data_field_nameString (readonly)

The name of the field in the standard object table that contains the document contents.



3131
3132
3133
# File 'kendra/cfn_data_source.rb', line 3131

def document_data_field_name
  @document_data_field_name
end

#document_title_field_nameString? (readonly)

The name of the field in the standard object table that contains the document title.



3141
3142
3143
# File 'kendra/cfn_data_source.rb', line 3141

def document_title_field_name
  @document_title_field_name
end

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

Maps attributes or field names of the standard object to Amazon Kendra index field names.

To create custom fields, use the UpdateIndex API before you map to Salesforce fields. For more information, see Mapping data source fields . The Salesforce data source field names must exist in your Salesforce custom metadata.



3148
3149
3150
# File 'kendra/cfn_data_source.rb', line 3148

def field_mappings
  @field_mappings
end

#nameString (readonly)

The name of the standard object.



3136
3137
3138
# File 'kendra/cfn_data_source.rb', line 3136

def name
  @name
end

Class Method Details

.jsii_propertiesObject



3150
3151
3152
3153
3154
3155
3156
3157
# File 'kendra/cfn_data_source.rb', line 3150

def self.jsii_properties
  {
    :document_data_field_name => "documentDataFieldName",
    :name => "name",
    :document_title_field_name => "documentTitleFieldName",
    :field_mappings => "fieldMappings",
  }
end

Instance Method Details

#to_jsiiObject



3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
# File 'kendra/cfn_data_source.rb', line 3159

def to_jsii
  result = {}
  result.merge!({
    "documentDataFieldName" => @document_data_field_name,
    "name" => @name,
    "documentTitleFieldName" => @document_title_field_name,
    "fieldMappings" => @field_mappings,
  })
  result.compact
end