commonMain.aws.sdk.kotlin.services.secretsmanager.model.GetRandomPasswordRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secretsmanager-jvm Show documentation
Show all versions of secretsmanager-jvm Show documentation
The AWS SDK for Kotlin client for Secrets Manager
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.secretsmanager.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetRandomPasswordRequest private constructor(builder: Builder) {
/**
* A string of the characters that you don't want in the password.
*/
public val excludeCharacters: kotlin.String? = builder.excludeCharacters
/**
* Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
*/
public val excludeLowercase: kotlin.Boolean? = builder.excludeLowercase
/**
* Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
*/
public val excludeNumbers: kotlin.Boolean? = builder.excludeNumbers
/**
* Specifies whether to exclude the following punctuation characters from the password: `! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~`. If you don't include this switch, the password can contain punctuation.
*/
public val excludePunctuation: kotlin.Boolean? = builder.excludePunctuation
/**
* Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
*/
public val excludeUppercase: kotlin.Boolean? = builder.excludeUppercase
/**
* Specifies whether to include the space character. If you include this switch, the password can contain space characters.
*/
public val includeSpace: kotlin.Boolean? = builder.includeSpace
/**
* The length of the password. If you don't include this parameter, the default length is 32 characters.
*/
public val passwordLength: kotlin.Long? = builder.passwordLength
/**
* Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
*/
public val requireEachIncludedType: kotlin.Boolean? = builder.requireEachIncludedType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.secretsmanager.model.GetRandomPasswordRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetRandomPasswordRequest(")
append("excludeCharacters=$excludeCharacters,")
append("excludeLowercase=$excludeLowercase,")
append("excludeNumbers=$excludeNumbers,")
append("excludePunctuation=$excludePunctuation,")
append("excludeUppercase=$excludeUppercase,")
append("includeSpace=$includeSpace,")
append("passwordLength=$passwordLength,")
append("requireEachIncludedType=$requireEachIncludedType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = excludeCharacters?.hashCode() ?: 0
result = 31 * result + (excludeLowercase?.hashCode() ?: 0)
result = 31 * result + (excludeNumbers?.hashCode() ?: 0)
result = 31 * result + (excludePunctuation?.hashCode() ?: 0)
result = 31 * result + (excludeUppercase?.hashCode() ?: 0)
result = 31 * result + (includeSpace?.hashCode() ?: 0)
result = 31 * result + (passwordLength?.hashCode() ?: 0)
result = 31 * result + (requireEachIncludedType?.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 GetRandomPasswordRequest
if (excludeCharacters != other.excludeCharacters) return false
if (excludeLowercase != other.excludeLowercase) return false
if (excludeNumbers != other.excludeNumbers) return false
if (excludePunctuation != other.excludePunctuation) return false
if (excludeUppercase != other.excludeUppercase) return false
if (includeSpace != other.includeSpace) return false
if (passwordLength != other.passwordLength) return false
if (requireEachIncludedType != other.requireEachIncludedType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.secretsmanager.model.GetRandomPasswordRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A string of the characters that you don't want in the password.
*/
public var excludeCharacters: kotlin.String? = null
/**
* Specifies whether to exclude lowercase letters from the password. If you don't include this switch, the password can contain lowercase letters.
*/
public var excludeLowercase: kotlin.Boolean? = null
/**
* Specifies whether to exclude numbers from the password. If you don't include this switch, the password can contain numbers.
*/
public var excludeNumbers: kotlin.Boolean? = null
/**
* Specifies whether to exclude the following punctuation characters from the password: `! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~`. If you don't include this switch, the password can contain punctuation.
*/
public var excludePunctuation: kotlin.Boolean? = null
/**
* Specifies whether to exclude uppercase letters from the password. If you don't include this switch, the password can contain uppercase letters.
*/
public var excludeUppercase: kotlin.Boolean? = null
/**
* Specifies whether to include the space character. If you include this switch, the password can contain space characters.
*/
public var includeSpace: kotlin.Boolean? = null
/**
* The length of the password. If you don't include this parameter, the default length is 32 characters.
*/
public var passwordLength: kotlin.Long? = null
/**
* Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.
*/
public var requireEachIncludedType: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.secretsmanager.model.GetRandomPasswordRequest) : this() {
this.excludeCharacters = x.excludeCharacters
this.excludeLowercase = x.excludeLowercase
this.excludeNumbers = x.excludeNumbers
this.excludePunctuation = x.excludePunctuation
this.excludeUppercase = x.excludeUppercase
this.includeSpace = x.includeSpace
this.passwordLength = x.passwordLength
this.requireEachIncludedType = x.requireEachIncludedType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.secretsmanager.model.GetRandomPasswordRequest = GetRandomPasswordRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}