
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.DependentEntity.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmcontacts.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about a resource that another resource is related to or depends on.
*
* For example, if a contact is a member of a rotation, the rotation is a dependent entity of the contact.
*/
public class DependentEntity private constructor(builder: Builder) {
/**
* The Amazon Resource Names (ARNs) of the dependent resources.
*/
public val dependentResourceIds: List = requireNotNull(builder.dependentResourceIds) { "A non-null value must be provided for dependentResourceIds" }
/**
* The type of relationship between one resource and the other resource that it is related to or depends on.
*/
public val relationType: kotlin.String = requireNotNull(builder.relationType) { "A non-null value must be provided for relationType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.DependentEntity = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DependentEntity(")
append("dependentResourceIds=$dependentResourceIds,")
append("relationType=$relationType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dependentResourceIds.hashCode()
result = 31 * result + (relationType.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 DependentEntity
if (dependentResourceIds != other.dependentResourceIds) return false
if (relationType != other.relationType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.DependentEntity = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Names (ARNs) of the dependent resources.
*/
public var dependentResourceIds: List? = null
/**
* The type of relationship between one resource and the other resource that it is related to or depends on.
*/
public var relationType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.DependentEntity) : this() {
this.dependentResourceIds = x.dependentResourceIds
this.relationType = x.relationType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.DependentEntity = DependentEntity(this)
internal fun correctErrors(): Builder {
if (dependentResourceIds == null) dependentResourceIds = emptyList()
if (relationType == null) relationType = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy