
commonMain.aws.sdk.kotlin.services.ssmsap.model.Resource.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmsap.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The resource contains a `ResourceArn` and the `ResourceType`.
*/
public class Resource private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the source resource.
*
* Example of `ResourceArn`: "`arn:aws:ec2:us-east-1:111111111111:instance/i-abcdefgh987654321`"
*/
public val resourceArn: kotlin.String? = builder.resourceArn
/**
* The resource type.
*
* Example of `ResourceType`: "`AWS::SystemsManagerSAP::Component`" or "`AWS::EC2::Instance`".
*/
public val resourceType: kotlin.String? = builder.resourceType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmsap.model.Resource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Resource(")
append("resourceArn=$resourceArn,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = resourceArn?.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 Resource
if (resourceArn != other.resourceArn) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmsap.model.Resource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the source resource.
*
* Example of `ResourceArn`: "`arn:aws:ec2:us-east-1:111111111111:instance/i-abcdefgh987654321`"
*/
public var resourceArn: kotlin.String? = null
/**
* The resource type.
*
* Example of `ResourceType`: "`AWS::SystemsManagerSAP::Component`" or "`AWS::EC2::Instance`".
*/
public var resourceType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmsap.model.Resource) : this() {
this.resourceArn = x.resourceArn
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmsap.model.Resource = Resource(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy