commonMain.aws.sdk.kotlin.services.redshiftserverless.model.CreateEndpointAccessRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshiftserverless-jvm Show documentation
Show all versions of redshiftserverless-jvm Show documentation
The AWS SDK for Kotlin client for Redshift Serverless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshiftserverless.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateEndpointAccessRequest private constructor(builder: Builder) {
/**
* The name of the VPC endpoint. An endpoint name must contain 1-30 characters. Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first character must be a letter. The name can't contain two consecutive hyphens or end with a hyphen.
*/
public val endpointName: kotlin.String? = builder.endpointName
/**
* The owner Amazon Web Services account for the Amazon Redshift Serverless workgroup.
*/
public val ownerAccount: kotlin.String? = builder.ownerAccount
/**
* The unique identifers of subnets from which Amazon Redshift Serverless chooses one to deploy a VPC endpoint.
*/
public val subnetIds: List? = builder.subnetIds
/**
* The unique identifiers of the security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
*/
public val vpcSecurityGroupIds: List? = builder.vpcSecurityGroupIds
/**
* The name of the workgroup to associate with the VPC endpoint.
*/
public val workgroupName: kotlin.String? = builder.workgroupName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshiftserverless.model.CreateEndpointAccessRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEndpointAccessRequest(")
append("endpointName=$endpointName,")
append("ownerAccount=$ownerAccount,")
append("subnetIds=$subnetIds,")
append("vpcSecurityGroupIds=$vpcSecurityGroupIds,")
append("workgroupName=$workgroupName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endpointName?.hashCode() ?: 0
result = 31 * result + (ownerAccount?.hashCode() ?: 0)
result = 31 * result + (subnetIds?.hashCode() ?: 0)
result = 31 * result + (vpcSecurityGroupIds?.hashCode() ?: 0)
result = 31 * result + (workgroupName?.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 CreateEndpointAccessRequest
if (endpointName != other.endpointName) return false
if (ownerAccount != other.ownerAccount) return false
if (subnetIds != other.subnetIds) return false
if (vpcSecurityGroupIds != other.vpcSecurityGroupIds) return false
if (workgroupName != other.workgroupName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshiftserverless.model.CreateEndpointAccessRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the VPC endpoint. An endpoint name must contain 1-30 characters. Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first character must be a letter. The name can't contain two consecutive hyphens or end with a hyphen.
*/
public var endpointName: kotlin.String? = null
/**
* The owner Amazon Web Services account for the Amazon Redshift Serverless workgroup.
*/
public var ownerAccount: kotlin.String? = null
/**
* The unique identifers of subnets from which Amazon Redshift Serverless chooses one to deploy a VPC endpoint.
*/
public var subnetIds: List? = null
/**
* The unique identifiers of the security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
*/
public var vpcSecurityGroupIds: List? = null
/**
* The name of the workgroup to associate with the VPC endpoint.
*/
public var workgroupName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshiftserverless.model.CreateEndpointAccessRequest) : this() {
this.endpointName = x.endpointName
this.ownerAccount = x.ownerAccount
this.subnetIds = x.subnetIds
this.vpcSecurityGroupIds = x.vpcSecurityGroupIds
this.workgroupName = x.workgroupName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshiftserverless.model.CreateEndpointAccessRequest = CreateEndpointAccessRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}