//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension Kendra {
    // MARK: Enums

    public enum AdditionalResultAttributeValueType: String, CustomStringConvertible, Codable {
        case textWithHighlightsValue = "TEXT_WITH_HIGHLIGHTS_VALUE"
        public var description: String { return self.rawValue }
    }

    public enum ConditionOperator: String, CustomStringConvertible, Codable {
        case beginsWith = "BeginsWith"
        case contains = "Contains"
        case equals = "Equals"
        case exists = "Exists"
        case greaterThan = "GreaterThan"
        case greaterThanOrEquals = "GreaterThanOrEquals"
        case lessThan = "LessThan"
        case lessThanOrEquals = "LessThanOrEquals"
        case notContains = "NotContains"
        case notEquals = "NotEquals"
        case notExists = "NotExists"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceAttachmentFieldName: String, CustomStringConvertible, Codable {
        case author = "AUTHOR"
        case contentType = "CONTENT_TYPE"
        case createdDate = "CREATED_DATE"
        case displayUrl = "DISPLAY_URL"
        case fileSize = "FILE_SIZE"
        case itemType = "ITEM_TYPE"
        case parentId = "PARENT_ID"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceBlogFieldName: String, CustomStringConvertible, Codable {
        case author = "AUTHOR"
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case labels = "LABELS"
        case publishDate = "PUBLISH_DATE"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluencePageFieldName: String, CustomStringConvertible, Codable {
        case author = "AUTHOR"
        case contentStatus = "CONTENT_STATUS"
        case createdDate = "CREATED_DATE"
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case labels = "LABELS"
        case modifiedDate = "MODIFIED_DATE"
        case parentId = "PARENT_ID"
        case spaceKey = "SPACE_KEY"
        case spaceName = "SPACE_NAME"
        case url = "URL"
        case version = "VERSION"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceSpaceFieldName: String, CustomStringConvertible, Codable {
        case displayUrl = "DISPLAY_URL"
        case itemType = "ITEM_TYPE"
        case spaceKey = "SPACE_KEY"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum ConfluenceVersion: String, CustomStringConvertible, Codable {
        case cloud = "CLOUD"
        case server = "SERVER"
        public var description: String { return self.rawValue }
    }

    public enum ContentType: String, CustomStringConvertible, Codable {
        case html = "HTML"
        case msWord = "MS_WORD"
        case pdf = "PDF"
        case plainText = "PLAIN_TEXT"
        case ppt = "PPT"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceSyncJobStatus: String, CustomStringConvertible, Codable {
        case aborted = "ABORTED"
        case failed = "FAILED"
        case incomplete = "INCOMPLETE"
        case stopping = "STOPPING"
        case succeeded = "SUCCEEDED"
        case syncing = "SYNCING"
        case syncingIndexing = "SYNCING_INDEXING"
        public var description: String { return self.rawValue }
    }

    public enum DataSourceType: String, CustomStringConvertible, Codable {
        case confluence = "CONFLUENCE"
        case custom = "CUSTOM"
        case database = "DATABASE"
        case googledrive = "GOOGLEDRIVE"
        case onedrive = "ONEDRIVE"
        case s3 = "S3"
        case salesforce = "SALESFORCE"
        case servicenow = "SERVICENOW"
        case sharepoint = "SHAREPOINT"
        case webcrawler = "WEBCRAWLER"
        case workdocs = "WORKDOCS"
        public var description: String { return self.rawValue }
    }

    public enum DatabaseEngineType: String, CustomStringConvertible, Codable {
        case rdsAuroraMysql = "RDS_AURORA_MYSQL"
        case rdsAuroraPostgresql = "RDS_AURORA_POSTGRESQL"
        case rdsMysql = "RDS_MYSQL"
        case rdsPostgresql = "RDS_POSTGRESQL"
        public var description: String { return self.rawValue }
    }

    public enum DocumentAttributeValueType: String, CustomStringConvertible, Codable {
        case dateValue = "DATE_VALUE"
        case longValue = "LONG_VALUE"
        case stringListValue = "STRING_LIST_VALUE"
        case stringValue = "STRING_VALUE"
        public var description: String { return self.rawValue }
    }

    public enum DocumentStatus: String, CustomStringConvertible, Codable {
        case failed = "FAILED"
        case indexed = "INDEXED"
        case notFound = "NOT_FOUND"
        case processing = "PROCESSING"
        case updated = "UPDATED"
        case updateFailed = "UPDATE_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum EndpointType: String, CustomStringConvertible, Codable {
        case home = "HOME"
        public var description: String { return self.rawValue }
    }

    public enum EntityType: String, CustomStringConvertible, Codable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable {
        case internalError = "InternalError"
        case invalidRequest = "InvalidRequest"
        public var description: String { return self.rawValue }
    }

    public enum ExperienceStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum FaqFileFormat: String, CustomStringConvertible, Codable {
        case csv = "CSV"
        case csvWithHeader = "CSV_WITH_HEADER"
        case json = "JSON"
        public var description: String { return self.rawValue }
    }

    public enum FaqStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum HighlightType: String, CustomStringConvertible, Codable {
        case standard = "STANDARD"
        case thesaurusSynonym = "THESAURUS_SYNONYM"
        public var description: String { return self.rawValue }
    }

    public enum IndexEdition: String, CustomStringConvertible, Codable {
        case developerEdition = "DEVELOPER_EDITION"
        case enterpriseEdition = "ENTERPRISE_EDITION"
        public var description: String { return self.rawValue }
    }

    public enum IndexStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case systemUpdating = "SYSTEM_UPDATING"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum Interval: String, CustomStringConvertible, Codable {
        case oneMonthAgo = "ONE_MONTH_AGO"
        case oneWeekAgo = "ONE_WEEK_AGO"
        case thisMonth = "THIS_MONTH"
        case thisWeek = "THIS_WEEK"
        case twoMonthsAgo = "TWO_MONTHS_AGO"
        case twoWeeksAgo = "TWO_WEEKS_AGO"
        public var description: String { return self.rawValue }
    }

    public enum KeyLocation: String, CustomStringConvertible, Codable {
        case secretManager = "SECRET_MANAGER"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum MetricType: String, CustomStringConvertible, Codable {
        case aggQueryDocMetrics = "AGG_QUERY_DOC_METRICS"
        case docsByClickCount = "DOCS_BY_CLICK_COUNT"
        case queriesByCount = "QUERIES_BY_COUNT"
        case queriesByZeroClickRate = "QUERIES_BY_ZERO_CLICK_RATE"
        case queriesByZeroResultRate = "QUERIES_BY_ZERO_RESULT_RATE"
        case trendQueryDocMetrics = "TREND_QUERY_DOC_METRICS"
        public var description: String { return self.rawValue }
    }

    public enum Mode: String, CustomStringConvertible, Codable {
        case enabled = "ENABLED"
        case learnOnly = "LEARN_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum Order: String, CustomStringConvertible, Codable {
        case ascending = "ASCENDING"
        case descending = "DESCENDING"
        public var description: String { return self.rawValue }
    }

    public enum Persona: String, CustomStringConvertible, Codable {
        case owner = "OWNER"
        case viewer = "VIEWER"
        public var description: String { return self.rawValue }
    }

    public enum PrincipalMappingStatus: String, CustomStringConvertible, Codable {
        case deleted = "DELETED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case processing = "PROCESSING"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum PrincipalType: String, CustomStringConvertible, Codable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum QueryIdentifiersEnclosingOption: String, CustomStringConvertible, Codable {
        case doubleQuotes = "DOUBLE_QUOTES"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum QueryResultType: String, CustomStringConvertible, Codable {
        case answer = "ANSWER"
        case document = "DOCUMENT"
        case questionAnswer = "QUESTION_ANSWER"
        public var description: String { return self.rawValue }
    }

    public enum QuerySuggestionsBlockListStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case activeButUpdateFailed = "ACTIVE_BUT_UPDATE_FAILED"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum QuerySuggestionsStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum ReadAccessType: String, CustomStringConvertible, Codable {
        case allow = "ALLOW"
        case deny = "DENY"
        public var description: String { return self.rawValue }
    }

    public enum RelevanceType: String, CustomStringConvertible, Codable {
        case notRelevant = "NOT_RELEVANT"
        case relevant = "RELEVANT"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceChatterFeedIncludeFilterType: String, CustomStringConvertible, Codable {
        case activeUser = "ACTIVE_USER"
        case standardUser = "STANDARD_USER"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceKnowledgeArticleState: String, CustomStringConvertible, Codable {
        case archived = "ARCHIVED"
        case draft = "DRAFT"
        case published = "PUBLISHED"
        public var description: String { return self.rawValue }
    }

    public enum SalesforceStandardObjectName: String, CustomStringConvertible, Codable {
        case account = "ACCOUNT"
        case campaign = "CAMPAIGN"
        case `case` = "CASE"
        case contact = "CONTACT"
        case contract = "CONTRACT"
        case document = "DOCUMENT"
        case group = "GROUP"
        case idea = "IDEA"
        case lead = "LEAD"
        case opportunity = "OPPORTUNITY"
        case partner = "PARTNER"
        case pricebook = "PRICEBOOK"
        case product = "PRODUCT"
        case profile = "PROFILE"
        case solution = "SOLUTION"
        case task = "TASK"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ScoreConfidence: String, CustomStringConvertible, Codable {
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        case notAvailable = "NOT_AVAILABLE"
        case veryHigh = "VERY_HIGH"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNowAuthenticationType: String, CustomStringConvertible, Codable {
        case httpBasic = "HTTP_BASIC"
        case oauth2 = "OAUTH2"
        public var description: String { return self.rawValue }
    }

    public enum ServiceNowBuildVersionType: String, CustomStringConvertible, Codable {
        case london = "LONDON"
        case others = "OTHERS"
        public var description: String { return self.rawValue }
    }

    public enum SharePointVersion: String, CustomStringConvertible, Codable {
        case sharepoint2013 = "SHAREPOINT_2013"
        case sharepoint2016 = "SHAREPOINT_2016"
        case sharepointOnline = "SHAREPOINT_ONLINE"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable {
        case asc = "ASC"
        case desc = "DESC"
        public var description: String { return self.rawValue }
    }

    public enum ThesaurusStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case activeButUpdateFailed = "ACTIVE_BUT_UPDATE_FAILED"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum UserContextPolicy: String, CustomStringConvertible, Codable {
        case attributeFilter = "ATTRIBUTE_FILTER"
        case userToken = "USER_TOKEN"
        public var description: String { return self.rawValue }
    }

    public enum UserGroupResolutionMode: String, CustomStringConvertible, Codable {
        case awsSso = "AWS_SSO"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum WebCrawlerMode: String, CustomStringConvertible, Codable {
        case everything = "EVERYTHING"
        case hostOnly = "HOST_ONLY"
        case subdomains = "SUBDOMAINS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessControlListConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Path to the Amazon Web Services S3 bucket that contains the ACL files.
        public let keyPath: String?

        public init(keyPath: String? = nil) {
            self.keyPath = keyPath
        }

        public func validate(name: String) throws {
            try self.validate(self.keyPath, name: "keyPath", parent: name, max: 1024)
            try self.validate(self.keyPath, name: "keyPath", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case keyPath = "KeyPath"
        }
    }

    public struct AclConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query operation.
        public let allowedGroupsColumnName: String

        public init(allowedGroupsColumnName: String) {
            self.allowedGroupsColumnName = allowedGroupsColumnName
        }

        public func validate(name: String) throws {
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, max: 100)
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, min: 1)
            try self.validate(self.allowedGroupsColumnName, name: "allowedGroupsColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowedGroupsColumnName = "AllowedGroupsColumnName"
        }
    }

    public struct AdditionalResultAttribute: AWSDecodableShape {
        /// The key that identifies the attribute.
        public let key: String
        /// An object that contains the attribute value.
        public let value: AdditionalResultAttributeValue
        /// The data type of the Value property.
        public let valueType: AdditionalResultAttributeValueType

        public init(key: String, value: AdditionalResultAttributeValue, valueType: AdditionalResultAttributeValueType) {
            self.key = key
            self.value = value
            self.valueType = valueType
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
            case valueType = "ValueType"
        }
    }

    public struct AdditionalResultAttributeValue: AWSDecodableShape {
        /// The text associated with the attribute and information about the highlight to apply to the text.
        public let textWithHighlightsValue: TextWithHighlights?

        public init(textWithHighlightsValue: TextWithHighlights? = nil) {
            self.textWithHighlightsValue = textWithHighlightsValue
        }

        private enum CodingKeys: String, CodingKey {
            case textWithHighlightsValue = "TextWithHighlightsValue"
        }
    }

    public struct AssociateEntitiesToExperienceRequest: AWSEncodableShape {
        /// Lists users or groups in your Amazon Web Services SSO identity source.
        public let entityList: [EntityConfiguration]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        public init(entityList: [EntityConfiguration], id: String, indexId: String) {
            self.entityList = entityList
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityList.forEach {
                try $0.validate(name: "\(name).entityList[]")
            }
            try self.validate(self.entityList, name: "entityList", parent: name, max: 20)
            try self.validate(self.entityList, name: "entityList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityList = "EntityList"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct AssociateEntitiesToExperienceResponse: AWSDecodableShape {
        /// Lists the users or groups in your Amazon Web Services SSO identity source that  failed to properly configure with your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct AssociatePersonasToEntitiesRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The personas that define the specific permissions of users or groups in  your Amazon Web Services SSO identity source. The available personas or access  roles are Owner and Viewer. For more information  on these personas, see Providing  access to your search page.
        public let personas: [EntityPersonaConfiguration]

        public init(id: String, indexId: String, personas: [EntityPersonaConfiguration]) {
            self.id = id
            self.indexId = indexId
            self.personas = personas
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.personas.forEach {
                try $0.validate(name: "\(name).personas[]")
            }
            try self.validate(self.personas, name: "personas", parent: name, max: 25)
            try self.validate(self.personas, name: "personas", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case personas = "Personas"
        }
    }

    public struct AssociatePersonasToEntitiesResponse: AWSDecodableShape {
        /// Lists the users or groups in your Amazon Web Services SSO identity source that  failed to properly configure with your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public class AttributeFilter: AWSEncodableShape {
        /// Performs a logical AND operation on all supplied filters.
        public let andAllFilters: [AttributeFilter]?
        /// Returns true when a document contains all of the specified document attributes. This filter is only applicable to StringListValue metadata.
        public let containsAll: DocumentAttribute?
        /// Returns true when a document contains any of the specified document attributes. This filter is only applicable to StringListValue metadata.
        public let containsAny: DocumentAttribute?
        /// Performs an equals operation on two document attributes.
        public let equalsTo: DocumentAttribute?
        /// Performs a greater than operation on two document attributes. Use with a document attribute of type Date or Long.
        public let greaterThan: DocumentAttribute?
        /// Performs a greater or equals than operation on two document attributes. Use with a document attribute of type Date or Long.
        public let greaterThanOrEquals: DocumentAttribute?
        /// Performs a less than operation on two document attributes. Use with a document attribute of type Date or Long.
        public let lessThan: DocumentAttribute?
        /// Performs a less than or equals operation on two document attributes. Use with a document attribute of type Date or Long.
        public let lessThanOrEquals: DocumentAttribute?
        /// Performs a logical NOT operation on all supplied filters.
        public let notFilter: AttributeFilter?
        /// Performs a logical OR operation on all supplied filters.
        public let orAllFilters: [AttributeFilter]?

        public init(andAllFilters: [AttributeFilter]? = nil, containsAll: DocumentAttribute? = nil, containsAny: DocumentAttribute? = nil, equalsTo: DocumentAttribute? = nil, greaterThan: DocumentAttribute? = nil, greaterThanOrEquals: DocumentAttribute? = nil, lessThan: DocumentAttribute? = nil, lessThanOrEquals: DocumentAttribute? = nil, notFilter: AttributeFilter? = nil, orAllFilters: [AttributeFilter]? = nil) {
            self.andAllFilters = andAllFilters
            self.containsAll = containsAll
            self.containsAny = containsAny
            self.equalsTo = equalsTo
            self.greaterThan = greaterThan
            self.greaterThanOrEquals = greaterThanOrEquals
            self.lessThan = lessThan
            self.lessThanOrEquals = lessThanOrEquals
            self.notFilter = notFilter
            self.orAllFilters = orAllFilters
        }

        public func validate(name: String) throws {
            try self.andAllFilters?.forEach {
                try $0.validate(name: "\(name).andAllFilters[]")
            }
            try self.containsAll?.validate(name: "\(name).containsAll")
            try self.containsAny?.validate(name: "\(name).containsAny")
            try self.equalsTo?.validate(name: "\(name).equalsTo")
            try self.greaterThan?.validate(name: "\(name).greaterThan")
            try self.greaterThanOrEquals?.validate(name: "\(name).greaterThanOrEquals")
            try self.lessThan?.validate(name: "\(name).lessThan")
            try self.lessThanOrEquals?.validate(name: "\(name).lessThanOrEquals")
            try self.notFilter?.validate(name: "\(name).notFilter")
            try self.orAllFilters?.forEach {
                try $0.validate(name: "\(name).orAllFilters[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case andAllFilters = "AndAllFilters"
            case containsAll = "ContainsAll"
            case containsAny = "ContainsAny"
            case equalsTo = "EqualsTo"
            case greaterThan = "GreaterThan"
            case greaterThanOrEquals = "GreaterThanOrEquals"
            case lessThan = "LessThan"
            case lessThanOrEquals = "LessThanOrEquals"
            case notFilter = "NotFilter"
            case orAllFilters = "OrAllFilters"
        }
    }

    public struct AuthenticationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of configuration information that's required to connect to and  crawl a website host using basic authentication credentials. The list includes the name and port number of the website host.
        public let basicAuthentication: [BasicAuthenticationConfiguration]?

        public init(basicAuthentication: [BasicAuthenticationConfiguration]? = nil) {
            self.basicAuthentication = basicAuthentication
        }

        public func validate(name: String) throws {
            try self.basicAuthentication?.forEach {
                try $0.validate(name: "\(name).basicAuthentication[]")
            }
            try self.validate(self.basicAuthentication, name: "basicAuthentication", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case basicAuthentication = "BasicAuthentication"
        }
    }

    public struct BasicAuthenticationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Your secret ARN, which you can create in Secrets Manager  You use a secret if basic authentication credentials are required to connect  to a website. The secret stores your credentials of user name and password.
        public let credentials: String
        /// The name of the website host you want to connect to using  authentication credentials. For example, the host name of https://a.example.com/page1.html is  "a.example.com".
        public let host: String
        /// The port number of the website host you want to connect to using  authentication credentials. For example, the port for https://a.example.com/page1.html is 443,  the standard port for HTTPS.
        public let port: Int

        public init(credentials: String, host: String, port: Int) {
            self.credentials = credentials
            self.host = host
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.credentials, name: "credentials", parent: name, max: 1284)
            try self.validate(self.credentials, name: "credentials", parent: name, min: 1)
            try self.validate(self.credentials, name: "credentials", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.host, name: "host", parent: name, max: 253)
            try self.validate(self.host, name: "host", parent: name, min: 1)
            try self.validate(self.host, name: "host", parent: name, pattern: "^([^\\s]*)$")
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case host = "Host"
            case port = "Port"
        }
    }

    public struct BatchDeleteDocumentRequest: AWSEncodableShape {
        public let dataSourceSyncJobMetricTarget: DataSourceSyncJobMetricTarget?
        /// One or more identifiers for documents to delete from the index.
        public let documentIdList: [String]
        /// The identifier of the index that contains the documents to delete.
        public let indexId: String

        public init(dataSourceSyncJobMetricTarget: DataSourceSyncJobMetricTarget? = nil, documentIdList: [String], indexId: String) {
            self.dataSourceSyncJobMetricTarget = dataSourceSyncJobMetricTarget
            self.documentIdList = documentIdList
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.dataSourceSyncJobMetricTarget?.validate(name: "\(name).dataSourceSyncJobMetricTarget")
            try self.documentIdList.forEach {
                try validate($0, name: "documentIdList[]", parent: name, max: 2048)
                try validate($0, name: "documentIdList[]", parent: name, min: 1)
            }
            try self.validate(self.documentIdList, name: "documentIdList", parent: name, max: 10)
            try self.validate(self.documentIdList, name: "documentIdList", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceSyncJobMetricTarget = "DataSourceSyncJobMetricTarget"
            case documentIdList = "DocumentIdList"
            case indexId = "IndexId"
        }
    }

    public struct BatchDeleteDocumentResponse: AWSDecodableShape {
        /// A list of documents that could not be removed from the index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
        public let failedDocuments: [BatchDeleteDocumentResponseFailedDocument]?

        public init(failedDocuments: [BatchDeleteDocumentResponseFailedDocument]? = nil) {
            self.failedDocuments = failedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case failedDocuments = "FailedDocuments"
        }
    }

    public struct BatchDeleteDocumentResponseFailedDocument: AWSDecodableShape {
        /// The error code for why the document couldn't be removed from the index.
        public let errorCode: ErrorCode?
        /// An explanation for why the document couldn't be removed from the index.
        public let errorMessage: String?
        /// The identifier of the document that couldn't be removed from the index.
        public let id: String?

        public init(errorCode: ErrorCode? = nil, errorMessage: String? = nil, id: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case id = "Id"
        }
    }

    public struct BatchGetDocumentStatusRequest: AWSEncodableShape {
        /// A list of DocumentInfo objects that identify the documents for which to get the status. You identify the documents by their document ID and optional attributes.
        public let documentInfoList: [DocumentInfo]
        /// The identifier of the index to add documents to. The index ID is returned by the  CreateIndex operation.
        public let indexId: String

        public init(documentInfoList: [DocumentInfo], indexId: String) {
            self.documentInfoList = documentInfoList
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.documentInfoList.forEach {
                try $0.validate(name: "\(name).documentInfoList[]")
            }
            try self.validate(self.documentInfoList, name: "documentInfoList", parent: name, max: 10)
            try self.validate(self.documentInfoList, name: "documentInfoList", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentInfoList = "DocumentInfoList"
            case indexId = "IndexId"
        }
    }

    public struct BatchGetDocumentStatusResponse: AWSDecodableShape {
        /// The status of documents. The status indicates if the document is waiting to be indexed, is in the process of indexing, has completed indexing, or failed indexing. If a document failed indexing, the status provides the reason why.
        public let documentStatusList: [Status]?
        /// A list of documents that Amazon Kendra couldn't get the status for. The list includes the ID of the document and the reason that the status couldn't be found.
        public let errors: [BatchGetDocumentStatusResponseError]?

        public init(documentStatusList: [Status]? = nil, errors: [BatchGetDocumentStatusResponseError]? = nil) {
            self.documentStatusList = documentStatusList
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case documentStatusList = "DocumentStatusList"
            case errors = "Errors"
        }
    }

    public struct BatchGetDocumentStatusResponseError: AWSDecodableShape {
        /// The unique identifier of the document whose status could not be retrieved.
        public let documentId: String?
        /// Indicates the source of the error.
        public let errorCode: ErrorCode?
        /// States that the API could not get the status of a document. This could be  because the request is not valid or there is a system error.
        public let errorMessage: String?

        public init(documentId: String? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil) {
            self.documentId = documentId
            self.errorCode = errorCode
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case documentId = "DocumentId"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct BatchPutDocumentRequest: AWSEncodableShape {
        /// Configuration information for altering your document metadata and content during  the document ingestion process when you use the BatchPutDocument  operation. For more information on how to create, modify and delete document metadata,  or make other content alterations when you ingest documents into Amazon Kendra, see  Customizing  document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// One or more documents to add to the index. Documents can include custom attributes. For example,  'DataSourceId' and 'DataSourceSyncJobId' are custom  attributes that provide information on the synchronization  of documents running on a data source. Note,  'DataSourceSyncJobId' could be an optional custom attribute  as Amazon Kendra will use the ID of a running sync job. Documents have the following file size limits.   5 MB total size for inline documents   50 MB total size for files from an S3 bucket   5 MB extracted text for any file   For more information about file size and transaction per second quotas, see Quotas.
        public let documents: [Document]
        /// The identifier of the index to add the documents to. You need to create the index first using the CreateIndex operation.
        public let indexId: String
        /// The Amazon Resource Name (ARN) of a role that is allowed to run the BatchPutDocument operation. For more information, see IAM Roles for Amazon Kendra.
        public let roleArn: String?

        public init(customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, documents: [Document], indexId: String, roleArn: String? = nil) {
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.documents = documents
            self.indexId = indexId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.documents.forEach {
                try $0.validate(name: "\(name).documents[]")
            }
            try self.validate(self.documents, name: "documents", parent: name, max: 10)
            try self.validate(self.documents, name: "documents", parent: name, min: 1)
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case documents = "Documents"
            case indexId = "IndexId"
            case roleArn = "RoleArn"
        }
    }

    public struct BatchPutDocumentResponse: AWSDecodableShape {
        /// A list of documents that were not added to the index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index. If there was an error adding a document to an index the error is reported in your Amazon Web Services CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch Logs
        public let failedDocuments: [BatchPutDocumentResponseFailedDocument]?

        public init(failedDocuments: [BatchPutDocumentResponseFailedDocument]? = nil) {
            self.failedDocuments = failedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case failedDocuments = "FailedDocuments"
        }
    }

    public struct BatchPutDocumentResponseFailedDocument: AWSDecodableShape {
        /// The type of error that caused the document to fail to be indexed.
        public let errorCode: ErrorCode?
        /// A description of the reason why the document could not be indexed.
        public let errorMessage: String?
        /// The unique identifier of the document.
        public let id: String?

        public init(errorCode: ErrorCode? = nil, errorMessage: String? = nil, id: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case id = "Id"
        }
    }

    public struct CapacityUnitsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The amount of extra query capacity for an index and  GetQuerySuggestions  capacity. A single extra capacity unit for an index provides 0.1 queries per second or approximately  8,000 queries per day.  GetQuerySuggestions capacity is five times the  provisioned query capacity for an index, or the base capacity of 2.5 calls per second,  whichever is higher. For example, the base capacity for an index is 0.1 queries per  second, and GetQuerySuggestions capacity has a base of 2.5 calls per second.  If you add another 0.1 queries per second to total 0.2 queries per second for an index, the  GetQuerySuggestions capacity is 2.5 calls per second  (higher than five times 0.2 queries per second).
        public let queryCapacityUnits: Int
        /// The amount of extra storage capacity for an index.  A single capacity unit provides 30 GB of storage space or 100,000 documents,  whichever is reached first.
        public let storageCapacityUnits: Int

        public init(queryCapacityUnits: Int, storageCapacityUnits: Int) {
            self.queryCapacityUnits = queryCapacityUnits
            self.storageCapacityUnits = storageCapacityUnits
        }

        public func validate(name: String) throws {
            try self.validate(self.queryCapacityUnits, name: "queryCapacityUnits", parent: name, min: 0)
            try self.validate(self.storageCapacityUnits, name: "storageCapacityUnits", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case queryCapacityUnits = "QueryCapacityUnits"
            case storageCapacityUnits = "StorageCapacityUnits"
        }
    }

    public struct ClearQuerySuggestionsRequest: AWSEncodableShape {
        /// The identifier of the index you want to clear query suggestions from.
        public let indexId: String

        public init(indexId: String) {
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
        }
    }

    public struct ClickFeedback: AWSEncodableShape {
        /// The Unix timestamp of the date and time that the result was clicked.
        public let clickTime: Date
        /// The unique identifier of the search result that was clicked.
        public let resultId: String

        public init(clickTime: Date, resultId: String) {
            self.clickTime = clickTime
            self.resultId = resultId
        }

        public func validate(name: String) throws {
            try self.validate(self.resultId, name: "resultId", parent: name, max: 73)
            try self.validate(self.resultId, name: "resultId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clickTime = "ClickTime"
            case resultId = "ResultId"
        }
    }

    public struct ColumnConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// One to five columns that indicate when a document in the database has changed.
        public let changeDetectingColumns: [String]
        /// The column that contains the contents of the document.
        public let documentDataColumnName: String
        /// The column that provides the document's unique identifier.
        public let documentIdColumnName: String
        /// The column that contains the title of the document.
        public let documentTitleColumnName: String?
        /// An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex operation.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        public init(changeDetectingColumns: [String], documentDataColumnName: String, documentIdColumnName: String, documentTitleColumnName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.changeDetectingColumns = changeDetectingColumns
            self.documentDataColumnName = documentDataColumnName
            self.documentIdColumnName = documentIdColumnName
            self.documentTitleColumnName = documentTitleColumnName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.changeDetectingColumns.forEach {
                try validate($0, name: "changeDetectingColumns[]", parent: name, max: 100)
                try validate($0, name: "changeDetectingColumns[]", parent: name, min: 1)
                try validate($0, name: "changeDetectingColumns[]", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            }
            try self.validate(self.changeDetectingColumns, name: "changeDetectingColumns", parent: name, max: 5)
            try self.validate(self.changeDetectingColumns, name: "changeDetectingColumns", parent: name, min: 1)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, max: 100)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, min: 1)
            try self.validate(self.documentDataColumnName, name: "documentDataColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, max: 100)
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, min: 1)
            try self.validate(self.documentIdColumnName, name: "documentIdColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, max: 100)
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, min: 1)
            try self.validate(self.documentTitleColumnName, name: "documentTitleColumnName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case changeDetectingColumns = "ChangeDetectingColumns"
            case documentDataColumnName = "DocumentDataColumnName"
            case documentIdColumnName = "DocumentIdColumnName"
            case documentTitleColumnName = "DocumentTitleColumnName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct ConfluenceAttachmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Defines how attachment metadata fields should be mapped to index fields. Before you can map a field, you must first create an index field with a matching type using the console or the UpdateIndex operation. If you specify the AttachentFieldMappings parameter, you must specify at least one field mapping.
        public let attachmentFieldMappings: [ConfluenceAttachmentToIndexFieldMapping]?
        /// Indicates whether Amazon Kendra indexes attachments to the pages and blogs in the Confluence data source.
        public let crawlAttachments: Bool?

        public init(attachmentFieldMappings: [ConfluenceAttachmentToIndexFieldMapping]? = nil, crawlAttachments: Bool? = nil) {
            self.attachmentFieldMappings = attachmentFieldMappings
            self.crawlAttachments = crawlAttachments
        }

        public func validate(name: String) throws {
            try self.attachmentFieldMappings?.forEach {
                try $0.validate(name: "\(name).attachmentFieldMappings[]")
            }
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, max: 11)
            try self.validate(self.attachmentFieldMappings, name: "attachmentFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentFieldMappings = "AttachmentFieldMappings"
            case crawlAttachments = "CrawlAttachments"
        }
    }

    public struct ConfluenceAttachmentToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.  You must first create the index field using the UpdateIndex operation.
        public let dataSourceFieldName: ConfluenceAttachmentFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        public init(dataSourceFieldName: ConfluenceAttachmentFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceBlogConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Defines how blog metadata fields should be mapped to index fields. Before you can map a field, you must first create an index field with a matching type using the console or the UpdateIndex operation. If you specify the BlogFieldMappings parameter, you must specify at least one field mapping.
        public let blogFieldMappings: [ConfluenceBlogToIndexFieldMapping]?

        public init(blogFieldMappings: [ConfluenceBlogToIndexFieldMapping]? = nil) {
            self.blogFieldMappings = blogFieldMappings
        }

        public func validate(name: String) throws {
            try self.blogFieldMappings?.forEach {
                try $0.validate(name: "\(name).blogFieldMappings[]")
            }
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, max: 9)
            try self.validate(self.blogFieldMappings, name: "blogFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case blogFieldMappings = "BlogFieldMappings"
        }
    }

    public struct ConfluenceBlogToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluenceBlogFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        public init(dataSourceFieldName: ConfluenceBlogFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies configuration information for indexing attachments to Confluence blogs and pages.
        public let attachmentConfiguration: ConfluenceAttachmentConfiguration?
        ///  Specifies configuration information for indexing Confluence blogs.
        public let blogConfiguration: ConfluenceBlogConfiguration?
        /// A list of regular expression patterns that apply to a URL on the Confluence server. An exclusion pattern can apply to a blog post, a page, a space, or an attachment. Items that match the pattern are excluded from the index. Items that don't match the pattern are included in the index. If a item matches both an exclusion pattern and an inclusion pattern, the item isn't included in the index.
        public let exclusionPatterns: [String]?
        /// A list of regular expression patterns that apply to a URL on the Confluence server. An inclusion pattern can apply to a blog post, a page, a space, or an attachment. Items that match the patterns are included in the index. Items that don't match the pattern are excluded from the index. If an item matches both an inclusion pattern and an exclusion pattern, the item isn't included in the index.
        public let inclusionPatterns: [String]?
        /// Specifies configuration information for indexing Confluence pages.
        public let pageConfiguration: ConfluencePageConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key/value pairs required to connect to your Confluence server. The secret must contain a JSON structure with the following keys:   username - The user name or email address of a user with administrative privileges for the Confluence server.   password - The password associated with the user logging in to the Confluence server.
        public let secretArn: String
        /// The URL of your Confluence instance. Use the full URL of the server. For example, https://server.example.com:port/. You can also use an IP address, for example, https://192.168.1.113/.
        public let serverUrl: String
        /// Specifies configuration information for indexing Confluence spaces.
        public let spaceConfiguration: ConfluenceSpaceConfiguration?
        /// Specifies the version of the Confluence installation that you are connecting to.
        public let version: ConfluenceVersion
        /// Specifies the information for connecting to an Amazon VPC.
        public let vpcConfiguration: DataSourceVpcConfiguration?

        public init(attachmentConfiguration: ConfluenceAttachmentConfiguration? = nil, blogConfiguration: ConfluenceBlogConfiguration? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, pageConfiguration: ConfluencePageConfiguration? = nil, secretArn: String, serverUrl: String, spaceConfiguration: ConfluenceSpaceConfiguration? = nil, version: ConfluenceVersion, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.attachmentConfiguration = attachmentConfiguration
            self.blogConfiguration = blogConfiguration
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.pageConfiguration = pageConfiguration
            self.secretArn = secretArn
            self.serverUrl = serverUrl
            self.spaceConfiguration = spaceConfiguration
            self.version = version
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.attachmentConfiguration?.validate(name: "\(name).attachmentConfiguration")
            try self.blogConfiguration?.validate(name: "\(name).blogConfiguration")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.pageConfiguration?.validate(name: "\(name).pageConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, max: 2048)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, min: 1)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.spaceConfiguration?.validate(name: "\(name).spaceConfiguration")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case attachmentConfiguration = "AttachmentConfiguration"
            case blogConfiguration = "BlogConfiguration"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case pageConfiguration = "PageConfiguration"
            case secretArn = "SecretArn"
            case serverUrl = "ServerUrl"
            case spaceConfiguration = "SpaceConfiguration"
            case version = "Version"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct ConfluencePageConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Defines how page metadata fields should be mapped to index fields. Before you can map a field, you must first create an index field with a matching type using the console or the UpdateIndex operation. If you specify the PageFieldMappings parameter, you must specify at least one field mapping.
        public let pageFieldMappings: [ConfluencePageToIndexFieldMapping]?

        public init(pageFieldMappings: [ConfluencePageToIndexFieldMapping]? = nil) {
            self.pageFieldMappings = pageFieldMappings
        }

        public func validate(name: String) throws {
            try self.pageFieldMappings?.forEach {
                try $0.validate(name: "\(name).pageFieldMappings[]")
            }
            try self.validate(self.pageFieldMappings, name: "pageFieldMappings", parent: name, max: 12)
            try self.validate(self.pageFieldMappings, name: "pageFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pageFieldMappings = "PageFieldMappings"
        }
    }

    public struct ConfluencePageToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluencePageFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        public init(dataSourceFieldName: ConfluencePageFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConfluenceSpaceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether Amazon Kendra should index archived spaces.
        public let crawlArchivedSpaces: Bool?
        /// Specifies whether Amazon Kendra should index personal spaces. Users can add restrictions to items in personal spaces. If personal spaces are indexed, queries without user context information may return restricted items from a personal space in their results. For more information, see Filtering on user context.
        public let crawlPersonalSpaces: Bool?
        /// A list of space keys of Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are not indexed. If a space is in both the ExcludeSpaces and the IncludeSpaces list, the space is excluded.
        public let excludeSpaces: [String]?
        /// A list of space keys for Confluence spaces. If you include a key, the blogs, documents, and attachments in the space are indexed. Spaces that aren't in the list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra logs an error when the data source is synchronized. If a space is in both the IncludeSpaces and the ExcludeSpaces list, the space is excluded.
        public let includeSpaces: [String]?
        /// Defines how space metadata fields should be mapped to index fields. Before you can map a field, you must first create an index field with a matching type using the console or the UpdateIndex operation. If you specify the SpaceFieldMappings parameter, you must specify at least one field mapping.
        public let spaceFieldMappings: [ConfluenceSpaceToIndexFieldMapping]?

        public init(crawlArchivedSpaces: Bool? = nil, crawlPersonalSpaces: Bool? = nil, excludeSpaces: [String]? = nil, includeSpaces: [String]? = nil, spaceFieldMappings: [ConfluenceSpaceToIndexFieldMapping]? = nil) {
            self.crawlArchivedSpaces = crawlArchivedSpaces
            self.crawlPersonalSpaces = crawlPersonalSpaces
            self.excludeSpaces = excludeSpaces
            self.includeSpaces = includeSpaces
            self.spaceFieldMappings = spaceFieldMappings
        }

        public func validate(name: String) throws {
            try self.excludeSpaces?.forEach {
                try validate($0, name: "excludeSpaces[]", parent: name, max: 255)
                try validate($0, name: "excludeSpaces[]", parent: name, min: 1)
                try validate($0, name: "excludeSpaces[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeSpaces, name: "excludeSpaces", parent: name, min: 1)
            try self.includeSpaces?.forEach {
                try validate($0, name: "includeSpaces[]", parent: name, max: 255)
                try validate($0, name: "includeSpaces[]", parent: name, min: 1)
                try validate($0, name: "includeSpaces[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.includeSpaces, name: "includeSpaces", parent: name, min: 1)
            try self.spaceFieldMappings?.forEach {
                try $0.validate(name: "\(name).spaceFieldMappings[]")
            }
            try self.validate(self.spaceFieldMappings, name: "spaceFieldMappings", parent: name, max: 4)
            try self.validate(self.spaceFieldMappings, name: "spaceFieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlArchivedSpaces = "CrawlArchivedSpaces"
            case crawlPersonalSpaces = "CrawlPersonalSpaces"
            case excludeSpaces = "ExcludeSpaces"
            case includeSpaces = "IncludeSpaces"
            case spaceFieldMappings = "SpaceFieldMappings"
        }
    }

    public struct ConfluenceSpaceToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the data source.
        public let dataSourceFieldName: ConfluenceSpaceFieldName?
        /// The format for date fields in the data source. If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.
        public let dateFieldFormat: String?
        /// The name of the index field to map to the Confluence data source field. The index field type must match the Confluence field type.
        public let indexFieldName: String?

        public init(dataSourceFieldName: ConfluenceSpaceFieldName? = nil, dateFieldFormat: String? = nil, indexFieldName: String? = nil) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct ConnectionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
        public let databaseHost: String
        /// The name of the database containing the document data.
        public let databaseName: String
        /// The port that the database uses for connections.
        public let databasePort: Int
        /// The Amazon Resource Name (ARN) of credentials stored in Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Database Data Source. For more information about  Secrets Manager, see  What Is  Secrets Manager in the  Secrets Manager user guide.
        public let secretArn: String
        /// The name of the table that contains the document data.
        public let tableName: String

        public init(databaseHost: String, databaseName: String, databasePort: Int, secretArn: String, tableName: String) {
            self.databaseHost = databaseHost
            self.databaseName = databaseName
            self.databasePort = databasePort
            self.secretArn = secretArn
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseHost, name: "databaseHost", parent: name, max: 253)
            try self.validate(self.databaseHost, name: "databaseHost", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 100)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
            try self.validate(self.databasePort, name: "databasePort", parent: name, max: 65535)
            try self.validate(self.databasePort, name: "databasePort", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 100)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case databaseHost = "DatabaseHost"
            case databaseName = "DatabaseName"
            case databasePort = "DatabasePort"
            case secretArn = "SecretArn"
            case tableName = "TableName"
        }
    }

    public struct ContentSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the data sources you want to use for your Amazon Kendra experience.
        public let dataSourceIds: [String]?
        ///  TRUE to use documents you indexed directly using the BatchPutDocument operation.
        public let directPutContent: Bool?
        /// The identifier of the FAQs that you want to use for your Amazon Kendra experience.
        public let faqIds: [String]?

        public init(dataSourceIds: [String]? = nil, directPutContent: Bool? = nil, faqIds: [String]? = nil) {
            self.dataSourceIds = dataSourceIds
            self.directPutContent = directPutContent
            self.faqIds = faqIds
        }

        public func validate(name: String) throws {
            try self.dataSourceIds?.forEach {
                try validate($0, name: "dataSourceIds[]", parent: name, max: 100)
                try validate($0, name: "dataSourceIds[]", parent: name, min: 1)
                try validate($0, name: "dataSourceIds[]", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.dataSourceIds, name: "dataSourceIds", parent: name, max: 100)
            try self.validate(self.dataSourceIds, name: "dataSourceIds", parent: name, min: 1)
            try self.faqIds?.forEach {
                try validate($0, name: "faqIds[]", parent: name, max: 100)
                try validate($0, name: "faqIds[]", parent: name, min: 1)
                try validate($0, name: "faqIds[]", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.faqIds, name: "faqIds", parent: name, max: 100)
            try self.validate(self.faqIds, name: "faqIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceIds = "DataSourceIds"
            case directPutContent = "DirectPutContent"
            case faqIds = "FaqIds"
        }
    }

    public struct CreateDataSourceRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a data source. Multiple calls to the CreateDataSource operation with the same client token will create only one data source.
        public let clientToken: String?
        /// The connector configuration information that is required to access the repository. You can't specify the Configuration parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception. The Configuration parameter is required for all other data sources.
        public let configuration: DataSourceConfiguration?
        /// Configuration information for altering document metadata and content during the document ingestion process when you create a data source. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see  Customizing  document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// A description for the data source.
        public let description: String?
        /// The identifier of the index that should be associated with this data source.
        public let indexId: String
        /// The code for a language. This allows you to support a language for all  documents when creating the data source. English is supported  by default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// A unique name for the data source. A data source name can't be changed without deleting and recreating the data source.
        public let name: String
        /// The Amazon Resource Name (ARN) of a role with permission to access the data source. For more information, see IAM Roles for Amazon Kendra. You can't specify the RoleArn parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception. The RoleArn parameter is required for all other data sources.
        public let roleArn: String?
        /// Sets the frequency that Amazon Kendra will check the documents in your repository and update the index. If you don't set a schedule Amazon Kendra will not periodically update the index. You can call the StartDataSourceSyncJob operation to update the index. You can't specify the Schedule parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.
        public let schedule: String?
        /// A list of key-value pairs that identify the data source. You can use the tags to identify and organize your resources and to control access to resources.
        public let tags: [Tag]?
        /// The type of repository that contains the data source.
        public let type: DataSourceType

        public init(clientToken: String? = CreateDataSourceRequest.idempotencyToken(), configuration: DataSourceConfiguration? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, indexId: String, languageCode: String? = nil, name: String, roleArn: String? = nil, schedule: String? = nil, tags: [Tag]? = nil, type: DataSourceType) {
            self.clientToken = clientToken
            self.configuration = configuration
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
            self.tags = tags
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.configuration?.validate(name: "\(name).configuration")
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case configuration = "Configuration"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
            case tags = "Tags"
            case type = "Type"
        }
    }

    public struct CreateDataSourceResponse: AWSDecodableShape {
        /// A unique identifier for the data source.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateExperienceRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create your Amazon Kendra experience. Multiple calls to the CreateExperience operation with the same client  token creates only one Amazon Kendra experience.
        public let clientToken: String?
        /// Provides the configuration information for your Amazon Kendra experience. This includes ContentSourceConfiguration, which specifies the data source IDs  and/or FAQ IDs, and UserIdentityConfiguration, which specifies the  user or group information to grant access to your Amazon Kendra experience.
        public let configuration: ExperienceConfiguration?
        /// A description for your Amazon Kendra experience.
        public let description: String?
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// A name for your Amazon Kendra experience.
        public let name: String
        /// The Amazon Resource Name (ARN) of a role with permission to access Query operations, QuerySuggestions operations, SubmitFeedback operations, and Amazon Web Services SSO that stores your user and group information.  For more information, see IAM roles for Amazon Kendra.
        public let roleArn: String?

        public init(clientToken: String? = CreateExperienceRequest.idempotencyToken(), configuration: ExperienceConfiguration? = nil, description: String? = nil, indexId: String, name: String, roleArn: String? = nil) {
            self.clientToken = clientToken
            self.configuration = configuration
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.configuration?.validate(name: "\(name).configuration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case configuration = "Configuration"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
        }
    }

    public struct CreateExperienceResponse: AWSDecodableShape {
        /// The identifier for your created Amazon Kendra experience.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateFaqRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a FAQ. Multiple calls to the CreateFaqRequest operation with the same client token will create only one FAQ.
        public let clientToken: String?
        /// A description of the FAQ.
        public let description: String?
        /// The format of the input file. You can choose between a basic CSV format, a CSV format that includes customs attributes in a header, and a JSON format that includes custom attributes. The format must match the format of the file stored in the S3 bucket identified in the S3Path parameter. For more information, see Adding questions and answers.
        public let fileFormat: FaqFileFormat?
        /// The identifier of the index that contains the FAQ.
        public let indexId: String
        /// The code for a language. This allows you to support a language  for the FAQ document. English is supported by default.  For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that should be associated with the FAQ.
        public let name: String
        /// The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra.
        public let roleArn: String
        /// The S3 location of the FAQ input data.
        public let s3Path: S3Path
        /// A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.
        public let tags: [Tag]?

        public init(clientToken: String? = CreateFaqRequest.idempotencyToken(), description: String? = nil, fileFormat: FaqFileFormat? = nil, indexId: String, languageCode: String? = nil, name: String, roleArn: String, s3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.fileFormat = fileFormat
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.s3Path = s3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.s3Path.validate(name: "\(name).s3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case fileFormat = "FileFormat"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case s3Path = "S3Path"
            case tags = "Tags"
        }
    }

    public struct CreateFaqResponse: AWSDecodableShape {
        /// The unique identifier of the FAQ.
        public let id: String?

        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateIndexRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex operation with the same client token will create only one index.
        public let clientToken: String?
        /// A description for the index.
        public let description: String?
        /// The Amazon Kendra edition to use for the index. Choose DEVELOPER_EDITION for indexes intended for development, testing, or proof of concept. Use ENTERPRISE_EDITION for your production databases. Once you set the edition for an index, it can't be changed. The Edition parameter is optional. If you don't supply a value, the default is ENTERPRISE_EDITION. For more information on quota limits for enterprise and developer editions,  see Quotas.
        public let edition: IndexEdition?
        /// The name for the new index.
        public let name: String
        /// An Identity and Access Management(IAM) role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.
        public let roleArn: String
        /// The identifier of the KMScustomer managed key (CMK) to use to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration?
        /// A list of key-value pairs that identify the index. You can use the tags to identify and organize your resources and to control access to resources.
        public let tags: [Tag]?
        /// The user context policy.  ATTRIBUTE_FILTER  All indexed content is searchable and displayable for all users. If you want to filter search results on  user context, you can use the attribute filters of _user_id and _group_ids or you can provide user and group information in UserContext.   USER_TOKEN  Enables token-based user access control to filter  search results on user context. All documents with no  access control and all documents accessible to the user  will be searchable and displayable.
        public let userContextPolicy: UserContextPolicy?
        /// Enables fetching access levels of groups and users from an Amazon Web Services Single Sign On  identity source. To configure this, see  UserGroupResolutionConfiguration.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        public init(clientToken: String? = CreateIndexRequest.idempotencyToken(), description: String? = nil, edition: IndexEdition? = nil, name: String, roleArn: String, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil, tags: [Tag]? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.edition = edition
            self.name = name
            self.roleArn = roleArn
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.tags = tags
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.serverSideEncryptionConfiguration?.validate(name: "\(name).serverSideEncryptionConfiguration")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
            try self.userTokenConfigurations?.forEach {
                try $0.validate(name: "\(name).userTokenConfigurations[]")
            }
            try self.validate(self.userTokenConfigurations, name: "userTokenConfigurations", parent: name, max: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case edition = "Edition"
            case name = "Name"
            case roleArn = "RoleArn"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case tags = "Tags"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct CreateIndexResponse: AWSDecodableShape {
        /// The unique identifier of the index. Use this identifier when you query an index, set up a data source, or index a document.
        public let id: String?

        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a  query suggestions block list.
        public let clientToken: String?
        /// A user-friendly description for the block list. For example, the description "List of all offensive words that can  appear in user queries and need to be blocked from suggestions."
        public let description: String?
        /// The identifier of the index you want to create a query suggestions block list for.
        public let indexId: String
        /// A user friendly name for the block list. For example, the block list named 'offensive-words' includes all  offensive words that could appear in user queries and need to be  blocked from suggestions.
        public let name: String
        /// The IAM (Identity and Access Management) role used by Amazon Kendra to  access the block list text file in your S3 bucket. You need permissions to the role ARN (Amazon Resource Name).  The role needs S3 read permissions to your file in S3 and needs  to give STS (Security Token Service) assume role permissions  to Amazon Kendra.
        public let roleArn: String
        /// The S3 path to your block list text file in your S3 bucket. Each block word or phrase should be on a separate line in a text file.  For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let sourceS3Path: S3Path
        /// A tag that you can assign to a block list that categorizes  the block list.
        public let tags: [Tag]?

        public init(clientToken: String? = CreateQuerySuggestionsBlockListRequest.idempotencyToken(), description: String? = nil, indexId: String, name: String, roleArn: String, sourceS3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path.validate(name: "\(name).sourceS3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case tags = "Tags"
        }
    }

    public struct CreateQuerySuggestionsBlockListResponse: AWSDecodableShape {
        /// The unique identifier of the created block list.
        public let id: String?

        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CreateThesaurusRequest: AWSEncodableShape {
        /// A token that you provide to identify the request to create a  thesaurus. Multiple calls to the CreateThesaurus operation  with the same client token will create only one thesaurus.
        public let clientToken: String?
        /// The description for the new thesaurus.
        public let description: String?
        /// The unique identifier of the index for the new thesaurus.
        public let indexId: String
        /// The name for the new thesaurus.
        public let name: String
        /// An IAM role that gives Amazon Kendra permissions  to access thesaurus file specified in SourceS3Path.
        public let roleArn: String
        /// The thesaurus file Amazon S3 source path.
        public let sourceS3Path: S3Path
        /// A list of key-value pairs that identify the thesaurus. You can use  the tags to identify and organize your resources and to control  access to resources.
        public let tags: [Tag]?

        public init(clientToken: String? = CreateThesaurusRequest.idempotencyToken(), description: String? = nil, indexId: String, name: String, roleArn: String, sourceS3Path: S3Path, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 100)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path.validate(name: "\(name).sourceS3Path")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case tags = "Tags"
        }
    }

    public struct CreateThesaurusResponse: AWSDecodableShape {
        /// The unique identifier of the thesaurus.
        public let id: String?

        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct CustomDocumentEnrichmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration information to alter document attributes or metadata fields and  content when ingesting documents into Amazon Kendra.
        public let inlineConfigurations: [InlineCustomDocumentEnrichmentConfiguration]?
        /// Configuration information for invoking a Lambda function in Lambda  on the structured documents with their metadata and text extracted. You can use a  Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced  data manipulation.
        public let postExtractionHookConfiguration: HookConfiguration?
        /// Configuration information for invoking a Lambda function in Lambda  on the original or raw documents before extracting their metadata and text. You can  use a Lambda function to apply advanced logic for creating, modifying, or deleting document metadata and content. For more information, see Advanced  data manipulation.
        public let preExtractionHookConfiguration: HookConfiguration?
        /// The Amazon Resource Name (ARN) of a role with permission to run  PreExtractionHookConfiguration and  PostExtractionHookConfiguration for altering document metadata  and content during the document ingestion process. For more information,  see IAM roles for Amazon Kendra.
        public let roleArn: String?

        public init(inlineConfigurations: [InlineCustomDocumentEnrichmentConfiguration]? = nil, postExtractionHookConfiguration: HookConfiguration? = nil, preExtractionHookConfiguration: HookConfiguration? = nil, roleArn: String? = nil) {
            self.inlineConfigurations = inlineConfigurations
            self.postExtractionHookConfiguration = postExtractionHookConfiguration
            self.preExtractionHookConfiguration = preExtractionHookConfiguration
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.inlineConfigurations?.forEach {
                try $0.validate(name: "\(name).inlineConfigurations[]")
            }
            try self.validate(self.inlineConfigurations, name: "inlineConfigurations", parent: name, max: 100)
            try self.postExtractionHookConfiguration?.validate(name: "\(name).postExtractionHookConfiguration")
            try self.preExtractionHookConfiguration?.validate(name: "\(name).preExtractionHookConfiguration")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case inlineConfigurations = "InlineConfigurations"
            case postExtractionHookConfiguration = "PostExtractionHookConfiguration"
            case preExtractionHookConfiguration = "PreExtractionHookConfiguration"
            case roleArn = "RoleArn"
        }
    }

    public struct DataSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides configuration information for connecting to a Confluence data source.
        public let confluenceConfiguration: ConfluenceConfiguration?
        /// Provides information necessary to create a data source connector for a database.
        public let databaseConfiguration: DatabaseConfiguration?
        /// Provides configuration for data sources that connect to Google Drive.
        public let googleDriveConfiguration: GoogleDriveConfiguration?
        /// Provides configuration for data sources that connect to Microsoft OneDrive.
        public let oneDriveConfiguration: OneDriveConfiguration?
        /// Provides information to create a data source connector for a document repository in an Amazon S3 bucket.
        public let s3Configuration: S3DataSourceConfiguration?
        /// Provides configuration information for data sources that connect to a Salesforce site.
        public let salesforceConfiguration: SalesforceConfiguration?
        /// Provides configuration for data sources that connect to ServiceNow instances.
        public let serviceNowConfiguration: ServiceNowConfiguration?
        /// Provides information necessary to create a data source connector for a Microsoft SharePoint site.
        public let sharePointConfiguration: SharePointConfiguration?
        public let webCrawlerConfiguration: WebCrawlerConfiguration?
        /// Provides the configuration information to connect to WorkDocs  as your data source.
        public let workDocsConfiguration: WorkDocsConfiguration?

        public init(confluenceConfiguration: ConfluenceConfiguration? = nil, databaseConfiguration: DatabaseConfiguration? = nil, googleDriveConfiguration: GoogleDriveConfiguration? = nil, oneDriveConfiguration: OneDriveConfiguration? = nil, s3Configuration: S3DataSourceConfiguration? = nil, salesforceConfiguration: SalesforceConfiguration? = nil, serviceNowConfiguration: ServiceNowConfiguration? = nil, sharePointConfiguration: SharePointConfiguration? = nil, webCrawlerConfiguration: WebCrawlerConfiguration? = nil, workDocsConfiguration: WorkDocsConfiguration? = nil) {
            self.confluenceConfiguration = confluenceConfiguration
            self.databaseConfiguration = databaseConfiguration
            self.googleDriveConfiguration = googleDriveConfiguration
            self.oneDriveConfiguration = oneDriveConfiguration
            self.s3Configuration = s3Configuration
            self.salesforceConfiguration = salesforceConfiguration
            self.serviceNowConfiguration = serviceNowConfiguration
            self.sharePointConfiguration = sharePointConfiguration
            self.webCrawlerConfiguration = webCrawlerConfiguration
            self.workDocsConfiguration = workDocsConfiguration
        }

        public func validate(name: String) throws {
            try self.confluenceConfiguration?.validate(name: "\(name).confluenceConfiguration")
            try self.databaseConfiguration?.validate(name: "\(name).databaseConfiguration")
            try self.googleDriveConfiguration?.validate(name: "\(name).googleDriveConfiguration")
            try self.oneDriveConfiguration?.validate(name: "\(name).oneDriveConfiguration")
            try self.s3Configuration?.validate(name: "\(name).s3Configuration")
            try self.salesforceConfiguration?.validate(name: "\(name).salesforceConfiguration")
            try self.serviceNowConfiguration?.validate(name: "\(name).serviceNowConfiguration")
            try self.sharePointConfiguration?.validate(name: "\(name).sharePointConfiguration")
            try self.webCrawlerConfiguration?.validate(name: "\(name).webCrawlerConfiguration")
            try self.workDocsConfiguration?.validate(name: "\(name).workDocsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case confluenceConfiguration = "ConfluenceConfiguration"
            case databaseConfiguration = "DatabaseConfiguration"
            case googleDriveConfiguration = "GoogleDriveConfiguration"
            case oneDriveConfiguration = "OneDriveConfiguration"
            case s3Configuration = "S3Configuration"
            case salesforceConfiguration = "SalesforceConfiguration"
            case serviceNowConfiguration = "ServiceNowConfiguration"
            case sharePointConfiguration = "SharePointConfiguration"
            case webCrawlerConfiguration = "WebCrawlerConfiguration"
            case workDocsConfiguration = "WorkDocsConfiguration"
        }
    }

    public struct DataSourceGroup: AWSEncodableShape {
        /// The identifier of the data source group you want to add  to your list of data source groups. This is for filtering  search results based on the groups' access to documents in  that data source.
        public let dataSourceId: String
        /// The identifier of the group you want to add to your list  of groups. This is for filtering search results based on the  groups' access to documents.
        public let groupId: String

        public init(dataSourceId: String, groupId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 200)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
        }
    }

    public struct DataSourceSummary: AWSDecodableShape {
        /// The UNIX datetime that the data source was created.
        public let createdAt: Date?
        /// The unique identifier for the data source.
        public let id: String?
        /// The code for a language. This shows a supported language for all documents  in the data source. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name of the data source.
        public let name: String?
        /// The status of the data source. When the status is ACTIVE the data source is ready to use.
        public let status: DataSourceStatus?
        /// The type of the data source.
        public let type: DataSourceType?
        /// The UNIX datetime that the data source was lasted updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, id: String? = nil, languageCode: String? = nil, name: String? = nil, status: DataSourceStatus? = nil, type: DataSourceType? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.languageCode = languageCode
            self.name = name
            self.status = status
            self.type = type
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case languageCode = "LanguageCode"
            case name = "Name"
            case status = "Status"
            case type = "Type"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DataSourceSyncJob: AWSDecodableShape {
        /// If the reason that the synchronization failed is due to an error with the underlying data source, this field contains a code that identifies the error.
        public let dataSourceErrorCode: String?
        /// The UNIX datetime that the synchronization job was completed.
        public let endTime: Date?
        /// If the Status field is set to FAILED, the ErrorCode field contains a the reason that the synchronization failed.
        public let errorCode: ErrorCode?
        /// If the Status field is set to ERROR, the ErrorMessage field contains a description of the error that caused the synchronization to fail.
        public let errorMessage: String?
        /// A unique identifier for the synchronization job.
        public let executionId: String?
        /// Maps a batch delete document request to a specific data source sync job. This is optional and should only be supplied when documents are deleted by a data source connector.
        public let metrics: DataSourceSyncJobMetrics?
        /// The UNIX datetime that the synchronization job was started.
        public let startTime: Date?
        /// The execution status of the synchronization job. When the Status field is set to SUCCEEDED, the synchronization job is done. If the status code is set to FAILED, the ErrorCode and ErrorMessage fields give you the reason for the failure.
        public let status: DataSourceSyncJobStatus?

        public init(dataSourceErrorCode: String? = nil, endTime: Date? = nil, errorCode: ErrorCode? = nil, errorMessage: String? = nil, executionId: String? = nil, metrics: DataSourceSyncJobMetrics? = nil, startTime: Date? = nil, status: DataSourceSyncJobStatus? = nil) {
            self.dataSourceErrorCode = dataSourceErrorCode
            self.endTime = endTime
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.executionId = executionId
            self.metrics = metrics
            self.startTime = startTime
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceErrorCode = "DataSourceErrorCode"
            case endTime = "EndTime"
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case executionId = "ExecutionId"
            case metrics = "Metrics"
            case startTime = "StartTime"
            case status = "Status"
        }
    }

    public struct DataSourceSyncJobMetricTarget: AWSEncodableShape {
        /// The ID of the data source that is running the sync job.
        public let dataSourceId: String
        /// The ID of the sync job that is running on the data source. If the ID of a sync job is not provided and there is a sync job  running, then the ID of this sync job is used and metrics are  generated for this sync job. If the ID of a sync job is not provided and there is no sync job  running, then no metrics are generated and documents are   indexed/deleted at the index level without sync job metrics included.
        public let dataSourceSyncJobId: String?

        public init(dataSourceId: String, dataSourceSyncJobId: String? = nil) {
            self.dataSourceId = dataSourceId
            self.dataSourceSyncJobId = dataSourceSyncJobId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, max: 100)
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, min: 1)
            try self.validate(self.dataSourceSyncJobId, name: "dataSourceSyncJobId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case dataSourceSyncJobId = "DataSourceSyncJobId"
        }
    }

    public struct DataSourceSyncJobMetrics: AWSDecodableShape {
        /// The number of documents added from the data source up to now in the data source sync.
        public let documentsAdded: String?
        /// The number of documents deleted from the data source up to now in the data source sync run.
        public let documentsDeleted: String?
        /// The number of documents that failed to sync from the data source up to now in the data source sync run.
        public let documentsFailed: String?
        /// The number of documents modified in the data source up to now in the data source sync run.
        public let documentsModified: String?
        /// The current number of documents crawled by the current sync job in the data source.
        public let documentsScanned: String?

        public init(documentsAdded: String? = nil, documentsDeleted: String? = nil, documentsFailed: String? = nil, documentsModified: String? = nil, documentsScanned: String? = nil) {
            self.documentsAdded = documentsAdded
            self.documentsDeleted = documentsDeleted
            self.documentsFailed = documentsFailed
            self.documentsModified = documentsModified
            self.documentsScanned = documentsScanned
        }

        private enum CodingKeys: String, CodingKey {
            case documentsAdded = "DocumentsAdded"
            case documentsDeleted = "DocumentsDeleted"
            case documentsFailed = "DocumentsFailed"
            case documentsModified = "DocumentsModified"
            case documentsScanned = "DocumentsScanned"
        }
    }

    public struct DataSourceToIndexFieldMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the column or attribute in the data source.
        public let dataSourceFieldName: String
        /// The type of data stored in the column or attribute.
        public let dateFieldFormat: String?
        /// The name of the field in the index.
        public let indexFieldName: String

        public init(dataSourceFieldName: String, dateFieldFormat: String? = nil, indexFieldName: String) {
            self.dataSourceFieldName = dataSourceFieldName
            self.dateFieldFormat = dateFieldFormat
            self.indexFieldName = indexFieldName
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, max: 100)
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, min: 1)
            try self.validate(self.dataSourceFieldName, name: "dataSourceFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, max: 40)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, min: 4)
            try self.validate(self.dateFieldFormat, name: "dateFieldFormat", parent: name, pattern: "^(?!\\s).*(?<!\\s)$")
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, max: 30)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, min: 1)
            try self.validate(self.indexFieldName, name: "indexFieldName", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceFieldName = "DataSourceFieldName"
            case dateFieldFormat = "DateFieldFormat"
            case indexFieldName = "IndexFieldName"
        }
    }

    public struct DataSourceVpcConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
        public let securityGroupIds: [String]
        /// A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
        public let subnetIds: [String]

        public init(securityGroupIds: [String], subnetIds: [String]) {
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
        }

        public func validate(name: String) throws {
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 200)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^[-0-9a-zA-Z]+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 10)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 200)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^[\\-0-9a-zA-Z]+$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 6)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
        }
    }

    public struct DatabaseConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Information about the database column that provides information for user context filtering.
        public let aclConfiguration: AclConfiguration?
        /// Information about where the index should get the document information from the database.
        public let columnConfiguration: ColumnConfiguration
        /// The information necessary to connect to a database.
        public let connectionConfiguration: ConnectionConfiguration
        /// The type of database engine that runs the database.
        public let databaseEngineType: DatabaseEngineType
        /// Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
        public let sqlConfiguration: SqlConfiguration?
        public let vpcConfiguration: DataSourceVpcConfiguration?

        public init(aclConfiguration: AclConfiguration? = nil, columnConfiguration: ColumnConfiguration, connectionConfiguration: ConnectionConfiguration, databaseEngineType: DatabaseEngineType, sqlConfiguration: SqlConfiguration? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.aclConfiguration = aclConfiguration
            self.columnConfiguration = columnConfiguration
            self.connectionConfiguration = connectionConfiguration
            self.databaseEngineType = databaseEngineType
            self.sqlConfiguration = sqlConfiguration
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.aclConfiguration?.validate(name: "\(name).aclConfiguration")
            try self.columnConfiguration.validate(name: "\(name).columnConfiguration")
            try self.connectionConfiguration.validate(name: "\(name).connectionConfiguration")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case aclConfiguration = "AclConfiguration"
            case columnConfiguration = "ColumnConfiguration"
            case connectionConfiguration = "ConnectionConfiguration"
            case databaseEngineType = "DatabaseEngineType"
            case sqlConfiguration = "SqlConfiguration"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct DeleteDataSourceRequest: AWSEncodableShape {
        /// The unique identifier of the data source to delete.
        public let id: String
        /// The unique identifier of the index associated with the data source.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteExperienceRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience you want to delete.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience you want to delete.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteExperienceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteFaqRequest: AWSEncodableShape {
        /// The identifier of the FAQ to remove.
        public let id: String
        /// The index to remove the FAQ from.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteIndexRequest: AWSEncodableShape {
        /// The identifier of the index to delete.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct DeletePrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source you want to delete a group from. This is useful if a group is tied to multiple data sources and you want  to delete a group from accessing documents in a certain data source. For example,  the groups "Research", "Engineering", and "Sales and Marketing" are all tied to  the company's documents stored in the data sources Confluence and Salesforce.  You want to delete "Research" and "Engineering" groups from Salesforce, so that these groups cannot access customer-related documents stored in Salesforce.  Only "Sales and Marketing" should access documents in the Salesforce data source.
        public let dataSourceId: String?
        /// The identifier of the group you want to delete.
        public let groupId: String
        /// The identifier of the index you want to delete a group from.
        public let indexId: String
        /// The timestamp identifier you specify to ensure Amazon Kendra does not  override the latest DELETE action with previous actions.  The highest number ID, which is the ordering ID, is the latest action  you want to process and apply on top of other actions with lower number  IDs. This prevents previous actions with lower number IDs from possibly  overriding the latest action. The ordering ID can be the UNIX time of the last update you made to a group  members list. You would then provide this list when calling  PutPrincipalMapping. This ensures your DELETE action  for that updated group with the latest members list doesn't get overwritten  by earlier DELETE actions for the same group which are yet to  be processed. The default ordering ID is the current UNIX time in milliseconds that the  action was received by Amazon Kendra.
        public let orderingId: Int64?

        public init(dataSourceId: String? = nil, groupId: String, indexId: String, orderingId: Int64? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.indexId = indexId
            self.orderingId = orderingId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32_535_158_400_000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case indexId = "IndexId"
            case orderingId = "OrderingId"
        }
    }

    public struct DeleteQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// The unique identifier of the block list that needs to be deleted.
        public let id: String
        /// The identifier of the you want to delete a block list from.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DeleteThesaurusRequest: AWSEncodableShape {
        /// The identifier of the thesaurus to delete.
        public let id: String
        /// The identifier of the index associated with the thesaurus to delete.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeDataSourceRequest: AWSEncodableShape {
        /// The unique identifier of the data source to describe.
        public let id: String
        /// The identifier of the index that contains the data source.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeDataSourceResponse: AWSDecodableShape {
        /// Information that describes where the data source is located and how the data source is configured. The specific information in the description depends on the data source provider.
        public let configuration: DataSourceConfiguration?
        /// The Unix timestamp of when the data source was created.
        public let createdAt: Date?
        /// Configuration information for altering document metadata and content during the document ingestion process when you describe a data source. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see  Customizing  document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// The description of the data source.
        public let description: String?
        /// When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source to fail.
        public let errorMessage: String?
        /// The identifier of the data source.
        public let id: String?
        /// The identifier of the index that contains the data source.
        public let indexId: String?
        /// The code for a language. This shows a supported language for all  documents in the data source. English is supported by  default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that you gave the data source when it was created.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the role that enables the data source to access its resources.
        public let roleArn: String?
        /// The schedule that Amazon Kendra will update the data source.
        public let schedule: String?
        /// The current status of the data source. When the status is ACTIVE the data source is ready to use. When the status is FAILED, the ErrorMessage field contains the reason that the data source failed.
        public let status: DataSourceStatus?
        /// The type of the data source.
        public let type: DataSourceType?
        /// The Unix timestamp of when the data source was last updated.
        public let updatedAt: Date?

        public init(configuration: DataSourceConfiguration? = nil, createdAt: Date? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, errorMessage: String? = nil, id: String? = nil, indexId: String? = nil, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, schedule: String? = nil, status: DataSourceStatus? = nil, type: DataSourceType? = nil, updatedAt: Date? = nil) {
            self.configuration = configuration
            self.createdAt = createdAt
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.errorMessage = errorMessage
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
            self.status = status
            self.type = type
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case createdAt = "CreatedAt"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
            case status = "Status"
            case type = "Type"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeExperienceRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience you want to get information on.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience you want to get  information on.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeExperienceResponse: AWSDecodableShape {
        /// Shows the configuration information for your Amazon Kendra experience. This includes ContentSourceConfiguration, which specifies the data source IDs  and/or FAQ IDs, and UserIdentityConfiguration, which specifies the  user or group information to grant access to your Amazon Kendra experience.
        public let configuration: ExperienceConfiguration?
        /// Shows the date-time your Amazon Kendra experience was created.
        public let createdAt: Date?
        /// Shows the description for your Amazon Kendra experience.
        public let description: String?
        /// Shows the endpoint URLs for your Amazon Kendra experiences. The URLs are unique and fully hosted by Amazon Web Services.
        public let endpoints: [ExperienceEndpoint]?
        /// The reason your Amazon Kendra experience could not properly process.
        public let errorMessage: String?
        /// Shows the identifier of your Amazon Kendra experience.
        public let id: String?
        /// Shows the identifier of the index for your Amazon Kendra experience.
        public let indexId: String?
        /// Shows the name of your Amazon Kendra experience.
        public let name: String?
        /// Shows the Amazon Resource Name (ARN) of a role with permission to access  Query operations, QuerySuggestions operations,  SubmitFeedback operations, and Amazon Web Services SSO that stores  your user and group information.
        public let roleArn: String?
        /// The current processing status of your Amazon Kendra experience. When the status  is ACTIVE, your Amazon Kendra experience is ready to use. When the  status is FAILED, the ErrorMessage field contains  the reason that this failed.
        public let status: ExperienceStatus?
        /// Shows the date-time your Amazon Kendra experience was last updated.
        public let updatedAt: Date?

        public init(configuration: ExperienceConfiguration? = nil, createdAt: Date? = nil, description: String? = nil, endpoints: [ExperienceEndpoint]? = nil, errorMessage: String? = nil, id: String? = nil, indexId: String? = nil, name: String? = nil, roleArn: String? = nil, status: ExperienceStatus? = nil, updatedAt: Date? = nil) {
            self.configuration = configuration
            self.createdAt = createdAt
            self.description = description
            self.endpoints = endpoints
            self.errorMessage = errorMessage
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case createdAt = "CreatedAt"
            case description = "Description"
            case endpoints = "Endpoints"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeFaqRequest: AWSEncodableShape {
        /// The unique identifier of the FAQ.
        public let id: String
        /// The identifier of the index that contains the FAQ.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeFaqResponse: AWSDecodableShape {
        /// The date and time that the FAQ was created.
        public let createdAt: Date?
        /// The description of the FAQ that you provided when it was created.
        public let description: String?
        /// If the Status field is FAILED, the ErrorMessage field contains the reason why the FAQ failed.
        public let errorMessage: String?
        /// The file format used by the input files for the FAQ.
        public let fileFormat: FaqFileFormat?
        /// The identifier of the FAQ.
        public let id: String?
        /// The identifier of the index that contains the FAQ.
        public let indexId: String?
        /// The code for a language. This shows a supported language  for the FAQ document. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that you gave the FAQ when it was created.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the role that provides access to the S3 bucket containing the input files for the FAQ.
        public let roleArn: String?
        public let s3Path: S3Path?
        /// The status of the FAQ. It is ready to use when the status is ACTIVE.
        public let status: FaqStatus?
        /// The date and time that the FAQ was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileFormat: FaqFileFormat? = nil, id: String? = nil, indexId: String? = nil, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, s3Path: S3Path? = nil, status: FaqStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileFormat = fileFormat
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.s3Path = s3Path
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileFormat = "FileFormat"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case s3Path = "S3Path"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeIndexRequest: AWSEncodableShape {
        /// The name of the index to describe.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct DescribeIndexResponse: AWSDecodableShape {
        /// For Enterprise edition indexes, you can choose to use additional capacity to meet the needs of your application. This contains the capacity units used for the index. A 0 for the query capacity or the storage capacity indicates that the index is using the default capacity for the index.
        public let capacityUnits: CapacityUnitsConfiguration?
        /// The Unix datetime that the index was created.
        public let createdAt: Date?
        /// The description of the index.
        public let description: String?
        /// Configuration settings for any metadata applied to the documents in the index.
        public let documentMetadataConfigurations: [DocumentMetadataConfiguration]?
        /// The Amazon Kendra edition used for the index. You decide the edition when you create the index.
        public let edition: IndexEdition?
        /// When th eStatus field value is FAILED, the ErrorMessage field contains a message that explains why.
        public let errorMessage: String?
        /// The name of the index.
        public let id: String?
        /// Provides information about the number of FAQ questions and answers and the number of text documents indexed.
        public let indexStatistics: IndexStatistics?
        /// The name of the index.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the IAM role that gives Amazon Kendra permission to write to your Amazon Cloudwatch logs.
        public let roleArn: String?
        /// The identifier of the KMScustomer master key (CMK) used to encrypt your data. Amazon Kendra doesn't support asymmetric CMKs.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration?
        /// The current status of the index. When the value is ACTIVE, the index is ready for use. If the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
        public let status: IndexStatus?
        /// The Unix datetime that the index was last updated.
        public let updatedAt: Date?
        /// The user context policy for the Amazon Kendra index.
        public let userContextPolicy: UserContextPolicy?
        /// Shows whether you have enabled the configuration for fetching access  levels of groups and users from an Amazon Web Services Single Sign On identity source.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration for the Amazon Kendra index.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        public init(capacityUnits: CapacityUnitsConfiguration? = nil, createdAt: Date? = nil, description: String? = nil, documentMetadataConfigurations: [DocumentMetadataConfiguration]? = nil, edition: IndexEdition? = nil, errorMessage: String? = nil, id: String? = nil, indexStatistics: IndexStatistics? = nil, name: String? = nil, roleArn: String? = nil, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil, status: IndexStatus? = nil, updatedAt: Date? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.capacityUnits = capacityUnits
            self.createdAt = createdAt
            self.description = description
            self.documentMetadataConfigurations = documentMetadataConfigurations
            self.edition = edition
            self.errorMessage = errorMessage
            self.id = id
            self.indexStatistics = indexStatistics
            self.name = name
            self.roleArn = roleArn
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.status = status
            self.updatedAt = updatedAt
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case capacityUnits = "CapacityUnits"
            case createdAt = "CreatedAt"
            case description = "Description"
            case documentMetadataConfigurations = "DocumentMetadataConfigurations"
            case edition = "Edition"
            case errorMessage = "ErrorMessage"
            case id = "Id"
            case indexStatistics = "IndexStatistics"
            case name = "Name"
            case roleArn = "RoleArn"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case status = "Status"
            case updatedAt = "UpdatedAt"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct DescribePrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source to check the processing of  PUT and DELETE actions for mapping  users to their groups.
        public let dataSourceId: String?
        /// The identifier of the group required to check the processing of  PUT and DELETE actions for mapping users  to their groups.
        public let groupId: String
        /// The identifier of the index required to check the processing of  PUT and DELETE actions for mapping users  to their groups.
        public let indexId: String

        public init(dataSourceId: String? = nil, groupId: String, indexId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case indexId = "IndexId"
        }
    }

    public struct DescribePrincipalMappingResponse: AWSDecodableShape {
        /// Shows the identifier of the data source to see information on  the processing of PUT and DELETE actions  for mapping users to their groups.
        public let dataSourceId: String?
        /// Shows the identifier of the group to see information on the  processing of PUT and DELETE actions  for mapping users to their groups.
        public let groupId: String?
        /// Shows the following information on the processing of PUT and  DELETE actions for mapping users to their groups:   Status – the status can be either  PROCESSING, SUCCEEDED, DELETING,  DELETED, or FAILED.   Last updated – the last date-time an action was updated.   Received – the last date-time an action was received or submitted.   Ordering ID – the latest action that should process and apply  after other actions.   Failure reason – the reason an action could not be processed.
        public let groupOrderingIdSummaries: [GroupOrderingIdSummary]?
        /// Shows the identifier of the index to see information on the  processing of PUT and DELETE actions  for mapping users to their groups.
        public let indexId: String?

        public init(dataSourceId: String? = nil, groupId: String? = nil, groupOrderingIdSummaries: [GroupOrderingIdSummary]? = nil, indexId: String? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.groupOrderingIdSummaries = groupOrderingIdSummaries
            self.indexId = indexId
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case groupOrderingIdSummaries = "GroupOrderingIdSummaries"
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// The unique identifier of the block list.
        public let id: String
        /// The identifier of the index for the block list.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsBlockListResponse: AWSDecodableShape {
        /// Shows the date-time a block list for query suggestions was created.
        public let createdAt: Date?
        /// Shows the description for the block list.
        public let description: String?
        /// Shows the error message with details when there are issues in  processing the block list.
        public let errorMessage: String?
        /// Shows the current size of the block list text file in S3.
        public let fileSizeBytes: Int64?
        /// Shows the unique identifier of the block list.
        public let id: String?
        /// Shows the identifier of the index for the block list.
        public let indexId: String?
        /// Shows the current number of valid, non-empty words or phrases in  the block list text file.
        public let itemCount: Int?
        /// Shows the name of the block list.
        public let name: String?
        /// Shows the current IAM (Identity and Access Management) role used by  Amazon Kendra to access the block list text file in S3. The role needs S3 read permissions to your file in S3 and needs to  give STS (Security Token Service) assume role permissions to  Amazon Kendra.
        public let roleArn: String?
        /// Shows the current S3 path to your block list text file in your S3 bucket. Each block word or phrase should be on a separate line in a text file. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let sourceS3Path: S3Path?
        /// Shows whether the current status of the block list is  ACTIVE or INACTIVE.
        public let status: QuerySuggestionsBlockListStatus?
        /// Shows the date-time a block list for query suggestions was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileSizeBytes: Int64? = nil, id: String? = nil, indexId: String? = nil, itemCount: Int? = nil, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil, status: QuerySuggestionsBlockListStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileSizeBytes = fileSizeBytes
            self.id = id
            self.indexId = indexId
            self.itemCount = itemCount
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileSizeBytes = "FileSizeBytes"
            case id = "Id"
            case indexId = "IndexId"
            case itemCount = "ItemCount"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DescribeQuerySuggestionsConfigRequest: AWSEncodableShape {
        /// The identifier of the index you want to describe query suggestions  settings for.
        public let indexId: String

        public init(indexId: String) {
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
        }
    }

    public struct DescribeQuerySuggestionsConfigResponse: AWSDecodableShape {
        /// Shows whether Amazon Kendra uses all queries or only uses queries that  include user information to generate query suggestions.
        public let includeQueriesWithoutUserInformation: Bool?
        /// Shows the date-time query suggestions for an index was last cleared. After you clear suggestions, Amazon Kendra learns new suggestions based  on new queries added to the query log from the time you cleared suggestions.  Amazon Kendra only considers re-occurences of a query from the time you cleared  suggestions.
        public let lastClearTime: Date?
        /// Shows the date-time query suggestions for an index was last updated.
        public let lastSuggestionsBuildTime: Date?
        /// Shows the minimum number of unique users who must search a query in  order for the query to be eligible to suggest to your users.
        public let minimumNumberOfQueryingUsers: Int?
        /// Shows the minimum number of times a query must be searched in order for  the query to be eligible to suggest to your users.
        public let minimumQueryCount: Int?
        /// Shows whether query suggestions are currently in  ENABLED mode or LEARN_ONLY mode. By default, Amazon Kendra enables query suggestions.LEARN_ONLY  turns off query suggestions for your users. You can change the mode using  the UpdateQuerySuggestionsConfig  operation.
        public let mode: Mode?
        /// Shows how recent your queries are in your query log time  window (in days).
        public let queryLogLookBackWindowInDays: Int?
        /// Shows whether the status of query suggestions settings is currently  Active or Updating. Active means the current settings apply and Updating means your  changed settings are in the process of applying.
        public let status: QuerySuggestionsStatus?
        /// Shows the current total count of query suggestions for an index. This count can change when you update your query suggestions settings,  if you filter out certain queries from suggestions using a block list,  and as the query log accumulates more queries for Amazon Kendra to learn from.
        public let totalSuggestionsCount: Int?

        public init(includeQueriesWithoutUserInformation: Bool? = nil, lastClearTime: Date? = nil, lastSuggestionsBuildTime: Date? = nil, minimumNumberOfQueryingUsers: Int? = nil, minimumQueryCount: Int? = nil, mode: Mode? = nil, queryLogLookBackWindowInDays: Int? = nil, status: QuerySuggestionsStatus? = nil, totalSuggestionsCount: Int? = nil) {
            self.includeQueriesWithoutUserInformation = includeQueriesWithoutUserInformation
            self.lastClearTime = lastClearTime
            self.lastSuggestionsBuildTime = lastSuggestionsBuildTime
            self.minimumNumberOfQueryingUsers = minimumNumberOfQueryingUsers
            self.minimumQueryCount = minimumQueryCount
            self.mode = mode
            self.queryLogLookBackWindowInDays = queryLogLookBackWindowInDays
            self.status = status
            self.totalSuggestionsCount = totalSuggestionsCount
        }

        private enum CodingKeys: String, CodingKey {
            case includeQueriesWithoutUserInformation = "IncludeQueriesWithoutUserInformation"
            case lastClearTime = "LastClearTime"
            case lastSuggestionsBuildTime = "LastSuggestionsBuildTime"
            case minimumNumberOfQueryingUsers = "MinimumNumberOfQueryingUsers"
            case minimumQueryCount = "MinimumQueryCount"
            case mode = "Mode"
            case queryLogLookBackWindowInDays = "QueryLogLookBackWindowInDays"
            case status = "Status"
            case totalSuggestionsCount = "TotalSuggestionsCount"
        }
    }

    public struct DescribeThesaurusRequest: AWSEncodableShape {
        /// The identifier of the thesaurus to describe.
        public let id: String
        /// The identifier of the index associated with the thesaurus to describe.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DescribeThesaurusResponse: AWSDecodableShape {
        /// The Unix datetime that the thesaurus was created.
        public let createdAt: Date?
        /// The thesaurus description.
        public let description: String?
        /// When the Status field value is FAILED, the ErrorMessage field provides more information.
        public let errorMessage: String?
        /// The size of the thesaurus file in bytes.
        public let fileSizeBytes: Int64?
        /// The identifier of the thesaurus.
        public let id: String?
        /// The identifier of the index associated with the thesaurus to describe.
        public let indexId: String?
        /// The thesaurus name.
        public let name: String?
        /// An IAM role that gives Amazon Kendra permissions  to access thesaurus file specified in SourceS3Path.
        public let roleArn: String?
        public let sourceS3Path: S3Path?
        /// The current status of the thesaurus. When the value is ACTIVE,  queries are able to use the thesaurus. If the Status field value  is FAILED, the ErrorMessage field provides more information.  If the status is ACTIVE_BUT_UPDATE_FAILED, it means that Amazon Kendra could not ingest the new thesaurus file. The old thesaurus file is still active.
        public let status: ThesaurusStatus?
        /// The number of synonym rules in the thesaurus file.
        public let synonymRuleCount: Int64?
        /// The number of unique terms in the thesaurus file. For example, the synonyms a,b,c and a=>d, the term count would be 4.
        public let termCount: Int64?
        /// The Unix datetime that the thesaurus was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, description: String? = nil, errorMessage: String? = nil, fileSizeBytes: Int64? = nil, id: String? = nil, indexId: String? = nil, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil, status: ThesaurusStatus? = nil, synonymRuleCount: Int64? = nil, termCount: Int64? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.errorMessage = errorMessage
            self.fileSizeBytes = fileSizeBytes
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
            self.status = status
            self.synonymRuleCount = synonymRuleCount
            self.termCount = termCount
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case description = "Description"
            case errorMessage = "ErrorMessage"
            case fileSizeBytes = "FileSizeBytes"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
            case status = "Status"
            case synonymRuleCount = "SynonymRuleCount"
            case termCount = "TermCount"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct DisassociateEntitiesFromExperienceRequest: AWSEncodableShape {
        /// Lists users or groups in your Amazon Web Services SSO identity source.
        public let entityList: [EntityConfiguration]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        public init(entityList: [EntityConfiguration], id: String, indexId: String) {
            self.entityList = entityList
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityList.forEach {
                try $0.validate(name: "\(name).entityList[]")
            }
            try self.validate(self.entityList, name: "entityList", parent: name, max: 40)
            try self.validate(self.entityList, name: "entityList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityList = "EntityList"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DisassociateEntitiesFromExperienceResponse: AWSDecodableShape {
        /// Lists the users or groups in your Amazon Web Services SSO identity source that  failed to properly remove access to your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct DisassociatePersonasFromEntitiesRequest: AWSEncodableShape {
        /// The identifiers of users or groups in your Amazon Web Services SSO identity  source. For example, user IDs could be user emails.
        public let entityIds: [String]
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String

        public init(entityIds: [String], id: String, indexId: String) {
            self.entityIds = entityIds
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.entityIds.forEach {
                try validate($0, name: "entityIds[]", parent: name, max: 47)
                try validate($0, name: "entityIds[]", parent: name, min: 1)
                try validate($0, name: "entityIds[]", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            }
            try self.validate(self.entityIds, name: "entityIds", parent: name, max: 25)
            try self.validate(self.entityIds, name: "entityIds", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityIds = "EntityIds"
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct DisassociatePersonasFromEntitiesResponse: AWSDecodableShape {
        /// Lists the users or groups in your Amazon Web Services SSO identity source that  failed to properly remove access to your Amazon Kendra experience.
        public let failedEntityList: [FailedEntity]?

        public init(failedEntityList: [FailedEntity]? = nil) {
            self.failedEntityList = failedEntityList
        }

        private enum CodingKeys: String, CodingKey {
            case failedEntityList = "FailedEntityList"
        }
    }

    public struct Document: AWSEncodableShape {
        /// Information on user and group access rights, which is used for  user context filtering.
        public let accessControlList: [Principal]?
        /// Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
        public let attributes: [DocumentAttribute]?
        /// The contents of the document.  Documents passed to the Blob parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Kendra operations. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
        public let blob: Data?
        /// The file type of the document in the Blob field.
        public let contentType: ContentType?
        /// The list of principal lists  that define the hierarchy for which documents users should have access to.
        public let hierarchicalAccessControlList: [HierarchicalPrincipal]?
        /// A unique identifier of the document in the index.
        public let id: String
        public let s3Path: S3Path?
        /// The title of the document.
        public let title: String?

        public init(accessControlList: [Principal]? = nil, attributes: [DocumentAttribute]? = nil, blob: Data? = nil, contentType: ContentType? = nil, hierarchicalAccessControlList: [HierarchicalPrincipal]? = nil, id: String, s3Path: S3Path? = nil, title: String? = nil) {
            self.accessControlList = accessControlList
            self.attributes = attributes
            self.blob = blob
            self.contentType = contentType
            self.hierarchicalAccessControlList = hierarchicalAccessControlList
            self.id = id
            self.s3Path = s3Path
            self.title = title
        }

        public func validate(name: String) throws {
            try self.accessControlList?.forEach {
                try $0.validate(name: "\(name).accessControlList[]")
            }
            try self.attributes?.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.hierarchicalAccessControlList?.forEach {
                try $0.validate(name: "\(name).hierarchicalAccessControlList[]")
            }
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, max: 30)
            try self.validate(self.hierarchicalAccessControlList, name: "hierarchicalAccessControlList", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, max: 2048)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.s3Path?.validate(name: "\(name).s3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlList = "AccessControlList"
            case attributes = "Attributes"
            case blob = "Blob"
            case contentType = "ContentType"
            case hierarchicalAccessControlList = "HierarchicalAccessControlList"
            case id = "Id"
            case s3Path = "S3Path"
            case title = "Title"
        }
    }

    public struct DocumentAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the attribute.
        public let key: String
        /// The value of the attribute.
        public let value: DocumentAttributeValue

        public init(key: String, value: DocumentAttributeValue) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 200)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.value.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct DocumentAttributeCondition: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the document attribute used for the condition. For example, 'Source_URI' could be an identifier for the attribute or metadata  field that contains source URIs associated with the documents. Amazon Kendra currently does not support _document_body as an attribute  key used for the condition.
        public let conditionDocumentAttributeKey: String
        /// The value used by the operator. For example, you can specify the value 'financial' for strings in the 'Source_URI' field that partially match or contain this value.
        public let conditionOnValue: DocumentAttributeValue?
        /// The condition operator. For example, you can use 'Contains' to partially match a string.
        public let `operator`: ConditionOperator

        public init(conditionDocumentAttributeKey: String, conditionOnValue: DocumentAttributeValue? = nil, operator: ConditionOperator) {
            self.conditionDocumentAttributeKey = conditionDocumentAttributeKey
            self.conditionOnValue = conditionOnValue
            self.`operator` = `operator`
        }

        public func validate(name: String) throws {
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, max: 200)
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, min: 1)
            try self.validate(self.conditionDocumentAttributeKey, name: "conditionDocumentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.conditionOnValue?.validate(name: "\(name).conditionOnValue")
        }

        private enum CodingKeys: String, CodingKey {
            case conditionDocumentAttributeKey = "ConditionDocumentAttributeKey"
            case conditionOnValue = "ConditionOnValue"
            case `operator` = "Operator"
        }
    }

    public struct DocumentAttributeTarget: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or  metadata field that includes the department names associated with the documents.
        public let targetDocumentAttributeKey: String?
        /// The target value you want to create for the target attribute. For example, 'Finance' could be the target value for the target attribute key 'Department'.
        public let targetDocumentAttributeValue: DocumentAttributeValue?
        ///  TRUE to delete the existing target value for your specified target  attribute key. You cannot create a target value and set this to TRUE.  To create a target value (TargetDocumentAttributeValue), set this to  FALSE.
        public let targetDocumentAttributeValueDeletion: Bool?

        public init(targetDocumentAttributeKey: String? = nil, targetDocumentAttributeValue: DocumentAttributeValue? = nil, targetDocumentAttributeValueDeletion: Bool? = nil) {
            self.targetDocumentAttributeKey = targetDocumentAttributeKey
            self.targetDocumentAttributeValue = targetDocumentAttributeValue
            self.targetDocumentAttributeValueDeletion = targetDocumentAttributeValueDeletion
        }

        public func validate(name: String) throws {
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, max: 200)
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, min: 1)
            try self.validate(self.targetDocumentAttributeKey, name: "targetDocumentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            try self.targetDocumentAttributeValue?.validate(name: "\(name).targetDocumentAttributeValue")
        }

        private enum CodingKeys: String, CodingKey {
            case targetDocumentAttributeKey = "TargetDocumentAttributeKey"
            case targetDocumentAttributeValue = "TargetDocumentAttributeValue"
            case targetDocumentAttributeValueDeletion = "TargetDocumentAttributeValueDeletion"
        }
    }

    public struct DocumentAttributeValue: AWSEncodableShape & AWSDecodableShape {
        /// A date expressed as an ISO 8601 string. It is important for the time zone to be included  in the ISO 8601 date-time format. For example,  20120325T123010+01:00 is the ISO 8601 date-time format  for March 25th 2012 at 12:30PM (plus 10 seconds) in  Central European Time.
        public let dateValue: Date?
        /// A long integer value.
        public let longValue: Int64?
        /// A list of strings.
        public let stringListValue: [String]?
        /// A string, such as "department".
        public let stringValue: String?

        public init(dateValue: Date? = nil, longValue: Int64? = nil, stringListValue: [String]? = nil, stringValue: String? = nil) {
            self.dateValue = dateValue
            self.longValue = longValue
            self.stringListValue = stringListValue
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.stringListValue?.forEach {
                try validate($0, name: "stringListValue[]", parent: name, max: 2048)
                try validate($0, name: "stringListValue[]", parent: name, min: 1)
            }
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 2048)
            try self.validate(self.stringValue, name: "stringValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dateValue = "DateValue"
            case longValue = "LongValue"
            case stringListValue = "StringListValue"
            case stringValue = "StringValue"
        }
    }

    public struct DocumentAttributeValueCountPair: AWSDecodableShape {
        /// The number of documents in the response that have the attribute value for the key.
        public let count: Int?
        /// The value of the attribute. For example, "HR."
        public let documentAttributeValue: DocumentAttributeValue?

        public init(count: Int? = nil, documentAttributeValue: DocumentAttributeValue? = nil) {
            self.count = count
            self.documentAttributeValue = documentAttributeValue
        }

        private enum CodingKeys: String, CodingKey {
            case count = "Count"
            case documentAttributeValue = "DocumentAttributeValue"
        }
    }

    public struct DocumentInfo: AWSEncodableShape {
        /// Attributes that identify a specific version of a document to check. The only valid attributes are:   version   datasourceId   jobExecutionId   The attributes follow these rules:    dataSourceId and jobExecutionId must be used together.    version is ignored if dataSourceId and jobExecutionId are not provided.   If dataSourceId and jobExecutionId are provided, but version is not, the version defaults to "0".
        public let attributes: [DocumentAttribute]?
        /// The unique identifier of the document.
        public let documentId: String

        public init(attributes: [DocumentAttribute]? = nil, documentId: String) {
            self.attributes = attributes
            self.documentId = documentId
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.validate(self.documentId, name: "documentId", parent: name, max: 2048)
            try self.validate(self.documentId, name: "documentId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case documentId = "DocumentId"
        }
    }

    public struct DocumentMetadataConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the index field.
        public let name: String
        /// Provides manual tuning parameters to determine how the field affects the search results.
        public let relevance: Relevance?
        /// Provides information about how the field is used during a search.
        public let search: Search?
        /// The data type of the index field.
        public let type: DocumentAttributeValueType

        public init(name: String, relevance: Relevance? = nil, search: Search? = nil, type: DocumentAttributeValueType) {
            self.name = name
            self.relevance = relevance
            self.search = search
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 30)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.relevance?.validate(name: "\(name).relevance")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case relevance = "Relevance"
            case search = "Search"
            case type = "Type"
        }
    }

    public struct DocumentRelevanceConfiguration: AWSEncodableShape {
        /// The name of the tuning configuration to override document relevance  at the index level.
        public let name: String
        public let relevance: Relevance

        public init(name: String, relevance: Relevance) {
            self.name = name
            self.relevance = relevance
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 30)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.relevance.validate(name: "\(name).relevance")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case relevance = "Relevance"
        }
    }

    public struct DocumentsMetadataConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A prefix used to filter metadata configuration files in the Amazon Web Services S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
        public let s3Prefix: String?

        public init(s3Prefix: String? = nil) {
            self.s3Prefix = s3Prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Prefix, name: "s3Prefix", parent: name, max: 1024)
            try self.validate(self.s3Prefix, name: "s3Prefix", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case s3Prefix = "S3Prefix"
        }
    }

    public struct EntityConfiguration: AWSEncodableShape {
        /// The identifier of a user or group in your Amazon Web Services SSO identity  source. For example, a user ID could be an email.
        public let entityId: String
        /// Specifies whether you are configuring a User or a Group.
        public let entityType: EntityType

        public init(entityId: String, entityType: EntityType) {
            self.entityId = entityId
            self.entityType = entityType
        }

        public func validate(name: String) throws {
            try self.validate(self.entityId, name: "entityId", parent: name, max: 47)
            try self.validate(self.entityId, name: "entityId", parent: name, min: 1)
            try self.validate(self.entityId, name: "entityId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case entityType = "EntityType"
        }
    }

    public struct EntityDisplayData: AWSDecodableShape {
        /// The first name of the user.
        public let firstName: String?
        /// The name of the group.
        public let groupName: String?
        /// The user name of the user.
        public let identifiedUserName: String?
        /// The last name of the user.
        public let lastName: String?
        /// The name of the user.
        public let userName: String?

        public init(firstName: String? = nil, groupName: String? = nil, identifiedUserName: String? = nil, lastName: String? = nil, userName: String? = nil) {
            self.firstName = firstName
            self.groupName = groupName
            self.identifiedUserName = identifiedUserName
            self.lastName = lastName
            self.userName = userName
        }

        private enum CodingKeys: String, CodingKey {
            case firstName = "FirstName"
            case groupName = "GroupName"
            case identifiedUserName = "IdentifiedUserName"
            case lastName = "LastName"
            case userName = "UserName"
        }
    }

    public struct EntityPersonaConfiguration: AWSEncodableShape {
        /// The identifier of a user or group in your Amazon Web Services SSO identity  source. For example, a user ID could be an email.
        public let entityId: String
        /// The persona that defines the specific permissions of the user or group  in your Amazon Web Services SSO identity source. The available personas or  access roles are Owner and Viewer. For more  information on these personas, see Providing  access to your search page.
        public let persona: Persona

        public init(entityId: String, persona: Persona) {
            self.entityId = entityId
            self.persona = persona
        }

        public func validate(name: String) throws {
            try self.validate(self.entityId, name: "entityId", parent: name, max: 47)
            try self.validate(self.entityId, name: "entityId", parent: name, min: 1)
            try self.validate(self.entityId, name: "entityId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case persona = "Persona"
        }
    }

    public struct ExperienceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifiers of your data sources and FAQs. Or, you can specify  that you want to use documents indexed via the BatchPutDocument  operation. This is the content you want to use for your Amazon Kendra experience.
        public let contentSourceConfiguration: ContentSourceConfiguration?
        /// The Amazon Web Services SSO field name that contains the identifiers of your users,  such as their emails.
        public let userIdentityConfiguration: UserIdentityConfiguration?

        public init(contentSourceConfiguration: ContentSourceConfiguration? = nil, userIdentityConfiguration: UserIdentityConfiguration? = nil) {
            self.contentSourceConfiguration = contentSourceConfiguration
            self.userIdentityConfiguration = userIdentityConfiguration
        }

        public func validate(name: String) throws {
            try self.contentSourceConfiguration?.validate(name: "\(name).contentSourceConfiguration")
            try self.userIdentityConfiguration?.validate(name: "\(name).userIdentityConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case contentSourceConfiguration = "ContentSourceConfiguration"
            case userIdentityConfiguration = "UserIdentityConfiguration"
        }
    }

    public struct ExperienceEndpoint: AWSDecodableShape {
        /// The endpoint of your Amazon Kendra experience.
        public let endpoint: String?
        /// The type of endpoint for your Amazon Kendra experience. The type currently available  is HOME, which is a unique and fully hosted URL to the home page  of your Amazon Kendra experience.
        public let endpointType: EndpointType?

        public init(endpoint: String? = nil, endpointType: EndpointType? = nil) {
            self.endpoint = endpoint
            self.endpointType = endpointType
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint = "Endpoint"
            case endpointType = "EndpointType"
        }
    }

    public struct ExperienceEntitiesSummary: AWSDecodableShape {
        /// Information about the user entity.
        public let displayData: EntityDisplayData?
        /// The identifier of a user or group in your Amazon Web Services SSO identity source.  For example, a user ID could be an email.
        public let entityId: String?
        /// Shows the type as User or Group.
        public let entityType: EntityType?

        public init(displayData: EntityDisplayData? = nil, entityId: String? = nil, entityType: EntityType? = nil) {
            self.displayData = displayData
            self.entityId = entityId
            self.entityType = entityType
        }

        private enum CodingKeys: String, CodingKey {
            case displayData = "DisplayData"
            case entityId = "EntityId"
            case entityType = "EntityType"
        }
    }

    public struct ExperiencesSummary: AWSDecodableShape {
        /// The date-time your Amazon Kendra experience was created.
        public let createdAt: Date?
        /// The endpoint URLs for your Amazon Kendra experiences. The URLs are unique  and fully hosted by Amazon Web Services.
        public let endpoints: [ExperienceEndpoint]?
        /// The identifier of your Amazon Kendra experience.
        public let id: String?
        /// The name of your Amazon Kendra experience.
        public let name: String?
        /// The processing status of your Amazon Kendra experience.
        public let status: ExperienceStatus?

        public init(createdAt: Date? = nil, endpoints: [ExperienceEndpoint]? = nil, id: String? = nil, name: String? = nil, status: ExperienceStatus? = nil) {
            self.createdAt = createdAt
            self.endpoints = endpoints
            self.id = id
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case endpoints = "Endpoints"
            case id = "Id"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct Facet: AWSEncodableShape {
        /// The unique key for the document attribute.
        public let documentAttributeKey: String?

        public init(documentAttributeKey: String? = nil) {
            self.documentAttributeKey = documentAttributeKey
        }

        public func validate(name: String) throws {
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, max: 200)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, min: 1)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
        }
    }

    public struct FacetResult: AWSDecodableShape {
        /// The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.
        public let documentAttributeKey: String?
        /// An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
        public let documentAttributeValueCountPairs: [DocumentAttributeValueCountPair]?
        /// The data type of the facet value. This is the same as the type defined for the index field when it was created.
        public let documentAttributeValueType: DocumentAttributeValueType?

        public init(documentAttributeKey: String? = nil, documentAttributeValueCountPairs: [DocumentAttributeValueCountPair]? = nil, documentAttributeValueType: DocumentAttributeValueType? = nil) {
            self.documentAttributeKey = documentAttributeKey
            self.documentAttributeValueCountPairs = documentAttributeValueCountPairs
            self.documentAttributeValueType = documentAttributeValueType
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case documentAttributeValueCountPairs = "DocumentAttributeValueCountPairs"
            case documentAttributeValueType = "DocumentAttributeValueType"
        }
    }

    public struct FailedEntity: AWSDecodableShape {
        /// The identifier of the user or group in your Amazon Web Services SSO identity  source. For example, a user ID could be an email.
        public let entityId: String?
        /// The reason the user or group in your Amazon Web Services SSO identity source  failed to properly configure with your Amazon Kendra experience.
        public let errorMessage: String?

        public init(entityId: String? = nil, errorMessage: String? = nil) {
            self.entityId = entityId
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case entityId = "EntityId"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct FaqStatistics: AWSDecodableShape {
        /// The total number of FAQ questions and answers contained in the index.
        public let indexedQuestionAnswersCount: Int

        public init(indexedQuestionAnswersCount: Int) {
            self.indexedQuestionAnswersCount = indexedQuestionAnswersCount
        }

        private enum CodingKeys: String, CodingKey {
            case indexedQuestionAnswersCount = "IndexedQuestionAnswersCount"
        }
    }

    public struct FaqSummary: AWSDecodableShape {
        /// The UNIX datetime that the FAQ was added to the index.
        public let createdAt: Date?
        /// The file type used to create the FAQ.
        public let fileFormat: FaqFileFormat?
        /// The unique identifier of the FAQ.
        public let id: String?
        /// The code for a language. This shows a supported language for the FAQ document  as part of the summary information for FAQs. English is supported by default.   For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name that you assigned the FAQ when you created or updated the FAQ.
        public let name: String?
        /// The current status of the FAQ. When the status is ACTIVE the FAQ is ready for use.
        public let status: FaqStatus?
        /// The UNIX datetime that the FAQ was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, fileFormat: FaqFileFormat? = nil, id: String? = nil, languageCode: String? = nil, name: String? = nil, status: FaqStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.fileFormat = fileFormat
            self.id = id
            self.languageCode = languageCode
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case fileFormat = "FileFormat"
            case id = "Id"
            case languageCode = "LanguageCode"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct GetQuerySuggestionsRequest: AWSEncodableShape {
        /// The identifier of the index you want to get query suggestions from.
        public let indexId: String
        /// The maximum number of query suggestions you want to show  to your users.
        public let maxSuggestionsCount: Int?
        /// The text of a user's query to generate query suggestions. A query is suggested if the query prefix matches  what a user starts to type as their query. Amazon Kendra does not show any suggestions if a user  types fewer than two characters or more than 60 characters.  A query must also have at least one search result and contain  at least one word of more than four characters.
        public let queryText: String

        public init(indexId: String, maxSuggestionsCount: Int? = nil, queryText: String) {
            self.indexId = indexId
            self.maxSuggestionsCount = maxSuggestionsCount
            self.queryText = queryText
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryText, name: "queryText", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxSuggestionsCount = "MaxSuggestionsCount"
            case queryText = "QueryText"
        }
    }

    public struct GetQuerySuggestionsResponse: AWSDecodableShape {
        /// The unique identifier for a list of query suggestions for an index.
        public let querySuggestionsId: String?
        /// A list of query suggestions for an index.
        public let suggestions: [Suggestion]?

        public init(querySuggestionsId: String? = nil, suggestions: [Suggestion]? = nil) {
            self.querySuggestionsId = querySuggestionsId
            self.suggestions = suggestions
        }

        private enum CodingKeys: String, CodingKey {
            case querySuggestionsId = "QuerySuggestionsId"
            case suggestions = "Suggestions"
        }
    }

    public struct GetSnapshotsRequest: AWSEncodableShape {
        /// The identifier of the index to get search metrics data.
        public let indexId: String
        /// The time interval or time window to get search metrics data.  The time interval uses the time zone of your index.  You can view data in the following time windows:    THIS_WEEK: The current week, starting on  the Sunday and ending on the day before the current date.    ONE_WEEK_AGO: The previous week, starting on  the Sunday and ending on the following Saturday.    TWO_WEEKS_AGO: The week before the previous week,  starting on the Sunday and ending on the following Saturday.    THIS_MONTH: The current month, starting on the  first day of the month and ending on the day before the current date.    ONE_MONTH_AGO: The previous month, starting on the  first day of the month and ending on the last day of the month.    TWO_MONTHS_AGO: The month before the previous month,  starting on the first day of the month and ending on last day of the month.
        public let interval: Interval
        /// The maximum number of returned data for the metric.
        public let maxResults: Int?
        /// The metric you want to retrieve. You can specify only one metric per call. For more information about the metrics you can view, see  Gaining  insights with search analytics.
        public let metricType: MetricType
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in  the response. You can use this pagination token to retrieve the next set of search metrics data.
        public let nextToken: String?

        public init(indexId: String, interval: Interval, maxResults: Int? = nil, metricType: MetricType, nextToken: String? = nil) {
            self.indexId = indexId
            self.interval = interval
            self.maxResults = maxResults
            self.metricType = metricType
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case interval = "Interval"
            case maxResults = "MaxResults"
            case metricType = "MetricType"
            case nextToken = "NextToken"
        }
    }

    public struct GetSnapshotsResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in a later request to retrieve the  next set of search metrics data.
        public let nextToken: String?
        /// The search metrics data. The data returned depends on the  metric type you requested.
        public let snapshotsData: [[String]]?
        /// The column headers for the search metrics data.
        public let snapshotsDataHeader: [String]?
        /// The date-time for the beginning and end of the time window  for the search metrics data.
        public let snapShotTimeFilter: TimeRange?

        public init(nextToken: String? = nil, snapshotsData: [[String]]? = nil, snapshotsDataHeader: [String]? = nil, snapShotTimeFilter: TimeRange? = nil) {
            self.nextToken = nextToken
            self.snapshotsData = snapshotsData
            self.snapshotsDataHeader = snapshotsDataHeader
            self.snapShotTimeFilter = snapShotTimeFilter
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case snapshotsData = "SnapshotsData"
            case snapshotsDataHeader = "SnapshotsDataHeader"
            case snapShotTimeFilter = "SnapShotTimeFilter"
        }
    }

    public struct GoogleDriveConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of MIME types to exclude from the index. All documents matching the specified MIME type are excluded.  For a list of MIME types, see Using a Google Workspace Drive data source.
        public let excludeMimeTypes: [String]?
        /// A list of identifiers or shared drives to exclude from the index. All files and folders stored on the shared drive are excluded.
        public let excludeSharedDrives: [String]?
        /// A list of email addresses of the users. Documents owned by these users are excluded from the index. Documents shared with excluded users are indexed unless they are excluded in another way.
        public let excludeUserAccounts: [String]?
        /// A list of regular expression patterns that apply to the path on Google Drive. Items that match the pattern are excluded from the index from both shared drives and users' My Drives. Items that don't match the pattern are included in the index. If an item matches both an exclusion pattern and an inclusion pattern, it is excluded from the index.
        public let exclusionPatterns: [String]?
        /// Defines mapping between a field in the Google Drive and a Amazon Kendra index field. If you are using the console, you can define index fields when creating the mapping. If you are using the API, you must first create the field using the UpdateIndex operation.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns that apply to path on Google Drive. Items that match the pattern are included in the index from both shared drives and users' My Drives. Items that don't match the pattern are excluded from the index. If an item matches both an inclusion pattern and an exclusion pattern, it is excluded from the index.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of a Secrets Managersecret that contains the credentials required to connect to Google Drive. For more information, see Using a Google Workspace Drive data source.
        public let secretArn: String

        public init(excludeMimeTypes: [String]? = nil, excludeSharedDrives: [String]? = nil, excludeUserAccounts: [String]? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, secretArn: String) {
            self.excludeMimeTypes = excludeMimeTypes
            self.excludeSharedDrives = excludeSharedDrives
            self.excludeUserAccounts = excludeUserAccounts
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
        }

        public func validate(name: String) throws {
            try self.excludeMimeTypes?.forEach {
                try validate($0, name: "excludeMimeTypes[]", parent: name, max: 256)
                try validate($0, name: "excludeMimeTypes[]", parent: name, min: 1)
                try validate($0, name: "excludeMimeTypes[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeMimeTypes, name: "excludeMimeTypes", parent: name, max: 30)
            try self.excludeSharedDrives?.forEach {
                try validate($0, name: "excludeSharedDrives[]", parent: name, max: 256)
                try validate($0, name: "excludeSharedDrives[]", parent: name, min: 1)
                try validate($0, name: "excludeSharedDrives[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeSharedDrives, name: "excludeSharedDrives", parent: name, max: 100)
            try self.excludeUserAccounts?.forEach {
                try validate($0, name: "excludeUserAccounts[]", parent: name, max: 256)
                try validate($0, name: "excludeUserAccounts[]", parent: name, min: 1)
                try validate($0, name: "excludeUserAccounts[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.excludeUserAccounts, name: "excludeUserAccounts", parent: name, max: 100)
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case excludeMimeTypes = "ExcludeMimeTypes"
            case excludeSharedDrives = "ExcludeSharedDrives"
            case excludeUserAccounts = "ExcludeUserAccounts"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
        }
    }

    public struct GroupMembers: AWSEncodableShape {
        /// A list of sub groups that belong to a group. For example, the sub  groups "Research", "Engineering", and "Sales and Marketing" all belong  to the group "Company".
        public let memberGroups: [MemberGroup]?
        /// A list of users that belong to a group. For example, a list of interns  all belong to the "Interns" group.
        public let memberUsers: [MemberUser]?
        /// If you have more than 1000 users and/or sub groups for a single group,  you need to provide the path to the S3 file that lists your users and sub  groups for a group. Your sub groups can contain more than 1000 users, but  the list of sub groups that belong to a group (and/or users) must be no  more than 1000. You can download this  example  S3 file that uses the correct format for listing group members. Note,  dataSourceId is optional. The value of type  for a group is always GROUP and for a user it is  always USER.
        public let s3PathforGroupMembers: S3Path?

        public init(memberGroups: [MemberGroup]? = nil, memberUsers: [MemberUser]? = nil, s3PathforGroupMembers: S3Path? = nil) {
            self.memberGroups = memberGroups
            self.memberUsers = memberUsers
            self.s3PathforGroupMembers = s3PathforGroupMembers
        }

        public func validate(name: String) throws {
            try self.memberGroups?.forEach {
                try $0.validate(name: "\(name).memberGroups[]")
            }
            try self.validate(self.memberGroups, name: "memberGroups", parent: name, max: 1000)
            try self.validate(self.memberGroups, name: "memberGroups", parent: name, min: 1)
            try self.memberUsers?.forEach {
                try $0.validate(name: "\(name).memberUsers[]")
            }
            try self.validate(self.memberUsers, name: "memberUsers", parent: name, max: 1000)
            try self.validate(self.memberUsers, name: "memberUsers", parent: name, min: 1)
            try self.s3PathforGroupMembers?.validate(name: "\(name).s3PathforGroupMembers")
        }

        private enum CodingKeys: String, CodingKey {
            case memberGroups = "MemberGroups"
            case memberUsers = "MemberUsers"
            case s3PathforGroupMembers = "S3PathforGroupMembers"
        }
    }

    public struct GroupOrderingIdSummary: AWSDecodableShape {
        /// The reason an action could not be processed. An action can be a  PUT or DELETE action for mapping users  to their groups.
        public let failureReason: String?
        /// The last date-time an action was updated. An action can be a  PUT or DELETE action for mapping users  to their groups.
        public let lastUpdatedAt: Date?
        /// The order in which actions should complete processing. An action can  be a PUT or DELETE action for mapping users  to their groups.
        public let orderingId: Int64?
        /// The date-time an action was received by Amazon Kendra. An action can be a  PUT or DELETE action for mapping users to  their groups.
        public let receivedAt: Date?
        /// The current processing status of actions for mapping users to their groups.  The status can be either PROCESSING, SUCCEEDED,  DELETING, DELETED, or FAILED.
        public let status: PrincipalMappingStatus?

        public init(failureReason: String? = nil, lastUpdatedAt: Date? = nil, orderingId: Int64? = nil, receivedAt: Date? = nil, status: PrincipalMappingStatus? = nil) {
            self.failureReason = failureReason
            self.lastUpdatedAt = lastUpdatedAt
            self.orderingId = orderingId
            self.receivedAt = receivedAt
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case lastUpdatedAt = "LastUpdatedAt"
            case orderingId = "OrderingId"
            case receivedAt = "ReceivedAt"
            case status = "Status"
        }
    }

    public struct GroupSummary: AWSDecodableShape {
        ///  The identifier of the group you want group summary information on.
        public let groupId: String?
        ///  The timestamp identifier used for the latest PUT or DELETE  action.
        public let orderingId: Int64?

        public init(groupId: String? = nil, orderingId: Int64? = nil) {
            self.groupId = groupId
            self.orderingId = orderingId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case orderingId = "OrderingId"
        }
    }

    public struct HierarchicalPrincipal: AWSEncodableShape {
        /// A list of principal lists  that define the hierarchy for which documents users should have access to.  Each hierarchical list specifies which user or group has allow or deny  access for each document.
        public let principalList: [Principal]

        public init(principalList: [Principal]) {
            self.principalList = principalList
        }

        public func validate(name: String) throws {
            try self.principalList.forEach {
                try $0.validate(name: "\(name).principalList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case principalList = "PrincipalList"
        }
    }

    public struct Highlight: AWSDecodableShape {
        /// The zero-based location in the response string where the highlight starts.
        public let beginOffset: Int
        /// The zero-based location in the response string where the highlight ends.
        public let endOffset: Int
        /// Indicates whether the response is the best response. True if this is the best response; otherwise, false.
        public let topAnswer: Bool?
        /// The highlight type.
        public let type: HighlightType?

        public init(beginOffset: Int, endOffset: Int, topAnswer: Bool? = nil, type: HighlightType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.topAnswer = topAnswer
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case topAnswer = "TopAnswer"
            case type = "Type"
        }
    }

    public struct HookConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The condition used for when a Lambda function should be invoked. For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time.
        public let invocationCondition: DocumentAttributeCondition?
        /// The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Amazon Kendra.
        public let lambdaArn: String
        /// Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information,  see Data  contracts for Lambda functions.
        public let s3Bucket: String

        public init(invocationCondition: DocumentAttributeCondition? = nil, lambdaArn: String, s3Bucket: String) {
            self.invocationCondition = invocationCondition
            self.lambdaArn = lambdaArn
            self.s3Bucket = s3Bucket
        }

        public func validate(name: String) throws {
            try self.invocationCondition?.validate(name: "\(name).invocationCondition")
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 1)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^/arn:aws[a-zA-Z-]*:lambda:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?/$")
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, max: 63)
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, min: 3)
            try self.validate(self.s3Bucket, name: "s3Bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
        }

        private enum CodingKeys: String, CodingKey {
            case invocationCondition = "InvocationCondition"
            case lambdaArn = "LambdaArn"
            case s3Bucket = "S3Bucket"
        }
    }

    public struct IndexConfigurationSummary: AWSDecodableShape {
        /// The Unix timestamp when the index was created.
        public let createdAt: Date
        /// Indicates whether the index is a enterprise edition index or a developer edition index.
        public let edition: IndexEdition?
        /// A unique identifier for the index. Use this to identify the index when you are using operations such as Query, DescribeIndex, UpdateIndex, and DeleteIndex.
        public let id: String?
        /// The name of the index.
        public let name: String?
        /// The current status of the index. When the status is ACTIVE, the index is ready to search.
        public let status: IndexStatus
        /// The Unix timestamp when the index was last updated by the UpdateIndex operation.
        public let updatedAt: Date

        public init(createdAt: Date, edition: IndexEdition? = nil, id: String? = nil, name: String? = nil, status: IndexStatus, updatedAt: Date) {
            self.createdAt = createdAt
            self.edition = edition
            self.id = id
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case edition = "Edition"
            case id = "Id"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct IndexStatistics: AWSDecodableShape {
        /// The number of question and answer topics in the index.
        public let faqStatistics: FaqStatistics
        /// The number of text documents indexed.
        public let textDocumentStatistics: TextDocumentStatistics

        public init(faqStatistics: FaqStatistics, textDocumentStatistics: TextDocumentStatistics) {
            self.faqStatistics = faqStatistics
            self.textDocumentStatistics = textDocumentStatistics
        }

        private enum CodingKeys: String, CodingKey {
            case faqStatistics = "FaqStatistics"
            case textDocumentStatistics = "TextDocumentStatistics"
        }
    }

    public struct InlineCustomDocumentEnrichmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Configuration of the condition used for the target document attribute or metadata field when ingesting documents into Amazon Kendra.
        public let condition: DocumentAttributeCondition?
        ///  TRUE to delete content if the condition used for the target  attribute is met.
        public let documentContentDeletion: Bool?
        /// Configuration of the target document attribute or metadata field when ingesting documents into Amazon Kendra. You can also include a value.
        public let target: DocumentAttributeTarget?

        public init(condition: DocumentAttributeCondition? = nil, documentContentDeletion: Bool? = nil, target: DocumentAttributeTarget? = nil) {
            self.condition = condition
            self.documentContentDeletion = documentContentDeletion
            self.target = target
        }

        public func validate(name: String) throws {
            try self.condition?.validate(name: "\(name).condition")
            try self.target?.validate(name: "\(name).target")
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case documentContentDeletion = "DocumentContentDeletion"
            case target = "Target"
        }
    }

    public struct JsonTokenTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The group attribute field.
        public let groupAttributeField: String
        /// The user name attribute field.
        public let userNameAttributeField: String

        public init(groupAttributeField: String, userNameAttributeField: String) {
            self.groupAttributeField = groupAttributeField
            self.userNameAttributeField = userNameAttributeField
        }

        public func validate(name: String) throws {
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, max: 2048)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, min: 1)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, max: 2048)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case groupAttributeField = "GroupAttributeField"
            case userNameAttributeField = "UserNameAttributeField"
        }
    }

    public struct JwtTokenTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The regular expression that identifies the claim.
        public let claimRegex: String?
        /// The group attribute field.
        public let groupAttributeField: String?
        /// The issuer of the token.
        public let issuer: String?
        /// The location of the key.
        public let keyLocation: KeyLocation
        /// The Amazon Resource Name (arn) of the secret.
        public let secretManagerArn: String?
        /// The signing key URL.
        public let url: String?
        /// The user name attribute field.
        public let userNameAttributeField: String?

        public init(claimRegex: String? = nil, groupAttributeField: String? = nil, issuer: String? = nil, keyLocation: KeyLocation, secretManagerArn: String? = nil, url: String? = nil, userNameAttributeField: String? = nil) {
            self.claimRegex = claimRegex
            self.groupAttributeField = groupAttributeField
            self.issuer = issuer
            self.keyLocation = keyLocation
            self.secretManagerArn = secretManagerArn
            self.url = url
            self.userNameAttributeField = userNameAttributeField
        }

        public func validate(name: String) throws {
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, max: 100)
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, min: 1)
            try self.validate(self.claimRegex, name: "claimRegex", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, max: 100)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, min: 1)
            try self.validate(self.groupAttributeField, name: "groupAttributeField", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.issuer, name: "issuer", parent: name, max: 65)
            try self.validate(self.issuer, name: "issuer", parent: name, min: 1)
            try self.validate(self.issuer, name: "issuer", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, max: 1284)
            try self.validate(self.secretManagerArn, name: "secretManagerArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.url, name: "url", parent: name, max: 2048)
            try self.validate(self.url, name: "url", parent: name, min: 1)
            try self.validate(self.url, name: "url", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, max: 100)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, min: 1)
            try self.validate(self.userNameAttributeField, name: "userNameAttributeField", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case claimRegex = "ClaimRegex"
            case groupAttributeField = "GroupAttributeField"
            case issuer = "Issuer"
            case keyLocation = "KeyLocation"
            case secretManagerArn = "SecretManagerArn"
            case url = "URL"
            case userNameAttributeField = "UserNameAttributeField"
        }
    }

    public struct ListDataSourceSyncJobsRequest: AWSEncodableShape {
        /// The identifier of the data source.
        public let id: String
        /// The identifier of the index that contains the data source.
        public let indexId: String
        /// The maximum number of synchronization jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve),  Amazon Kendra returns a pagination token in the response. You can use this pagination token  to retrieve the next set of jobs.
        public let nextToken: String?
        /// When specified, the synchronization jobs returned in the list are limited to jobs between the specified dates.
        public let startTimeFilter: TimeRange?
        /// When specified, only returns synchronization jobs with the Status field equal to the specified status.
        public let statusFilter: DataSourceSyncJobStatus?

        public init(id: String, indexId: String, maxResults: Int? = nil, nextToken: String? = nil, startTimeFilter: TimeRange? = nil, statusFilter: DataSourceSyncJobStatus? = nil) {
            self.id = id
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTimeFilter = startTimeFilter
            self.statusFilter = statusFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case startTimeFilter = "StartTimeFilter"
            case statusFilter = "StatusFilter"
        }
    }

    public struct ListDataSourceSyncJobsResponse: AWSDecodableShape {
        /// A history of synchronization jobs for the data source.
        public let history: [DataSourceSyncJob]?
        /// If the response is truncated, Amazon Kendra returns this token that you  can use in the subsequent request to retrieve the next set of jobs.
        public let nextToken: String?

        public init(history: [DataSourceSyncJob]? = nil, nextToken: String? = nil) {
            self.history = history
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case history = "History"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataSourcesRequest: AWSEncodableShape {
        /// The identifier of the index that contains the data source.
        public let indexId: String
        /// The maximum number of data sources to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of data sources (DataSourceSummaryItems).
        public let nextToken: String?

        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDataSourcesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of data sources.
        public let nextToken: String?
        /// An array of summary information for one or more data sources.
        public let summaryItems: [DataSourceSummary]?

        public init(nextToken: String? = nil, summaryItems: [DataSourceSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListEntityPersonasRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The maximum number of returned users or groups.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of users or groups.
        public let nextToken: String?

        public init(id: String, indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.id = id
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityPersonasResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in  a later request to retrieve the next set of users or groups.
        public let nextToken: String?
        /// An array of summary information for one or more users or groups.
        public let summaryItems: [PersonasSummary]?

        public init(nextToken: String? = nil, summaryItems: [PersonasSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListExperienceEntitiesRequest: AWSEncodableShape {
        /// The identifier of your Amazon Kendra experience.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of users or groups.
        public let nextToken: String?

        public init(id: String, indexId: String, nextToken: String? = nil) {
            self.id = id
            self.indexId = indexId
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
            case nextToken = "NextToken"
        }
    }

    public struct ListExperienceEntitiesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use in  a later request to retrieve the next set of users or groups.
        public let nextToken: String?
        /// An array of summary information for one or more users or groups.
        public let summaryItems: [ExperienceEntitiesSummary]?

        public init(nextToken: String? = nil, summaryItems: [ExperienceEntitiesSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListExperiencesRequest: AWSEncodableShape {
        /// The identifier of the index for your Amazon Kendra experience.
        public let indexId: String
        /// The maximum number of returned Amazon Kendra experiences.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Kendra experiences.
        public let nextToken: String?

        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListExperiencesResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this token, which you can use  in a later request to retrieve the next set of Amazon Kendra experiences.
        public let nextToken: String?
        /// An array of summary information for one or more Amazon Kendra experiences.
        public let summaryItems: [ExperiencesSummary]?

        public init(nextToken: String? = nil, summaryItems: [ExperiencesSummary]? = nil) {
            self.nextToken = nextToken
            self.summaryItems = summaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case summaryItems = "SummaryItems"
        }
    }

    public struct ListFaqsRequest: AWSEncodableShape {
        /// The index that contains the FAQ lists.
        public let indexId: String
        /// The maximum number of FAQs to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve),  Amazon Kendra returns a pagination token in the response. You can use this pagination token  to retrieve the next set of FAQs.
        public let nextToken: String?

        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListFaqsResponse: AWSDecodableShape {
        /// information about the FAQs associated with the specified index.
        public let faqSummaryItems: [FaqSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use  in the subsequent request to retrieve the next set of FAQs.
        public let nextToken: String?

        public init(faqSummaryItems: [FaqSummary]? = nil, nextToken: String? = nil) {
            self.faqSummaryItems = faqSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case faqSummaryItems = "FaqSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupsOlderThanOrderingIdRequest: AWSEncodableShape {
        /// The identifier of the data source for getting a list of groups mapped  to users before a given ordering timestamp identifier.
        public let dataSourceId: String?
        /// The identifier of the index for getting a list of groups mapped  to users before a given ordering or timestamp identifier.
        public let indexId: String
        ///  The maximum number of returned groups that are mapped to users before a  given ordering or timestamp identifier.
        public let maxResults: Int?
        ///  If the previous response was incomplete (because there is more data to retrieve),  Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of groups that are mapped to users before a  given ordering or timestamp identifier.
        public let nextToken: String?
        /// The timestamp identifier used for the latest PUT or  DELETE action for mapping users to their groups.
        public let orderingId: Int64

        public init(dataSourceId: String? = nil, indexId: String, maxResults: Int? = nil, nextToken: String? = nil, orderingId: Int64) {
            self.dataSourceId = dataSourceId
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.orderingId = orderingId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32_535_158_400_000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case orderingId = "OrderingId"
        }
    }

    public struct ListGroupsOlderThanOrderingIdResponse: AWSDecodableShape {
        ///  Summary information for list of groups that are mapped to users before a  given ordering or timestamp identifier.
        public let groupsSummaries: [GroupSummary]?
        ///  If the response is truncated, Amazon Kendra returns this token that you can use  in the subsequent request to retrieve the next set of groups that are  mapped to users before a given ordering or timestamp identifier.
        public let nextToken: String?

        public init(groupsSummaries: [GroupSummary]? = nil, nextToken: String? = nil) {
            self.groupsSummaries = groupsSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groupsSummaries = "GroupsSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListIndicesRequest: AWSEncodableShape {
        /// The maximum number of data sources to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of indexes (DataSourceSummaryItems).
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListIndicesResponse: AWSDecodableShape {
        /// An array of summary information for one or more indexes.
        public let indexConfigurationSummaryItems: [IndexConfigurationSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of indexes.
        public let nextToken: String?

        public init(indexConfigurationSummaryItems: [IndexConfigurationSummary]? = nil, nextToken: String? = nil) {
            self.indexConfigurationSummaryItems = indexConfigurationSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexConfigurationSummaryItems = "IndexConfigurationSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListQuerySuggestionsBlockListsRequest: AWSEncodableShape {
        /// The identifier of the index for a list of all block lists that exist for  that index. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let indexId: String
        /// The maximum number of block lists to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve),  Amazon Kendra returns a pagination token in the response. You can use this pagination  token to retrieve the next set of block lists (BlockListSummaryItems).
        public let nextToken: String?

        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListQuerySuggestionsBlockListsResponse: AWSDecodableShape {
        /// Summary items for a block list. This includes summary items on the block list ID, block list name, when the  block list was created, when the block list was last updated, and the count  of block words/phrases in the block list. For information on the current quota limits for block lists, see  Quotas  for Amazon Kendra.
        public let blockListSummaryItems: [QuerySuggestionsBlockListSummary]?
        /// If the response is truncated, Amazon Kendra returns this token that you can use  in the subsequent request to retrieve the next set of block lists.
        public let nextToken: String?

        public init(blockListSummaryItems: [QuerySuggestionsBlockListSummary]? = nil, nextToken: String? = nil) {
            self.blockListSummaryItems = blockListSummaryItems
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case blockListSummaryItems = "BlockListSummaryItems"
            case nextToken = "NextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, or data source to get a list of tags for.
        public let resourceARN: String

        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// A list of tags associated with the index, FAQ, or data source.
        public let tags: [Tag]?

        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListThesauriRequest: AWSEncodableShape {
        /// The identifier of the index associated with the thesaurus to list.
        public let indexId: String
        /// The maximum number of thesauri to return.
        public let maxResults: Int?
        /// If the previous response was incomplete (because there is more data to retrieve), Amazon Kendra returns a pagination token in the response. You can use this pagination token to retrieve the next set of thesauri (ThesaurusSummaryItems).
        public let nextToken: String?

        public init(indexId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.indexId = indexId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 800)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexId = "IndexId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListThesauriResponse: AWSDecodableShape {
        /// If the response is truncated, Amazon Kendra returns this  token that you can use in the subsequent request to  retrieve the next set of thesauri.
        public let nextToken: String?
        /// An array of summary information for a thesaurus or multiple thesauri.
        public let thesaurusSummaryItems: [ThesaurusSummary]?

        public init(nextToken: String? = nil, thesaurusSummaryItems: [ThesaurusSummary]? = nil) {
            self.nextToken = nextToken
            self.thesaurusSummaryItems = thesaurusSummaryItems
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case thesaurusSummaryItems = "ThesaurusSummaryItems"
        }
    }

    public struct MemberGroup: AWSEncodableShape {
        /// The identifier of the data source for the sub group  you want to map to a group.
        public let dataSourceId: String?
        /// The identifier of the sub group you want to map to a group.
        public let groupId: String

        public init(dataSourceId: String? = nil, groupId: String) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
        }
    }

    public struct MemberUser: AWSEncodableShape {
        /// The identifier of the user you want to map to a group.
        public let userId: String

        public init(userId: String) {
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.userId, name: "userId", parent: name, max: 1024)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case userId = "UserId"
        }
    }

    public struct OneDriveConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean value that specifies whether local groups are disabled (True) or enabled (False).
        public let disableLocalGroups: Bool?
        /// List of regular expressions applied to documents. Items that match the exclusion pattern are not indexed. If you provide both an inclusion pattern and an exclusion pattern, any item that matches the exclusion pattern isn't indexed.  The exclusion pattern is applied to the file name.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map Microsoft OneDrive fields to custom fields in the Amazon Kendra index. You must first create the index fields before you map OneDrive fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns. Documents that match the pattern are included in the index. Documents that don't match the pattern are excluded from the index. If a document matches both an inclusion pattern and an exclusion pattern, the document is not included in the index.  The exclusion pattern is applied to the file name.
        public let inclusionPatterns: [String]?
        /// A list of user accounts whose documents should be indexed.
        public let oneDriveUsers: OneDriveUsers
        /// The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the user name and password to connect to OneDrive. The user namd should be the application ID for the OneDrive application, and the password is the application key for the OneDrive application.
        public let secretArn: String
        /// The Azure Active Directory domain of the organization.
        public let tenantDomain: String

        public init(disableLocalGroups: Bool? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, oneDriveUsers: OneDriveUsers, secretArn: String, tenantDomain: String) {
            self.disableLocalGroups = disableLocalGroups
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.oneDriveUsers = oneDriveUsers
            self.secretArn = secretArn
            self.tenantDomain = tenantDomain
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.oneDriveUsers.validate(name: "\(name).oneDriveUsers")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, max: 256)
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, min: 1)
            try self.validate(self.tenantDomain, name: "tenantDomain", parent: name, pattern: "^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-z]{2,}$")
        }

        private enum CodingKeys: String, CodingKey {
            case disableLocalGroups = "DisableLocalGroups"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case oneDriveUsers = "OneDriveUsers"
            case secretArn = "SecretArn"
            case tenantDomain = "TenantDomain"
        }
    }

    public struct OneDriveUsers: AWSEncodableShape & AWSDecodableShape {
        /// A list of users whose documents should be indexed. Specify the user names in email format, for example, username@tenantdomain. If you need to index the documents of more than 100 users, use the OneDriveUserS3Path field to specify the location of a file containing a list of users.
        public let oneDriveUserList: [String]?
        /// The S3 bucket location of a file containing a list of users whose documents should be indexed.
        public let oneDriveUserS3Path: S3Path?

        public init(oneDriveUserList: [String]? = nil, oneDriveUserS3Path: S3Path? = nil) {
            self.oneDriveUserList = oneDriveUserList
            self.oneDriveUserS3Path = oneDriveUserS3Path
        }

        public func validate(name: String) throws {
            try self.oneDriveUserList?.forEach {
                try validate($0, name: "oneDriveUserList[]", parent: name, max: 256)
                try validate($0, name: "oneDriveUserList[]", parent: name, min: 1)
                try validate($0, name: "oneDriveUserList[]", parent: name, pattern: "^(?!\\s).+@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$")
            }
            try self.validate(self.oneDriveUserList, name: "oneDriveUserList", parent: name, max: 100)
            try self.validate(self.oneDriveUserList, name: "oneDriveUserList", parent: name, min: 1)
            try self.oneDriveUserS3Path?.validate(name: "\(name).oneDriveUserS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case oneDriveUserList = "OneDriveUserList"
            case oneDriveUserS3Path = "OneDriveUserS3Path"
        }
    }

    public struct PersonasSummary: AWSDecodableShape {
        /// The date-time the summary information was created.
        public let createdAt: Date?
        /// The identifier of a user or group in your Amazon Web Services SSO identity source.  For example, a user ID could be an email.
        public let entityId: String?
        /// The persona that defines the specific permissions of the user or group in  your Amazon Web Services SSO identity source. The available personas or access  roles are Owner and Viewer. For more information on  these personas, see Providing  access to your search page.
        public let persona: Persona?
        /// The date-time the summary information was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, entityId: String? = nil, persona: Persona? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.entityId = entityId
            self.persona = persona
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case entityId = "EntityId"
            case persona = "Persona"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct Principal: AWSEncodableShape {
        /// Whether to allow or deny access to the principal.
        public let access: ReadAccessType
        /// The identifier of the data source the principal should  access documents from.
        public let dataSourceId: String?
        /// The name of the user or group.
        public let name: String
        /// The type of principal.
        public let type: PrincipalType

        public init(access: ReadAccessType, dataSourceId: String? = nil, name: String, type: PrincipalType) {
            self.access = access
            self.dataSourceId = dataSourceId
            self.name = name
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 200)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case access = "Access"
            case dataSourceId = "DataSourceId"
            case name = "Name"
            case type = "Type"
        }
    }

    public struct ProxyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Your secret ARN, which you can create in Secrets Manager  The credentials are optional. You use a secret if web proxy credentials  are required to connect to a website host. Amazon Kendra currently support basic  authentication to connect to a web proxy server. The secret stores your  credentials.
        public let credentials: String?
        /// The name of the website host you want to connect to  via a web proxy server. For example, the host name of https://a.example.com/page1.html  is "a.example.com".
        public let host: String
        /// The port number of the website host you want to connect  to via a web proxy server.  For example, the port for https://a.example.com/page1.html is 443, the standard port for HTTPS.
        public let port: Int

        public init(credentials: String? = nil, host: String, port: Int) {
            self.credentials = credentials
            self.host = host
            self.port = port
        }

        public func validate(name: String) throws {
            try self.validate(self.credentials, name: "credentials", parent: name, max: 1284)
            try self.validate(self.credentials, name: "credentials", parent: name, min: 1)
            try self.validate(self.credentials, name: "credentials", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.host, name: "host", parent: name, max: 253)
            try self.validate(self.host, name: "host", parent: name, min: 1)
            try self.validate(self.host, name: "host", parent: name, pattern: "^([^\\s]*)$")
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case host = "Host"
            case port = "Port"
        }
    }

    public struct PutPrincipalMappingRequest: AWSEncodableShape {
        /// The identifier of the data source you want to map users to their groups. This is useful if a group is tied to multiple data sources, but you only want  the group to access documents of a certain data source. For example, the groups  "Research", "Engineering", and "Sales and Marketing" are all tied to the company's  documents stored in the data sources Confluence and Salesforce. However,  "Sales and Marketing" team only needs access to customer-related documents  stored in Salesforce.
        public let dataSourceId: String?
        /// The identifier of the group you want to map its users to.
        public let groupId: String
        /// The list that contains your users or sub groups that belong  the same group. For example, the group "Company" includes the user "CEO" and the  sub groups "Research", "Engineering", and "Sales and Marketing". If you have more than 1000 users and/or sub groups for a single group,  you need to provide the path to the S3 file that lists your users and  sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be  no more than 1000.
        public let groupMembers: GroupMembers
        /// The identifier of the index you want to map users to their groups.
        public let indexId: String
        /// The timestamp identifier you specify to ensure Amazon Kendra does not override  the latest PUT action with previous actions. The highest number  ID, which is the ordering ID, is the latest action you want to process and  apply on top of other actions with lower number IDs. This prevents previous  actions with lower number IDs from possibly overriding the latest action. The ordering ID can be the UNIX time of the last update you made to a  group members list. You would then provide this list when calling  PutPrincipalMapping. This ensures your PUT action  for that updated group with the latest members list doesn't get overwritten  by earlier PUT actions for the same group which are yet to  be processed. The default ordering ID is the current UNIX time in milliseconds that the  action was received by Amazon Kendra.
        public let orderingId: Int64?
        /// The Amazon Resource Name (ARN) of a role that has access to the S3 file  that contains your list of users or sub groups that belong to a group. For more information, see IAM roles for Amazon Kendra.
        public let roleArn: String?

        public init(dataSourceId: String? = nil, groupId: String, groupMembers: GroupMembers, indexId: String, orderingId: Int64? = nil, roleArn: String? = nil) {
            self.dataSourceId = dataSourceId
            self.groupId = groupId
            self.groupMembers = groupMembers
            self.indexId = indexId
            self.orderingId = orderingId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, max: 100)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, min: 1)
            try self.validate(self.dataSourceId, name: "dataSourceId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.groupId, name: "groupId", parent: name, max: 1024)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^\\P{C}*$")
            try self.groupMembers.validate(name: "\(name).groupMembers")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.orderingId, name: "orderingId", parent: name, max: 32_535_158_400_000)
            try self.validate(self.orderingId, name: "orderingId", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceId = "DataSourceId"
            case groupId = "GroupId"
            case groupMembers = "GroupMembers"
            case indexId = "IndexId"
            case orderingId = "OrderingId"
            case roleArn = "RoleArn"
        }
    }

    public struct QueryRequest: AWSEncodableShape {
        /// Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the AndAllFilters, NotFilter, and OrAllFilters parameters contain a list of other filters. The AttributeFilter parameter enables you to create a set of filtering rules that a document must satisfy to be included in the query results.
        public let attributeFilter: AttributeFilter?
        /// Overrides relevance tuning configurations of fields or attributes set at the index level. If you use this API to override the relevance tuning configured at the index  level, but there is no relevance tuning configured at the index level, then Amazon Kendra does not apply any relevance tuning. If there is relevance tuning configured at the index level, but you do not use this API  to override any relevance tuning in the index, then Amazon Kendra uses the relevance tuning that is configured at the index level. If there is relevance tuning configured for fields at the index level,  but you use this API to override only some of these fields, then for the fields you did not override, the importance is set to 1.
        public let documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]?
        /// An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
        public let facets: [Facet]?
        /// The unique identifier of the index to search. The identifier is returned in the response from the CreateIndex operation.
        public let indexId: String
        /// Query results are returned in pages the size of the PageSize parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.
        public let pageNumber: Int?
        /// Sets the number of results that are returned in each page of results. The default page size is 10. The maximum number of results returned is 100. If you ask for more than 100 results, only 100 are returned.
        public let pageSize: Int?
        /// Sets the type of query. Only results for the specified query type are returned.
        public let queryResultTypeFilter: QueryResultType?
        /// The text to search for.
        public let queryText: String
        /// An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.
        public let requestedDocumentAttributes: [String]?
        /// Provides information that determines how the results of the query are sorted. You can set the field that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. In the case of ties in sorting the results, the results are sorted by relevance. If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.
        public let sortingConfiguration: SortingConfiguration?
        /// The user context token or user and group information.
        public let userContext: UserContext?
        /// Provides an identifier for a specific user. The VisitorId should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the VisitorId.
        public let visitorId: String?

        public init(attributeFilter: AttributeFilter? = nil, documentRelevanceOverrideConfigurations: [DocumentRelevanceConfiguration]? = nil, facets: [Facet]? = nil, indexId: String, pageNumber: Int? = nil, pageSize: Int? = nil, queryResultTypeFilter: QueryResultType? = nil, queryText: String, requestedDocumentAttributes: [String]? = nil, sortingConfiguration: SortingConfiguration? = nil, userContext: UserContext? = nil, visitorId: String? = nil) {
            self.attributeFilter = attributeFilter
            self.documentRelevanceOverrideConfigurations = documentRelevanceOverrideConfigurations
            self.facets = facets
            self.indexId = indexId
            self.pageNumber = pageNumber
            self.pageSize = pageSize
            self.queryResultTypeFilter = queryResultTypeFilter
            self.queryText = queryText
            self.requestedDocumentAttributes = requestedDocumentAttributes
            self.sortingConfiguration = sortingConfiguration
            self.userContext = userContext
            self.visitorId = visitorId
        }

        public func validate(name: String) throws {
            try self.attributeFilter?.validate(name: "\(name).attributeFilter")
            try self.documentRelevanceOverrideConfigurations?.forEach {
                try $0.validate(name: "\(name).documentRelevanceOverrideConfigurations[]")
            }
            try self.validate(self.documentRelevanceOverrideConfigurations, name: "documentRelevanceOverrideConfigurations", parent: name, max: 500)
            try self.facets?.forEach {
                try $0.validate(name: "\(name).facets[]")
            }
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryText, name: "queryText", parent: name, max: 1000)
            try self.validate(self.queryText, name: "queryText", parent: name, min: 1)
            try self.validate(self.queryText, name: "queryText", parent: name, pattern: "^\\P{C}*$")
            try self.requestedDocumentAttributes?.forEach {
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, max: 200)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, min: 1)
                try validate($0, name: "requestedDocumentAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
            }
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, max: 100)
            try self.validate(self.requestedDocumentAttributes, name: "requestedDocumentAttributes", parent: name, min: 1)
            try self.sortingConfiguration?.validate(name: "\(name).sortingConfiguration")
            try self.userContext?.validate(name: "\(name).userContext")
            try self.validate(self.visitorId, name: "visitorId", parent: name, max: 256)
            try self.validate(self.visitorId, name: "visitorId", parent: name, min: 1)
            try self.validate(self.visitorId, name: "visitorId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeFilter = "AttributeFilter"
            case documentRelevanceOverrideConfigurations = "DocumentRelevanceOverrideConfigurations"
            case facets = "Facets"
            case indexId = "IndexId"
            case pageNumber = "PageNumber"
            case pageSize = "PageSize"
            case queryResultTypeFilter = "QueryResultTypeFilter"
            case queryText = "QueryText"
            case requestedDocumentAttributes = "RequestedDocumentAttributes"
            case sortingConfiguration = "SortingConfiguration"
            case userContext = "UserContext"
            case visitorId = "VisitorId"
        }
    }

    public struct QueryResult: AWSDecodableShape {
        /// Contains the facet results. A FacetResult contains the counts for each attribute key that was specified in the Facets input parameter.
        public let facetResults: [FacetResult]?
        /// The unique identifier for the search. You use QueryId to identify the search when using the feedback API.
        public let queryId: String?
        /// The results of the search.
        public let resultItems: [QueryResultItem]?
        /// The total number of items found by the search; however, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.
        public let totalNumberOfResults: Int?

        public init(facetResults: [FacetResult]? = nil, queryId: String? = nil, resultItems: [QueryResultItem]? = nil, totalNumberOfResults: Int? = nil) {
            self.facetResults = facetResults
            self.queryId = queryId
            self.resultItems = resultItems
            self.totalNumberOfResults = totalNumberOfResults
        }

        private enum CodingKeys: String, CodingKey {
            case facetResults = "FacetResults"
            case queryId = "QueryId"
            case resultItems = "ResultItems"
            case totalNumberOfResults = "TotalNumberOfResults"
        }
    }

    public struct QueryResultItem: AWSDecodableShape {
        /// One or more additional attributes associated with the query result.
        public let additionalAttributes: [AdditionalResultAttribute]?
        /// An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
        public let documentAttributes: [DocumentAttribute]?
        /// An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
        public let documentExcerpt: TextWithHighlights?
        /// The unique identifier for the document.
        public let documentId: String?
        /// The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
        public let documentTitle: TextWithHighlights?
        /// The URI of the original location of the document.
        public let documentURI: String?
        /// A token that identifies a particular result from a particular query. Use this token to provide click-through feedback for the result. For more information, see  Submitting feedback .
        public let feedbackToken: String?
        /// The unique identifier for the query result.
        public let id: String?
        /// Indicates the confidence that Amazon Kendra has that a result matches the query that you provided. Each result is placed into a bin that indicates the confidence, VERY_HIGH, HIGH, MEDIUM and LOW. You can use the score to determine if a response meets the confidence needed for your application. The field is only set to LOW when the Type field is set to DOCUMENT and Amazon Kendra is not confident that the result matches the query.
        public let scoreAttributes: ScoreAttributes?
        /// The type of document.
        public let type: QueryResultType?

        public init(additionalAttributes: [AdditionalResultAttribute]? = nil, documentAttributes: [DocumentAttribute]? = nil, documentExcerpt: TextWithHighlights? = nil, documentId: String? = nil, documentTitle: TextWithHighlights? = nil, documentURI: String? = nil, feedbackToken: String? = nil, id: String? = nil, scoreAttributes: ScoreAttributes? = nil, type: QueryResultType? = nil) {
            self.additionalAttributes = additionalAttributes
            self.documentAttributes = documentAttributes
            self.documentExcerpt = documentExcerpt
            self.documentId = documentId
            self.documentTitle = documentTitle
            self.documentURI = documentURI
            self.feedbackToken = feedbackToken
            self.id = id
            self.scoreAttributes = scoreAttributes
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case additionalAttributes = "AdditionalAttributes"
            case documentAttributes = "DocumentAttributes"
            case documentExcerpt = "DocumentExcerpt"
            case documentId = "DocumentId"
            case documentTitle = "DocumentTitle"
            case documentURI = "DocumentURI"
            case feedbackToken = "FeedbackToken"
            case id = "Id"
            case scoreAttributes = "ScoreAttributes"
            case type = "Type"
        }
    }

    public struct QuerySuggestionsBlockListSummary: AWSDecodableShape {
        /// The date-time summary information for a query suggestions  block list was last created.
        public let createdAt: Date?
        /// The identifier of a block list.
        public let id: String?
        /// The number of items in the block list file.
        public let itemCount: Int?
        /// The name of the block list.
        public let name: String?
        /// The status of the block list.
        public let status: QuerySuggestionsBlockListStatus?
        /// The date-time the block list was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, id: String? = nil, itemCount: Int? = nil, name: String? = nil, status: QuerySuggestionsBlockListStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.itemCount = itemCount
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case itemCount = "ItemCount"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct Relevance: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.  Only applies to DATE fields.
        public let duration: String?
        /// Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. You can only set the Freshness field on one DATE type field. Only applies to DATE fields.
        public let freshness: Bool?
        /// The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.
        public let importance: Int?
        /// Determines how values should be interpreted. When the RankOrder field is ASCENDING, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1. When the RankOrder field is DESCENDING, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task. Only applies to LONG and DOUBLE fields.
        public let rankOrder: Order?
        /// A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department," query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.  For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
        public let valueImportanceMap: [String: Int]?

        public init(duration: String? = nil, freshness: Bool? = nil, importance: Int? = nil, rankOrder: Order? = nil, valueImportanceMap: [String: Int]? = nil) {
            self.duration = duration
            self.freshness = freshness
            self.importance = importance
            self.rankOrder = rankOrder
            self.valueImportanceMap = valueImportanceMap
        }

        public func validate(name: String) throws {
            try self.validate(self.duration, name: "duration", parent: name, max: 10)
            try self.validate(self.duration, name: "duration", parent: name, min: 1)
            try self.validate(self.duration, name: "duration", parent: name, pattern: "^[0-9]+[s]$")
            try self.validate(self.importance, name: "importance", parent: name, max: 10)
            try self.validate(self.importance, name: "importance", parent: name, min: 1)
            try self.valueImportanceMap?.forEach {
                try validate($0.key, name: "valueImportanceMap.key", parent: name, max: 50)
                try validate($0.key, name: "valueImportanceMap.key", parent: name, min: 1)
                try validate($0.value, name: "valueImportanceMap[\"\($0.key)\"]", parent: name, max: 10)
                try validate($0.value, name: "valueImportanceMap[\"\($0.key)\"]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case duration = "Duration"
            case freshness = "Freshness"
            case importance = "Importance"
            case rankOrder = "RankOrder"
            case valueImportanceMap = "ValueImportanceMap"
        }
    }

    public struct RelevanceFeedback: AWSEncodableShape {
        /// Whether to document was relevant or not relevant to the search.
        public let relevanceValue: RelevanceType
        /// The unique identifier of the search result that the user provided relevance feedback for.
        public let resultId: String

        public init(relevanceValue: RelevanceType, resultId: String) {
            self.relevanceValue = relevanceValue
            self.resultId = resultId
        }

        public func validate(name: String) throws {
            try self.validate(self.resultId, name: "resultId", parent: name, max: 73)
            try self.validate(self.resultId, name: "resultId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case relevanceValue = "RelevanceValue"
            case resultId = "ResultId"
        }
    }

    public struct S3DataSourceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides the path to the S3 bucket that contains the user context filtering files for the data source. For the format of the file, see Access control for S3 data sources.
        public let accessControlListConfiguration: AccessControlListConfiguration?
        /// The name of the bucket that contains the documents.
        public let bucketName: String
        public let documentsMetadataConfiguration: DocumentsMetadataConfiguration?
        /// A list of glob patterns for documents that should not be indexed. If a document that matches an inclusion prefix or inclusion pattern also matches an exclusion pattern, the document is not indexed. Some examples  are:    *.png , *.jpg will exclude  all PNG and JPEG image files in a directory  (files with the extensions .png and .jpg).    *internal* will exclude all  files in a directory that contain 'internal' in the file name,  such as 'internal', 'internal_only', 'company_internal'.    **/*internal* will exclude  all internal-related files in a directory and its subdirectories.
        public let exclusionPatterns: [String]?
        /// A list of glob patterns for documents that should be indexed. If a document that matches an inclusion pattern also matches an exclusion pattern, the document is not indexed. Some examples  are:    *.txt will include all text files  in a directory (files with the extension .txt).    **/*.txt will include all text  files in a directory and its subdirectories.    *tax* will include all files in  a directory that contain 'tax' in the file name, such as 'tax',  'taxes', 'income_tax'.
        public let inclusionPatterns: [String]?
        /// A list of S3 prefixes for the documents that should be included in the index.
        public let inclusionPrefixes: [String]?

        public init(accessControlListConfiguration: AccessControlListConfiguration? = nil, bucketName: String, documentsMetadataConfiguration: DocumentsMetadataConfiguration? = nil, exclusionPatterns: [String]? = nil, inclusionPatterns: [String]? = nil, inclusionPrefixes: [String]? = nil) {
            self.accessControlListConfiguration = accessControlListConfiguration
            self.bucketName = bucketName
            self.documentsMetadataConfiguration = documentsMetadataConfiguration
            self.exclusionPatterns = exclusionPatterns
            self.inclusionPatterns = inclusionPatterns
            self.inclusionPrefixes = inclusionPrefixes
        }

        public func validate(name: String) throws {
            try self.accessControlListConfiguration?.validate(name: "\(name).accessControlListConfiguration")
            try self.validate(self.bucketName, name: "bucketName", parent: name, max: 63)
            try self.validate(self.bucketName, name: "bucketName", parent: name, min: 3)
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.documentsMetadataConfiguration?.validate(name: "\(name).documentsMetadataConfiguration")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.inclusionPrefixes?.forEach {
                try validate($0, name: "inclusionPrefixes[]", parent: name, max: 150)
                try validate($0, name: "inclusionPrefixes[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPrefixes, name: "inclusionPrefixes", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlListConfiguration = "AccessControlListConfiguration"
            case bucketName = "BucketName"
            case documentsMetadataConfiguration = "DocumentsMetadataConfiguration"
            case exclusionPatterns = "ExclusionPatterns"
            case inclusionPatterns = "InclusionPatterns"
            case inclusionPrefixes = "InclusionPrefixes"
        }
    }

    public struct S3Path: AWSEncodableShape & AWSDecodableShape {
        /// The name of the S3 bucket that contains the file.
        public let bucket: String
        /// The name of the file.
        public let key: String

        public init(bucket: String, key: String) {
            self.bucket = bucket
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "Bucket"
            case key = "Key"
        }
    }

    public struct SalesforceChatterFeedConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the column in the Salesforce FeedItem table that contains the content to index. Typically this is the Body column.
        public let documentDataFieldName: String
        /// The name of the column in the Salesforce FeedItem table that contains the title of the document. This is typically the Title column.
        public let documentTitleFieldName: String?
        /// Maps fields from a Salesforce chatter feed into Amazon Kendra index fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// Filters the documents in the feed based on status of the user. When you specify ACTIVE_USERS only documents from users who have an active account are indexed. When you specify STANDARD_USER only documents for Salesforce standard users are documented. You can specify both.
        public let includeFilterTypes: [SalesforceChatterFeedIncludeFilterType]?

        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, includeFilterTypes: [SalesforceChatterFeedIncludeFilterType]? = nil) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.includeFilterTypes = includeFilterTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.includeFilterTypes, name: "includeFilterTypes", parent: name, max: 2)
            try self.validate(self.includeFilterTypes, name: "includeFilterTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case includeFilterTypes = "IncludeFilterTypes"
        }
    }

    public struct SalesforceConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies configuration information for Salesforce chatter feeds.
        public let chatterFeedConfiguration: SalesforceChatterFeedConfiguration?
        /// Indicates whether Amazon Kendra should index attachments to Salesforce objects.
        public let crawlAttachments: Bool?
        /// A list of regular expression patterns. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an exclusion pattern and an inclusion pattern, the document is not included in the index. The regex is applied to the name of the attached file.
        public let excludeAttachmentFilePatterns: [String]?
        /// A list of regular expression patterns. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion pattern and an exclusion pattern, the document is not included in the index. The regex is applied to the name of the attached file.
        public let includeAttachmentFilePatterns: [String]?
        /// Specifies configuration information for the knowledge article types that Amazon Kendra indexes. Amazon Kendra indexes standard knowledge articles and the standard fields of knowledge articles, or the custom fields of custom knowledge articles, but not both.
        public let knowledgeArticleConfiguration: SalesforceKnowledgeArticleConfiguration?
        /// The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the key/value pairs required to connect to your Salesforce instance. The secret must contain a JSON structure with the following keys:   authenticationUrl - The OAUTH endpoint that Amazon Kendra connects to get an OAUTH token.    consumerKey - The application public key generated when you created your Salesforce application.   consumerSecret - The application private key generated when you created your Salesforce application.   password - The password associated with the user logging in to the Salesforce instance.   securityToken - The token associated with the user account logging in to the Salesforce instance.   username - The user name of the user logging in to the Salesforce instance.
        public let secretArn: String
        /// The instance URL for the Salesforce site that you want to index.
        public let serverUrl: String
        /// Provides configuration information for processing attachments to Salesforce standard objects.
        public let standardObjectAttachmentConfiguration: SalesforceStandardObjectAttachmentConfiguration?
        /// Specifies the Salesforce standard objects that Amazon Kendra indexes.
        public let standardObjectConfigurations: [SalesforceStandardObjectConfiguration]?

        public init(chatterFeedConfiguration: SalesforceChatterFeedConfiguration? = nil, crawlAttachments: Bool? = nil, excludeAttachmentFilePatterns: [String]? = nil, includeAttachmentFilePatterns: [String]? = nil, knowledgeArticleConfiguration: SalesforceKnowledgeArticleConfiguration? = nil, secretArn: String, serverUrl: String, standardObjectAttachmentConfiguration: SalesforceStandardObjectAttachmentConfiguration? = nil, standardObjectConfigurations: [SalesforceStandardObjectConfiguration]? = nil) {
            self.chatterFeedConfiguration = chatterFeedConfiguration
            self.crawlAttachments = crawlAttachments
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
            self.knowledgeArticleConfiguration = knowledgeArticleConfiguration
            self.secretArn = secretArn
            self.serverUrl = serverUrl
            self.standardObjectAttachmentConfiguration = standardObjectAttachmentConfiguration
            self.standardObjectConfigurations = standardObjectConfigurations
        }

        public func validate(name: String) throws {
            try self.chatterFeedConfiguration?.validate(name: "\(name).chatterFeedConfiguration")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 100)
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 100)
            try self.knowledgeArticleConfiguration?.validate(name: "\(name).knowledgeArticleConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, max: 2048)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, min: 1)
            try self.validate(self.serverUrl, name: "serverUrl", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            try self.standardObjectAttachmentConfiguration?.validate(name: "\(name).standardObjectAttachmentConfiguration")
            try self.standardObjectConfigurations?.forEach {
                try $0.validate(name: "\(name).standardObjectConfigurations[]")
            }
            try self.validate(self.standardObjectConfigurations, name: "standardObjectConfigurations", parent: name, max: 17)
            try self.validate(self.standardObjectConfigurations, name: "standardObjectConfigurations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case chatterFeedConfiguration = "ChatterFeedConfiguration"
            case crawlAttachments = "CrawlAttachments"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
            case knowledgeArticleConfiguration = "KnowledgeArticleConfiguration"
            case secretArn = "SecretArn"
            case serverUrl = "ServerUrl"
            case standardObjectAttachmentConfiguration = "StandardObjectAttachmentConfiguration"
            case standardObjectConfigurations = "StandardObjectConfigurations"
        }
    }

    public struct SalesforceCustomKnowledgeArticleTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the custom knowledge article that contains the document data to index.
        public let documentDataFieldName: String
        /// The name of the field in the custom knowledge article that contains the document title.
        public let documentTitleFieldName: String?
        /// One or more objects that map fields in the custom knowledge article to fields in the Amazon Kendra index.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// The name of the configuration.
        public let name: String

        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, name: String) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case name = "Name"
        }
    }

    public struct SalesforceKnowledgeArticleConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides configuration information for custom Salesforce knowledge articles.
        public let customKnowledgeArticleTypeConfigurations: [SalesforceCustomKnowledgeArticleTypeConfiguration]?
        /// Specifies the document states that should be included when Amazon Kendra indexes knowledge articles. You must specify at least one state.
        public let includedStates: [SalesforceKnowledgeArticleState]
        /// Provides configuration information for standard Salesforce knowledge articles.
        public let standardKnowledgeArticleTypeConfiguration: SalesforceStandardKnowledgeArticleTypeConfiguration?

        public init(customKnowledgeArticleTypeConfigurations: [SalesforceCustomKnowledgeArticleTypeConfiguration]? = nil, includedStates: [SalesforceKnowledgeArticleState], standardKnowledgeArticleTypeConfiguration: SalesforceStandardKnowledgeArticleTypeConfiguration? = nil) {
            self.customKnowledgeArticleTypeConfigurations = customKnowledgeArticleTypeConfigurations
            self.includedStates = includedStates
            self.standardKnowledgeArticleTypeConfiguration = standardKnowledgeArticleTypeConfiguration
        }

        public func validate(name: String) throws {
            try self.customKnowledgeArticleTypeConfigurations?.forEach {
                try $0.validate(name: "\(name).customKnowledgeArticleTypeConfigurations[]")
            }
            try self.validate(self.customKnowledgeArticleTypeConfigurations, name: "customKnowledgeArticleTypeConfigurations", parent: name, max: 10)
            try self.validate(self.customKnowledgeArticleTypeConfigurations, name: "customKnowledgeArticleTypeConfigurations", parent: name, min: 1)
            try self.validate(self.includedStates, name: "includedStates", parent: name, max: 3)
            try self.validate(self.includedStates, name: "includedStates", parent: name, min: 1)
            try self.standardKnowledgeArticleTypeConfiguration?.validate(name: "\(name).standardKnowledgeArticleTypeConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case customKnowledgeArticleTypeConfigurations = "CustomKnowledgeArticleTypeConfigurations"
            case includedStates = "IncludedStates"
            case standardKnowledgeArticleTypeConfiguration = "StandardKnowledgeArticleTypeConfiguration"
        }
    }

    public struct SalesforceStandardKnowledgeArticleTypeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field that contains the document data to index.
        public let documentDataFieldName: String
        /// The name of the field that contains the document title.
        public let documentTitleFieldName: String?
        /// One or more objects that map fields in the knowledge article to Amazon Kendra index fields. The index field must exist before you can map a Salesforce field to it.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct SalesforceStandardObjectAttachmentConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field used for the document title.
        public let documentTitleFieldName: String?
        /// One or more objects that map fields in attachments to Amazon Kendra index fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?

        public init(documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil) {
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
        }

        public func validate(name: String) throws {
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
        }
    }

    public struct SalesforceStandardObjectConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field in the standard object table that contains the document contents.
        public let documentDataFieldName: String
        /// The name of the field in the standard object table that contains the document title.
        public let documentTitleFieldName: String?
        /// One or more objects that map fields in the standard object to Amazon Kendra index fields. The index field must exist before you can map a Salesforce field to it.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// The name of the standard object.
        public let name: SalesforceStandardObjectName

        public init(documentDataFieldName: String, documentTitleFieldName: String? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, name: SalesforceStandardObjectName) {
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.fieldMappings = fieldMappings
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case fieldMappings = "FieldMappings"
            case name = "Name"
        }
    }

    public struct ScoreAttributes: AWSDecodableShape {
        /// A relative ranking for how well the response matches the query.
        public let scoreConfidence: ScoreConfidence?

        public init(scoreConfidence: ScoreConfidence? = nil) {
            self.scoreConfidence = scoreConfidence
        }

        private enum CodingKeys: String, CodingKey {
            case scoreConfidence = "ScoreConfidence"
        }
    }

    public struct Search: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the field is returned in the query response. The default is true.
        public let displayable: Bool?
        /// Indicates that the field can be used to create search facets, a count of results for each value in the field. The default is false .
        public let facetable: Bool?
        /// Determines whether the field is used in the search. If the Searchable field is true, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default is true for string fields and false for number and date fields.
        public let searchable: Bool?
        /// Determines whether the field can be used to sort the results of a query. If you specify sorting on a field that does not have Sortable set to true, Amazon Kendra returns an exception. The default is false.
        public let sortable: Bool?

        public init(displayable: Bool? = nil, facetable: Bool? = nil, searchable: Bool? = nil, sortable: Bool? = nil) {
            self.displayable = displayable
            self.facetable = facetable
            self.searchable = searchable
            self.sortable = sortable
        }

        private enum CodingKeys: String, CodingKey {
            case displayable = "Displayable"
            case facetable = "Facetable"
            case searchable = "Searchable"
            case sortable = "Sortable"
        }
    }

    public struct SeedUrlConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of seed or starting point URLs of the  websites you want to crawl. The list can include a maximum of 100 seed URLs.
        public let seedUrls: [String]
        /// You can choose one of the following modes:    HOST_ONLY – crawl only the website host names.  For example, if the seed URL is "abc.example.com",  then only URLs with host name "abc.example.com" are crawled.    SUBDOMAINS – crawl the website host names with  subdomains. For example, if the seed URL is  "abc.example.com", then  "a.abc.example.com" and "b.abc.example.com" are also crawled.    EVERYTHING – crawl the website host names with  subdomains and other domains that the webpages link to.   The default mode is set to HOST_ONLY.
        public let webCrawlerMode: WebCrawlerMode?

        public init(seedUrls: [String], webCrawlerMode: WebCrawlerMode? = nil) {
            self.seedUrls = seedUrls
            self.webCrawlerMode = webCrawlerMode
        }

        public func validate(name: String) throws {
            try self.seedUrls.forEach {
                try validate($0, name: "seedUrls[]", parent: name, max: 2048)
                try validate($0, name: "seedUrls[]", parent: name, min: 1)
                try validate($0, name: "seedUrls[]", parent: name, pattern: "^(https?):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.seedUrls, name: "seedUrls", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case seedUrls = "SeedUrls"
            case webCrawlerMode = "WebCrawlerMode"
        }
    }

    public struct ServerSideEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the KMScustomer master key (CMK). Amazon Kendra doesn't support asymmetric CMKs.
        public let kmsKeyId: String?

        public init(kmsKeyId: String? = nil) {
            self.kmsKeyId = kmsKeyId
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
        }
    }

    public struct ServiceNowConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Determines the type of authentication used to connect to the ServiceNow instance. If you choose HTTP_BASIC, Amazon Kendra is authenticated using the user name and password provided in the  Secrets Manager secret in the SecretArn field. When you choose OAUTH2, Amazon Kendra is authenticated using the OAuth token and secret provided in the Secrets Manager secret, and the user name and password are used to determine which information Amazon Kendra has access to. When you use OAUTH2 authentication, you must generate a token and a client secret using the ServiceNow console. For more information, see Using a ServiceNow data source.
        public let authenticationType: ServiceNowAuthenticationType?
        /// The ServiceNow instance that the data source connects to. The host endpoint should look like the following: {instance}.service-now.com.
        public let hostUrl: String
        /// Provides configuration information for crawling knowledge articles in the ServiceNow site.
        public let knowledgeArticleConfiguration: ServiceNowKnowledgeArticleConfiguration?
        /// The Amazon Resource Name (ARN) of the Secrets Manager secret that contains the user name and password required to connect to the ServiceNow instance.
        public let secretArn: String
        /// Provides configuration information for crawling service catalogs in the ServiceNow site.
        public let serviceCatalogConfiguration: ServiceNowServiceCatalogConfiguration?
        /// The identifier of the release that the ServiceNow host is running. If the host is not running the LONDON release, use OTHERS.
        public let serviceNowBuildVersion: ServiceNowBuildVersionType

        public init(authenticationType: ServiceNowAuthenticationType? = nil, hostUrl: String, knowledgeArticleConfiguration: ServiceNowKnowledgeArticleConfiguration? = nil, secretArn: String, serviceCatalogConfiguration: ServiceNowServiceCatalogConfiguration? = nil, serviceNowBuildVersion: ServiceNowBuildVersionType) {
            self.authenticationType = authenticationType
            self.hostUrl = hostUrl
            self.knowledgeArticleConfiguration = knowledgeArticleConfiguration
            self.secretArn = secretArn
            self.serviceCatalogConfiguration = serviceCatalogConfiguration
            self.serviceNowBuildVersion = serviceNowBuildVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, max: 2048)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, min: 1)
            try self.validate(self.hostUrl, name: "hostUrl", parent: name, pattern: "^(?!(^(https?|ftp|file):\\/\\/))[a-z0-9-]+(\\.service-now\\.com)$")
            try self.knowledgeArticleConfiguration?.validate(name: "\(name).knowledgeArticleConfiguration")
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.serviceCatalogConfiguration?.validate(name: "\(name).serviceCatalogConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationType = "AuthenticationType"
            case hostUrl = "HostUrl"
            case knowledgeArticleConfiguration = "KnowledgeArticleConfiguration"
            case secretArn = "SecretArn"
            case serviceCatalogConfiguration = "ServiceCatalogConfiguration"
            case serviceNowBuildVersion = "ServiceNowBuildVersion"
        }
    }

    public struct ServiceNowKnowledgeArticleConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether Amazon Kendra should index attachments to knowledge articles.
        public let crawlAttachments: Bool?
        /// The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
        public let documentDataFieldName: String
        /// The name of the ServiceNow field that is mapped to the index document title field.
        public let documentTitleFieldName: String?
        /// List of regular expressions applied to knowledge articles. Items that don't match the inclusion pattern are not indexed. The regex is applied to the field specified in the PatternTargetField
        public let excludeAttachmentFilePatterns: [String]?
        /// Mapping between ServiceNow fields and Amazon Kendra index fields. You must create the index field before you map the field.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A query that selects the knowledge articles to index. The query can return articles from multiple knowledge bases, and the knowledge bases can be public or private. The query string must be one generated by the ServiceNow console. For more information, see Specifying documents to index with a query.
        public let filterQuery: String?
        /// List of regular expressions applied to knowledge articles. Items that don't match the inclusion pattern are not indexed. The regex is applied to the field specified in the PatternTargetField.
        public let includeAttachmentFilePatterns: [String]?

        public init(crawlAttachments: Bool? = nil, documentDataFieldName: String, documentTitleFieldName: String? = nil, excludeAttachmentFilePatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, filterQuery: String? = nil, includeAttachmentFilePatterns: [String]? = nil) {
            self.crawlAttachments = crawlAttachments
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.fieldMappings = fieldMappings
            self.filterQuery = filterQuery
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, max: 2048)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, min: 1)
            try self.validate(self.filterQuery, name: "filterQuery", parent: name, pattern: "^\\P{C}*$")
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlAttachments = "CrawlAttachments"
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case fieldMappings = "FieldMappings"
            case filterQuery = "FilterQuery"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
        }
    }

    public struct ServiceNowServiceCatalogConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether Amazon Kendra should crawl attachments to the service catalog items.
        public let crawlAttachments: Bool?
        /// The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
        public let documentDataFieldName: String
        /// The name of the ServiceNow field that is mapped to the index document title field.
        public let documentTitleFieldName: String?
        /// A list of regular expression patterns. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an exclusion pattern and an inclusion pattern, the document is not included in the index. The regex is applied to the file name of the attachment.
        public let excludeAttachmentFilePatterns: [String]?
        /// Mapping between ServiceNow fields and Amazon Kendra index fields. You must create the index field before you map the field.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an exclusion pattern and an inclusion pattern, the document is not included in the index. The regex is applied to the file name of the attachment.
        public let includeAttachmentFilePatterns: [String]?

        public init(crawlAttachments: Bool? = nil, documentDataFieldName: String, documentTitleFieldName: String? = nil, excludeAttachmentFilePatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, includeAttachmentFilePatterns: [String]? = nil) {
            self.crawlAttachments = crawlAttachments
            self.documentDataFieldName = documentDataFieldName
            self.documentTitleFieldName = documentTitleFieldName
            self.excludeAttachmentFilePatterns = excludeAttachmentFilePatterns
            self.fieldMappings = fieldMappings
            self.includeAttachmentFilePatterns = includeAttachmentFilePatterns
        }

        public func validate(name: String) throws {
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, max: 100)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, min: 1)
            try self.validate(self.documentDataFieldName, name: "documentDataFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.excludeAttachmentFilePatterns?.forEach {
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "excludeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.excludeAttachmentFilePatterns, name: "excludeAttachmentFilePatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.includeAttachmentFilePatterns?.forEach {
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, max: 150)
                try validate($0, name: "includeAttachmentFilePatterns[]", parent: name, min: 1)
            }
            try self.validate(self.includeAttachmentFilePatterns, name: "includeAttachmentFilePatterns", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case crawlAttachments = "CrawlAttachments"
            case documentDataFieldName = "DocumentDataFieldName"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case excludeAttachmentFilePatterns = "ExcludeAttachmentFilePatterns"
            case fieldMappings = "FieldMappings"
            case includeAttachmentFilePatterns = "IncludeAttachmentFilePatterns"
        }
    }

    public struct SharePointConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to include attachments to documents stored in your Microsoft SharePoint site in the index; otherwise, FALSE.
        public let crawlAttachments: Bool?
        /// A Boolean value that specifies whether local groups are disabled (True) or enabled (False).
        public let disableLocalGroups: Bool?
        /// The Microsoft SharePoint attribute field that contains the title of the document.
        public let documentTitleFieldName: String?
        /// A list of regular expression patterns. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an exclusion pattern and an inclusion pattern, the document is not included in the index. The regex is applied to the display URL of the SharePoint document.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map Microsoft SharePoint attributes to custom fields in the Amazon Kendra index. You must first create the index fields using the UpdateIndex operation before you map SharePoint attributes. For more information, see Mapping Data Source Fields.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion pattern and an exclusion pattern, the document is not included in the index. The regex is applied to the display URL of the SharePoint document.
        public let inclusionPatterns: [String]?
        /// The Amazon Resource Name (ARN) of credentials stored in  Secrets Manager. The credentials should be a user/password pair.  If you use SharePoint Server, you also need to provide the sever  domain name as part of the credentials. For more information, see Using a Microsoft SharePoint Data Source. For more information about Secrets Manager see  What Is  Secrets Manager in the Secrets Manager user guide.
        public let secretArn: String
        /// The version of Microsoft SharePoint that you are using as a data source.
        public let sharePointVersion: SharePointVersion
        public let sslCertificateS3Path: S3Path?
        /// The URLs of the Microsoft SharePoint site that contains the documents that should be indexed.
        public let urls: [String]
        /// Set to TRUE to use the Microsoft SharePoint change log to determine the documents that need to be updated in the index. Depending on the size of the SharePoint change log, it may take longer for Amazon Kendra to use the change log than it takes it to determine the changed documents using the Amazon Kendra document crawler.
        public let useChangeLog: Bool?
        public let vpcConfiguration: DataSourceVpcConfiguration?

        public init(crawlAttachments: Bool? = nil, disableLocalGroups: Bool? = nil, documentTitleFieldName: String? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, secretArn: String, sharePointVersion: SharePointVersion, sslCertificateS3Path: S3Path? = nil, urls: [String], useChangeLog: Bool? = nil, vpcConfiguration: DataSourceVpcConfiguration? = nil) {
            self.crawlAttachments = crawlAttachments
            self.disableLocalGroups = disableLocalGroups
            self.documentTitleFieldName = documentTitleFieldName
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.secretArn = secretArn
            self.sharePointVersion = sharePointVersion
            self.sslCertificateS3Path = sslCertificateS3Path
            self.urls = urls
            self.useChangeLog = useChangeLog
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, max: 100)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, min: 1)
            try self.validate(self.documentTitleFieldName, name: "documentTitleFieldName", parent: name, pattern: "^[a-zA-Z][a-zA-Z0-9_.]*$")
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.validate(self.secretArn, name: "secretArn", parent: name, max: 1284)
            try self.validate(self.secretArn, name: "secretArn", parent: name, min: 1)
            try self.validate(self.secretArn, name: "secretArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sslCertificateS3Path?.validate(name: "\(name).sslCertificateS3Path")
            try self.urls.forEach {
                try validate($0, name: "urls[]", parent: name, max: 2048)
                try validate($0, name: "urls[]", parent: name, min: 1)
                try validate($0, name: "urls[]", parent: name, pattern: "^(https?|ftp|file):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.urls, name: "urls", parent: name, max: 100)
            try self.validate(self.urls, name: "urls", parent: name, min: 1)
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case crawlAttachments = "CrawlAttachments"
            case disableLocalGroups = "DisableLocalGroups"
            case documentTitleFieldName = "DocumentTitleFieldName"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case secretArn = "SecretArn"
            case sharePointVersion = "SharePointVersion"
            case sslCertificateS3Path = "SslCertificateS3Path"
            case urls = "Urls"
            case useChangeLog = "UseChangeLog"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct SiteMapsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The list of sitemap URLs of the websites  you want to crawl. The list can include a maximum of three sitemap URLs.
        public let siteMaps: [String]

        public init(siteMaps: [String]) {
            self.siteMaps = siteMaps
        }

        public func validate(name: String) throws {
            try self.siteMaps.forEach {
                try validate($0, name: "siteMaps[]", parent: name, max: 2048)
                try validate($0, name: "siteMaps[]", parent: name, min: 1)
                try validate($0, name: "siteMaps[]", parent: name, pattern: "^(https?):\\/\\/([^\\s]*)$")
            }
            try self.validate(self.siteMaps, name: "siteMaps", parent: name, max: 3)
        }

        private enum CodingKeys: String, CodingKey {
            case siteMaps = "SiteMaps"
        }
    }

    public struct SortingConfiguration: AWSEncodableShape {
        /// The name of the document attribute used to sort the response. You can use any field that has the Sortable flag set to true. You can also sort by any of the following built-in attributes:   _category   _created_at   _last_updated_at   _version   _view_count
        public let documentAttributeKey: String
        /// The order that the results should be returned in. In case of ties, the relevance assigned to the result by Amazon Kendra is used as the tie-breaker.
        public let sortOrder: SortOrder

        public init(documentAttributeKey: String, sortOrder: SortOrder) {
            self.documentAttributeKey = documentAttributeKey
            self.sortOrder = sortOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, max: 200)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, min: 1)
            try self.validate(self.documentAttributeKey, name: "documentAttributeKey", parent: name, pattern: "^[a-zA-Z0-9_][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentAttributeKey = "DocumentAttributeKey"
            case sortOrder = "SortOrder"
        }
    }

    public struct SqlConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether Amazon Kendra encloses SQL identifiers for tables and column names in double quotes (") when making a database query. By default, Amazon Kendra passes SQL identifiers the way that they are entered into the data source configuration. It does not change the case of identifiers or enclose them in quotes. PostgreSQL internally converts uppercase characters to lower case characters in identifiers unless they are quoted. Choosing this option encloses identifiers in quotes so that PostgreSQL does not convert the character's case. For MySQL databases, you must enable the ansi_quotes option when you set this field to DOUBLE_QUOTES.
        public let queryIdentifiersEnclosingOption: QueryIdentifiersEnclosingOption?

        public init(queryIdentifiersEnclosingOption: QueryIdentifiersEnclosingOption? = nil) {
            self.queryIdentifiersEnclosingOption = queryIdentifiersEnclosingOption
        }

        private enum CodingKeys: String, CodingKey {
            case queryIdentifiersEnclosingOption = "QueryIdentifiersEnclosingOption"
        }
    }

    public struct StartDataSourceSyncJobRequest: AWSEncodableShape {
        /// The identifier of the data source to synchronize.
        public let id: String
        /// The identifier of the index that contains the data source.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct StartDataSourceSyncJobResponse: AWSDecodableShape {
        /// Identifies a particular synchronization job.
        public let executionId: String?

        public init(executionId: String? = nil) {
            self.executionId = executionId
        }

        private enum CodingKeys: String, CodingKey {
            case executionId = "ExecutionId"
        }
    }

    public struct Status: AWSDecodableShape {
        /// The unique identifier of the document.
        public let documentId: String?
        /// The current status of a document. If the document was submitted for deletion, the status is NOT_FOUND after the document is deleted.
        public let documentStatus: DocumentStatus?
        /// Indicates the source of the error.
        public let failureCode: String?
        /// Provides detailed information about why the document couldn't be indexed. Use this information to correct the error before you resubmit the document for indexing.
        public let failureReason: String?

        public init(documentId: String? = nil, documentStatus: DocumentStatus? = nil, failureCode: String? = nil, failureReason: String? = nil) {
            self.documentId = documentId
            self.documentStatus = documentStatus
            self.failureCode = failureCode
            self.failureReason = failureReason
        }

        private enum CodingKeys: String, CodingKey {
            case documentId = "DocumentId"
            case documentStatus = "DocumentStatus"
            case failureCode = "FailureCode"
            case failureReason = "FailureReason"
        }
    }

    public struct StopDataSourceSyncJobRequest: AWSEncodableShape {
        /// The identifier of the data source for which to stop the synchronization jobs.
        public let id: String
        /// The identifier of the index that contains the data source.
        public let indexId: String

        public init(id: String, indexId: String) {
            self.id = id
            self.indexId = indexId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case indexId = "IndexId"
        }
    }

    public struct SubmitFeedbackRequest: AWSEncodableShape {
        /// Tells Amazon Kendra that a particular search result link was chosen by the user.
        public let clickFeedbackItems: [ClickFeedback]?
        /// The identifier of the index that was queried.
        public let indexId: String
        /// The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the Query operation.
        public let queryId: String
        /// Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.
        public let relevanceFeedbackItems: [RelevanceFeedback]?

        public init(clickFeedbackItems: [ClickFeedback]? = nil, indexId: String, queryId: String, relevanceFeedbackItems: [RelevanceFeedback]? = nil) {
            self.clickFeedbackItems = clickFeedbackItems
            self.indexId = indexId
            self.queryId = queryId
            self.relevanceFeedbackItems = relevanceFeedbackItems
        }

        public func validate(name: String) throws {
            try self.clickFeedbackItems?.forEach {
                try $0.validate(name: "\(name).clickFeedbackItems[]")
            }
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
            try self.validate(self.queryId, name: "queryId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.relevanceFeedbackItems?.forEach {
                try $0.validate(name: "\(name).relevanceFeedbackItems[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clickFeedbackItems = "ClickFeedbackItems"
            case indexId = "IndexId"
            case queryId = "QueryId"
            case relevanceFeedbackItems = "RelevanceFeedbackItems"
        }
    }

    public struct Suggestion: AWSDecodableShape {
        /// The unique UUID (universally unique identifier) of a single  query suggestion.
        public let id: String?
        /// The value for the unique UUID (universally unique identifier)  of a single query suggestion. The value is the text string of a suggestion.
        public let value: SuggestionValue?

        public init(id: String? = nil, value: SuggestionValue? = nil) {
            self.id = id
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case value = "Value"
        }
    }

    public struct SuggestionHighlight: AWSDecodableShape {
        /// The zero-based location in the response string where the highlight starts.
        public let beginOffset: Int?
        /// The zero-based location in the response string where the highlight ends.
        public let endOffset: Int?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
        }
    }

    public struct SuggestionTextWithHighlights: AWSDecodableShape {
        /// The beginning and end of the query suggestion text that should be highlighted.
        public let highlights: [SuggestionHighlight]?
        /// The query suggestion text to display to the user.
        public let text: String?

        public init(highlights: [SuggestionHighlight]? = nil, text: String? = nil) {
            self.highlights = highlights
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case highlights = "Highlights"
            case text = "Text"
        }
    }

    public struct SuggestionValue: AWSDecodableShape {
        /// The SuggestionTextWithHighlights structure that contains  the query suggestion text and highlights.
        public let text: SuggestionTextWithHighlights?

        public init(text: SuggestionTextWithHighlights? = nil) {
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case text = "Text"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, or data source.
        public let key: String
        /// The value associated with the tag. The value may be an empty string but it can't be null.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, or data source to tag.
        public let resourceARN: String
        /// A list of tag keys to add to the index, FAQ, or data source. If a tag already exists, the existing value is replaced with the new value.
        public let tags: [Tag]

        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TextDocumentStatistics: AWSDecodableShape {
        /// The total size, in bytes, of the indexed documents.
        public let indexedTextBytes: Int64
        /// The number of text documents indexed.
        public let indexedTextDocumentsCount: Int

        public init(indexedTextBytes: Int64, indexedTextDocumentsCount: Int) {
            self.indexedTextBytes = indexedTextBytes
            self.indexedTextDocumentsCount = indexedTextDocumentsCount
        }

        private enum CodingKeys: String, CodingKey {
            case indexedTextBytes = "IndexedTextBytes"
            case indexedTextDocumentsCount = "IndexedTextDocumentsCount"
        }
    }

    public struct TextWithHighlights: AWSDecodableShape {
        /// The beginning and end of the text that should be highlighted.
        public let highlights: [Highlight]?
        /// The text to display to the user.
        public let text: String?

        public init(highlights: [Highlight]? = nil, text: String? = nil) {
            self.highlights = highlights
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case highlights = "Highlights"
            case text = "Text"
        }
    }

    public struct ThesaurusSummary: AWSDecodableShape {
        /// The Unix datetime that the thesaurus was created.
        public let createdAt: Date?
        /// The identifier of the thesaurus.
        public let id: String?
        /// The name of the thesaurus.
        public let name: String?
        /// The status of the thesaurus.
        public let status: ThesaurusStatus?
        /// The Unix datetime that the thesaurus was last updated.
        public let updatedAt: Date?

        public init(createdAt: Date? = nil, id: String? = nil, name: String? = nil, status: ThesaurusStatus? = nil, updatedAt: Date? = nil) {
            self.createdAt = createdAt
            self.id = id
            self.name = name
            self.status = status
            self.updatedAt = updatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "CreatedAt"
            case id = "Id"
            case name = "Name"
            case status = "Status"
            case updatedAt = "UpdatedAt"
        }
    }

    public struct TimeRange: AWSEncodableShape & AWSDecodableShape {
        /// The UNIX datetime of the end of the time range.
        public let endTime: Date?
        /// The UNIX datetime of the beginning of the time range.
        public let startTime: Date?

        public init(endTime: Date? = nil, startTime: Date? = nil) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case startTime = "StartTime"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the index, FAQ, or data source to remove the tag from.
        public let resourceARN: String
        /// A list of tag keys to remove from the index, FAQ, or data source. If a tag key does not exist on the resource, it is ignored.
        public let tagKeys: [String]

        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDataSourceRequest: AWSEncodableShape {
        /// Configuration information for an Amazon Kendra data source.
        public let configuration: DataSourceConfiguration?
        /// Configuration information for altering document metadata and content during the document ingestion process when you update a data source. For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see  Customizing  document metadata during the ingestion process.
        public let customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration?
        /// The new description for the data source.
        public let description: String?
        /// The unique identifier of the data source to update.
        public let id: String
        /// The identifier of the index that contains the data source to update.
        public let indexId: String
        /// The code for a language. This allows you to support a language for all  documents when updating the data source. English is supported  by default. For more information on supported languages, including their codes,  see Adding  documents in languages other than English.
        public let languageCode: String?
        /// The name of the data source to update. The name of the data source can't be updated. To rename a data source you must delete the data source and re-create it.
        public let name: String?
        /// The Amazon Resource Name (ARN) of the new role to use when the data source is accessing resources on your behalf.
        public let roleArn: String?
        /// The new update schedule for the data source.
        public let schedule: String?

        public init(configuration: DataSourceConfiguration? = nil, customDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfiguration? = nil, description: String? = nil, id: String, indexId: String, languageCode: String? = nil, name: String? = nil, roleArn: String? = nil, schedule: String? = nil) {
            self.configuration = configuration
            self.customDocumentEnrichmentConfiguration = customDocumentEnrichmentConfiguration
            self.description = description
            self.id = id
            self.indexId = indexId
            self.languageCode = languageCode
            self.name = name
            self.roleArn = roleArn
            self.schedule = schedule
        }

        public func validate(name: String) throws {
            try self.configuration?.validate(name: "\(name).configuration")
            try self.customDocumentEnrichmentConfiguration?.validate(name: "\(name).customDocumentEnrichmentConfiguration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.languageCode, name: "languageCode", parent: name, max: 10)
            try self.validate(self.languageCode, name: "languageCode", parent: name, min: 2)
            try self.validate(self.languageCode, name: "languageCode", parent: name, pattern: "^[a-zA-Z-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case customDocumentEnrichmentConfiguration = "CustomDocumentEnrichmentConfiguration"
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case languageCode = "LanguageCode"
            case name = "Name"
            case roleArn = "RoleArn"
            case schedule = "Schedule"
        }
    }

    public struct UpdateExperienceRequest: AWSEncodableShape {
        /// Provides the user configuration information. This includes the Amazon Web Services SSO field name that contains the identifiers of your users, such as their emails.
        public let configuration: ExperienceConfiguration?
        /// The description of your Amazon Kendra experience you want to update.
        public let description: String?
        /// The identifier of your Amazon Kendra experience you want to update.
        public let id: String
        /// The identifier of the index for your Amazon Kendra experience you want to update.
        public let indexId: String
        /// The name of your Amazon Kendra experience you want to update.
        public let name: String?
        /// The Amazon Resource Name (ARN) of a role with permission to access Query operations, QuerySuggestions operations, SubmitFeedback operations, and Amazon Web Services SSO that stores your user and group information.  For more information, see IAM roles for Amazon Kendra.
        public let roleArn: String?

        public init(configuration: ExperienceConfiguration? = nil, description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil) {
            self.configuration = configuration
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.configuration?.validate(name: "\(name).configuration")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "Configuration"
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
        }
    }

    public struct UpdateIndexRequest: AWSEncodableShape {
        /// Sets the number of additional storage and query capacity units that should be used by the index. You can change the capacity of the index up to 5 times per day. If you are using extra storage units, you can't reduce the storage capacity below that required to meet the storage needs for your index.
        public let capacityUnits: CapacityUnitsConfiguration?
        /// A new description for the index.
        public let description: String?
        /// The document metadata to update.
        public let documentMetadataConfigurationUpdates: [DocumentMetadataConfiguration]?
        /// The identifier of the index to update.
        public let id: String
        /// The name of the index to update.
        public let name: String?
        /// A new IAM role that gives Amazon Kendra permission to access your Amazon CloudWatch logs.
        public let roleArn: String?
        /// The user context policy.
        public let userContextPolicy: UserContextPolicy?
        /// Enables fetching access levels of groups and users from an Amazon Web Services Single Sign On  identity source. To configure this, see  UserGroupResolutionConfiguration.
        public let userGroupResolutionConfiguration: UserGroupResolutionConfiguration?
        /// The user token configuration.
        public let userTokenConfigurations: [UserTokenConfiguration]?

        public init(capacityUnits: CapacityUnitsConfiguration? = nil, description: String? = nil, documentMetadataConfigurationUpdates: [DocumentMetadataConfiguration]? = nil, id: String, name: String? = nil, roleArn: String? = nil, userContextPolicy: UserContextPolicy? = nil, userGroupResolutionConfiguration: UserGroupResolutionConfiguration? = nil, userTokenConfigurations: [UserTokenConfiguration]? = nil) {
            self.capacityUnits = capacityUnits
            self.description = description
            self.documentMetadataConfigurationUpdates = documentMetadataConfigurationUpdates
            self.id = id
            self.name = name
            self.roleArn = roleArn
            self.userContextPolicy = userContextPolicy
            self.userGroupResolutionConfiguration = userGroupResolutionConfiguration
            self.userTokenConfigurations = userTokenConfigurations
        }

        public func validate(name: String) throws {
            try self.capacityUnits?.validate(name: "\(name).capacityUnits")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.documentMetadataConfigurationUpdates?.forEach {
                try $0.validate(name: "\(name).documentMetadataConfigurationUpdates[]")
            }
            try self.validate(self.documentMetadataConfigurationUpdates, name: "documentMetadataConfigurationUpdates", parent: name, max: 500)
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 1000)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.userTokenConfigurations?.forEach {
                try $0.validate(name: "\(name).userTokenConfigurations[]")
            }
            try self.validate(self.userTokenConfigurations, name: "userTokenConfigurations", parent: name, max: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case capacityUnits = "CapacityUnits"
            case description = "Description"
            case documentMetadataConfigurationUpdates = "DocumentMetadataConfigurationUpdates"
            case id = "Id"
            case name = "Name"
            case roleArn = "RoleArn"
            case userContextPolicy = "UserContextPolicy"
            case userGroupResolutionConfiguration = "UserGroupResolutionConfiguration"
            case userTokenConfigurations = "UserTokenConfigurations"
        }
    }

    public struct UpdateQuerySuggestionsBlockListRequest: AWSEncodableShape {
        /// The description for a block list.
        public let description: String?
        /// The unique identifier of a block list.
        public let id: String
        /// The identifier of the index for a block list.
        public let indexId: String
        /// The name of a block list.
        public let name: String?
        /// The IAM (Identity and Access Management) role used to access the  block list text file in S3.
        public let roleArn: String?
        /// The S3 path where your block list text file sits in S3. If you update your block list and provide the same path to the  block list text file in S3, then Amazon Kendra reloads the file to refresh  the block list. Amazon Kendra does not automatically refresh your block list.  You need to call the UpdateQuerySuggestionsBlockList API  to refresh you block list. If you update your block list, then Amazon Kendra asynchronously refreshes  all query suggestions with the latest content in the S3 file. This  means changes might not take effect immediately.
        public let sourceS3Path: S3Path?

        public init(description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil) {
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 36)
            try self.validate(self.id, name: "id", parent: name, min: 36)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path?.validate(name: "\(name).sourceS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
        }
    }

    public struct UpdateQuerySuggestionsConfigRequest: AWSEncodableShape {
        ///  TRUE to include queries without user information (i.e. all queries,  irrespective of the user), otherwise FALSE to only include queries  with user information. If you pass user information to Amazon Kendra along with the queries, you can set this  flag to FALSE and instruct Amazon Kendra to only consider queries with user  information. If you set to FALSE, Amazon Kendra only considers queries searched at least  MinimumQueryCount times across MinimumNumberOfQueryingUsers  unique users for suggestions. If you set to TRUE, Amazon Kendra ignores all user information and learns  from all queries.
        public let includeQueriesWithoutUserInformation: Bool?
        /// The identifier of the index you want to update query suggestions settings for.
        public let indexId: String
        /// The minimum number of unique users who must search a query in order for the query  to be eligible to suggest to your users. Increasing this number might decrease the number of suggestions. However, this  ensures a query is searched by many users and is truly popular to suggest to users. How you tune this setting depends on your specific needs.
        public let minimumNumberOfQueryingUsers: Int?
        /// The the minimum number of times a query must be searched in order to be  eligible to suggest to your users. Decreasing this number increases the number of suggestions. However, this  affects the quality of suggestions as it sets a low bar for a query to be  considered popular to suggest to users. How you tune this setting depends on your specific needs.
        public let minimumQueryCount: Int?
        /// Set the mode to ENABLED or LEARN_ONLY. By default, Amazon Kendra enables query suggestions.  LEARN_ONLY mode allows you to turn off query suggestions.  You can to update this at any time. In LEARN_ONLY mode, Amazon Kendra continues to learn from new  queries to keep suggestions up to date for when you are ready to  switch to ENABLED mode again.
        public let mode: Mode?
        /// How recent your queries are in your query log time window. The time window is the number of days from current day to past days. By default, Amazon Kendra sets this to 180.
        public let queryLogLookBackWindowInDays: Int?

        public init(includeQueriesWithoutUserInformation: Bool? = nil, indexId: String, minimumNumberOfQueryingUsers: Int? = nil, minimumQueryCount: Int? = nil, mode: Mode? = nil, queryLogLookBackWindowInDays: Int? = nil) {
            self.includeQueriesWithoutUserInformation = includeQueriesWithoutUserInformation
            self.indexId = indexId
            self.minimumNumberOfQueryingUsers = minimumNumberOfQueryingUsers
            self.minimumQueryCount = minimumQueryCount
            self.mode = mode
            self.queryLogLookBackWindowInDays = queryLogLookBackWindowInDays
        }

        public func validate(name: String) throws {
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.minimumNumberOfQueryingUsers, name: "minimumNumberOfQueryingUsers", parent: name, max: 10000)
            try self.validate(self.minimumNumberOfQueryingUsers, name: "minimumNumberOfQueryingUsers", parent: name, min: 1)
            try self.validate(self.minimumQueryCount, name: "minimumQueryCount", parent: name, max: 10000)
            try self.validate(self.minimumQueryCount, name: "minimumQueryCount", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case includeQueriesWithoutUserInformation = "IncludeQueriesWithoutUserInformation"
            case indexId = "IndexId"
            case minimumNumberOfQueryingUsers = "MinimumNumberOfQueryingUsers"
            case minimumQueryCount = "MinimumQueryCount"
            case mode = "Mode"
            case queryLogLookBackWindowInDays = "QueryLogLookBackWindowInDays"
        }
    }

    public struct UpdateThesaurusRequest: AWSEncodableShape {
        /// The updated description of the thesaurus.
        public let description: String?
        /// The identifier of the thesaurus to update.
        public let id: String
        /// The identifier of the index associated with the thesaurus to update.
        public let indexId: String
        /// The updated name of the thesaurus.
        public let name: String?
        /// The updated role ARN of the thesaurus.
        public let roleArn: String?
        public let sourceS3Path: S3Path?

        public init(description: String? = nil, id: String, indexId: String, name: String? = nil, roleArn: String? = nil, sourceS3Path: S3Path? = nil) {
            self.description = description
            self.id = id
            self.indexId = indexId
            self.name = name
            self.roleArn = roleArn
            self.sourceS3Path = sourceS3Path
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.indexId, name: "indexId", parent: name, max: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, min: 36)
            try self.validate(self.indexId, name: "indexId", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 1284)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}$")
            try self.sourceS3Path?.validate(name: "\(name).sourceS3Path")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case indexId = "IndexId"
            case name = "Name"
            case roleArn = "RoleArn"
            case sourceS3Path = "SourceS3Path"
        }
    }

    public struct Urls: AWSEncodableShape & AWSDecodableShape {
        /// Provides the configuration of the seed or starting point URLs of the websites  you want to crawl. You can choose to crawl only the website host names, or the website host names  with subdomains, or the website host names with subdomains and other domains  that the webpages link to. You can list up to 100 seed URLs.
        public let seedUrlConfiguration: SeedUrlConfiguration?
        /// Provides the configuration of the sitemap URLs of the websites you want to crawl. Only URLs belonging to the same website host names are crawled. You can list up to  three sitemap URLs.
        public let siteMapsConfiguration: SiteMapsConfiguration?

        public init(seedUrlConfiguration: SeedUrlConfiguration? = nil, siteMapsConfiguration: SiteMapsConfiguration? = nil) {
            self.seedUrlConfiguration = seedUrlConfiguration
            self.siteMapsConfiguration = siteMapsConfiguration
        }

        public func validate(name: String) throws {
            try self.seedUrlConfiguration?.validate(name: "\(name).seedUrlConfiguration")
            try self.siteMapsConfiguration?.validate(name: "\(name).siteMapsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case seedUrlConfiguration = "SeedUrlConfiguration"
            case siteMapsConfiguration = "SiteMapsConfiguration"
        }
    }

    public struct UserContext: AWSEncodableShape {
        /// The list of data source groups you want to filter search results  based on groups' access to documents in that data source.
        public let dataSourceGroups: [DataSourceGroup]?
        /// The list of groups you want to filter search results based on the  groups' access to documents.
        public let groups: [String]?
        /// The user context token for filtering search results for a user. It must  be a JWT or a JSON token.
        public let token: String?
        /// The identifier of the user you want to filter search results based on their  access to documents.
        public let userId: String?

        public init(dataSourceGroups: [DataSourceGroup]? = nil, groups: [String]? = nil, token: String? = nil, userId: String? = nil) {
            self.dataSourceGroups = dataSourceGroups
            self.groups = groups
            self.token = token
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.dataSourceGroups?.forEach {
                try $0.validate(name: "\(name).dataSourceGroups[]")
            }
            try self.validate(self.dataSourceGroups, name: "dataSourceGroups", parent: name, max: 2048)
            try self.validate(self.dataSourceGroups, name: "dataSourceGroups", parent: name, min: 1)
            try self.groups?.forEach {
                try validate($0, name: "groups[]", parent: name, max: 200)
                try validate($0, name: "groups[]", parent: name, min: 1)
                try validate($0, name: "groups[]", parent: name, pattern: "^\\P{C}*$")
            }
            try self.validate(self.groups, name: "groups", parent: name, max: 2048)
            try self.validate(self.groups, name: "groups", parent: name, min: 1)
            try self.validate(self.token, name: "token", parent: name, max: 100_000)
            try self.validate(self.token, name: "token", parent: name, min: 1)
            try self.validate(self.token, name: "token", parent: name, pattern: "^\\P{C}*$")
            try self.validate(self.userId, name: "userId", parent: name, max: 200)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^\\P{C}*$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataSourceGroups = "DataSourceGroups"
            case groups = "Groups"
            case token = "Token"
            case userId = "UserId"
        }
    }

    public struct UserGroupResolutionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The identity store provider (mode) you want to use to fetch access levels of groups and users. Amazon Web Services Single Sign On is currently the only available mode. Your users and groups must exist in an Amazon Web Services SSO identity source in order to use this mode.
        public let userGroupResolutionMode: UserGroupResolutionMode

        public init(userGroupResolutionMode: UserGroupResolutionMode) {
            self.userGroupResolutionMode = userGroupResolutionMode
        }

        private enum CodingKeys: String, CodingKey {
            case userGroupResolutionMode = "UserGroupResolutionMode"
        }
    }

    public struct UserIdentityConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Web Services SSO field name that contains the identifiers of your users,  such as their emails. This is used for user context filtering  and for granting access to your Amazon Kendra experience. You must set up Amazon Web Services SSO  with Amazon Kendra. You must include your users and groups in your Access Control List when  you ingest documents into your index. For more information, see  Getting  started with an Amazon Web Services SSO identity source.
        public let identityAttributeName: String?

        public init(identityAttributeName: String? = nil) {
            self.identityAttributeName = identityAttributeName
        }

        public func validate(name: String) throws {
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, max: 1000)
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, min: 1)
            try self.validate(self.identityAttributeName, name: "identityAttributeName", parent: name, pattern: "^[a-zA-Z0-9][a-zA-Z0-9_-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityAttributeName = "IdentityAttributeName"
        }
    }

    public struct UserTokenConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Information about the JSON token type configuration.
        public let jsonTokenTypeConfiguration: JsonTokenTypeConfiguration?
        /// Information about the JWT token type configuration.
        public let jwtTokenTypeConfiguration: JwtTokenTypeConfiguration?

        public init(jsonTokenTypeConfiguration: JsonTokenTypeConfiguration? = nil, jwtTokenTypeConfiguration: JwtTokenTypeConfiguration? = nil) {
            self.jsonTokenTypeConfiguration = jsonTokenTypeConfiguration
            self.jwtTokenTypeConfiguration = jwtTokenTypeConfiguration
        }

        public func validate(name: String) throws {
            try self.jsonTokenTypeConfiguration?.validate(name: "\(name).jsonTokenTypeConfiguration")
            try self.jwtTokenTypeConfiguration?.validate(name: "\(name).jwtTokenTypeConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case jsonTokenTypeConfiguration = "JsonTokenTypeConfiguration"
            case jwtTokenTypeConfiguration = "JwtTokenTypeConfiguration"
        }
    }

    public struct WebCrawlerConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Provides configuration information required to connect to websites using  authentication. You can connect to websites using basic authentication of user name and password. You must provide the website host name and port number. For example, the host name  of https://a.example.com/page1.html is "a.example.com" and the port is 443, the  standard port for HTTPS. You use a secret in Secrets Manager to store  your authentication credentials.
        public let authenticationConfiguration: AuthenticationConfiguration?
        /// Specifies the number of levels in a website that you want to crawl. The first level begins from the website seed or starting point URL.  For example, if a website has 3 levels – index level (i.e. seed in this  example), sections level, and subsections level – and you are only  interested in crawling information up to the sections level (i.e.  levels 0-1), you can set your depth to 1. The default crawl depth is set to 2.
        public let crawlDepth: Int?
        /// The maximum size (in MB) of a webpage or attachment to crawl. Files larger than this size (in MB) are skipped/not crawled. The default maximum size of a webpage or attachment is set to 50 MB.
        public let maxContentSizePerPageInMegaBytes: Float?
        /// The maximum number of URLs on a webpage to include when crawling a website.  This number is per webpage. As a website’s webpages are crawled, any URLs the webpages link to are also crawled. URLs on a webpage are crawled in order of appearance. The default maximum links per page is 100.
        public let maxLinksPerPage: Int?
        /// The maximum number of URLs crawled per website host per minute. A minimum of one URL is required. The default maximum number of URLs crawled per website host per minute is 300.
        public let maxUrlsPerMinuteCrawlRate: Int?
        /// Provides configuration information required to connect to your internal  websites via a web proxy. You must provide the website host name and port number. For example, the  host name of https://a.example.com/page1.html is "a.example.com" and the  port is 443, the standard port for HTTPS. Web proxy credentials are optional and you can use them to connect to a  web proxy server that requires basic authentication. To store web proxy  credentials, you use a secret in Secrets Manager.
        public let proxyConfiguration: ProxyConfiguration?
        /// The regular expression pattern to exclude certain URLs to crawl. If there is a regular expression pattern to include certain URLs that  conflicts with the exclude pattern, the exclude pattern takes precedence.
        public let urlExclusionPatterns: [String]?
        /// The regular expression pattern to include certain URLs to crawl. If there is a regular expression pattern to exclude certain URLs that  conflicts with the include pattern, the exclude pattern takes precedence.
        public let urlInclusionPatterns: [String]?
        /// Specifies the seed or starting point URLs of the  websites or the sitemap URLs of the websites you want to crawl. You can include website subdomains. You can list up to 100 seed  URLs and up to three sitemap URLs. You can only crawl websites that use the secure communication protocol,  Hypertext Transfer Protocol Secure (HTTPS). If you receive an error when  crawling a website, it could be that the website is blocked from crawling.  When selecting websites to index, you must adhere to  the Amazon Acceptable Use Policy  and all other Amazon terms. Remember that you must only use Amazon Kendra  Web Crawler to index your own webpages, or webpages that you have  authorization to index.
        public let urls: Urls

        public init(authenticationConfiguration: AuthenticationConfiguration? = nil, crawlDepth: Int? = nil, maxContentSizePerPageInMegaBytes: Float? = nil, maxLinksPerPage: Int? = nil, maxUrlsPerMinuteCrawlRate: Int? = nil, proxyConfiguration: ProxyConfiguration? = nil, urlExclusionPatterns: [String]? = nil, urlInclusionPatterns: [String]? = nil, urls: Urls) {
            self.authenticationConfiguration = authenticationConfiguration
            self.crawlDepth = crawlDepth
            self.maxContentSizePerPageInMegaBytes = maxContentSizePerPageInMegaBytes
            self.maxLinksPerPage = maxLinksPerPage
            self.maxUrlsPerMinuteCrawlRate = maxUrlsPerMinuteCrawlRate
            self.proxyConfiguration = proxyConfiguration
            self.urlExclusionPatterns = urlExclusionPatterns
            self.urlInclusionPatterns = urlInclusionPatterns
            self.urls = urls
        }

        public func validate(name: String) throws {
            try self.authenticationConfiguration?.validate(name: "\(name).authenticationConfiguration")
            try self.validate(self.crawlDepth, name: "crawlDepth", parent: name, max: 10)
            try self.validate(self.crawlDepth, name: "crawlDepth", parent: name, min: 0)
            try self.validate(self.maxContentSizePerPageInMegaBytes, name: "maxContentSizePerPageInMegaBytes", parent: name, max: 50.0)
            try self.validate(self.maxContentSizePerPageInMegaBytes, name: "maxContentSizePerPageInMegaBytes", parent: name, min: 1e-06)
            try self.validate(self.maxLinksPerPage, name: "maxLinksPerPage", parent: name, max: 1000)
            try self.validate(self.maxLinksPerPage, name: "maxLinksPerPage", parent: name, min: 1)
            try self.validate(self.maxUrlsPerMinuteCrawlRate, name: "maxUrlsPerMinuteCrawlRate", parent: name, max: 300)
            try self.validate(self.maxUrlsPerMinuteCrawlRate, name: "maxUrlsPerMinuteCrawlRate", parent: name, min: 1)
            try self.proxyConfiguration?.validate(name: "\(name).proxyConfiguration")
            try self.urlExclusionPatterns?.forEach {
                try validate($0, name: "urlExclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "urlExclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.urlExclusionPatterns, name: "urlExclusionPatterns", parent: name, max: 100)
            try self.urlInclusionPatterns?.forEach {
                try validate($0, name: "urlInclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "urlInclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.urlInclusionPatterns, name: "urlInclusionPatterns", parent: name, max: 100)
            try self.urls.validate(name: "\(name).urls")
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationConfiguration = "AuthenticationConfiguration"
            case crawlDepth = "CrawlDepth"
            case maxContentSizePerPageInMegaBytes = "MaxContentSizePerPageInMegaBytes"
            case maxLinksPerPage = "MaxLinksPerPage"
            case maxUrlsPerMinuteCrawlRate = "MaxUrlsPerMinuteCrawlRate"
            case proxyConfiguration = "ProxyConfiguration"
            case urlExclusionPatterns = "UrlExclusionPatterns"
            case urlInclusionPatterns = "UrlInclusionPatterns"
            case urls = "Urls"
        }
    }

    public struct WorkDocsConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  TRUE to include comments on documents  in your index. Including comments in your index means each comment  is a document that can be searched on. The default is set to FALSE.
        public let crawlComments: Bool?
        /// A list of regular expression patterns to exclude certain files  in your Amazon WorkDocs site repository. Files that match the patterns  are excluded from the index. Files that don’t match the patterns  are included in the index. If a file matches both an inclusion  pattern and an exclusion pattern, the exclusion pattern takes  precedence and the file isn’t included in the index.
        public let exclusionPatterns: [String]?
        /// A list of DataSourceToIndexFieldMapping objects that map  Amazon WorkDocs field names to custom index field names in Amazon Kendra. You must first  create the custom index fields using the UpdateIndex operation before  you map to Amazon WorkDocs fields. For more information, see  Mapping  Data Source Fields. The Amazon WorkDocs data source field names  need to exist in your Amazon WorkDocs custom metadata.
        public let fieldMappings: [DataSourceToIndexFieldMapping]?
        /// A list of regular expression patterns to include certain files  in your Amazon WorkDocs site repository. Files that match the patterns  are included in the index. Files that don't match the patterns are  excluded from the index. If a file matches both an inclusion pattern  and an exclusion pattern, the exclusion pattern takes precedence and  the file isn’t included in the index.
        public let inclusionPatterns: [String]?
        /// The identifier of the directory corresponding to your  Amazon WorkDocs site repository. You can find the organization ID in the  Directory Service by going to  Active Directory, then  Directories. Your Amazon WorkDocs site directory has an  ID, which is the organization ID. You can also set up a new Amazon WorkDocs  directory in the Directory Service console and enable a Amazon WorkDocs site  for the directory in the Amazon WorkDocs console.
        public let organizationId: String
        ///  TRUE to use the change logs to update documents in your  index instead of scanning all documents. If you are syncing your Amazon WorkDocs data source with your index for the  first time, all documents are scanned. After your first sync, you can  use the change logs to update your documents in your index for  future syncs. The default is set to FALSE.
        public let useChangeLog: Bool?

        public init(crawlComments: Bool? = nil, exclusionPatterns: [String]? = nil, fieldMappings: [DataSourceToIndexFieldMapping]? = nil, inclusionPatterns: [String]? = nil, organizationId: String, useChangeLog: Bool? = nil) {
            self.crawlComments = crawlComments
            self.exclusionPatterns = exclusionPatterns
            self.fieldMappings = fieldMappings
            self.inclusionPatterns = inclusionPatterns
            self.organizationId = organizationId
            self.useChangeLog = useChangeLog
        }

        public func validate(name: String) throws {
            try self.exclusionPatterns?.forEach {
                try validate($0, name: "exclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "exclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.exclusionPatterns, name: "exclusionPatterns", parent: name, max: 100)
            try self.fieldMappings?.forEach {
                try $0.validate(name: "\(name).fieldMappings[]")
            }
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, max: 100)
            try self.validate(self.fieldMappings, name: "fieldMappings", parent: name, min: 1)
            try self.inclusionPatterns?.forEach {
                try validate($0, name: "inclusionPatterns[]", parent: name, max: 150)
                try validate($0, name: "inclusionPatterns[]", parent: name, min: 1)
            }
            try self.validate(self.inclusionPatterns, name: "inclusionPatterns", parent: name, max: 100)
            try self.validate(self.organizationId, name: "organizationId", parent: name, max: 12)
            try self.validate(self.organizationId, name: "organizationId", parent: name, min: 12)
            try self.validate(self.organizationId, name: "organizationId", parent: name, pattern: "^d-[0-9a-fA-F]{10}$")
        }

        private enum CodingKeys: String, CodingKey {
            case crawlComments = "CrawlComments"
            case exclusionPatterns = "ExclusionPatterns"
            case fieldMappings = "FieldMappings"
            case inclusionPatterns = "InclusionPatterns"
            case organizationId = "OrganizationId"
            case useChangeLog = "UseChangeLog"
        }
    }
}
