commonMain.aws.sdk.kotlin.services.vpclattice.model.PutAuthPolicyResponse.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 PutAuthPolicyResponse private constructor(builder: Builder) {
/**
* The auth policy. The policy string in JSON must not contain newlines or blank lines.
*/
public val policy: kotlin.String? = builder.policy
/**
* The state of the auth policy. The auth policy is only active when the auth type is set to `AWS_IAM`. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is `NONE`, then, any auth policy that you provide remains inactive. For more information, see [Create a service network](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html#create-service-network) in the *Amazon VPC Lattice User Guide*.
*/
public val state: aws.sdk.kotlin.services.vpclattice.model.AuthPolicyState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.PutAuthPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutAuthPolicyResponse(")
append("policy=$policy,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = policy?.hashCode() ?: 0
result = 31 * result + (state?.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 PutAuthPolicyResponse
if (policy != other.policy) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.PutAuthPolicyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The auth policy. The policy string in JSON must not contain newlines or blank lines.
*/
public var policy: kotlin.String? = null
/**
* The state of the auth policy. The auth policy is only active when the auth type is set to `AWS_IAM`. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is `NONE`, then, any auth policy that you provide remains inactive. For more information, see [Create a service network](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html#create-service-network) in the *Amazon VPC Lattice User Guide*.
*/
public var state: aws.sdk.kotlin.services.vpclattice.model.AuthPolicyState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.PutAuthPolicyResponse) : this() {
this.policy = x.policy
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.PutAuthPolicyResponse = PutAuthPolicyResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}