
commonMain.aws.sdk.kotlin.services.cloudcontrol.model.GetResourceRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudcontrol.model
public class GetResourceRequest private constructor(builder: Builder) {
/**
* The identifier for the resource.
*
* You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.
*
* For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values *in the order they are specified* in the primary identifier definition, separated by `|`.
*
* For more information, see [Identifying resources](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html) in the *Amazon Web Services Cloud Control API User Guide*.
*/
public val identifier: kotlin.String = requireNotNull(builder.identifier) { "A non-null value must be provided for identifier" }
/**
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the ` handlers ` section of the [resource type definition schema](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html).
*
* If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.
*
* For more information, see [Specifying credentials](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions) in the *Amazon Web Services Cloud Control API User Guide*.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The name of the resource type.
*/
public val typeName: kotlin.String = requireNotNull(builder.typeName) { "A non-null value must be provided for typeName" }
/**
* For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.
*/
public val typeVersionId: kotlin.String? = builder.typeVersionId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudcontrol.model.GetResourceRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetResourceRequest(")
append("identifier=$identifier,")
append("roleArn=$roleArn,")
append("typeName=$typeName,")
append("typeVersionId=$typeVersionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = identifier.hashCode()
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (typeName.hashCode())
result = 31 * result + (typeVersionId?.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 GetResourceRequest
if (identifier != other.identifier) return false
if (roleArn != other.roleArn) return false
if (typeName != other.typeName) return false
if (typeVersionId != other.typeVersionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudcontrol.model.GetResourceRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The identifier for the resource.
*
* You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.
*
* For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values *in the order they are specified* in the primary identifier definition, separated by `|`.
*
* For more information, see [Identifying resources](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html) in the *Amazon Web Services Cloud Control API User Guide*.
*/
public var identifier: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the ` handlers ` section of the [resource type definition schema](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html).
*
* If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.
*
* For more information, see [Specifying credentials](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions) in the *Amazon Web Services Cloud Control API User Guide*.
*/
public var roleArn: kotlin.String? = null
/**
* The name of the resource type.
*/
public var typeName: kotlin.String? = null
/**
* For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.
*/
public var typeVersionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudcontrol.model.GetResourceRequest) : this() {
this.identifier = x.identifier
this.roleArn = x.roleArn
this.typeName = x.typeName
this.typeVersionId = x.typeVersionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudcontrol.model.GetResourceRequest = GetResourceRequest(this)
internal fun correctErrors(): Builder {
if (identifier == null) identifier = ""
if (typeName == null) typeName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy