commonMain.aws.sdk.kotlin.services.redshift.model.Ec2SecurityGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes an Amazon EC2 security group.
*/
public class Ec2SecurityGroup private constructor(builder: Builder) {
/**
* The name of the EC2 Security Group.
*/
public val ec2SecurityGroupName: kotlin.String? = builder.ec2SecurityGroupName
/**
* The Amazon Web Services account ID of the owner of the EC2 security group specified in the `EC2SecurityGroupName` field.
*/
public val ec2SecurityGroupOwnerId: kotlin.String? = builder.ec2SecurityGroupOwnerId
/**
* The status of the EC2 security group.
*/
public val status: kotlin.String? = builder.status
/**
* The list of tags for the EC2 security group.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.Ec2SecurityGroup = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Ec2SecurityGroup(")
append("ec2SecurityGroupName=$ec2SecurityGroupName,")
append("ec2SecurityGroupOwnerId=$ec2SecurityGroupOwnerId,")
append("status=$status,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = ec2SecurityGroupName?.hashCode() ?: 0
result = 31 * result + (ec2SecurityGroupOwnerId?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (tags?.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 Ec2SecurityGroup
if (ec2SecurityGroupName != other.ec2SecurityGroupName) return false
if (ec2SecurityGroupOwnerId != other.ec2SecurityGroupOwnerId) return false
if (status != other.status) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.Ec2SecurityGroup = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the EC2 Security Group.
*/
public var ec2SecurityGroupName: kotlin.String? = null
/**
* The Amazon Web Services account ID of the owner of the EC2 security group specified in the `EC2SecurityGroupName` field.
*/
public var ec2SecurityGroupOwnerId: kotlin.String? = null
/**
* The status of the EC2 security group.
*/
public var status: kotlin.String? = null
/**
* The list of tags for the EC2 security group.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.Ec2SecurityGroup) : this() {
this.ec2SecurityGroupName = x.ec2SecurityGroupName
this.ec2SecurityGroupOwnerId = x.ec2SecurityGroupOwnerId
this.status = x.status
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.Ec2SecurityGroup = Ec2SecurityGroup(this)
internal fun correctErrors(): Builder {
return this
}
}
}