
commonMain.aws.sdk.kotlin.services.osis.model.VpcOptions.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 that specify the subnets and security groups for an OpenSearch Ingestion VPC endpoint.
*/
public class VpcOptions private constructor(builder: Builder) {
/**
* A list of security groups associated with the VPC endpoint.
*/
public val securityGroupIds: List? = builder.securityGroupIds
/**
* A list of subnet IDs associated with the VPC endpoint.
*/
public val subnetIds: List = requireNotNull(builder.subnetIds) { "A non-null value must be provided for subnetIds" }
/**
* Options for attaching a VPC to a pipeline.
*/
public val vpcAttachmentOptions: aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions? = builder.vpcAttachmentOptions
/**
* Defines whether you or Amazon OpenSearch Ingestion service create and manage the VPC endpoint configured for the pipeline.
*/
public val vpcEndpointManagement: aws.sdk.kotlin.services.osis.model.VpcEndpointManagement? = builder.vpcEndpointManagement
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.osis.model.VpcOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VpcOptions(")
append("securityGroupIds=$securityGroupIds,")
append("subnetIds=$subnetIds,")
append("vpcAttachmentOptions=$vpcAttachmentOptions,")
append("vpcEndpointManagement=$vpcEndpointManagement")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = securityGroupIds?.hashCode() ?: 0
result = 31 * result + (subnetIds.hashCode())
result = 31 * result + (vpcAttachmentOptions?.hashCode() ?: 0)
result = 31 * result + (vpcEndpointManagement?.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 VpcOptions
if (securityGroupIds != other.securityGroupIds) return false
if (subnetIds != other.subnetIds) return false
if (vpcAttachmentOptions != other.vpcAttachmentOptions) return false
if (vpcEndpointManagement != other.vpcEndpointManagement) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.osis.model.VpcOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of security groups associated with the VPC endpoint.
*/
public var securityGroupIds: List? = null
/**
* A list of subnet IDs associated with the VPC endpoint.
*/
public var subnetIds: List? = null
/**
* Options for attaching a VPC to a pipeline.
*/
public var vpcAttachmentOptions: aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions? = null
/**
* Defines whether you or Amazon OpenSearch Ingestion service create and manage the VPC endpoint configured for the pipeline.
*/
public var vpcEndpointManagement: aws.sdk.kotlin.services.osis.model.VpcEndpointManagement? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.osis.model.VpcOptions) : this() {
this.securityGroupIds = x.securityGroupIds
this.subnetIds = x.subnetIds
this.vpcAttachmentOptions = x.vpcAttachmentOptions
this.vpcEndpointManagement = x.vpcEndpointManagement
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.osis.model.VpcOptions = VpcOptions(this)
/**
* construct an [aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions] inside the given [block]
*/
public fun vpcAttachmentOptions(block: aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions.Builder.() -> kotlin.Unit) {
this.vpcAttachmentOptions = aws.sdk.kotlin.services.osis.model.VpcAttachmentOptions.invoke(block)
}
internal fun correctErrors(): Builder {
if (subnetIds == null) subnetIds = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy