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

commonMain.aws.sdk.kotlin.services.personalize.model.UpdateCampaignRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.personalize.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateCampaignRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the campaign.
     */
    public val campaignArn: kotlin.String? = builder.campaignArn
    /**
     * The configuration details of a campaign.
     */
    public val campaignConfig: aws.sdk.kotlin.services.personalize.model.CampaignConfig? = builder.campaignConfig
    /**
     * Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high `minProvisionedTPS` will increase your bill. We recommend starting with 1 for `minProvisionedTPS` (the default). Track your usage using Amazon CloudWatch metrics, and increase the `minProvisionedTPS` as necessary.
     */
    public val minProvisionedTps: kotlin.Int? = builder.minProvisionedTps
    /**
     * The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your *solution* in `SolutionArn/$LATEST` format. You must use this format if you set `syncWithLatestSolutionVersion` to `True` in the [CampaignConfig](https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html).
     *
     *  To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.
     *
     *  For more information about automatic campaign updates, see [Enabling automatic campaign updates](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update).
     */
    public val solutionVersionArn: kotlin.String? = builder.solutionVersionArn

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.UpdateCampaignRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateCampaignRequest(")
        append("campaignArn=$campaignArn,")
        append("campaignConfig=$campaignConfig,")
        append("minProvisionedTps=$minProvisionedTps,")
        append("solutionVersionArn=$solutionVersionArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = campaignArn?.hashCode() ?: 0
        result = 31 * result + (campaignConfig?.hashCode() ?: 0)
        result = 31 * result + (minProvisionedTps ?: 0)
        result = 31 * result + (solutionVersionArn?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as UpdateCampaignRequest

        if (campaignArn != other.campaignArn) return false
        if (campaignConfig != other.campaignConfig) return false
        if (minProvisionedTps != other.minProvisionedTps) return false
        if (solutionVersionArn != other.solutionVersionArn) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.UpdateCampaignRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the campaign.
         */
        public var campaignArn: kotlin.String? = null
        /**
         * The configuration details of a campaign.
         */
        public var campaignConfig: aws.sdk.kotlin.services.personalize.model.CampaignConfig? = null
        /**
         * Specifies the requested minimum provisioned transactions (recommendations) per second that Amazon Personalize will support. A high `minProvisionedTPS` will increase your bill. We recommend starting with 1 for `minProvisionedTPS` (the default). Track your usage using Amazon CloudWatch metrics, and increase the `minProvisionedTPS` as necessary.
         */
        public var minProvisionedTps: kotlin.Int? = null
        /**
         * The Amazon Resource Name (ARN) of a new model to deploy. To specify the latest solution version of your solution, specify the ARN of your *solution* in `SolutionArn/$LATEST` format. You must use this format if you set `syncWithLatestSolutionVersion` to `True` in the [CampaignConfig](https://docs.aws.amazon.com/personalize/latest/dg/API_CampaignConfig.html).
         *
         *  To deploy a model that isn't the latest solution version of your solution, specify the ARN of the solution version.
         *
         *  For more information about automatic campaign updates, see [Enabling automatic campaign updates](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-automatic-latest-sv-update).
         */
        public var solutionVersionArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.personalize.model.UpdateCampaignRequest) : this() {
            this.campaignArn = x.campaignArn
            this.campaignConfig = x.campaignConfig
            this.minProvisionedTps = x.minProvisionedTps
            this.solutionVersionArn = x.solutionVersionArn
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.personalize.model.UpdateCampaignRequest = UpdateCampaignRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.personalize.model.CampaignConfig] inside the given [block]
         */
        public fun campaignConfig(block: aws.sdk.kotlin.services.personalize.model.CampaignConfig.Builder.() -> kotlin.Unit) {
            this.campaignConfig = aws.sdk.kotlin.services.personalize.model.CampaignConfig.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy