All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.opensearchserverless.model.CreateVpcEndpointRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.opensearchserverless.model



public class CreateVpcEndpointRequest private constructor(builder: Builder) {
    /**
     * Unique, case-sensitive identifier to ensure idempotency of the request.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The name of the interface endpoint.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The unique identifiers of the security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
     */
    public val securityGroupIds: List? = builder.securityGroupIds
    /**
     * The ID of one or more subnets from which you'll access OpenSearch Serverless.
     */
    public val subnetIds: List = requireNotNull(builder.subnetIds) { "A non-null value must be provided for subnetIds" }
    /**
     * The ID of the VPC from which you'll access OpenSearch Serverless.
     */
    public val vpcId: kotlin.String = requireNotNull(builder.vpcId) { "A non-null value must be provided for vpcId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearchserverless.model.CreateVpcEndpointRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateVpcEndpointRequest(")
        append("clientToken=$clientToken,")
        append("name=$name,")
        append("securityGroupIds=$securityGroupIds,")
        append("subnetIds=$subnetIds,")
        append("vpcId=$vpcId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (name.hashCode())
        result = 31 * result + (securityGroupIds?.hashCode() ?: 0)
        result = 31 * result + (subnetIds.hashCode())
        result = 31 * result + (vpcId.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 CreateVpcEndpointRequest

        if (clientToken != other.clientToken) return false
        if (name != other.name) return false
        if (securityGroupIds != other.securityGroupIds) return false
        if (subnetIds != other.subnetIds) return false
        if (vpcId != other.vpcId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearchserverless.model.CreateVpcEndpointRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Unique, case-sensitive identifier to ensure idempotency of the request.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The name of the interface endpoint.
         */
        public var name: kotlin.String? = null
        /**
         * The unique identifiers of the security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
         */
        public var securityGroupIds: List? = null
        /**
         * The ID of one or more subnets from which you'll access OpenSearch Serverless.
         */
        public var subnetIds: List? = null
        /**
         * The ID of the VPC from which you'll access OpenSearch Serverless.
         */
        public var vpcId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearchserverless.model.CreateVpcEndpointRequest) : this() {
            this.clientToken = x.clientToken
            this.name = x.name
            this.securityGroupIds = x.securityGroupIds
            this.subnetIds = x.subnetIds
            this.vpcId = x.vpcId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.opensearchserverless.model.CreateVpcEndpointRequest = CreateVpcEndpointRequest(this)

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            if (subnetIds == null) subnetIds = emptyList()
            if (vpcId == null) vpcId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy