
commonMain.aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.osis.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Options for attaching a VPC to pipeline.
*/
public class VpcAttachmentOptions private constructor(builder: Builder) {
/**
* Whether a VPC is attached to the pipeline.
*/
public val attachToVpc: kotlin.Boolean = requireNotNull(builder.attachToVpc) { "A non-null value must be provided for attachToVpc" }
/**
* The CIDR block to be reserved for OpenSearch Ingestion to create elastic network interfaces (ENIs).
*/
public val cidrBlock: kotlin.String? = builder.cidrBlock
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VpcAttachmentOptions(")
append("attachToVpc=$attachToVpc,")
append("cidrBlock=$cidrBlock")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attachToVpc.hashCode()
result = 31 * result + (cidrBlock?.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 VpcAttachmentOptions
if (attachToVpc != other.attachToVpc) return false
if (cidrBlock != other.cidrBlock) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Whether a VPC is attached to the pipeline.
*/
public var attachToVpc: kotlin.Boolean? = null
/**
* The CIDR block to be reserved for OpenSearch Ingestion to create elastic network interfaces (ENIs).
*/
public var cidrBlock: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions) : this() {
this.attachToVpc = x.attachToVpc
this.cidrBlock = x.cidrBlock
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions = VpcAttachmentOptions(this)
internal fun correctErrors(): Builder {
if (attachToVpc == null) attachToVpc = false
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy