
commonMain.aws.sdk.kotlin.services.rekognition.model.CreateUserRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
public class CreateUserRequest private constructor(builder: Builder) {
/**
* Idempotent token used to identify the request to `CreateUser`. If you use the same token with multiple `CreateUser` requests, the same response is returned. Use ClientRequestToken to prevent the same request from being processed more than once.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* The ID of an existing collection to which the new UserID needs to be created.
*/
public val collectionId: kotlin.String? = builder.collectionId
/**
* ID for the UserID to be created. This ID needs to be unique within the collection.
*/
public val userId: kotlin.String? = builder.userId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.CreateUserRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateUserRequest(")
append("clientRequestToken=$clientRequestToken,")
append("collectionId=$collectionId,")
append("userId=$userId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (collectionId?.hashCode() ?: 0)
result = 31 * result + (userId?.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 CreateUserRequest
if (clientRequestToken != other.clientRequestToken) return false
if (collectionId != other.collectionId) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.CreateUserRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Idempotent token used to identify the request to `CreateUser`. If you use the same token with multiple `CreateUser` requests, the same response is returned. Use ClientRequestToken to prevent the same request from being processed more than once.
*/
public var clientRequestToken: kotlin.String? = null
/**
* The ID of an existing collection to which the new UserID needs to be created.
*/
public var collectionId: kotlin.String? = null
/**
* ID for the UserID to be created. This ID needs to be unique within the collection.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.CreateUserRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.collectionId = x.collectionId
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.CreateUserRequest = CreateUserRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy