
commonMain.aws.sdk.kotlin.services.ssm.model.UpdateDocumentRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
public class UpdateDocumentRequest private constructor(builder: Builder) {
/**
* A list of key-value pairs that describe attachments to a version of a document.
*/
public val attachments: List? = builder.attachments
/**
* A valid JSON or YAML string.
*/
public val content: kotlin.String? = builder.content
/**
* The friendly name of the SSM document that you want to update. This value can differ for each version of the document. If you don't specify a value for this parameter in your request, the existing value is applied to the new document version.
*/
public val displayName: kotlin.String? = builder.displayName
/**
* Specify the document format for the new document version. Systems Manager supports JSON and YAML documents. JSON is the default format.
*/
public val documentFormat: aws.sdk.kotlin.services.ssm.model.DocumentFormat? = builder.documentFormat
/**
* The version of the document that you want to update. Currently, Systems Manager supports updating only the latest version of the document. You can specify the version number of the latest version or use the `$LATEST` variable.
*
* If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the `apply-only-at-cron-interval` parameter.
*/
public val documentVersion: kotlin.String? = builder.documentVersion
/**
* The name of the SSM document that you want to update.
*/
public val name: kotlin.String? = builder.name
/**
* Specify a new target type for the document.
*/
public val targetType: kotlin.String? = builder.targetType
/**
* An optional field specifying the version of the artifact you are updating with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.
*/
public val versionName: kotlin.String? = builder.versionName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.UpdateDocumentRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateDocumentRequest(")
append("attachments=$attachments,")
append("content=$content,")
append("displayName=$displayName,")
append("documentFormat=$documentFormat,")
append("documentVersion=$documentVersion,")
append("name=$name,")
append("targetType=$targetType,")
append("versionName=$versionName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attachments?.hashCode() ?: 0
result = 31 * result + (content?.hashCode() ?: 0)
result = 31 * result + (displayName?.hashCode() ?: 0)
result = 31 * result + (documentFormat?.hashCode() ?: 0)
result = 31 * result + (documentVersion?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (targetType?.hashCode() ?: 0)
result = 31 * result + (versionName?.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 UpdateDocumentRequest
if (attachments != other.attachments) return false
if (content != other.content) return false
if (displayName != other.displayName) return false
if (documentFormat != other.documentFormat) return false
if (documentVersion != other.documentVersion) return false
if (name != other.name) return false
if (targetType != other.targetType) return false
if (versionName != other.versionName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.UpdateDocumentRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A list of key-value pairs that describe attachments to a version of a document.
*/
public var attachments: List? = null
/**
* A valid JSON or YAML string.
*/
public var content: kotlin.String? = null
/**
* The friendly name of the SSM document that you want to update. This value can differ for each version of the document. If you don't specify a value for this parameter in your request, the existing value is applied to the new document version.
*/
public var displayName: kotlin.String? = null
/**
* Specify the document format for the new document version. Systems Manager supports JSON and YAML documents. JSON is the default format.
*/
public var documentFormat: aws.sdk.kotlin.services.ssm.model.DocumentFormat? = null
/**
* The version of the document that you want to update. Currently, Systems Manager supports updating only the latest version of the document. You can specify the version number of the latest version or use the `$LATEST` variable.
*
* If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the `apply-only-at-cron-interval` parameter.
*/
public var documentVersion: kotlin.String? = null
/**
* The name of the SSM document that you want to update.
*/
public var name: kotlin.String? = null
/**
* Specify a new target type for the document.
*/
public var targetType: kotlin.String? = null
/**
* An optional field specifying the version of the artifact you are updating with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.
*/
public var versionName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.UpdateDocumentRequest) : this() {
this.attachments = x.attachments
this.content = x.content
this.displayName = x.displayName
this.documentFormat = x.documentFormat
this.documentVersion = x.documentVersion
this.name = x.name
this.targetType = x.targetType
this.versionName = x.versionName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.UpdateDocumentRequest = UpdateDocumentRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy