commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticbeanstalk-jvm Show documentation
Show all versions of elasticbeanstalk-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Beanstalk
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticbeanstalk.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Request to add or change the operations role used by an environment.
*/
public class AssociateEnvironmentOperationsRoleRequest private constructor(builder: Builder) {
/**
* The name of the environment to which to set the operations role.
*/
public val environmentName: kotlin.String? = builder.environmentName
/**
* The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role.
*/
public val operationsRole: kotlin.String? = builder.operationsRole
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateEnvironmentOperationsRoleRequest(")
append("environmentName=$environmentName,")
append("operationsRole=$operationsRole")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = environmentName?.hashCode() ?: 0
result = 31 * result + (operationsRole?.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 AssociateEnvironmentOperationsRoleRequest
if (environmentName != other.environmentName) return false
if (operationsRole != other.operationsRole) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the environment to which to set the operations role.
*/
public var environmentName: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role.
*/
public var operationsRole: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleRequest) : this() {
this.environmentName = x.environmentName
this.operationsRole = x.operationsRole
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticbeanstalk.model.AssociateEnvironmentOperationsRoleRequest = AssociateEnvironmentOperationsRoleRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}