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

commonMain.aws.sdk.kotlin.services.transfer.model.DescribedProfile.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

/**
 * The details for a local or partner AS2 profile.
 */
public class DescribedProfile private constructor(builder: Builder) {
    /**
     * The unique Amazon Resource Name (ARN) for the profile.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The `As2Id` is the *AS2-name*, as defined in the [RFC 4130](https://datatracker.ietf.org/doc/html/rfc4130). For inbound transfers, this is the `AS2-From` header for the AS2 messages sent from the partner. For outbound connectors, this is the `AS2-To` header for the AS2 messages sent to the partner using the `StartFileTransfer` API operation. This ID cannot include spaces.
     */
    public val as2Id: kotlin.String? = builder.as2Id
    /**
     * An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.
     */
    public val certificateIds: List? = builder.certificateIds
    /**
     * A unique identifier for the local or partner AS2 profile.
     */
    public val profileId: kotlin.String? = builder.profileId
    /**
     * Indicates whether to list only `LOCAL` type profiles or only `PARTNER` type profiles. If not supplied in the request, the command lists all types of profiles.
     */
    public val profileType: aws.sdk.kotlin.services.transfer.model.ProfileType? = builder.profileType
    /**
     * Key-value pairs that can be used to group and search for profiles.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("DescribedProfile(")
        append("arn=$arn,")
        append("as2Id=$as2Id,")
        append("certificateIds=$certificateIds,")
        append("profileId=$profileId,")
        append("profileType=$profileType,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (as2Id?.hashCode() ?: 0)
        result = 31 * result + (certificateIds?.hashCode() ?: 0)
        result = 31 * result + (profileId?.hashCode() ?: 0)
        result = 31 * result + (profileType?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 DescribedProfile

        if (arn != other.arn) return false
        if (as2Id != other.as2Id) return false
        if (certificateIds != other.certificateIds) return false
        if (profileId != other.profileId) return false
        if (profileType != other.profileType) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique Amazon Resource Name (ARN) for the profile.
         */
        public var arn: kotlin.String? = null
        /**
         * The `As2Id` is the *AS2-name*, as defined in the [RFC 4130](https://datatracker.ietf.org/doc/html/rfc4130). For inbound transfers, this is the `AS2-From` header for the AS2 messages sent from the partner. For outbound connectors, this is the `AS2-To` header for the AS2 messages sent to the partner using the `StartFileTransfer` API operation. This ID cannot include spaces.
         */
        public var as2Id: kotlin.String? = null
        /**
         * An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.
         */
        public var certificateIds: List? = null
        /**
         * A unique identifier for the local or partner AS2 profile.
         */
        public var profileId: kotlin.String? = null
        /**
         * Indicates whether to list only `LOCAL` type profiles or only `PARTNER` type profiles. If not supplied in the request, the command lists all types of profiles.
         */
        public var profileType: aws.sdk.kotlin.services.transfer.model.ProfileType? = null
        /**
         * Key-value pairs that can be used to group and search for profiles.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.DescribedProfile) : this() {
            this.arn = x.arn
            this.as2Id = x.as2Id
            this.certificateIds = x.certificateIds
            this.profileId = x.profileId
            this.profileType = x.profileType
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy