
commonMain.aws.sdk.kotlin.services.opensearchserverless.model.CreateSecurityConfigRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.opensearchserverless.model
public class CreateSecurityConfigRequest private constructor(builder: Builder) {
/**
* Unique, case-sensitive identifier to ensure idempotency of the request.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* A description of the security configuration.
*/
public val description: kotlin.String? = builder.description
/**
* The name of the security configuration.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Describes SAML options in in the form of a key-value map. This field is required if you specify `saml` for the `type` parameter.
*/
public val samlOptions: aws.sdk.kotlin.services.opensearchserverless.model.SamlConfigOptions? = builder.samlOptions
/**
* The type of security configuration.
*/
public val type: aws.sdk.kotlin.services.opensearchserverless.model.SecurityConfigType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearchserverless.model.CreateSecurityConfigRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateSecurityConfigRequest(")
append("clientToken=$clientToken,")
append("description=$description,")
append("name=$name,")
append("samlOptions=$samlOptions,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (samlOptions?.hashCode() ?: 0)
result = 31 * result + (type.hashCode())
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 CreateSecurityConfigRequest
if (clientToken != other.clientToken) return false
if (description != other.description) return false
if (name != other.name) return false
if (samlOptions != other.samlOptions) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearchserverless.model.CreateSecurityConfigRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Unique, case-sensitive identifier to ensure idempotency of the request.
*/
public var clientToken: kotlin.String? = null
/**
* A description of the security configuration.
*/
public var description: kotlin.String? = null
/**
* The name of the security configuration.
*/
public var name: kotlin.String? = null
/**
* Describes SAML options in in the form of a key-value map. This field is required if you specify `saml` for the `type` parameter.
*/
public var samlOptions: aws.sdk.kotlin.services.opensearchserverless.model.SamlConfigOptions? = null
/**
* The type of security configuration.
*/
public var type: aws.sdk.kotlin.services.opensearchserverless.model.SecurityConfigType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearchserverless.model.CreateSecurityConfigRequest) : this() {
this.clientToken = x.clientToken
this.description = x.description
this.name = x.name
this.samlOptions = x.samlOptions
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearchserverless.model.CreateSecurityConfigRequest = CreateSecurityConfigRequest(this)
/**
* construct an [aws.sdk.kotlin.services.opensearchserverless.model.SamlConfigOptions] inside the given [block]
*/
public fun samlOptions(block: aws.sdk.kotlin.services.opensearchserverless.model.SamlConfigOptions.Builder.() -> kotlin.Unit) {
this.samlOptions = aws.sdk.kotlin.services.opensearchserverless.model.SamlConfigOptions.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (type == null) type = SecurityConfigType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy