commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.EventSource.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* A partner event source is created by an SaaS partner. If a customer creates a partner event bus that matches this event source, that Amazon Web Services account can receive events from the partner's applications or services.
*/
public class EventSource private constructor(builder: Builder) {
/**
* The ARN of the event source.
*/
public val arn: kotlin.String? = builder.arn
/**
* The name of the partner that created the event source.
*/
public val createdBy: kotlin.String? = builder.createdBy
/**
* The date and time the event source was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.
*/
public val expirationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationTime
/**
* The name of the event source.
*/
public val name: kotlin.String? = builder.name
/**
* The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
*/
public val state: aws.sdk.kotlin.services.cloudwatchevents.model.EventSourceState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.EventSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EventSource(")
append("arn=$arn,")
append("createdBy=$createdBy,")
append("creationTime=$creationTime,")
append("expirationTime=$expirationTime,")
append("name=$name,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (createdBy?.hashCode() ?: 0)
result = 31 * result + (creationTime?.hashCode() ?: 0)
result = 31 * result + (expirationTime?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (state?.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 EventSource
if (arn != other.arn) return false
if (createdBy != other.createdBy) return false
if (creationTime != other.creationTime) return false
if (expirationTime != other.expirationTime) return false
if (name != other.name) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.EventSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the event source.
*/
public var arn: kotlin.String? = null
/**
* The name of the partner that created the event source.
*/
public var createdBy: kotlin.String? = null
/**
* The date and time the event source was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.
*/
public var expirationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The name of the event source.
*/
public var name: kotlin.String? = null
/**
* The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.
*/
public var state: aws.sdk.kotlin.services.cloudwatchevents.model.EventSourceState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.EventSource) : this() {
this.arn = x.arn
this.createdBy = x.createdBy
this.creationTime = x.creationTime
this.expirationTime = x.expirationTime
this.name = x.name
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.EventSource = EventSource(this)
internal fun correctErrors(): Builder {
return this
}
}
}