commonMain.aws.sdk.kotlin.services.backupgateway.model.CreateGatewayRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backupgateway-jvm Show documentation
Show all versions of backupgateway-jvm Show documentation
The AWS SDK for Kotlin client for Backup Gateway
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backupgateway.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateGatewayRequest private constructor(builder: Builder) {
/**
* The activation key of the created gateway.
*/
public val activationKey: kotlin.String = requireNotNull(builder.activationKey) { "A non-null value must be provided for activationKey" }
/**
* The display name of the created gateway.
*/
public val gatewayDisplayName: kotlin.String = requireNotNull(builder.gatewayDisplayName) { "A non-null value must be provided for gatewayDisplayName" }
/**
* The type of created gateway.
*/
public val gatewayType: aws.sdk.kotlin.services.backupgateway.model.GatewayType = requireNotNull(builder.gatewayType) { "A non-null value must be provided for gatewayType" }
/**
* A list of up to 50 tags to assign to the gateway. Each tag is a key-value pair.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backupgateway.model.CreateGatewayRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGatewayRequest(")
append("activationKey=$activationKey,")
append("gatewayDisplayName=$gatewayDisplayName,")
append("gatewayType=$gatewayType,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = activationKey.hashCode()
result = 31 * result + (gatewayDisplayName.hashCode())
result = 31 * result + (gatewayType.hashCode())
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 CreateGatewayRequest
if (activationKey != other.activationKey) return false
if (gatewayDisplayName != other.gatewayDisplayName) return false
if (gatewayType != other.gatewayType) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backupgateway.model.CreateGatewayRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The activation key of the created gateway.
*/
public var activationKey: kotlin.String? = null
/**
* The display name of the created gateway.
*/
public var gatewayDisplayName: kotlin.String? = null
/**
* The type of created gateway.
*/
public var gatewayType: aws.sdk.kotlin.services.backupgateway.model.GatewayType? = null
/**
* A list of up to 50 tags to assign to the gateway. Each tag is a key-value pair.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backupgateway.model.CreateGatewayRequest) : this() {
this.activationKey = x.activationKey
this.gatewayDisplayName = x.gatewayDisplayName
this.gatewayType = x.gatewayType
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backupgateway.model.CreateGatewayRequest = CreateGatewayRequest(this)
internal fun correctErrors(): Builder {
if (activationKey == null) activationKey = ""
if (gatewayDisplayName == null) gatewayDisplayName = ""
if (gatewayType == null) gatewayType = GatewayType.SdkUnknown("no value provided")
return this
}
}
}