commonMain.aws.sdk.kotlin.services.redshift.model.RevokeClusterSecurityGroupIngressRequest.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
/**
*
*/
public class RevokeClusterSecurityGroupIngressRequest private constructor(builder: Builder) {
/**
* The IP range for which to revoke access. This range must be a valid Classless Inter-Domain Routing (CIDR) block of IP addresses. If `CIDRIP` is specified, `EC2SecurityGroupName` and `EC2SecurityGroupOwnerId` cannot be provided.
*/
public val cidrip: kotlin.String? = builder.cidrip
/**
* The name of the security Group from which to revoke the ingress rule.
*/
public val clusterSecurityGroupName: kotlin.String? = builder.clusterSecurityGroupName
/**
* The name of the EC2 Security Group whose access is to be revoked. If `EC2SecurityGroupName` is specified, `EC2SecurityGroupOwnerId` must also be provided and `CIDRIP` cannot be provided.
*/
public val ec2SecurityGroupName: kotlin.String? = builder.ec2SecurityGroupName
/**
* The Amazon Web Services account number of the owner of the security group specified in the `EC2SecurityGroupName` parameter. The Amazon Web Services access key ID is not an acceptable value. If `EC2SecurityGroupOwnerId` is specified, `EC2SecurityGroupName` must also be provided. and `CIDRIP` cannot be provided.
*
* Example: `111122223333`
*/
public val ec2SecurityGroupOwnerId: kotlin.String? = builder.ec2SecurityGroupOwnerId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.RevokeClusterSecurityGroupIngressRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RevokeClusterSecurityGroupIngressRequest(")
append("cidrip=$cidrip,")
append("clusterSecurityGroupName=$clusterSecurityGroupName,")
append("ec2SecurityGroupName=$ec2SecurityGroupName,")
append("ec2SecurityGroupOwnerId=$ec2SecurityGroupOwnerId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cidrip?.hashCode() ?: 0
result = 31 * result + (clusterSecurityGroupName?.hashCode() ?: 0)
result = 31 * result + (ec2SecurityGroupName?.hashCode() ?: 0)
result = 31 * result + (ec2SecurityGroupOwnerId?.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 RevokeClusterSecurityGroupIngressRequest
if (cidrip != other.cidrip) return false
if (clusterSecurityGroupName != other.clusterSecurityGroupName) return false
if (ec2SecurityGroupName != other.ec2SecurityGroupName) return false
if (ec2SecurityGroupOwnerId != other.ec2SecurityGroupOwnerId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.RevokeClusterSecurityGroupIngressRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The IP range for which to revoke access. This range must be a valid Classless Inter-Domain Routing (CIDR) block of IP addresses. If `CIDRIP` is specified, `EC2SecurityGroupName` and `EC2SecurityGroupOwnerId` cannot be provided.
*/
public var cidrip: kotlin.String? = null
/**
* The name of the security Group from which to revoke the ingress rule.
*/
public var clusterSecurityGroupName: kotlin.String? = null
/**
* The name of the EC2 Security Group whose access is to be revoked. If `EC2SecurityGroupName` is specified, `EC2SecurityGroupOwnerId` must also be provided and `CIDRIP` cannot be provided.
*/
public var ec2SecurityGroupName: kotlin.String? = null
/**
* The Amazon Web Services account number of the owner of the security group specified in the `EC2SecurityGroupName` parameter. The Amazon Web Services access key ID is not an acceptable value. If `EC2SecurityGroupOwnerId` is specified, `EC2SecurityGroupName` must also be provided. and `CIDRIP` cannot be provided.
*
* Example: `111122223333`
*/
public var ec2SecurityGroupOwnerId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.RevokeClusterSecurityGroupIngressRequest) : this() {
this.cidrip = x.cidrip
this.clusterSecurityGroupName = x.clusterSecurityGroupName
this.ec2SecurityGroupName = x.ec2SecurityGroupName
this.ec2SecurityGroupOwnerId = x.ec2SecurityGroupOwnerId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.RevokeClusterSecurityGroupIngressRequest = RevokeClusterSecurityGroupIngressRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}