
commonMain.aws.sdk.kotlin.services.iot.model.CreateRoleAliasRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
public class CreateRoleAliasRequest private constructor(builder: Builder) {
/**
* How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.
*
* This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.
*/
public val credentialDurationSeconds: kotlin.Int? = builder.credentialDurationSeconds
/**
* The role alias that points to a role ARN. This allows you to change the role without having to update the device.
*/
public val roleAlias: kotlin.String? = builder.roleAlias
/**
* The role ARN.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* Metadata which can be used to manage the role alias.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.CreateRoleAliasRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRoleAliasRequest(")
append("credentialDurationSeconds=$credentialDurationSeconds,")
append("roleAlias=$roleAlias,")
append("roleArn=$roleArn,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = credentialDurationSeconds ?: 0
result = 31 * result + (roleAlias?.hashCode() ?: 0)
result = 31 * result + (roleArn?.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 CreateRoleAliasRequest
if (credentialDurationSeconds != other.credentialDurationSeconds) return false
if (roleAlias != other.roleAlias) return false
if (roleArn != other.roleArn) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.CreateRoleAliasRequest = Builder(this).apply(block).build()
public class Builder {
/**
* How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.
*
* This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.
*/
public var credentialDurationSeconds: kotlin.Int? = null
/**
* The role alias that points to a role ARN. This allows you to change the role without having to update the device.
*/
public var roleAlias: kotlin.String? = null
/**
* The role ARN.
*/
public var roleArn: kotlin.String? = null
/**
* Metadata which can be used to manage the role alias.
*
* For URI Request parameters use format: ...key1=value1&key2=value2...
*
* For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
*
* For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.CreateRoleAliasRequest) : this() {
this.credentialDurationSeconds = x.credentialDurationSeconds
this.roleAlias = x.roleAlias
this.roleArn = x.roleArn
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.CreateRoleAliasRequest = CreateRoleAliasRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy