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

commonMain.aws.sdk.kotlin.services.configservice.model.BaseConfigurationItem.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 detailed configurations of a specified resource.
 */
public class BaseConfigurationItem private constructor(builder: Builder) {
    /**
     * The 12-digit Amazon Web Services account ID associated with the resource.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The Amazon Resource Name (ARN) of the resource.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The Availability Zone associated with the resource.
     */
    public val availabilityZone: kotlin.String? = builder.availabilityZone
    /**
     * The region where the resource resides.
     */
    public val awsRegion: kotlin.String? = builder.awsRegion
    /**
     * The description of the resource configuration.
     */
    public val configuration: kotlin.String? = builder.configuration
    /**
     * The time when the recording of configuration changes was initiated for the resource.
     */
    public val configurationItemCaptureTime: aws.smithy.kotlin.runtime.time.Instant? = builder.configurationItemCaptureTime
    /**
     * The time when configuration changes for the resource were delivered.
     *
     * This field is optional and is not guaranteed to be present in a configuration item (CI). If you are using daily recording, this field will be populated. However, if you are using continuous recording, this field will be omitted since the delivery time is instantaneous as the CI is available right away. For more information on daily recording and continuous recording, see [Recording Frequency](https://docs.aws.amazon.com/config/latest/developerguide/select-resources.html#select-resources-recording-frequency) in the *Config Developer Guide*.
     */
    public val configurationItemDeliveryTime: aws.smithy.kotlin.runtime.time.Instant? = builder.configurationItemDeliveryTime
    /**
     * The configuration item status. Valid values include:
     * + OK – The resource configuration has been updated.
     * + ResourceDiscovered – The resource was newly discovered.
     * + ResourceNotRecorded – The resource was discovered, but its configuration was not recorded since the recorder doesn't record resources of this type.
     * + ResourceDeleted – The resource was deleted
     * + ResourceDeletedNotRecorded – The resource was deleted, but its configuration was not recorded since the recorder doesn't record resources of this type.
     */
    public val configurationItemStatus: aws.sdk.kotlin.services.configservice.model.ConfigurationItemStatus? = builder.configurationItemStatus
    /**
     * An identifier that indicates the ordering of the configuration items of a resource.
     */
    public val configurationStateId: kotlin.String? = builder.configurationStateId
    /**
     * The recording frequency that Config uses to record configuration changes for the resource.
     */
    public val recordingFrequency: aws.sdk.kotlin.services.configservice.model.RecordingFrequency? = builder.recordingFrequency
    /**
     * The time stamp when the resource was created.
     */
    public val resourceCreationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.resourceCreationTime
    /**
     * 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 Amazon Web Services resource.
     */
    public val resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = builder.resourceType
    /**
     * Configuration attributes that Config returns for certain resource types to supplement the information returned for the configuration parameter.
     */
    public val supplementaryConfiguration: Map? = builder.supplementaryConfiguration
    /**
     * The version number of the resource configuration.
     */
    public val version: kotlin.String? = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("BaseConfigurationItem(")
        append("accountId=$accountId,")
        append("arn=$arn,")
        append("availabilityZone=$availabilityZone,")
        append("awsRegion=$awsRegion,")
        append("configuration=$configuration,")
        append("configurationItemCaptureTime=$configurationItemCaptureTime,")
        append("configurationItemDeliveryTime=$configurationItemDeliveryTime,")
        append("configurationItemStatus=$configurationItemStatus,")
        append("configurationStateId=$configurationStateId,")
        append("recordingFrequency=$recordingFrequency,")
        append("resourceCreationTime=$resourceCreationTime,")
        append("resourceId=$resourceId,")
        append("resourceName=$resourceName,")
        append("resourceType=$resourceType,")
        append("supplementaryConfiguration=$supplementaryConfiguration,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (arn?.hashCode() ?: 0)
        result = 31 * result + (availabilityZone?.hashCode() ?: 0)
        result = 31 * result + (awsRegion?.hashCode() ?: 0)
        result = 31 * result + (configuration?.hashCode() ?: 0)
        result = 31 * result + (configurationItemCaptureTime?.hashCode() ?: 0)
        result = 31 * result + (configurationItemDeliveryTime?.hashCode() ?: 0)
        result = 31 * result + (configurationItemStatus?.hashCode() ?: 0)
        result = 31 * result + (configurationStateId?.hashCode() ?: 0)
        result = 31 * result + (recordingFrequency?.hashCode() ?: 0)
        result = 31 * result + (resourceCreationTime?.hashCode() ?: 0)
        result = 31 * result + (resourceId?.hashCode() ?: 0)
        result = 31 * result + (resourceName?.hashCode() ?: 0)
        result = 31 * result + (resourceType?.hashCode() ?: 0)
        result = 31 * result + (supplementaryConfiguration?.hashCode() ?: 0)
        result = 31 * result + (version?.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 BaseConfigurationItem

        if (accountId != other.accountId) return false
        if (arn != other.arn) return false
        if (availabilityZone != other.availabilityZone) return false
        if (awsRegion != other.awsRegion) return false
        if (configuration != other.configuration) return false
        if (configurationItemCaptureTime != other.configurationItemCaptureTime) return false
        if (configurationItemDeliveryTime != other.configurationItemDeliveryTime) return false
        if (configurationItemStatus != other.configurationItemStatus) return false
        if (configurationStateId != other.configurationStateId) return false
        if (recordingFrequency != other.recordingFrequency) return false
        if (resourceCreationTime != other.resourceCreationTime) return false
        if (resourceId != other.resourceId) return false
        if (resourceName != other.resourceName) return false
        if (resourceType != other.resourceType) return false
        if (supplementaryConfiguration != other.supplementaryConfiguration) return false
        if (version != other.version) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The 12-digit Amazon Web Services account ID associated with the resource.
         */
        public var accountId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the resource.
         */
        public var arn: kotlin.String? = null
        /**
         * The Availability Zone associated with the resource.
         */
        public var availabilityZone: kotlin.String? = null
        /**
         * The region where the resource resides.
         */
        public var awsRegion: kotlin.String? = null
        /**
         * The description of the resource configuration.
         */
        public var configuration: kotlin.String? = null
        /**
         * The time when the recording of configuration changes was initiated for the resource.
         */
        public var configurationItemCaptureTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time when configuration changes for the resource were delivered.
         *
         * This field is optional and is not guaranteed to be present in a configuration item (CI). If you are using daily recording, this field will be populated. However, if you are using continuous recording, this field will be omitted since the delivery time is instantaneous as the CI is available right away. For more information on daily recording and continuous recording, see [Recording Frequency](https://docs.aws.amazon.com/config/latest/developerguide/select-resources.html#select-resources-recording-frequency) in the *Config Developer Guide*.
         */
        public var configurationItemDeliveryTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The configuration item status. Valid values include:
         * + OK – The resource configuration has been updated.
         * + ResourceDiscovered – The resource was newly discovered.
         * + ResourceNotRecorded – The resource was discovered, but its configuration was not recorded since the recorder doesn't record resources of this type.
         * + ResourceDeleted – The resource was deleted
         * + ResourceDeletedNotRecorded – The resource was deleted, but its configuration was not recorded since the recorder doesn't record resources of this type.
         */
        public var configurationItemStatus: aws.sdk.kotlin.services.configservice.model.ConfigurationItemStatus? = null
        /**
         * An identifier that indicates the ordering of the configuration items of a resource.
         */
        public var configurationStateId: kotlin.String? = null
        /**
         * The recording frequency that Config uses to record configuration changes for the resource.
         */
        public var recordingFrequency: aws.sdk.kotlin.services.configservice.model.RecordingFrequency? = null
        /**
         * The time stamp when the resource was created.
         */
        public var resourceCreationTime: 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 Amazon Web Services resource.
         */
        public var resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = null
        /**
         * Configuration attributes that Config returns for certain resource types to supplement the information returned for the configuration parameter.
         */
        public var supplementaryConfiguration: Map? = null
        /**
         * The version number of the resource configuration.
         */
        public var version: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.BaseConfigurationItem) : this() {
            this.accountId = x.accountId
            this.arn = x.arn
            this.availabilityZone = x.availabilityZone
            this.awsRegion = x.awsRegion
            this.configuration = x.configuration
            this.configurationItemCaptureTime = x.configurationItemCaptureTime
            this.configurationItemDeliveryTime = x.configurationItemDeliveryTime
            this.configurationItemStatus = x.configurationItemStatus
            this.configurationStateId = x.configurationStateId
            this.recordingFrequency = x.recordingFrequency
            this.resourceCreationTime = x.resourceCreationTime
            this.resourceId = x.resourceId
            this.resourceName = x.resourceName
            this.resourceType = x.resourceType
            this.supplementaryConfiguration = x.supplementaryConfiguration
            this.version = x.version
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy