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

commonMain.aws.sdk.kotlin.services.neptune.model.AddSourceIdentifierToSubscriptionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.neptune.model

import aws.smithy.kotlin.runtime.SdkDsl

public class AddSourceIdentifierToSubscriptionRequest private constructor(builder: Builder) {
    /**
     * The identifier of the event source to be added.
     *
     * Constraints:
     * + If the source type is a DB instance, then a `DBInstanceIdentifier` must be supplied.
     * + If the source type is a DB security group, a `DBSecurityGroupName` must be supplied.
     * + If the source type is a DB parameter group, a `DBParameterGroupName` must be supplied.
     * + If the source type is a DB snapshot, a `DBSnapshotIdentifier` must be supplied.
     */
    public val sourceIdentifier: kotlin.String? = builder.sourceIdentifier
    /**
     * The name of the event notification subscription you want to add a source identifier to.
     */
    public val subscriptionName: kotlin.String? = builder.subscriptionName

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

    override fun toString(): kotlin.String = buildString {
        append("AddSourceIdentifierToSubscriptionRequest(")
        append("sourceIdentifier=$sourceIdentifier,")
        append("subscriptionName=$subscriptionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sourceIdentifier?.hashCode() ?: 0
        result = 31 * result + (subscriptionName?.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 AddSourceIdentifierToSubscriptionRequest

        if (sourceIdentifier != other.sourceIdentifier) return false
        if (subscriptionName != other.subscriptionName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The identifier of the event source to be added.
         *
         * Constraints:
         * + If the source type is a DB instance, then a `DBInstanceIdentifier` must be supplied.
         * + If the source type is a DB security group, a `DBSecurityGroupName` must be supplied.
         * + If the source type is a DB parameter group, a `DBParameterGroupName` must be supplied.
         * + If the source type is a DB snapshot, a `DBSnapshotIdentifier` must be supplied.
         */
        public var sourceIdentifier: kotlin.String? = null
        /**
         * The name of the event notification subscription you want to add a source identifier to.
         */
        public var subscriptionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.AddSourceIdentifierToSubscriptionRequest) : this() {
            this.sourceIdentifier = x.sourceIdentifier
            this.subscriptionName = x.subscriptionName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy