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

commonMain.aws.sdk.kotlin.services.guardduty.model.KubernetesWorkloadDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.guardduty.model



/**
 * Details about the Kubernetes workload involved in a Kubernetes finding.
 */
class KubernetesWorkloadDetails private constructor(builder: Builder) {
    /**
     * Containers running as part of the Kubernetes workload.
     */
    val containers: List? = builder.containers
    /**
     * Whether the hostNetwork flag is enabled for the pods included in the workload.
     */
    val hostNetwork: kotlin.Boolean = builder.hostNetwork
    /**
     * Kubernetes workload name.
     */
    val name: kotlin.String? = builder.name
    /**
     * Kubernetes namespace that the workload is part of.
     */
    val namespace: kotlin.String? = builder.namespace
    /**
     * Kubernetes workload type (e.g. Pod, Deployment, etc.).
     */
    val type: kotlin.String? = builder.type
    /**
     * Kubernetes workload ID.
     */
    val uid: kotlin.String? = builder.uid
    /**
     * Volumes used by the Kubernetes workload.
     */
    val volumes: List? = builder.volumes

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

    override fun toString(): kotlin.String = buildString {
        append("KubernetesWorkloadDetails(")
        append("containers=$containers,")
        append("hostNetwork=$hostNetwork,")
        append("name=$name,")
        append("namespace=$namespace,")
        append("type=$type,")
        append("uid=$uid,")
        append("volumes=$volumes)")
    }

    override fun hashCode(): kotlin.Int {
        var result = containers?.hashCode() ?: 0
        result = 31 * result + (hostNetwork.hashCode())
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (namespace?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (uid?.hashCode() ?: 0)
        result = 31 * result + (volumes?.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 KubernetesWorkloadDetails

        if (containers != other.containers) return false
        if (hostNetwork != other.hostNetwork) return false
        if (name != other.name) return false
        if (namespace != other.namespace) return false
        if (type != other.type) return false
        if (uid != other.uid) return false
        if (volumes != other.volumes) return false

        return true
    }

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

    class Builder {
        /**
         * Containers running as part of the Kubernetes workload.
         */
        var containers: List? = null
        /**
         * Whether the hostNetwork flag is enabled for the pods included in the workload.
         */
        var hostNetwork: kotlin.Boolean = false
        /**
         * Kubernetes workload name.
         */
        var name: kotlin.String? = null
        /**
         * Kubernetes namespace that the workload is part of.
         */
        var namespace: kotlin.String? = null
        /**
         * Kubernetes workload type (e.g. Pod, Deployment, etc.).
         */
        var type: kotlin.String? = null
        /**
         * Kubernetes workload ID.
         */
        var uid: kotlin.String? = null
        /**
         * Volumes used by the Kubernetes workload.
         */
        var volumes: List? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.guardduty.model.KubernetesWorkloadDetails) : this() {
            this.containers = x.containers
            this.hostNetwork = x.hostNetwork
            this.name = x.name
            this.namespace = x.namespace
            this.type = x.type
            this.uid = x.uid
            this.volumes = x.volumes
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.guardduty.model.KubernetesWorkloadDetails = KubernetesWorkloadDetails(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy