commonMain.aws.sdk.kotlin.services.configservice.model.Relationship.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configservice-jvm Show documentation
Show all versions of configservice-jvm Show documentation
The AWS Kotlin client for Config Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
/**
* The relationship of the related resource to the main resource.
*/
public class Relationship private constructor(builder: Builder) {
/**
* The type of relationship with the related resource.
*/
public val relationshipName: kotlin.String? = builder.relationshipName
/**
* The ID of the related resource (for example, `sg-xxxxxx`).
*/
public val resourceId: kotlin.String? = builder.resourceId
/**
* The custom name of the related resource, if available.
*/
public val resourceName: kotlin.String? = builder.resourceName
/**
* The resource type of the related resource.
*/
public val resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = builder.resourceType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.Relationship = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Relationship(")
append("relationshipName=$relationshipName,")
append("resourceId=$resourceId,")
append("resourceName=$resourceName,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = relationshipName?.hashCode() ?: 0
result = 31 * result + (resourceId?.hashCode() ?: 0)
result = 31 * result + (resourceName?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 Relationship
if (relationshipName != other.relationshipName) return false
if (resourceId != other.resourceId) return false
if (resourceName != other.resourceName) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.Relationship = Builder(this).apply(block).build()
public class Builder {
/**
* The type of relationship with the related resource.
*/
public var relationshipName: kotlin.String? = null
/**
* The ID of the related resource (for example, `sg-xxxxxx`).
*/
public var resourceId: kotlin.String? = null
/**
* The custom name of the related resource, if available.
*/
public var resourceName: kotlin.String? = null
/**
* The resource type of the related resource.
*/
public var resourceType: aws.sdk.kotlin.services.configservice.model.ResourceType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.Relationship) : this() {
this.relationshipName = x.relationshipName
this.resourceId = x.resourceId
this.resourceName = x.resourceName
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.Relationship = Relationship(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy