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

commonMain.aws.sdk.kotlin.services.wellarchitected.model.WorkloadShare.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wellarchitected.model



/**
 * A workload share return object.
 */
public class WorkloadShare private constructor(builder: Builder) {
    /**
     * Permission granted on a share request.
     */
    public val permissionType: aws.sdk.kotlin.services.wellarchitected.model.PermissionType? = builder.permissionType
    /**
     * The ID associated with the share.
     */
    public val shareId: kotlin.String? = builder.shareId
    /**
     * An Amazon Web Services account ID.
     */
    public val sharedBy: kotlin.String? = builder.sharedBy
    /**
     * The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.
     */
    public val sharedWith: kotlin.String? = builder.sharedWith
    /**
     * The status of the share request.
     */
    public val status: aws.sdk.kotlin.services.wellarchitected.model.ShareStatus? = builder.status
    /**
     * The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.
     */
    public val workloadId: kotlin.String? = builder.workloadId
    /**
     * The name of the workload.
     *
     * The name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization are ignored when checking for uniqueness.
     */
    public val workloadName: kotlin.String? = builder.workloadName

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

    override fun toString(): kotlin.String = buildString {
        append("WorkloadShare(")
        append("permissionType=$permissionType,")
        append("shareId=$shareId,")
        append("sharedBy=$sharedBy,")
        append("sharedWith=$sharedWith,")
        append("status=$status,")
        append("workloadId=$workloadId,")
        append("workloadName=$workloadName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = permissionType?.hashCode() ?: 0
        result = 31 * result + (shareId?.hashCode() ?: 0)
        result = 31 * result + (sharedBy?.hashCode() ?: 0)
        result = 31 * result + (sharedWith?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (workloadId?.hashCode() ?: 0)
        result = 31 * result + (workloadName?.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 WorkloadShare

        if (permissionType != other.permissionType) return false
        if (shareId != other.shareId) return false
        if (sharedBy != other.sharedBy) return false
        if (sharedWith != other.sharedWith) return false
        if (status != other.status) return false
        if (workloadId != other.workloadId) return false
        if (workloadName != other.workloadName) return false

        return true
    }

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

    public class Builder {
        /**
         * Permission granted on a share request.
         */
        public var permissionType: aws.sdk.kotlin.services.wellarchitected.model.PermissionType? = null
        /**
         * The ID associated with the share.
         */
        public var shareId: kotlin.String? = null
        /**
         * An Amazon Web Services account ID.
         */
        public var sharedBy: kotlin.String? = null
        /**
         * The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload, lens, or profile is shared.
         */
        public var sharedWith: kotlin.String? = null
        /**
         * The status of the share request.
         */
        public var status: aws.sdk.kotlin.services.wellarchitected.model.ShareStatus? = null
        /**
         * The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.
         */
        public var workloadId: kotlin.String? = null
        /**
         * The name of the workload.
         *
         * The name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization are ignored when checking for uniqueness.
         */
        public var workloadName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.WorkloadShare) : this() {
            this.permissionType = x.permissionType
            this.shareId = x.shareId
            this.sharedBy = x.sharedBy
            this.sharedWith = x.sharedWith
            this.status = x.status
            this.workloadId = x.workloadId
            this.workloadName = x.workloadName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy