
commonMain.aws.sdk.kotlin.services.mq.model.CreateConfigurationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.mq.model
/**
* Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).
*/
public class CreateConfigurationRequest private constructor(builder: Builder) {
/**
* Optional. The authentication strategy associated with the configuration. The default is SIMPLE.
*/
public val authenticationStrategy: aws.sdk.kotlin.services.mq.model.AuthenticationStrategy? = builder.authenticationStrategy
/**
* Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
*/
public val engineType: aws.sdk.kotlin.services.mq.model.EngineType? = builder.engineType
/**
* Required. The broker engine's version. For a list of supported engine versions, see [Supported engines](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker-engine.html).
*/
public val engineVersion: kotlin.String? = builder.engineVersion
/**
* Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
*/
public val name: kotlin.String? = builder.name
/**
* Create tags when creating the configuration.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mq.model.CreateConfigurationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateConfigurationRequest(")
append("authenticationStrategy=$authenticationStrategy,")
append("engineType=$engineType,")
append("engineVersion=$engineVersion,")
append("name=$name,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationStrategy?.hashCode() ?: 0
result = 31 * result + (engineType?.hashCode() ?: 0)
result = 31 * result + (engineVersion?.hashCode() ?: 0)
result = 31 * result + (name?.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 CreateConfigurationRequest
if (authenticationStrategy != other.authenticationStrategy) return false
if (engineType != other.engineType) return false
if (engineVersion != other.engineVersion) return false
if (name != other.name) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mq.model.CreateConfigurationRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Optional. The authentication strategy associated with the configuration. The default is SIMPLE.
*/
public var authenticationStrategy: aws.sdk.kotlin.services.mq.model.AuthenticationStrategy? = null
/**
* Required. The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
*/
public var engineType: aws.sdk.kotlin.services.mq.model.EngineType? = null
/**
* Required. The broker engine's version. For a list of supported engine versions, see [Supported engines](https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker-engine.html).
*/
public var engineVersion: kotlin.String? = null
/**
* Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.
*/
public var name: kotlin.String? = null
/**
* Create tags when creating the configuration.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mq.model.CreateConfigurationRequest) : this() {
this.authenticationStrategy = x.authenticationStrategy
this.engineType = x.engineType
this.engineVersion = x.engineVersion
this.name = x.name
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mq.model.CreateConfigurationRequest = CreateConfigurationRequest(this)
internal fun correctErrors(): Builder {
if (engineType == null) engineType = EngineType.SdkUnknown("no value provided")
if (engineVersion == null) engineVersion = ""
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy