commonMain.aws.sdk.kotlin.services.workspacesweb.model.IpRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of workspacesweb-jvm Show documentation
Show all versions of workspacesweb-jvm Show documentation
The AWS SDK for Kotlin client for WorkSpaces Web
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.workspacesweb.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The IP rules of the IP access settings.
*/
public class IpRule private constructor(builder: Builder) {
/**
* The description of the IP rule.
*/
public val description: kotlin.String? = builder.description
/**
* The IP range of the IP rule.
*/
public val ipRange: kotlin.String = requireNotNull(builder.ipRange) { "A non-null value must be provided for ipRange" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.workspacesweb.model.IpRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("IpRule(")
append("description=*** Sensitive Data Redacted ***,")
append("ipRange=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (ipRange.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 IpRule
if (description != other.description) return false
if (ipRange != other.ipRange) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.workspacesweb.model.IpRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The description of the IP rule.
*/
public var description: kotlin.String? = null
/**
* The IP range of the IP rule.
*/
public var ipRange: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.workspacesweb.model.IpRule) : this() {
this.description = x.description
this.ipRange = x.ipRange
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.workspacesweb.model.IpRule = IpRule(this)
internal fun correctErrors(): Builder {
if (ipRange == null) ipRange = ""
return this
}
}
}