
commonMain.aws.sdk.kotlin.services.appmesh.model.VirtualNodeData.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appmesh.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that represents a virtual node returned by a describe operation.
*/
public class VirtualNodeData private constructor(builder: Builder) {
/**
* The name of the service mesh that the virtual node resides in.
*/
public val meshName: kotlin.String = requireNotNull(builder.meshName) { "A non-null value must be provided for meshName" }
/**
* The associated metadata for the virtual node.
*/
public val metadata: aws.sdk.kotlin.services.appmesh.model.ResourceMetadata? = builder.metadata
/**
* The specifications of the virtual node.
*/
public val spec: aws.sdk.kotlin.services.appmesh.model.VirtualNodeSpec? = builder.spec
/**
* The current status for the virtual node.
*/
public val status: aws.sdk.kotlin.services.appmesh.model.VirtualNodeStatus? = builder.status
/**
* The name of the virtual node.
*/
public val virtualNodeName: kotlin.String = requireNotNull(builder.virtualNodeName) { "A non-null value must be provided for virtualNodeName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.VirtualNodeData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VirtualNodeData(")
append("meshName=$meshName,")
append("metadata=$metadata,")
append("spec=$spec,")
append("status=$status,")
append("virtualNodeName=$virtualNodeName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = meshName.hashCode()
result = 31 * result + (metadata?.hashCode() ?: 0)
result = 31 * result + (spec?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (virtualNodeName.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 VirtualNodeData
if (meshName != other.meshName) return false
if (metadata != other.metadata) return false
if (spec != other.spec) return false
if (status != other.status) return false
if (virtualNodeName != other.virtualNodeName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.VirtualNodeData = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the service mesh that the virtual node resides in.
*/
public var meshName: kotlin.String? = null
/**
* The associated metadata for the virtual node.
*/
public var metadata: aws.sdk.kotlin.services.appmesh.model.ResourceMetadata? = null
/**
* The specifications of the virtual node.
*/
public var spec: aws.sdk.kotlin.services.appmesh.model.VirtualNodeSpec? = null
/**
* The current status for the virtual node.
*/
public var status: aws.sdk.kotlin.services.appmesh.model.VirtualNodeStatus? = null
/**
* The name of the virtual node.
*/
public var virtualNodeName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.VirtualNodeData) : this() {
this.meshName = x.meshName
this.metadata = x.metadata
this.spec = x.spec
this.status = x.status
this.virtualNodeName = x.virtualNodeName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.VirtualNodeData = VirtualNodeData(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.ResourceMetadata] inside the given [block]
*/
public fun metadata(block: aws.sdk.kotlin.services.appmesh.model.ResourceMetadata.Builder.() -> kotlin.Unit) {
this.metadata = aws.sdk.kotlin.services.appmesh.model.ResourceMetadata.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.VirtualNodeSpec] inside the given [block]
*/
public fun spec(block: aws.sdk.kotlin.services.appmesh.model.VirtualNodeSpec.Builder.() -> kotlin.Unit) {
this.spec = aws.sdk.kotlin.services.appmesh.model.VirtualNodeSpec.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.VirtualNodeStatus] inside the given [block]
*/
public fun status(block: aws.sdk.kotlin.services.appmesh.model.VirtualNodeStatus.Builder.() -> kotlin.Unit) {
this.status = aws.sdk.kotlin.services.appmesh.model.VirtualNodeStatus.invoke(block)
}
internal fun correctErrors(): Builder {
if (meshName == null) meshName = ""
if (virtualNodeName == null) virtualNodeName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy