commonMain.aws.sdk.kotlin.services.configservice.model.TemplateSsmDocumentDetails.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This API allows you to create a conformance pack template with an Amazon Web Services Systems Manager document (SSM document). To deploy a conformance pack using an SSM document, first create an SSM document with conformance pack content, and then provide the `DocumentName` in the [PutConformancePack API](https://docs.aws.amazon.com/config/latest/APIReference/API_PutConformancePack.html). You can also provide the `DocumentVersion`.
*
* The `TemplateSSMDocumentDetails` object contains the name of the SSM document and the version of the SSM document.
*/
public class TemplateSsmDocumentDetails private constructor(builder: Builder) {
/**
* The name or Amazon Resource Name (ARN) of the SSM document to use to create a conformance pack. If you use the document name, Config checks only your account and Amazon Web Services Region for the SSM document.
*/
public val documentName: kotlin.String = requireNotNull(builder.documentName) { "A non-null value must be provided for documentName" }
/**
* The version of the SSM document to use to create a conformance pack. By default, Config uses the latest version.
*
* This field is optional.
*/
public val documentVersion: kotlin.String? = builder.documentVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.TemplateSsmDocumentDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TemplateSsmDocumentDetails(")
append("documentName=$documentName,")
append("documentVersion=$documentVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = documentName.hashCode()
result = 31 * result + (documentVersion?.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 TemplateSsmDocumentDetails
if (documentName != other.documentName) return false
if (documentVersion != other.documentVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.TemplateSsmDocumentDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name or Amazon Resource Name (ARN) of the SSM document to use to create a conformance pack. If you use the document name, Config checks only your account and Amazon Web Services Region for the SSM document.
*/
public var documentName: kotlin.String? = null
/**
* The version of the SSM document to use to create a conformance pack. By default, Config uses the latest version.
*
* This field is optional.
*/
public var documentVersion: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.TemplateSsmDocumentDetails) : this() {
this.documentName = x.documentName
this.documentVersion = x.documentVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.TemplateSsmDocumentDetails = TemplateSsmDocumentDetails(this)
internal fun correctErrors(): Builder {
if (documentName == null) documentName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy