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

commonMain.aws.sdk.kotlin.services.configservice.model.ResourceIdentifier.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The details that identify a resource that is discovered by Config, including the resource type, ID, and (if available) the custom resource name.
 */
public class ResourceIdentifier private constructor(builder: Builder) {
    /**
     * The time that the resource was deleted.
     */
    public val resourceDeletionTime: aws.smithy.kotlin.runtime.time.Instant? = builder.resourceDeletionTime
    /**
     * The ID of the resource (for example, `sg-xxxxxx`).
     */
    public val resourceId: kotlin.String? = builder.resourceId
    /**
     * The custom name of the resource (if available).
     */
    public val resourceName: kotlin.String? = builder.resourceName
    /**
     * The type of resource.
     */
    public val resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = builder.resourceType

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

    override fun toString(): kotlin.String = buildString {
        append("ResourceIdentifier(")
        append("resourceDeletionTime=$resourceDeletionTime,")
        append("resourceId=$resourceId,")
        append("resourceName=$resourceName,")
        append("resourceType=$resourceType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = resourceDeletionTime?.hashCode() ?: 0
        result = 31 * result + (resourceId?.hashCode() ?: 0)
        result = 31 * result + (resourceName?.hashCode() ?: 0)
        result = 31 * result + (resourceType?.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 ResourceIdentifier

        if (resourceDeletionTime != other.resourceDeletionTime) return false
        if (resourceId != other.resourceId) return false
        if (resourceName != other.resourceName) return false
        if (resourceType != other.resourceType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The time that the resource was deleted.
         */
        public var resourceDeletionTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the resource (for example, `sg-xxxxxx`).
         */
        public var resourceId: kotlin.String? = null
        /**
         * The custom name of the resource (if available).
         */
        public var resourceName: kotlin.String? = null
        /**
         * The type of resource.
         */
        public var resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.ResourceIdentifier) : this() {
            this.resourceDeletionTime = x.resourceDeletionTime
            this.resourceId = x.resourceId
            this.resourceName = x.resourceName
            this.resourceType = x.resourceType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy