All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.wisdom.WisdomClient.kt Maven / Gradle / Ivy

There is a newer version: 1.3.80
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.wisdom

import aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider
import aws.sdk.kotlin.runtime.auth.credentials.internal.manage
import aws.sdk.kotlin.runtime.client.AwsSdkClientConfig
import aws.sdk.kotlin.runtime.config.AbstractAwsSdkClientFactory
import aws.sdk.kotlin.runtime.config.endpoints.resolveEndpointUrl
import aws.sdk.kotlin.runtime.config.profile.AwsProfile
import aws.sdk.kotlin.runtime.config.profile.AwsSharedConfig
import aws.sdk.kotlin.runtime.http.retries.AwsRetryPolicy
import aws.sdk.kotlin.services.wisdom.auth.DefaultWisdomAuthSchemeProvider
import aws.sdk.kotlin.services.wisdom.auth.WisdomAuthSchemeProvider
import aws.sdk.kotlin.services.wisdom.endpoints.DefaultWisdomEndpointProvider
import aws.sdk.kotlin.services.wisdom.endpoints.WisdomEndpointParameters
import aws.sdk.kotlin.services.wisdom.endpoints.WisdomEndpointProvider
import aws.sdk.kotlin.services.wisdom.model.CreateAssistantAssociationRequest
import aws.sdk.kotlin.services.wisdom.model.CreateAssistantAssociationResponse
import aws.sdk.kotlin.services.wisdom.model.CreateAssistantRequest
import aws.sdk.kotlin.services.wisdom.model.CreateAssistantResponse
import aws.sdk.kotlin.services.wisdom.model.CreateContentRequest
import aws.sdk.kotlin.services.wisdom.model.CreateContentResponse
import aws.sdk.kotlin.services.wisdom.model.CreateKnowledgeBaseRequest
import aws.sdk.kotlin.services.wisdom.model.CreateKnowledgeBaseResponse
import aws.sdk.kotlin.services.wisdom.model.CreateQuickResponseRequest
import aws.sdk.kotlin.services.wisdom.model.CreateQuickResponseResponse
import aws.sdk.kotlin.services.wisdom.model.CreateSessionRequest
import aws.sdk.kotlin.services.wisdom.model.CreateSessionResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteAssistantAssociationRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteAssistantAssociationResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteAssistantRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteAssistantResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteContentRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteContentResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteImportJobRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteImportJobResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteKnowledgeBaseRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteKnowledgeBaseResponse
import aws.sdk.kotlin.services.wisdom.model.DeleteQuickResponseRequest
import aws.sdk.kotlin.services.wisdom.model.DeleteQuickResponseResponse
import aws.sdk.kotlin.services.wisdom.model.GetAssistantAssociationRequest
import aws.sdk.kotlin.services.wisdom.model.GetAssistantAssociationResponse
import aws.sdk.kotlin.services.wisdom.model.GetAssistantRequest
import aws.sdk.kotlin.services.wisdom.model.GetAssistantResponse
import aws.sdk.kotlin.services.wisdom.model.GetContentRequest
import aws.sdk.kotlin.services.wisdom.model.GetContentResponse
import aws.sdk.kotlin.services.wisdom.model.GetContentSummaryRequest
import aws.sdk.kotlin.services.wisdom.model.GetContentSummaryResponse
import aws.sdk.kotlin.services.wisdom.model.GetImportJobRequest
import aws.sdk.kotlin.services.wisdom.model.GetImportJobResponse
import aws.sdk.kotlin.services.wisdom.model.GetKnowledgeBaseRequest
import aws.sdk.kotlin.services.wisdom.model.GetKnowledgeBaseResponse
import aws.sdk.kotlin.services.wisdom.model.GetQuickResponseRequest
import aws.sdk.kotlin.services.wisdom.model.GetQuickResponseResponse
import aws.sdk.kotlin.services.wisdom.model.GetRecommendationsRequest
import aws.sdk.kotlin.services.wisdom.model.GetRecommendationsResponse
import aws.sdk.kotlin.services.wisdom.model.GetSessionRequest
import aws.sdk.kotlin.services.wisdom.model.GetSessionResponse
import aws.sdk.kotlin.services.wisdom.model.ListAssistantAssociationsRequest
import aws.sdk.kotlin.services.wisdom.model.ListAssistantAssociationsResponse
import aws.sdk.kotlin.services.wisdom.model.ListAssistantsRequest
import aws.sdk.kotlin.services.wisdom.model.ListAssistantsResponse
import aws.sdk.kotlin.services.wisdom.model.ListContentsRequest
import aws.sdk.kotlin.services.wisdom.model.ListContentsResponse
import aws.sdk.kotlin.services.wisdom.model.ListImportJobsRequest
import aws.sdk.kotlin.services.wisdom.model.ListImportJobsResponse
import aws.sdk.kotlin.services.wisdom.model.ListKnowledgeBasesRequest
import aws.sdk.kotlin.services.wisdom.model.ListKnowledgeBasesResponse
import aws.sdk.kotlin.services.wisdom.model.ListQuickResponsesRequest
import aws.sdk.kotlin.services.wisdom.model.ListQuickResponsesResponse
import aws.sdk.kotlin.services.wisdom.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.wisdom.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.wisdom.model.NotifyRecommendationsReceivedRequest
import aws.sdk.kotlin.services.wisdom.model.NotifyRecommendationsReceivedResponse
import aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest
import aws.sdk.kotlin.services.wisdom.model.QueryAssistantResponse
import aws.sdk.kotlin.services.wisdom.model.RemoveKnowledgeBaseTemplateUriRequest
import aws.sdk.kotlin.services.wisdom.model.RemoveKnowledgeBaseTemplateUriResponse
import aws.sdk.kotlin.services.wisdom.model.SearchContentRequest
import aws.sdk.kotlin.services.wisdom.model.SearchContentResponse
import aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesRequest
import aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse
import aws.sdk.kotlin.services.wisdom.model.SearchSessionsRequest
import aws.sdk.kotlin.services.wisdom.model.SearchSessionsResponse
import aws.sdk.kotlin.services.wisdom.model.StartContentUploadRequest
import aws.sdk.kotlin.services.wisdom.model.StartContentUploadResponse
import aws.sdk.kotlin.services.wisdom.model.StartImportJobRequest
import aws.sdk.kotlin.services.wisdom.model.StartImportJobResponse
import aws.sdk.kotlin.services.wisdom.model.TagResourceRequest
import aws.sdk.kotlin.services.wisdom.model.TagResourceResponse
import aws.sdk.kotlin.services.wisdom.model.UntagResourceRequest
import aws.sdk.kotlin.services.wisdom.model.UntagResourceResponse
import aws.sdk.kotlin.services.wisdom.model.UpdateContentRequest
import aws.sdk.kotlin.services.wisdom.model.UpdateContentResponse
import aws.sdk.kotlin.services.wisdom.model.UpdateKnowledgeBaseTemplateUriRequest
import aws.sdk.kotlin.services.wisdom.model.UpdateKnowledgeBaseTemplateUriResponse
import aws.sdk.kotlin.services.wisdom.model.UpdateQuickResponseRequest
import aws.sdk.kotlin.services.wisdom.model.UpdateQuickResponseResponse
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
import aws.smithy.kotlin.runtime.client.IdempotencyTokenConfig
import aws.smithy.kotlin.runtime.client.IdempotencyTokenProvider
import aws.smithy.kotlin.runtime.client.LogMode
import aws.smithy.kotlin.runtime.client.RetryClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
import aws.smithy.kotlin.runtime.client.SdkClient
import aws.smithy.kotlin.runtime.client.SdkClientConfig
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
import aws.smithy.kotlin.runtime.http.auth.HttpAuthConfig
import aws.smithy.kotlin.runtime.http.config.HttpClientConfig
import aws.smithy.kotlin.runtime.http.config.HttpEngineConfig
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl
import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor
import aws.smithy.kotlin.runtime.net.url.Url
import aws.smithy.kotlin.runtime.retries.RetryStrategy
import aws.smithy.kotlin.runtime.retries.policy.RetryPolicy
import aws.smithy.kotlin.runtime.telemetry.Global
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
import kotlin.collections.List
import kotlin.jvm.JvmStatic


public const val ServiceId: String = "Wisdom"
public const val SdkVersion: String = "1.3.42"
public const val ServiceApiVersion: String = "2020-10-19"

/**
 * Amazon Connect Wisdom delivers agents the information they need to solve customer issues as they're actively speaking with customers. Agents can search across connected repositories from within their agent desktop to find answers quickly. Use Amazon Connect Wisdom to create an assistant and a knowledge base, for example, or manage content by uploading custom files.
 */
public interface WisdomClient : SdkClient {
    /**
     * WisdomClient's configuration
     */
    public override val config: Config

    public companion object : AbstractAwsSdkClientFactory()
     {
        @JvmStatic
        override fun builder(): Builder = Builder()

        override fun finalizeConfig(builder: Builder) {
            super.finalizeConfig(builder)
            builder.config.interceptors.add(0, ClockSkewInterceptor())
        }

        override suspend fun finalizeEnvironmentalConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
            super.finalizeEnvironmentalConfig(builder, sharedConfig, activeProfile)
            builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
                sharedConfig,
                "Wisdom",
                "WISDOM",
                "wisdom",
            )
        }
    }

    public class Builder internal constructor(): AbstractSdkClientBuilder() {
        override val config: Config.Builder = Config.Builder()
        override fun newClient(config: Config): WisdomClient = DefaultWisdomClient(config)
    }

    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), IdempotencyTokenConfig, RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
        override val clientName: String = builder.clientName
        override val region: String? = builder.region
        override val authSchemes: kotlin.collections.List = builder.authSchemes
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
        public val endpointProvider: WisdomEndpointProvider = builder.endpointProvider ?: DefaultWisdomEndpointProvider()
        public val endpointUrl: Url? = builder.endpointUrl
        override val idempotencyTokenProvider: IdempotencyTokenProvider = builder.idempotencyTokenProvider ?: IdempotencyTokenProvider.Default
        override val interceptors: kotlin.collections.List = builder.interceptors
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
        override val retryPolicy: RetryPolicy = builder.retryPolicy ?: AwsRetryPolicy.Default
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
        override val useDualStack: Boolean = builder.useDualStack ?: false
        override val useFips: Boolean = builder.useFips ?: false
        override val applicationId: String? = builder.applicationId
        public val authSchemeProvider: WisdomAuthSchemeProvider = builder.authSchemeProvider ?: DefaultWisdomAuthSchemeProvider()
        public companion object {
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
        }

        public fun toBuilder(): Builder = Builder().apply {
            clientName = [email protected]
            region = [email protected]
            authSchemes = [email protected]
            credentialsProvider = [email protected]
            endpointProvider = [email protected]
            endpointUrl = [email protected]
            httpClient = [email protected]
            idempotencyTokenProvider = [email protected]
            interceptors = [email protected]()
            logMode = [email protected]
            retryPolicy = [email protected]
            retryStrategy = [email protected]
            telemetryProvider = [email protected]
            useDualStack = [email protected]
            useFips = [email protected]
            applicationId = [email protected]
            authSchemeProvider = [email protected]
        }

        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), IdempotencyTokenConfig.Builder, RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder, TelemetryConfig.Builder {
            /**
             * A reader-friendly name for the client.
             */
            override var clientName: String = "Wisdom"

            /**
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
             * information
             */
            override var region: String? = null

            /**
             * Register new or override default [AuthScheme]s configured for this client. By default, the set
             * of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
             * precedence over the defaults and can be used to customize identity resolution and signing for specific
             * authentication schemes.
             */
            override var authSchemes: kotlin.collections.List = emptyList()

            /**
             * The AWS credentials provider to use for authenticating requests. If not provided a
             * [aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider] instance will be used.
             * NOTE: The caller is responsible for managing the lifetime of the provider when set. The SDK
             * client will not close it when the client is closed.
             */
            override var credentialsProvider: CredentialsProvider? = null

            /**
             * The endpoint provider used to determine where to make service requests. **This is an advanced config
             * option.**
             *
             * Endpoint resolution occurs as part of the workflow for every request made via the service client.
             *
             * The inputs to endpoint resolution are defined on a per-service basis (see [EndpointParameters]).
             */
            public var endpointProvider: WisdomEndpointProvider? = null

            /**
             * A custom endpoint to route requests to. The endpoint set here is passed to the configured
             * [endpointProvider], which may inspect and modify it as needed.
             *
             * Setting a custom endpointUrl should generally be preferred to overriding the [endpointProvider] and is
             * the recommended way to route requests to development or preview instances of a service.
             *
             * **This is an advanced config option.**
             */
            public var endpointUrl: Url? = null

            /**
             * Override the default idempotency token generator. SDK clients will generate tokens for members
             * that represent idempotent tokens when not explicitly set by the caller using this generator.
             */
            override var idempotencyTokenProvider: IdempotencyTokenProvider? = null

            /**
             * Add an [aws.smithy.kotlin.runtime.client.Interceptor] that will have access to read and modify
             * the request and response objects as they are processed by the SDK.
             * Interceptors added using this method are executed in the order they are configured and are always
             * later than any added automatically by the SDK.
             */
            override var interceptors: kotlin.collections.MutableList = kotlin.collections.mutableListOf()

            /**
             * Configure events that will be logged. By default clients will not output
             * raw requests or responses. Use this setting to opt-in to additional debug logging.
             *
             * This can be used to configure logging of requests, responses, retries, etc of SDK clients.
             *
             * **NOTE**: Logging of raw requests or responses may leak sensitive information! It may also have
             * performance considerations when dumping the request/response body. This is primarily a tool for
             * debug purposes.
             */
            override var logMode: LogMode? = null

            /**
             * The policy to use for evaluating operation results and determining whether/how to retry.
             */
            override var retryPolicy: RetryPolicy? = null

            /**
             * The telemetry provider used to instrument the SDK operations with. By default, the global telemetry
             * provider will be used.
             */
            override var telemetryProvider: TelemetryProvider? = null

            /**
             *            Flag to toggle whether to use dual-stack endpoints when making requests.
             *            See [https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html] for more information.
             * `          Disabled by default.
             */
            override var useDualStack: Boolean? = null

            /**
             *            Flag to toggle whether to use [FIPS](https://aws.amazon.com/compliance/fips/) endpoints when making requests.
             * `          Disabled by default.
             */
            override var useFips: Boolean? = null

            /**
             * An optional application specific identifier.
             * When set it will be appended to the User-Agent header of every request in the form of: `app/{applicationId}`.
             * When not explicitly set, the value will be loaded from the following locations:
             *
             * - JVM System Property: `aws.userAgentAppId`
             * - Environment variable: `AWS_SDK_UA_APP_ID`
             * - Shared configuration profile attribute: `sdk_ua_app_id`
             *
             * See [shared configuration settings](https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html)
             * reference for more information on environment variables and shared config settings.
             */
            override var applicationId: String? = null

            /**
             * Configure the provider used to resolve the authentication scheme to use for a particular operation.
             */
            public var authSchemeProvider: WisdomAuthSchemeProvider? = null

            override fun build(): Config = Config(this)
        }
    }

    /**
     * Creates an Amazon Connect Wisdom assistant.
     */
    public suspend fun createAssistant(input: CreateAssistantRequest): CreateAssistantResponse

    /**
     * Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.
     */
    public suspend fun createAssistantAssociation(input: CreateAssistantAssociationRequest): CreateAssistantAssociationResponse

    /**
     * Creates Wisdom content. Before to calling this API, use [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html) to upload an asset.
     */
    public suspend fun createContent(input: CreateContentRequest): CreateContentResponse

    /**
     * Creates a knowledge base.
     *
     * When using this API, you cannot reuse [Amazon AppIntegrations](https://docs.aws.amazon.com/appintegrations/latest/APIReference/Welcome.html) DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an `InvalidRequestException` error.
     *
     * For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:
     * + Call [DeleteKnowledgeBase](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_DeleteKnowledgeBase.html).
     * + Call [DeleteDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_DeleteDataIntegration.html).
     * + Call [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) to recreate the DataIntegration or a create different one.
     * + Call CreateKnowledgeBase.
     */
    public suspend fun createKnowledgeBase(input: CreateKnowledgeBaseRequest): CreateKnowledgeBaseResponse

    /**
     * Creates a Wisdom quick response.
     */
    public suspend fun createQuickResponse(input: CreateQuickResponseRequest): CreateQuickResponseResponse

    /**
     * Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is enabled.
     */
    public suspend fun createSession(input: CreateSessionRequest): CreateSessionResponse

    /**
     * Deletes an assistant.
     */
    public suspend fun deleteAssistant(input: DeleteAssistantRequest): DeleteAssistantResponse

    /**
     * Deletes an assistant association.
     */
    public suspend fun deleteAssistantAssociation(input: DeleteAssistantAssociationRequest): DeleteAssistantAssociationResponse

    /**
     * Deletes the content.
     */
    public suspend fun deleteContent(input: DeleteContentRequest): DeleteContentResponse

    /**
     * Deletes the quick response import job.
     */
    public suspend fun deleteImportJob(input: DeleteImportJobRequest): DeleteImportJobResponse

    /**
     * Deletes the knowledge base.
     *
     * When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the [Amazon AppIntegrations](https://docs.aws.amazon.com/appintegrations/latest/APIReference/Welcome.html) DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See [DeleteDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_DeleteDataIntegration.html) and [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) in the *Amazon AppIntegrations API Reference*.
     */
    public suspend fun deleteKnowledgeBase(input: DeleteKnowledgeBaseRequest): DeleteKnowledgeBaseResponse

    /**
     * Deletes a quick response.
     */
    public suspend fun deleteQuickResponse(input: DeleteQuickResponseRequest): DeleteQuickResponseResponse

    /**
     * Retrieves information about an assistant.
     */
    public suspend fun getAssistant(input: GetAssistantRequest): GetAssistantResponse

    /**
     * Retrieves information about an assistant association.
     */
    public suspend fun getAssistantAssociation(input: GetAssistantAssociationRequest): GetAssistantAssociationResponse

    /**
     * Retrieves content, including a pre-signed URL to download the content.
     */
    public suspend fun getContent(input: GetContentRequest): GetContentResponse

    /**
     * Retrieves summary information about the content.
     */
    public suspend fun getContentSummary(input: GetContentSummaryRequest): GetContentSummaryResponse

    /**
     * Retrieves the started import job.
     */
    public suspend fun getImportJob(input: GetImportJobRequest): GetImportJobResponse

    /**
     * Retrieves information about the knowledge base.
     */
    public suspend fun getKnowledgeBase(input: GetKnowledgeBaseRequest): GetKnowledgeBaseResponse

    /**
     * Retrieves the quick response.
     */
    public suspend fun getQuickResponse(input: GetQuickResponseRequest): GetQuickResponseResponse

    /**
     * Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the `waitTimeSeconds` parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html).
     */
    @Deprecated("GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    public suspend fun getRecommendations(input: GetRecommendationsRequest): GetRecommendationsResponse

    /**
     * Retrieves information for a specified session.
     */
    public suspend fun getSession(input: GetSessionRequest): GetSessionResponse

    /**
     * Lists information about assistant associations.
     */
    public suspend fun listAssistantAssociations(input: ListAssistantAssociationsRequest): ListAssistantAssociationsResponse

    /**
     * Lists information about assistants.
     */
    public suspend fun listAssistants(input: ListAssistantsRequest = ListAssistantsRequest { }): ListAssistantsResponse

    /**
     * Lists the content.
     */
    public suspend fun listContents(input: ListContentsRequest): ListContentsResponse

    /**
     * Lists information about import jobs.
     */
    public suspend fun listImportJobs(input: ListImportJobsRequest): ListImportJobsResponse

    /**
     * Lists the knowledge bases.
     */
    public suspend fun listKnowledgeBases(input: ListKnowledgeBasesRequest = ListKnowledgeBasesRequest { }): ListKnowledgeBasesResponse

    /**
     * Lists information about quick response.
     */
    public suspend fun listQuickResponses(input: ListQuickResponsesRequest): ListQuickResponsesResponse

    /**
     * Lists the tags for the specified resource.
     */
    public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse

    /**
     * Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html) and a `waitTimeSeconds` input for long-polling behavior and avoiding duplicate recommendations.
     */
    public suspend fun notifyRecommendationsReceived(input: NotifyRecommendationsReceivedRequest): NotifyRecommendationsReceivedResponse

    /**
     * Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html).
     */
    @Deprecated("QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    public suspend fun queryAssistant(input: QueryAssistantRequest): QueryAssistantResponse

    /**
     * Removes a URI template from a knowledge base.
     */
    public suspend fun removeKnowledgeBaseTemplateUri(input: RemoveKnowledgeBaseTemplateUriRequest): RemoveKnowledgeBaseTemplateUriResponse

    /**
     * Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.
     */
    public suspend fun searchContent(input: SearchContentRequest): SearchContentResponse

    /**
     * Searches existing Wisdom quick responses in a Wisdom knowledge base.
     */
    public suspend fun searchQuickResponses(input: SearchQuickResponsesRequest): SearchQuickResponsesResponse

    /**
     * Searches for sessions.
     */
    public suspend fun searchSessions(input: SearchSessionsRequest): SearchSessionsResponse

    /**
     * Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use [CreateContent](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_CreateContent.html) to finalize the content creation process or [UpdateContent](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_UpdateContent.html) to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
     */
    public suspend fun startContentUpload(input: StartContentUploadRequest): StartContentUploadResponse

    /**
     * Start an asynchronous job to import Wisdom resources from an uploaded source file. Before calling this API, use [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html) to upload an asset that contains the resource data.
     * + For importing Wisdom quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see [Import quick responses](https://docs.aws.amazon.com/console/connect/quick-responses/add-data).
     */
    public suspend fun startImportJob(input: StartImportJobRequest): StartImportJobResponse

    /**
     * Adds the specified tags to the specified resource.
     */
    public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

    /**
     * Removes the specified tags from the specified resource.
     */
    public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse

    /**
     * Updates information about the content.
     */
    public suspend fun updateContent(input: UpdateContentRequest): UpdateContentResponse

    /**
     * Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in `${variable}` format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an `Id` value, and you can set the template URI to `https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view`.
     */
    public suspend fun updateKnowledgeBaseTemplateUri(input: UpdateKnowledgeBaseTemplateUriRequest): UpdateKnowledgeBaseTemplateUriResponse

    /**
     * Updates an existing Wisdom quick response.
     */
    public suspend fun updateQuickResponse(input: UpdateQuickResponseRequest): UpdateQuickResponseResponse
}

/**
 * Create a copy of the client with one or more configuration values overridden.
 * This method allows the caller to perform scoped config overrides for one or more client operations.
 *
 * Any resources created on your behalf will be shared between clients, and will only be closed when ALL clients using them are closed.
 * If you provide a resource (e.g. [HttpClientEngine]) to the SDK, you are responsible for managing the lifetime of that resource.
 */
public fun WisdomClient.withConfig(block: WisdomClient.Config.Builder.() -> Unit): WisdomClient {
    val newConfig = config.toBuilder().apply(block).build()
    return DefaultWisdomClient(newConfig)
}

/**
 * Creates an Amazon Connect Wisdom assistant.
 */
public suspend inline fun WisdomClient.createAssistant(crossinline block: CreateAssistantRequest.Builder.() -> Unit): CreateAssistantResponse = createAssistant(CreateAssistantRequest.Builder().apply(block).build())

/**
 * Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.
 */
public suspend inline fun WisdomClient.createAssistantAssociation(crossinline block: CreateAssistantAssociationRequest.Builder.() -> Unit): CreateAssistantAssociationResponse = createAssistantAssociation(CreateAssistantAssociationRequest.Builder().apply(block).build())

/**
 * Creates Wisdom content. Before to calling this API, use [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html) to upload an asset.
 */
public suspend inline fun WisdomClient.createContent(crossinline block: CreateContentRequest.Builder.() -> Unit): CreateContentResponse = createContent(CreateContentRequest.Builder().apply(block).build())

/**
 * Creates a knowledge base.
 *
 * When using this API, you cannot reuse [Amazon AppIntegrations](https://docs.aws.amazon.com/appintegrations/latest/APIReference/Welcome.html) DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an `InvalidRequestException` error.
 *
 * For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:
 * + Call [DeleteKnowledgeBase](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_DeleteKnowledgeBase.html).
 * + Call [DeleteDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_DeleteDataIntegration.html).
 * + Call [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) to recreate the DataIntegration or a create different one.
 * + Call CreateKnowledgeBase.
 */
public suspend inline fun WisdomClient.createKnowledgeBase(crossinline block: CreateKnowledgeBaseRequest.Builder.() -> Unit): CreateKnowledgeBaseResponse = createKnowledgeBase(CreateKnowledgeBaseRequest.Builder().apply(block).build())

/**
 * Creates a Wisdom quick response.
 */
public suspend inline fun WisdomClient.createQuickResponse(crossinline block: CreateQuickResponseRequest.Builder.() -> Unit): CreateQuickResponseResponse = createQuickResponse(CreateQuickResponseRequest.Builder().apply(block).build())

/**
 * Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is enabled.
 */
public suspend inline fun WisdomClient.createSession(crossinline block: CreateSessionRequest.Builder.() -> Unit): CreateSessionResponse = createSession(CreateSessionRequest.Builder().apply(block).build())

/**
 * Deletes an assistant.
 */
public suspend inline fun WisdomClient.deleteAssistant(crossinline block: DeleteAssistantRequest.Builder.() -> Unit): DeleteAssistantResponse = deleteAssistant(DeleteAssistantRequest.Builder().apply(block).build())

/**
 * Deletes an assistant association.
 */
public suspend inline fun WisdomClient.deleteAssistantAssociation(crossinline block: DeleteAssistantAssociationRequest.Builder.() -> Unit): DeleteAssistantAssociationResponse = deleteAssistantAssociation(DeleteAssistantAssociationRequest.Builder().apply(block).build())

/**
 * Deletes the content.
 */
public suspend inline fun WisdomClient.deleteContent(crossinline block: DeleteContentRequest.Builder.() -> Unit): DeleteContentResponse = deleteContent(DeleteContentRequest.Builder().apply(block).build())

/**
 * Deletes the quick response import job.
 */
public suspend inline fun WisdomClient.deleteImportJob(crossinline block: DeleteImportJobRequest.Builder.() -> Unit): DeleteImportJobResponse = deleteImportJob(DeleteImportJobRequest.Builder().apply(block).build())

/**
 * Deletes the knowledge base.
 *
 * When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the [Amazon AppIntegrations](https://docs.aws.amazon.com/appintegrations/latest/APIReference/Welcome.html) DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See [DeleteDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_DeleteDataIntegration.html) and [CreateDataIntegration](https://docs.aws.amazon.com/appintegrations/latest/APIReference/API_CreateDataIntegration.html) in the *Amazon AppIntegrations API Reference*.
 */
public suspend inline fun WisdomClient.deleteKnowledgeBase(crossinline block: DeleteKnowledgeBaseRequest.Builder.() -> Unit): DeleteKnowledgeBaseResponse = deleteKnowledgeBase(DeleteKnowledgeBaseRequest.Builder().apply(block).build())

/**
 * Deletes a quick response.
 */
public suspend inline fun WisdomClient.deleteQuickResponse(crossinline block: DeleteQuickResponseRequest.Builder.() -> Unit): DeleteQuickResponseResponse = deleteQuickResponse(DeleteQuickResponseRequest.Builder().apply(block).build())

/**
 * Retrieves information about an assistant.
 */
public suspend inline fun WisdomClient.getAssistant(crossinline block: GetAssistantRequest.Builder.() -> Unit): GetAssistantResponse = getAssistant(GetAssistantRequest.Builder().apply(block).build())

/**
 * Retrieves information about an assistant association.
 */
public suspend inline fun WisdomClient.getAssistantAssociation(crossinline block: GetAssistantAssociationRequest.Builder.() -> Unit): GetAssistantAssociationResponse = getAssistantAssociation(GetAssistantAssociationRequest.Builder().apply(block).build())

/**
 * Retrieves content, including a pre-signed URL to download the content.
 */
public suspend inline fun WisdomClient.getContent(crossinline block: GetContentRequest.Builder.() -> Unit): GetContentResponse = getContent(GetContentRequest.Builder().apply(block).build())

/**
 * Retrieves summary information about the content.
 */
public suspend inline fun WisdomClient.getContentSummary(crossinline block: GetContentSummaryRequest.Builder.() -> Unit): GetContentSummaryResponse = getContentSummary(GetContentSummaryRequest.Builder().apply(block).build())

/**
 * Retrieves the started import job.
 */
public suspend inline fun WisdomClient.getImportJob(crossinline block: GetImportJobRequest.Builder.() -> Unit): GetImportJobResponse = getImportJob(GetImportJobRequest.Builder().apply(block).build())

/**
 * Retrieves information about the knowledge base.
 */
public suspend inline fun WisdomClient.getKnowledgeBase(crossinline block: GetKnowledgeBaseRequest.Builder.() -> Unit): GetKnowledgeBaseResponse = getKnowledgeBase(GetKnowledgeBaseRequest.Builder().apply(block).build())

/**
 * Retrieves the quick response.
 */
public suspend inline fun WisdomClient.getQuickResponse(crossinline block: GetQuickResponseRequest.Builder.() -> Unit): GetQuickResponseResponse = getQuickResponse(GetQuickResponseRequest.Builder().apply(block).build())

/**
 * Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use [NotifyRecommendationsReceived](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_NotifyRecommendationsReceived.html). This API supports long-polling behavior with the `waitTimeSeconds` parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use [QueryAssistant](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html).
 */
@Deprecated("GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
public suspend inline fun WisdomClient.getRecommendations(crossinline block: GetRecommendationsRequest.Builder.() -> Unit): GetRecommendationsResponse = getRecommendations(GetRecommendationsRequest.Builder().apply(block).build())

/**
 * Retrieves information for a specified session.
 */
public suspend inline fun WisdomClient.getSession(crossinline block: GetSessionRequest.Builder.() -> Unit): GetSessionResponse = getSession(GetSessionRequest.Builder().apply(block).build())

/**
 * Lists information about assistant associations.
 */
public suspend inline fun WisdomClient.listAssistantAssociations(crossinline block: ListAssistantAssociationsRequest.Builder.() -> Unit): ListAssistantAssociationsResponse = listAssistantAssociations(ListAssistantAssociationsRequest.Builder().apply(block).build())

/**
 * Lists information about assistants.
 */
public suspend inline fun WisdomClient.listAssistants(crossinline block: ListAssistantsRequest.Builder.() -> Unit): ListAssistantsResponse = listAssistants(ListAssistantsRequest.Builder().apply(block).build())

/**
 * Lists the content.
 */
public suspend inline fun WisdomClient.listContents(crossinline block: ListContentsRequest.Builder.() -> Unit): ListContentsResponse = listContents(ListContentsRequest.Builder().apply(block).build())

/**
 * Lists information about import jobs.
 */
public suspend inline fun WisdomClient.listImportJobs(crossinline block: ListImportJobsRequest.Builder.() -> Unit): ListImportJobsResponse = listImportJobs(ListImportJobsRequest.Builder().apply(block).build())

/**
 * Lists the knowledge bases.
 */
public suspend inline fun WisdomClient.listKnowledgeBases(crossinline block: ListKnowledgeBasesRequest.Builder.() -> Unit): ListKnowledgeBasesResponse = listKnowledgeBases(ListKnowledgeBasesRequest.Builder().apply(block).build())

/**
 * Lists information about quick response.
 */
public suspend inline fun WisdomClient.listQuickResponses(crossinline block: ListQuickResponsesRequest.Builder.() -> Unit): ListQuickResponsesResponse = listQuickResponses(ListQuickResponsesRequest.Builder().apply(block).build())

/**
 * Lists the tags for the specified resource.
 */
public suspend inline fun WisdomClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())

/**
 * Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html) and a `waitTimeSeconds` input for long-polling behavior and avoiding duplicate recommendations.
 */
public suspend inline fun WisdomClient.notifyRecommendationsReceived(crossinline block: NotifyRecommendationsReceivedRequest.Builder.() -> Unit): NotifyRecommendationsReceivedResponse = notifyRecommendationsReceived(NotifyRecommendationsReceivedRequest.Builder().apply(block).build())

/**
 * Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use [GetRecommendations](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html).
 */
@Deprecated("QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
public suspend inline fun WisdomClient.queryAssistant(crossinline block: QueryAssistantRequest.Builder.() -> Unit): QueryAssistantResponse = queryAssistant(QueryAssistantRequest.Builder().apply(block).build())

/**
 * Removes a URI template from a knowledge base.
 */
public suspend inline fun WisdomClient.removeKnowledgeBaseTemplateUri(crossinline block: RemoveKnowledgeBaseTemplateUriRequest.Builder.() -> Unit): RemoveKnowledgeBaseTemplateUriResponse = removeKnowledgeBaseTemplateUri(RemoveKnowledgeBaseTemplateUriRequest.Builder().apply(block).build())

/**
 * Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.
 */
public suspend inline fun WisdomClient.searchContent(crossinline block: SearchContentRequest.Builder.() -> Unit): SearchContentResponse = searchContent(SearchContentRequest.Builder().apply(block).build())

/**
 * Searches existing Wisdom quick responses in a Wisdom knowledge base.
 */
public suspend inline fun WisdomClient.searchQuickResponses(crossinline block: SearchQuickResponsesRequest.Builder.() -> Unit): SearchQuickResponsesResponse = searchQuickResponses(SearchQuickResponsesRequest.Builder().apply(block).build())

/**
 * Searches for sessions.
 */
public suspend inline fun WisdomClient.searchSessions(crossinline block: SearchSessionsRequest.Builder.() -> Unit): SearchSessionsResponse = searchSessions(SearchSessionsRequest.Builder().apply(block).build())

/**
 * Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use [CreateContent](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_CreateContent.html) to finalize the content creation process or [UpdateContent](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_UpdateContent.html) to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
 */
public suspend inline fun WisdomClient.startContentUpload(crossinline block: StartContentUploadRequest.Builder.() -> Unit): StartContentUploadResponse = startContentUpload(StartContentUploadRequest.Builder().apply(block).build())

/**
 * Start an asynchronous job to import Wisdom resources from an uploaded source file. Before calling this API, use [StartContentUpload](https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html) to upload an asset that contains the resource data.
 * + For importing Wisdom quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see [Import quick responses](https://docs.aws.amazon.com/console/connect/quick-responses/add-data).
 */
public suspend inline fun WisdomClient.startImportJob(crossinline block: StartImportJobRequest.Builder.() -> Unit): StartImportJobResponse = startImportJob(StartImportJobRequest.Builder().apply(block).build())

/**
 * Adds the specified tags to the specified resource.
 */
public suspend inline fun WisdomClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())

/**
 * Removes the specified tags from the specified resource.
 */
public suspend inline fun WisdomClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())

/**
 * Updates information about the content.
 */
public suspend inline fun WisdomClient.updateContent(crossinline block: UpdateContentRequest.Builder.() -> Unit): UpdateContentResponse = updateContent(UpdateContentRequest.Builder().apply(block).build())

/**
 * Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in `${variable}` format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an `Id` value, and you can set the template URI to `https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view`.
 */
public suspend inline fun WisdomClient.updateKnowledgeBaseTemplateUri(crossinline block: UpdateKnowledgeBaseTemplateUriRequest.Builder.() -> Unit): UpdateKnowledgeBaseTemplateUriResponse = updateKnowledgeBaseTemplateUri(UpdateKnowledgeBaseTemplateUriRequest.Builder().apply(block).build())

/**
 * Updates an existing Wisdom quick response.
 */
public suspend inline fun WisdomClient.updateQuickResponse(crossinline block: UpdateQuickResponseRequest.Builder.() -> Unit): UpdateQuickResponseResponse = updateQuickResponse(UpdateQuickResponseRequest.Builder().apply(block).build())




© 2015 - 2024 Weber Informatics LLC | Privacy Policy