
commonMain.aws.sdk.kotlin.services.kafkaconnect.model.CreateCustomPluginRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kafkaconnect.model
public class CreateCustomPluginRequest private constructor(builder: Builder) {
/**
* The type of the plugin file.
*/
public val contentType: aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginContentType = requireNotNull(builder.contentType) { "A non-null value must be provided for contentType" }
/**
* A summary description of the custom plugin.
*/
public val description: kotlin.String? = builder.description
/**
* Information about the location of a custom plugin.
*/
public val location: aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginLocation? = builder.location
/**
* The name of the custom plugin.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafkaconnect.model.CreateCustomPluginRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateCustomPluginRequest(")
append("contentType=$contentType,")
append("description=$description,")
append("location=$location,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contentType.hashCode()
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (location?.hashCode() ?: 0)
result = 31 * result + (name.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 CreateCustomPluginRequest
if (contentType != other.contentType) return false
if (description != other.description) return false
if (location != other.location) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafkaconnect.model.CreateCustomPluginRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The type of the plugin file.
*/
public var contentType: aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginContentType? = null
/**
* A summary description of the custom plugin.
*/
public var description: kotlin.String? = null
/**
* Information about the location of a custom plugin.
*/
public var location: aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginLocation? = null
/**
* The name of the custom plugin.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafkaconnect.model.CreateCustomPluginRequest) : this() {
this.contentType = x.contentType
this.description = x.description
this.location = x.location
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafkaconnect.model.CreateCustomPluginRequest = CreateCustomPluginRequest(this)
/**
* construct an [aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginLocation] inside the given [block]
*/
public fun location(block: aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginLocation.Builder.() -> kotlin.Unit) {
this.location = aws.sdk.kotlin.services.kafkaconnect.model.CustomPluginLocation.invoke(block)
}
internal fun correctErrors(): Builder {
if (contentType == null) contentType = CustomPluginContentType.SdkUnknown("no value provided")
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy