commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.CreateApiDestinationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchevents-jvm Show documentation
Show all versions of cloudwatchevents-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Events
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchevents.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateApiDestinationRequest private constructor(builder: Builder) {
/**
* The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.
*/
public val connectionArn: kotlin.String? = builder.connectionArn
/**
* A description for the API destination to create.
*/
public val description: kotlin.String? = builder.description
/**
* The method to use for the request to the HTTP invocation endpoint.
*/
public val httpMethod: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationHttpMethod? = builder.httpMethod
/**
* The URL to the HTTP invocation endpoint for the API destination.
*/
public val invocationEndpoint: kotlin.String? = builder.invocationEndpoint
/**
* The maximum number of requests per second to send to the HTTP invocation endpoint.
*/
public val invocationRateLimitPerSecond: kotlin.Int? = builder.invocationRateLimitPerSecond
/**
* The name for the API destination to create.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.CreateApiDestinationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateApiDestinationRequest(")
append("connectionArn=$connectionArn,")
append("description=$description,")
append("httpMethod=$httpMethod,")
append("invocationEndpoint=$invocationEndpoint,")
append("invocationRateLimitPerSecond=$invocationRateLimitPerSecond,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionArn?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (httpMethod?.hashCode() ?: 0)
result = 31 * result + (invocationEndpoint?.hashCode() ?: 0)
result = 31 * result + (invocationRateLimitPerSecond ?: 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 CreateApiDestinationRequest
if (connectionArn != other.connectionArn) return false
if (description != other.description) return false
if (httpMethod != other.httpMethod) return false
if (invocationEndpoint != other.invocationEndpoint) return false
if (invocationRateLimitPerSecond != other.invocationRateLimitPerSecond) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.CreateApiDestinationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.
*/
public var connectionArn: kotlin.String? = null
/**
* A description for the API destination to create.
*/
public var description: kotlin.String? = null
/**
* The method to use for the request to the HTTP invocation endpoint.
*/
public var httpMethod: aws.sdk.kotlin.services.cloudwatchevents.model.ApiDestinationHttpMethod? = null
/**
* The URL to the HTTP invocation endpoint for the API destination.
*/
public var invocationEndpoint: kotlin.String? = null
/**
* The maximum number of requests per second to send to the HTTP invocation endpoint.
*/
public var invocationRateLimitPerSecond: kotlin.Int? = null
/**
* The name for the API destination to create.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.CreateApiDestinationRequest) : this() {
this.connectionArn = x.connectionArn
this.description = x.description
this.httpMethod = x.httpMethod
this.invocationEndpoint = x.invocationEndpoint
this.invocationRateLimitPerSecond = x.invocationRateLimitPerSecond
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.CreateApiDestinationRequest = CreateApiDestinationRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}