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

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

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

package aws.sdk.kotlin.services.iotfleetwise.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateCampaignRequest private constructor(builder: Builder) {
    /**
     * Specifies how to update a campaign. The action can be one of the following:
     * + `APPROVE` - To approve delivering a data collection scheme to vehicles.
     * + `SUSPEND` - To suspend collecting signal data. The campaign is deleted from vehicles and all vehicles in the suspended campaign will stop sending data.
     * + `RESUME` - To reactivate the `SUSPEND` campaign. The campaign is redeployed to all vehicles and the vehicles will resume sending data.
     * + `UPDATE` - To update a campaign.
     */
    public val action: aws.sdk.kotlin.services.iotfleetwise.model.UpdateCampaignAction = requireNotNull(builder.action) { "A non-null value must be provided for action" }
    /**
     * A list of vehicle attributes to associate with a signal.
     *
     * Default: An empty array
     */
    public val dataExtraDimensions: List? = builder.dataExtraDimensions
    /**
     * The description of the campaign.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the campaign to update.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateCampaignRequest(")
        append("action=$action,")
        append("dataExtraDimensions=*** Sensitive Data Redacted ***,")
        append("description=$description,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = action.hashCode()
        result = 31 * result + (dataExtraDimensions?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        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 (action != other.action) return false
        if (dataExtraDimensions != other.dataExtraDimensions) return false
        if (description != other.description) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies how to update a campaign. The action can be one of the following:
         * + `APPROVE` - To approve delivering a data collection scheme to vehicles.
         * + `SUSPEND` - To suspend collecting signal data. The campaign is deleted from vehicles and all vehicles in the suspended campaign will stop sending data.
         * + `RESUME` - To reactivate the `SUSPEND` campaign. The campaign is redeployed to all vehicles and the vehicles will resume sending data.
         * + `UPDATE` - To update a campaign.
         */
        public var action: aws.sdk.kotlin.services.iotfleetwise.model.UpdateCampaignAction? = null
        /**
         * A list of vehicle attributes to associate with a signal.
         *
         * Default: An empty array
         */
        public var dataExtraDimensions: List? = null
        /**
         * The description of the campaign.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the campaign to update.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.UpdateCampaignRequest) : this() {
            this.action = x.action
            this.dataExtraDimensions = x.dataExtraDimensions
            this.description = x.description
            this.name = x.name
        }

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

        internal fun correctErrors(): Builder {
            if (action == null) action = UpdateCampaignAction.SdkUnknown("no value provided")
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy