commonMain.aws.sdk.kotlin.services.cloudwatchevents.model.CreateEventBusRequest.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 CreateEventBusRequest private constructor(builder: Builder) {
/**
* If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
*/
public val eventSourceName: kotlin.String? = builder.eventSourceName
/**
* The name of the new event bus.
*
* Event bus names cannot contain the / character. You can't use the name `default` for a custom event bus, as this name is already used for your account's default event bus.
*
* If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to.
*/
public val name: kotlin.String? = builder.name
/**
* Tags to associate with the event bus.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchevents.model.CreateEventBusRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEventBusRequest(")
append("eventSourceName=$eventSourceName,")
append("name=$name,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventSourceName?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateEventBusRequest
if (eventSourceName != other.eventSourceName) return false
if (name != other.name) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchevents.model.CreateEventBusRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
*/
public var eventSourceName: kotlin.String? = null
/**
* The name of the new event bus.
*
* Event bus names cannot contain the / character. You can't use the name `default` for a custom event bus, as this name is already used for your account's default event bus.
*
* If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to.
*/
public var name: kotlin.String? = null
/**
* Tags to associate with the event bus.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchevents.model.CreateEventBusRequest) : this() {
this.eventSourceName = x.eventSourceName
this.name = x.name
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchevents.model.CreateEventBusRequest = CreateEventBusRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}