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

commonMain.aws.sdk.kotlin.services.connectcases.ConnectCasesClient.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.connectcases

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.connectcases.auth.ConnectCasesAuthSchemeProvider
import aws.sdk.kotlin.services.connectcases.auth.DefaultConnectCasesAuthSchemeProvider
import aws.sdk.kotlin.services.connectcases.endpoints.ConnectCasesEndpointParameters
import aws.sdk.kotlin.services.connectcases.endpoints.ConnectCasesEndpointProvider
import aws.sdk.kotlin.services.connectcases.endpoints.DefaultConnectCasesEndpointProvider
import aws.sdk.kotlin.services.connectcases.model.BatchGetFieldRequest
import aws.sdk.kotlin.services.connectcases.model.BatchGetFieldResponse
import aws.sdk.kotlin.services.connectcases.model.BatchPutFieldOptionsRequest
import aws.sdk.kotlin.services.connectcases.model.BatchPutFieldOptionsResponse
import aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest
import aws.sdk.kotlin.services.connectcases.model.CreateCaseResponse
import aws.sdk.kotlin.services.connectcases.model.CreateDomainRequest
import aws.sdk.kotlin.services.connectcases.model.CreateDomainResponse
import aws.sdk.kotlin.services.connectcases.model.CreateFieldRequest
import aws.sdk.kotlin.services.connectcases.model.CreateFieldResponse
import aws.sdk.kotlin.services.connectcases.model.CreateLayoutRequest
import aws.sdk.kotlin.services.connectcases.model.CreateLayoutResponse
import aws.sdk.kotlin.services.connectcases.model.CreateRelatedItemRequest
import aws.sdk.kotlin.services.connectcases.model.CreateRelatedItemResponse
import aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest
import aws.sdk.kotlin.services.connectcases.model.CreateTemplateResponse
import aws.sdk.kotlin.services.connectcases.model.DeleteDomainRequest
import aws.sdk.kotlin.services.connectcases.model.DeleteDomainResponse
import aws.sdk.kotlin.services.connectcases.model.GetCaseAuditEventsRequest
import aws.sdk.kotlin.services.connectcases.model.GetCaseAuditEventsResponse
import aws.sdk.kotlin.services.connectcases.model.GetCaseEventConfigurationRequest
import aws.sdk.kotlin.services.connectcases.model.GetCaseEventConfigurationResponse
import aws.sdk.kotlin.services.connectcases.model.GetCaseRequest
import aws.sdk.kotlin.services.connectcases.model.GetCaseResponse
import aws.sdk.kotlin.services.connectcases.model.GetDomainRequest
import aws.sdk.kotlin.services.connectcases.model.GetDomainResponse
import aws.sdk.kotlin.services.connectcases.model.GetLayoutRequest
import aws.sdk.kotlin.services.connectcases.model.GetLayoutResponse
import aws.sdk.kotlin.services.connectcases.model.GetTemplateRequest
import aws.sdk.kotlin.services.connectcases.model.GetTemplateResponse
import aws.sdk.kotlin.services.connectcases.model.ListCasesForContactRequest
import aws.sdk.kotlin.services.connectcases.model.ListCasesForContactResponse
import aws.sdk.kotlin.services.connectcases.model.ListDomainsRequest
import aws.sdk.kotlin.services.connectcases.model.ListDomainsResponse
import aws.sdk.kotlin.services.connectcases.model.ListFieldOptionsRequest
import aws.sdk.kotlin.services.connectcases.model.ListFieldOptionsResponse
import aws.sdk.kotlin.services.connectcases.model.ListFieldsRequest
import aws.sdk.kotlin.services.connectcases.model.ListFieldsResponse
import aws.sdk.kotlin.services.connectcases.model.ListLayoutsRequest
import aws.sdk.kotlin.services.connectcases.model.ListLayoutsResponse
import aws.sdk.kotlin.services.connectcases.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.connectcases.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.connectcases.model.ListTemplatesRequest
import aws.sdk.kotlin.services.connectcases.model.ListTemplatesResponse
import aws.sdk.kotlin.services.connectcases.model.PutCaseEventConfigurationRequest
import aws.sdk.kotlin.services.connectcases.model.PutCaseEventConfigurationResponse
import aws.sdk.kotlin.services.connectcases.model.SearchCasesRequest
import aws.sdk.kotlin.services.connectcases.model.SearchCasesResponse
import aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsRequest
import aws.sdk.kotlin.services.connectcases.model.SearchRelatedItemsResponse
import aws.sdk.kotlin.services.connectcases.model.TagResourceRequest
import aws.sdk.kotlin.services.connectcases.model.TagResourceResponse
import aws.sdk.kotlin.services.connectcases.model.UntagResourceRequest
import aws.sdk.kotlin.services.connectcases.model.UntagResourceResponse
import aws.sdk.kotlin.services.connectcases.model.UpdateCaseRequest
import aws.sdk.kotlin.services.connectcases.model.UpdateCaseResponse
import aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest
import aws.sdk.kotlin.services.connectcases.model.UpdateFieldResponse
import aws.sdk.kotlin.services.connectcases.model.UpdateLayoutRequest
import aws.sdk.kotlin.services.connectcases.model.UpdateLayoutResponse
import aws.sdk.kotlin.services.connectcases.model.UpdateTemplateRequest
import aws.sdk.kotlin.services.connectcases.model.UpdateTemplateResponse
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.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.client.SdkClientFactory
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 = "ConnectCases"
public const val SdkVersion: String = "1.0.54"
public const val ServiceApiVersion: String = "2022-10-03"

/**
 * With Amazon Connect Cases, your agents can track and manage customer issues that require multiple interactions, follow-up tasks, and teams in your contact center. A case represents a customer issue. It records the issue, the steps and interactions taken to resolve the issue, and the outcome. For more information, see [Amazon Connect Cases](https://docs.aws.amazon.com/connect/latest/adminguide/cases.html) in the *Amazon Connect Administrator Guide*.
 */
public interface ConnectCasesClient : SdkClient {
    /**
     * ConnectCasesClient's configuration
     */
    public override val config: Config

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

        override suspend fun finalizeConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
            builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
                sharedConfig,
                "ConnectCases",
                "CONNECTCASES",
                "connectcases",
            )
            builder.config.interceptors.add(0, ClockSkewInterceptor())
        }
    }

    public class Builder internal constructor(): AbstractSdkClientBuilder() {
        override val config: Config.Builder = Config.Builder()
        override fun newClient(config: Config): ConnectCasesClient = DefaultConnectCasesClient(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: ConnectCasesEndpointProvider = builder.endpointProvider ?: DefaultConnectCasesEndpointProvider()
        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: ConnectCasesAuthSchemeProvider = builder.authSchemeProvider ?: DefaultConnectCasesAuthSchemeProvider()
        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 = "ConnectCases"

            /**
             * 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: ConnectCasesEndpointProvider? = 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: ConnectCasesAuthSchemeProvider? = null

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

    /**
     * Returns the description for the list of fields in the request parameters.
     */
    public suspend fun batchGetField(input: BatchGetFieldRequest): BatchGetFieldResponse

    /**
     * Creates and updates a set of field options for a single select field in a Cases domain.
     */
    public suspend fun batchPutFieldOptions(input: BatchPutFieldOptionsRequest): BatchPutFieldOptionsResponse

    /**
     * If you provide a value for `PerformedBy.UserArn` you must also have [connect:DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the User ARN resource that you provide
     *
     * Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types.
     *
     * The following fields are required when creating a case:
     * + `customer_id` - You must provide the full customer profile ARN in this format: `arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID`
     * + `title`
     */
    public suspend fun createCase(input: CreateCaseRequest): CreateCaseResponse

    /**
     * Creates a domain, which is a container for all case data, such as cases, fields, templates and layouts. Each Amazon Connect instance can be associated with only one Cases domain.
     *
     * This will not associate your connect instance to Cases domain. Instead, use the Amazon Connect [CreateIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateIntegrationAssociation.html) API. You need specific IAM permissions to successfully associate the Cases domain. For more information, see [Onboard to Cases](https://docs.aws.amazon.com/connect/latest/adminguide/required-permissions-iam-cases.html#onboard-cases-iam).
     */
    public suspend fun createDomain(input: CreateDomainRequest): CreateDomainResponse

    /**
     * Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain.
     */
    public suspend fun createField(input: CreateFieldRequest): CreateFieldResponse

    /**
     * Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface:
     * + Fields to display to the users
     * + Field ordering
     *
     * Title and Status fields cannot be part of layouts since they are not configurable.
     */
    public suspend fun createLayout(input: CreateLayoutRequest): CreateLayoutResponse

    /**
     * Creates a related item (comments, tasks, and contacts) and associates it with a case.
     *
     * + A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a `contactArn`). All Related Items have their own internal identifier, the `relatedItemArn`. Examples of related items include `comments` and `contacts`.
     * + If you provide a value for `performedBy.userArn` you must also have [DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the ARN of the user that you provide.
     */
    public suspend fun createRelatedItem(input: CreateRelatedItemRequest): CreateRelatedItemResponse

    /**
     * Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.
     */
    public suspend fun createTemplate(input: CreateTemplateRequest): CreateTemplateResponse

    /**
     * Deletes a Cases domain.
     *
     * After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this Amazon Connect instance. See [DeleteIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html).
     */
    public suspend fun deleteDomain(input: DeleteDomainRequest): DeleteDomainResponse

    /**
     * Returns information about a specific case if it exists.
     */
    public suspend fun getCase(input: GetCaseRequest): GetCaseResponse

    /**
     * Returns the audit history about a specific case if it exists.
     */
    public suspend fun getCaseAuditEvents(input: GetCaseAuditEventsRequest): GetCaseAuditEventsResponse

    /**
     * Returns the case event publishing configuration.
     */
    public suspend fun getCaseEventConfiguration(input: GetCaseEventConfigurationRequest): GetCaseEventConfigurationResponse

    /**
     * Returns information about a specific domain if it exists.
     */
    public suspend fun getDomain(input: GetDomainRequest): GetDomainResponse

    /**
     * Returns the details for the requested layout.
     */
    public suspend fun getLayout(input: GetLayoutRequest): GetLayoutResponse

    /**
     * Returns the details for the requested template.
     */
    public suspend fun getTemplate(input: GetTemplateRequest): GetTemplateResponse

    /**
     * Lists cases for a given contact.
     */
    public suspend fun listCasesForContact(input: ListCasesForContactRequest): ListCasesForContactResponse

    /**
     * Lists all cases domains in the Amazon Web Services account. Each list item is a condensed summary object of the domain.
     */
    public suspend fun listDomains(input: ListDomainsRequest = ListDomainsRequest { }): ListDomainsResponse

    /**
     * Lists all of the field options for a field identifier in the domain.
     */
    public suspend fun listFieldOptions(input: ListFieldOptionsRequest): ListFieldOptionsResponse

    /**
     * Lists all fields in a Cases domain.
     */
    public suspend fun listFields(input: ListFieldsRequest): ListFieldsResponse

    /**
     * Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.
     */
    public suspend fun listLayouts(input: ListLayoutsRequest): ListLayoutsResponse

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

    /**
     * Lists all of the templates in a Cases domain. Each list item is a condensed summary object of the template.
     */
    public suspend fun listTemplates(input: ListTemplatesRequest): ListTemplatesResponse

    /**
     * Adds case event publishing configuration. For a complete list of fields you can add to the event message, see [Create case fields](https://docs.aws.amazon.com/connect/latest/adminguide/case-fields.html) in the *Amazon Connect Administrator Guide*
     */
    public suspend fun putCaseEventConfiguration(input: PutCaseEventConfigurationRequest): PutCaseEventConfigurationResponse

    /**
     * Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.
     *
     * For `customer_id` you must provide the full customer profile ARN in this format: ` arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID`.
     */
    public suspend fun searchCases(input: SearchCasesRequest): SearchCasesResponse

    /**
     * Searches for related items that are associated with a case.
     *
     * If no filters are provided, this returns all related items associated with a case.
     */
    public suspend fun searchRelatedItems(input: SearchRelatedItemsRequest): SearchRelatedItemsResponse

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

    /**
     * Untags a resource.
     */
    public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse

    /**
     * If you provide a value for `PerformedBy.UserArn` you must also have [connect:DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the User ARN resource that you provide
     *
     * Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the `CreateCase` input .
     *
     * If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
     */
    public suspend fun updateCase(input: UpdateCaseRequest): UpdateCaseResponse

    /**
     * Updates the properties of an existing field.
     */
    public suspend fun updateField(input: UpdateFieldRequest): UpdateFieldResponse

    /**
     * Updates the attributes of an existing layout.
     *
     * If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
     *
     * A `ValidationException` is returned when you add non-existent `fieldIds` to a layout.
     *
     * Title and Status fields cannot be part of layouts because they are not configurable.
     */
    public suspend fun updateLayout(input: UpdateLayoutRequest): UpdateLayoutResponse

    /**
     * Updates the attributes of an existing template. The template attributes that can be modified include `name`, `description`, `layoutConfiguration`, `requiredFields`, and `status`. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.
     */
    public suspend fun updateTemplate(input: UpdateTemplateRequest): UpdateTemplateResponse
}

/**
 * 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 ConnectCasesClient.withConfig(block: ConnectCasesClient.Config.Builder.() -> Unit): ConnectCasesClient {
    val newConfig = config.toBuilder().apply(block).build()
    return DefaultConnectCasesClient(newConfig)
}

/**
 * Returns the description for the list of fields in the request parameters.
 */
public suspend inline fun ConnectCasesClient.batchGetField(crossinline block: BatchGetFieldRequest.Builder.() -> Unit): BatchGetFieldResponse = batchGetField(BatchGetFieldRequest.Builder().apply(block).build())

/**
 * Creates and updates a set of field options for a single select field in a Cases domain.
 */
public suspend inline fun ConnectCasesClient.batchPutFieldOptions(crossinline block: BatchPutFieldOptionsRequest.Builder.() -> Unit): BatchPutFieldOptionsResponse = batchPutFieldOptions(BatchPutFieldOptionsRequest.Builder().apply(block).build())

/**
 * If you provide a value for `PerformedBy.UserArn` you must also have [connect:DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the User ARN resource that you provide
 *
 * Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types.
 *
 * The following fields are required when creating a case:
 * + `customer_id` - You must provide the full customer profile ARN in this format: `arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID`
 * + `title`
 */
public suspend inline fun ConnectCasesClient.createCase(crossinline block: CreateCaseRequest.Builder.() -> Unit): CreateCaseResponse = createCase(CreateCaseRequest.Builder().apply(block).build())

/**
 * Creates a domain, which is a container for all case data, such as cases, fields, templates and layouts. Each Amazon Connect instance can be associated with only one Cases domain.
 *
 * This will not associate your connect instance to Cases domain. Instead, use the Amazon Connect [CreateIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateIntegrationAssociation.html) API. You need specific IAM permissions to successfully associate the Cases domain. For more information, see [Onboard to Cases](https://docs.aws.amazon.com/connect/latest/adminguide/required-permissions-iam-cases.html#onboard-cases-iam).
 */
public suspend inline fun ConnectCasesClient.createDomain(crossinline block: CreateDomainRequest.Builder.() -> Unit): CreateDomainResponse = createDomain(CreateDomainRequest.Builder().apply(block).build())

/**
 * Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain.
 */
public suspend inline fun ConnectCasesClient.createField(crossinline block: CreateFieldRequest.Builder.() -> Unit): CreateFieldResponse = createField(CreateFieldRequest.Builder().apply(block).build())

/**
 * Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface:
 * + Fields to display to the users
 * + Field ordering
 *
 * Title and Status fields cannot be part of layouts since they are not configurable.
 */
public suspend inline fun ConnectCasesClient.createLayout(crossinline block: CreateLayoutRequest.Builder.() -> Unit): CreateLayoutResponse = createLayout(CreateLayoutRequest.Builder().apply(block).build())

/**
 * Creates a related item (comments, tasks, and contacts) and associates it with a case.
 *
 * + A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a `contactArn`). All Related Items have their own internal identifier, the `relatedItemArn`. Examples of related items include `comments` and `contacts`.
 * + If you provide a value for `performedBy.userArn` you must also have [DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the ARN of the user that you provide.
 */
public suspend inline fun ConnectCasesClient.createRelatedItem(crossinline block: CreateRelatedItemRequest.Builder.() -> Unit): CreateRelatedItemResponse = createRelatedItem(CreateRelatedItemRequest.Builder().apply(block).build())

/**
 * Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.
 */
public suspend inline fun ConnectCasesClient.createTemplate(crossinline block: CreateTemplateRequest.Builder.() -> Unit): CreateTemplateResponse = createTemplate(CreateTemplateRequest.Builder().apply(block).build())

/**
 * Deletes a Cases domain.
 *
 * After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this Amazon Connect instance. See [DeleteIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html).
 */
public suspend inline fun ConnectCasesClient.deleteDomain(crossinline block: DeleteDomainRequest.Builder.() -> Unit): DeleteDomainResponse = deleteDomain(DeleteDomainRequest.Builder().apply(block).build())

/**
 * Returns information about a specific case if it exists.
 */
public suspend inline fun ConnectCasesClient.getCase(crossinline block: GetCaseRequest.Builder.() -> Unit): GetCaseResponse = getCase(GetCaseRequest.Builder().apply(block).build())

/**
 * Returns the audit history about a specific case if it exists.
 */
public suspend inline fun ConnectCasesClient.getCaseAuditEvents(crossinline block: GetCaseAuditEventsRequest.Builder.() -> Unit): GetCaseAuditEventsResponse = getCaseAuditEvents(GetCaseAuditEventsRequest.Builder().apply(block).build())

/**
 * Returns the case event publishing configuration.
 */
public suspend inline fun ConnectCasesClient.getCaseEventConfiguration(crossinline block: GetCaseEventConfigurationRequest.Builder.() -> Unit): GetCaseEventConfigurationResponse = getCaseEventConfiguration(GetCaseEventConfigurationRequest.Builder().apply(block).build())

/**
 * Returns information about a specific domain if it exists.
 */
public suspend inline fun ConnectCasesClient.getDomain(crossinline block: GetDomainRequest.Builder.() -> Unit): GetDomainResponse = getDomain(GetDomainRequest.Builder().apply(block).build())

/**
 * Returns the details for the requested layout.
 */
public suspend inline fun ConnectCasesClient.getLayout(crossinline block: GetLayoutRequest.Builder.() -> Unit): GetLayoutResponse = getLayout(GetLayoutRequest.Builder().apply(block).build())

/**
 * Returns the details for the requested template.
 */
public suspend inline fun ConnectCasesClient.getTemplate(crossinline block: GetTemplateRequest.Builder.() -> Unit): GetTemplateResponse = getTemplate(GetTemplateRequest.Builder().apply(block).build())

/**
 * Lists cases for a given contact.
 */
public suspend inline fun ConnectCasesClient.listCasesForContact(crossinline block: ListCasesForContactRequest.Builder.() -> Unit): ListCasesForContactResponse = listCasesForContact(ListCasesForContactRequest.Builder().apply(block).build())

/**
 * Lists all cases domains in the Amazon Web Services account. Each list item is a condensed summary object of the domain.
 */
public suspend inline fun ConnectCasesClient.listDomains(crossinline block: ListDomainsRequest.Builder.() -> Unit): ListDomainsResponse = listDomains(ListDomainsRequest.Builder().apply(block).build())

/**
 * Lists all of the field options for a field identifier in the domain.
 */
public suspend inline fun ConnectCasesClient.listFieldOptions(crossinline block: ListFieldOptionsRequest.Builder.() -> Unit): ListFieldOptionsResponse = listFieldOptions(ListFieldOptionsRequest.Builder().apply(block).build())

/**
 * Lists all fields in a Cases domain.
 */
public suspend inline fun ConnectCasesClient.listFields(crossinline block: ListFieldsRequest.Builder.() -> Unit): ListFieldsResponse = listFields(ListFieldsRequest.Builder().apply(block).build())

/**
 * Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.
 */
public suspend inline fun ConnectCasesClient.listLayouts(crossinline block: ListLayoutsRequest.Builder.() -> Unit): ListLayoutsResponse = listLayouts(ListLayoutsRequest.Builder().apply(block).build())

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

/**
 * Lists all of the templates in a Cases domain. Each list item is a condensed summary object of the template.
 */
public suspend inline fun ConnectCasesClient.listTemplates(crossinline block: ListTemplatesRequest.Builder.() -> Unit): ListTemplatesResponse = listTemplates(ListTemplatesRequest.Builder().apply(block).build())

/**
 * Adds case event publishing configuration. For a complete list of fields you can add to the event message, see [Create case fields](https://docs.aws.amazon.com/connect/latest/adminguide/case-fields.html) in the *Amazon Connect Administrator Guide*
 */
public suspend inline fun ConnectCasesClient.putCaseEventConfiguration(crossinline block: PutCaseEventConfigurationRequest.Builder.() -> Unit): PutCaseEventConfigurationResponse = putCaseEventConfiguration(PutCaseEventConfigurationRequest.Builder().apply(block).build())

/**
 * Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.
 *
 * For `customer_id` you must provide the full customer profile ARN in this format: ` arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID`.
 */
public suspend inline fun ConnectCasesClient.searchCases(crossinline block: SearchCasesRequest.Builder.() -> Unit): SearchCasesResponse = searchCases(SearchCasesRequest.Builder().apply(block).build())

/**
 * Searches for related items that are associated with a case.
 *
 * If no filters are provided, this returns all related items associated with a case.
 */
public suspend inline fun ConnectCasesClient.searchRelatedItems(crossinline block: SearchRelatedItemsRequest.Builder.() -> Unit): SearchRelatedItemsResponse = searchRelatedItems(SearchRelatedItemsRequest.Builder().apply(block).build())

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

/**
 * Untags a resource.
 */
public suspend inline fun ConnectCasesClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())

/**
 * If you provide a value for `PerformedBy.UserArn` you must also have [connect:DescribeUser](https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeUser.html) permission on the User ARN resource that you provide
 *
 * Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the `CreateCase` input .
 *
 * If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
 */
public suspend inline fun ConnectCasesClient.updateCase(crossinline block: UpdateCaseRequest.Builder.() -> Unit): UpdateCaseResponse = updateCase(UpdateCaseRequest.Builder().apply(block).build())

/**
 * Updates the properties of an existing field.
 */
public suspend inline fun ConnectCasesClient.updateField(crossinline block: UpdateFieldRequest.Builder.() -> Unit): UpdateFieldResponse = updateField(UpdateFieldRequest.Builder().apply(block).build())

/**
 * Updates the attributes of an existing layout.
 *
 * If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
 *
 * A `ValidationException` is returned when you add non-existent `fieldIds` to a layout.
 *
 * Title and Status fields cannot be part of layouts because they are not configurable.
 */
public suspend inline fun ConnectCasesClient.updateLayout(crossinline block: UpdateLayoutRequest.Builder.() -> Unit): UpdateLayoutResponse = updateLayout(UpdateLayoutRequest.Builder().apply(block).build())

/**
 * Updates the attributes of an existing template. The template attributes that can be modified include `name`, `description`, `layoutConfiguration`, `requiredFields`, and `status`. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.
 */
public suspend inline fun ConnectCasesClient.updateTemplate(crossinline block: UpdateTemplateRequest.Builder.() -> Unit): UpdateTemplateResponse = updateTemplate(UpdateTemplateRequest.Builder().apply(block).build())




© 2015 - 2025 Weber Informatics LLC | Privacy Policy