commonMain.aws.sdk.kotlin.services.vpclattice.model.UpdateServiceNetworkRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vpclattice-jvm Show documentation
Show all versions of vpclattice-jvm Show documentation
The AWS SDK for Kotlin client for VPC Lattice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.vpclattice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateServiceNetworkRequest private constructor(builder: Builder) {
/**
* The type of IAM policy.
* + `NONE`: The resource does not use an IAM policy. This is the default.
* + `AWS_IAM`: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.
*/
public val authType: aws.sdk.kotlin.services.vpclattice.model.AuthType = requireNotNull(builder.authType) { "A non-null value must be provided for authType" }
/**
* The ID or Amazon Resource Name (ARN) of the service network.
*/
public val serviceNetworkIdentifier: kotlin.String = requireNotNull(builder.serviceNetworkIdentifier) { "A non-null value must be provided for serviceNetworkIdentifier" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.UpdateServiceNetworkRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateServiceNetworkRequest(")
append("authType=$authType,")
append("serviceNetworkIdentifier=$serviceNetworkIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authType.hashCode()
result = 31 * result + (serviceNetworkIdentifier.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 UpdateServiceNetworkRequest
if (authType != other.authType) return false
if (serviceNetworkIdentifier != other.serviceNetworkIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.UpdateServiceNetworkRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The type of IAM policy.
* + `NONE`: The resource does not use an IAM policy. This is the default.
* + `AWS_IAM`: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.
*/
public var authType: aws.sdk.kotlin.services.vpclattice.model.AuthType? = null
/**
* The ID or Amazon Resource Name (ARN) of the service network.
*/
public var serviceNetworkIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.UpdateServiceNetworkRequest) : this() {
this.authType = x.authType
this.serviceNetworkIdentifier = x.serviceNetworkIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.UpdateServiceNetworkRequest = UpdateServiceNetworkRequest(this)
internal fun correctErrors(): Builder {
if (authType == null) authType = AuthType.SdkUnknown("no value provided")
if (serviceNetworkIdentifier == null) serviceNetworkIdentifier = ""
return this
}
}
}