commonMain.aws.sdk.kotlin.services.backupgateway.model.UpdateHypervisorRequest.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 UpdateHypervisorRequest private constructor(builder: Builder) {
/**
* The updated host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).
*/
public val host: kotlin.String? = builder.host
/**
* The Amazon Resource Name (ARN) of the hypervisor to update.
*/
public val hypervisorArn: kotlin.String = requireNotNull(builder.hypervisorArn) { "A non-null value must be provided for hypervisorArn" }
/**
* The Amazon Resource Name (ARN) of the group of gateways within the requested log.
*/
public val logGroupArn: kotlin.String? = builder.logGroupArn
/**
* The updated name for the hypervisor
*/
public val name: kotlin.String? = builder.name
/**
* The updated password for the hypervisor.
*/
public val password: kotlin.String? = builder.password
/**
* The updated username for the hypervisor.
*/
public val username: kotlin.String? = builder.username
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backupgateway.model.UpdateHypervisorRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateHypervisorRequest(")
append("host=$host,")
append("hypervisorArn=$hypervisorArn,")
append("logGroupArn=$logGroupArn,")
append("name=$name,")
append("password=*** Sensitive Data Redacted ***,")
append("username=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = host?.hashCode() ?: 0
result = 31 * result + (hypervisorArn.hashCode())
result = 31 * result + (logGroupArn?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (password?.hashCode() ?: 0)
result = 31 * result + (username?.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 UpdateHypervisorRequest
if (host != other.host) return false
if (hypervisorArn != other.hypervisorArn) return false
if (logGroupArn != other.logGroupArn) return false
if (name != other.name) return false
if (password != other.password) return false
if (username != other.username) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backupgateway.model.UpdateHypervisorRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The updated host of the hypervisor. This can be either an IP address or a fully-qualified domain name (FQDN).
*/
public var host: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the hypervisor to update.
*/
public var hypervisorArn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the group of gateways within the requested log.
*/
public var logGroupArn: kotlin.String? = null
/**
* The updated name for the hypervisor
*/
public var name: kotlin.String? = null
/**
* The updated password for the hypervisor.
*/
public var password: kotlin.String? = null
/**
* The updated username for the hypervisor.
*/
public var username: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backupgateway.model.UpdateHypervisorRequest) : this() {
this.host = x.host
this.hypervisorArn = x.hypervisorArn
this.logGroupArn = x.logGroupArn
this.name = x.name
this.password = x.password
this.username = x.username
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backupgateway.model.UpdateHypervisorRequest = UpdateHypervisorRequest(this)
internal fun correctErrors(): Builder {
if (hypervisorArn == null) hypervisorArn = ""
return this
}
}
}