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

commonMain.aws.sdk.kotlin.services.devopsguru.model.ServiceIntegrationConfig.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devopsguru.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the integration of DevOps Guru with another Amazon Web Services service, such as Amazon Web Services Systems Manager.
 */
public class ServiceIntegrationConfig private constructor(builder: Builder) {
    /**
     * Information about whether DevOps Guru is configured to encrypt server-side data using KMS.
     */
    public val kmsServerSideEncryption: aws.sdk.kotlin.services.devopsguru.model.KmsServerSideEncryptionIntegration? = builder.kmsServerSideEncryption
    /**
     * Information about whether DevOps Guru is configured to perform log anomaly detection on Amazon CloudWatch log groups.
     */
    public val logsAnomalyDetection: aws.sdk.kotlin.services.devopsguru.model.LogsAnomalyDetectionIntegration? = builder.logsAnomalyDetection
    /**
     * Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager OpsCenter for each created insight.
     */
    public val opsCenter: aws.sdk.kotlin.services.devopsguru.model.OpsCenterIntegration? = builder.opsCenter

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

    override fun toString(): kotlin.String = buildString {
        append("ServiceIntegrationConfig(")
        append("kmsServerSideEncryption=$kmsServerSideEncryption,")
        append("logsAnomalyDetection=$logsAnomalyDetection,")
        append("opsCenter=$opsCenter")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = kmsServerSideEncryption?.hashCode() ?: 0
        result = 31 * result + (logsAnomalyDetection?.hashCode() ?: 0)
        result = 31 * result + (opsCenter?.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 ServiceIntegrationConfig

        if (kmsServerSideEncryption != other.kmsServerSideEncryption) return false
        if (logsAnomalyDetection != other.logsAnomalyDetection) return false
        if (opsCenter != other.opsCenter) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Information about whether DevOps Guru is configured to encrypt server-side data using KMS.
         */
        public var kmsServerSideEncryption: aws.sdk.kotlin.services.devopsguru.model.KmsServerSideEncryptionIntegration? = null
        /**
         * Information about whether DevOps Guru is configured to perform log anomaly detection on Amazon CloudWatch log groups.
         */
        public var logsAnomalyDetection: aws.sdk.kotlin.services.devopsguru.model.LogsAnomalyDetectionIntegration? = null
        /**
         * Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager OpsCenter for each created insight.
         */
        public var opsCenter: aws.sdk.kotlin.services.devopsguru.model.OpsCenterIntegration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.ServiceIntegrationConfig) : this() {
            this.kmsServerSideEncryption = x.kmsServerSideEncryption
            this.logsAnomalyDetection = x.logsAnomalyDetection
            this.opsCenter = x.opsCenter
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.KmsServerSideEncryptionIntegration] inside the given [block]
         */
        public fun kmsServerSideEncryption(block: aws.sdk.kotlin.services.devopsguru.model.KmsServerSideEncryptionIntegration.Builder.() -> kotlin.Unit) {
            this.kmsServerSideEncryption = aws.sdk.kotlin.services.devopsguru.model.KmsServerSideEncryptionIntegration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.LogsAnomalyDetectionIntegration] inside the given [block]
         */
        public fun logsAnomalyDetection(block: aws.sdk.kotlin.services.devopsguru.model.LogsAnomalyDetectionIntegration.Builder.() -> kotlin.Unit) {
            this.logsAnomalyDetection = aws.sdk.kotlin.services.devopsguru.model.LogsAnomalyDetectionIntegration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.OpsCenterIntegration] inside the given [block]
         */
        public fun opsCenter(block: aws.sdk.kotlin.services.devopsguru.model.OpsCenterIntegration.Builder.() -> kotlin.Unit) {
            this.opsCenter = aws.sdk.kotlin.services.devopsguru.model.OpsCenterIntegration.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy