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

commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestination.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.cloudwatchevents.model

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

/**
 * Contains details about an API destination.
 */
public class ApiDestination private constructor(builder: Builder) {
    /**
     * The ARN of the API destination.
     */
    public val apiDestinationArn: kotlin.String? = builder.apiDestinationArn
    /**
     * The state of the API destination.
     */
    public val apiDestinationState: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationState? = builder.apiDestinationState
    /**
     * The ARN of the connection specified for the API destination.
     */
    public val connectionArn: kotlin.String? = builder.connectionArn
    /**
     * A time stamp for the time that the API destination was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The method to use to connect to the HTTP endpoint.
     */
    public val httpMethod: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationHttpMethod? = builder.httpMethod
    /**
     * The URL to the endpoint for the API destination.
     */
    public val invocationEndpoint: kotlin.String? = builder.invocationEndpoint
    /**
     * The maximum number of invocations per second to send to the HTTP endpoint.
     */
    public val invocationRateLimitPerSecond: kotlin.Int? = builder.invocationRateLimitPerSecond
    /**
     * A time stamp for the time that the API destination was last modified.
     */
    public val lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedTime
    /**
     * The name of the API destination.
     */
    public val name: kotlin.String? = builder.name

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

    override fun toString(): kotlin.String = buildString {
        append("ApiDestination(")
        append("apiDestinationArn=$apiDestinationArn,")
        append("apiDestinationState=$apiDestinationState,")
        append("connectionArn=$connectionArn,")
        append("creationTime=$creationTime,")
        append("httpMethod=$httpMethod,")
        append("invocationEndpoint=$invocationEndpoint,")
        append("invocationRateLimitPerSecond=$invocationRateLimitPerSecond,")
        append("lastModifiedTime=$lastModifiedTime,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = apiDestinationArn?.hashCode() ?: 0
        result = 31 * result + (apiDestinationState?.hashCode() ?: 0)
        result = 31 * result + (connectionArn?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (httpMethod?.hashCode() ?: 0)
        result = 31 * result + (invocationEndpoint?.hashCode() ?: 0)
        result = 31 * result + (invocationRateLimitPerSecond ?: 0)
        result = 31 * result + (lastModifiedTime?.hashCode() ?: 0)
        result = 31 * result + (name?.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 ApiDestination

        if (apiDestinationArn != other.apiDestinationArn) return false
        if (apiDestinationState != other.apiDestinationState) return false
        if (connectionArn != other.connectionArn) return false
        if (creationTime != other.creationTime) return false
        if (httpMethod != other.httpMethod) return false
        if (invocationEndpoint != other.invocationEndpoint) return false
        if (invocationRateLimitPerSecond != other.invocationRateLimitPerSecond) return false
        if (lastModifiedTime != other.lastModifiedTime) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the API destination.
         */
        public var apiDestinationArn: kotlin.String? = null
        /**
         * The state of the API destination.
         */
        public var apiDestinationState: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationState? = null
        /**
         * The ARN of the connection specified for the API destination.
         */
        public var connectionArn: kotlin.String? = null
        /**
         * A time stamp for the time that the API destination was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The method to use to connect to the HTTP endpoint.
         */
        public var httpMethod: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationHttpMethod? = null
        /**
         * The URL to the endpoint for the API destination.
         */
        public var invocationEndpoint: kotlin.String? = null
        /**
         * The maximum number of invocations per second to send to the HTTP endpoint.
         */
        public var invocationRateLimitPerSecond: kotlin.Int? = null
        /**
         * A time stamp for the time that the API destination was last modified.
         */
        public var lastModifiedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the API destination.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestination) : this() {
            this.apiDestinationArn = x.apiDestinationArn
            this.apiDestinationState = x.apiDestinationState
            this.connectionArn = x.connectionArn
            this.creationTime = x.creationTime
            this.httpMethod = x.httpMethod
            this.invocationEndpoint = x.invocationEndpoint
            this.invocationRateLimitPerSecond = x.invocationRateLimitPerSecond
            this.lastModifiedTime = x.lastModifiedTime
            this.name = x.name
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy