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

commonMain.aws.sdk.kotlin.services.transfer.model.UpdateAgreementRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.transfer.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateAgreementRequest private constructor(builder: Builder) {
    /**
     * Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.
     *
     * **For AS2 connectors**
     *
     * With AS2, you can send files by calling `StartFileTransfer` and specifying the file paths in the request parameter, `SendFilePaths`. We use the file’s parent directory (for example, for `--send-file-paths /bucket/dir/file.txt`, parent directory is `/bucket/dir/`) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the `AccessRole` needs to provide read and write access to the parent directory of the file location used in the `StartFileTransfer` request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with `StartFileTransfer`.
     *
     * If you are using Basic authentication for your AS2 connector, the access role requires the `secretsmanager:GetSecretValue` permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the `kms:Decrypt` permission for that key.
     *
     * **For SFTP connectors**
     *
     * Make sure that the access role provides read and write access to the parent directory of the file location that's used in the `StartFileTransfer` request. Additionally, make sure that the role provides `secretsmanager:GetSecretValue` permission to Secrets Manager.
     */
    public val accessRole: kotlin.String? = builder.accessRole
    /**
     * A unique identifier for the agreement. This identifier is returned when you create an agreement.
     */
    public val agreementId: kotlin.String? = builder.agreementId
    /**
     * To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, `/DOC-EXAMPLE-BUCKET/home/mydirectory `.
     */
    public val baseDirectory: kotlin.String? = builder.baseDirectory
    /**
     * To replace the existing description, provide a short description for the agreement.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A unique identifier for the AS2 local profile.
     *
     * To change the local profile identifier, provide a new value here.
     */
    public val localProfileId: kotlin.String? = builder.localProfileId
    /**
     * A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.
     */
    public val partnerProfileId: kotlin.String? = builder.partnerProfileId
    /**
     * A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.
     */
    public val serverId: kotlin.String? = builder.serverId
    /**
     * You can update the status for the agreement, either activating an inactive agreement or the reverse.
     */
    public val status: aws.sdk.kotlin.services.transfer.model.AgreementStatusType? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateAgreementRequest(")
        append("accessRole=$accessRole,")
        append("agreementId=$agreementId,")
        append("baseDirectory=$baseDirectory,")
        append("description=$description,")
        append("localProfileId=$localProfileId,")
        append("partnerProfileId=$partnerProfileId,")
        append("serverId=$serverId,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessRole?.hashCode() ?: 0
        result = 31 * result + (agreementId?.hashCode() ?: 0)
        result = 31 * result + (baseDirectory?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (localProfileId?.hashCode() ?: 0)
        result = 31 * result + (partnerProfileId?.hashCode() ?: 0)
        result = 31 * result + (serverId?.hashCode() ?: 0)
        result = 31 * result + (status?.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 UpdateAgreementRequest

        if (accessRole != other.accessRole) return false
        if (agreementId != other.agreementId) return false
        if (baseDirectory != other.baseDirectory) return false
        if (description != other.description) return false
        if (localProfileId != other.localProfileId) return false
        if (partnerProfileId != other.partnerProfileId) return false
        if (serverId != other.serverId) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.
         *
         * **For AS2 connectors**
         *
         * With AS2, you can send files by calling `StartFileTransfer` and specifying the file paths in the request parameter, `SendFilePaths`. We use the file’s parent directory (for example, for `--send-file-paths /bucket/dir/file.txt`, parent directory is `/bucket/dir/`) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the `AccessRole` needs to provide read and write access to the parent directory of the file location used in the `StartFileTransfer` request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with `StartFileTransfer`.
         *
         * If you are using Basic authentication for your AS2 connector, the access role requires the `secretsmanager:GetSecretValue` permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the `kms:Decrypt` permission for that key.
         *
         * **For SFTP connectors**
         *
         * Make sure that the access role provides read and write access to the parent directory of the file location that's used in the `StartFileTransfer` request. Additionally, make sure that the role provides `secretsmanager:GetSecretValue` permission to Secrets Manager.
         */
        public var accessRole: kotlin.String? = null
        /**
         * A unique identifier for the agreement. This identifier is returned when you create an agreement.
         */
        public var agreementId: kotlin.String? = null
        /**
         * To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, `/DOC-EXAMPLE-BUCKET/home/mydirectory `.
         */
        public var baseDirectory: kotlin.String? = null
        /**
         * To replace the existing description, provide a short description for the agreement.
         */
        public var description: kotlin.String? = null
        /**
         * A unique identifier for the AS2 local profile.
         *
         * To change the local profile identifier, provide a new value here.
         */
        public var localProfileId: kotlin.String? = null
        /**
         * A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.
         */
        public var partnerProfileId: kotlin.String? = null
        /**
         * A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.
         */
        public var serverId: kotlin.String? = null
        /**
         * You can update the status for the agreement, either activating an inactive agreement or the reverse.
         */
        public var status: aws.sdk.kotlin.services.transfer.model.AgreementStatusType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.UpdateAgreementRequest) : this() {
            this.accessRole = x.accessRole
            this.agreementId = x.agreementId
            this.baseDirectory = x.baseDirectory
            this.description = x.description
            this.localProfileId = x.localProfileId
            this.partnerProfileId = x.partnerProfileId
            this.serverId = x.serverId
            this.status = x.status
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy