commonMain.aws.sdk.kotlin.services.resiliencehub.model.DescribeAppVersionResourceRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resiliencehub-jvm Show documentation
Show all versions of resiliencehub-jvm Show documentation
The AWS SDK for Kotlin client for resiliencehub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.resiliencehub.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DescribeAppVersionResourceRequest private constructor(builder: Builder) {
/**
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:`partition`:resiliencehub:`region`:`account`:app/`app-id`. For more information about ARNs, see [ Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference* guide.
*/
public val appArn: kotlin.String = requireNotNull(builder.appArn) { "A non-null value must be provided for appArn" }
/**
* Resilience Hub application version.
*/
public val appVersion: kotlin.String = requireNotNull(builder.appVersion) { "A non-null value must be provided for appVersion" }
/**
* Amazon Web Services account that owns the physical resource.
*/
public val awsAccountId: kotlin.String? = builder.awsAccountId
/**
* Amazon Web Services region that owns the physical resource.
*/
public val awsRegion: kotlin.String? = builder.awsRegion
/**
* Logical identifier of the resource.
*/
public val logicalResourceId: aws.sdk.kotlin.services.resiliencehub.model.LogicalResourceId? = builder.logicalResourceId
/**
* Physical identifier of the resource.
*/
public val physicalResourceId: kotlin.String? = builder.physicalResourceId
/**
* Name of the resource.
*/
public val resourceName: kotlin.String? = builder.resourceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.resiliencehub.model.DescribeAppVersionResourceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeAppVersionResourceRequest(")
append("appArn=$appArn,")
append("appVersion=$appVersion,")
append("awsAccountId=$awsAccountId,")
append("awsRegion=$awsRegion,")
append("logicalResourceId=$logicalResourceId,")
append("physicalResourceId=$physicalResourceId,")
append("resourceName=$resourceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appArn.hashCode()
result = 31 * result + (appVersion.hashCode())
result = 31 * result + (awsAccountId?.hashCode() ?: 0)
result = 31 * result + (awsRegion?.hashCode() ?: 0)
result = 31 * result + (logicalResourceId?.hashCode() ?: 0)
result = 31 * result + (physicalResourceId?.hashCode() ?: 0)
result = 31 * result + (resourceName?.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 DescribeAppVersionResourceRequest
if (appArn != other.appArn) return false
if (appVersion != other.appVersion) return false
if (awsAccountId != other.awsAccountId) return false
if (awsRegion != other.awsRegion) return false
if (logicalResourceId != other.logicalResourceId) return false
if (physicalResourceId != other.physicalResourceId) return false
if (resourceName != other.resourceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.resiliencehub.model.DescribeAppVersionResourceRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:`partition`:resiliencehub:`region`:`account`:app/`app-id`. For more information about ARNs, see [ Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference* guide.
*/
public var appArn: kotlin.String? = null
/**
* Resilience Hub application version.
*/
public var appVersion: kotlin.String? = null
/**
* Amazon Web Services account that owns the physical resource.
*/
public var awsAccountId: kotlin.String? = null
/**
* Amazon Web Services region that owns the physical resource.
*/
public var awsRegion: kotlin.String? = null
/**
* Logical identifier of the resource.
*/
public var logicalResourceId: aws.sdk.kotlin.services.resiliencehub.model.LogicalResourceId? = null
/**
* Physical identifier of the resource.
*/
public var physicalResourceId: kotlin.String? = null
/**
* Name of the resource.
*/
public var resourceName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.DescribeAppVersionResourceRequest) : this() {
this.appArn = x.appArn
this.appVersion = x.appVersion
this.awsAccountId = x.awsAccountId
this.awsRegion = x.awsRegion
this.logicalResourceId = x.logicalResourceId
this.physicalResourceId = x.physicalResourceId
this.resourceName = x.resourceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.resiliencehub.model.DescribeAppVersionResourceRequest = DescribeAppVersionResourceRequest(this)
/**
* construct an [aws.sdk.kotlin.services.resiliencehub.model.LogicalResourceId] inside the given [block]
*/
public fun logicalResourceId(block: aws.sdk.kotlin.services.resiliencehub.model.LogicalResourceId.Builder.() -> kotlin.Unit) {
this.logicalResourceId = aws.sdk.kotlin.services.resiliencehub.model.LogicalResourceId.invoke(block)
}
internal fun correctErrors(): Builder {
if (appArn == null) appArn = ""
if (appVersion == null) appVersion = ""
return this
}
}
}