
commonMain.aws.sdk.kotlin.services.ssm.model.CreateResourceDataSyncRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateResourceDataSyncRequest private constructor(builder: Builder) {
/**
* Amazon S3 configuration details for the sync. This parameter is required if the `SyncType` value is SyncToDestination.
*/
public val s3Destination: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncS3Destination? = builder.s3Destination
/**
* A name for the configuration.
*/
public val syncName: kotlin.String? = builder.syncName
/**
* Specify information about the data sources to synchronize. This parameter is required if the `SyncType` value is SyncFromSource.
*/
public val syncSource: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncSource? = builder.syncSource
/**
* Specify `SyncToDestination` to create a resource data sync that synchronizes data to an S3 bucket for Inventory. If you specify `SyncToDestination`, you must provide a value for `S3Destination`. Specify `SyncFromSource` to synchronize data from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as listed in Organizations for Explorer. If you specify `SyncFromSource`, you must provide a value for `SyncSource`. The default value is `SyncToDestination`.
*/
public val syncType: kotlin.String? = builder.syncType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.CreateResourceDataSyncRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateResourceDataSyncRequest(")
append("s3Destination=$s3Destination,")
append("syncName=$syncName,")
append("syncSource=$syncSource,")
append("syncType=$syncType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = s3Destination?.hashCode() ?: 0
result = 31 * result + (syncName?.hashCode() ?: 0)
result = 31 * result + (syncSource?.hashCode() ?: 0)
result = 31 * result + (syncType?.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 CreateResourceDataSyncRequest
if (s3Destination != other.s3Destination) return false
if (syncName != other.syncName) return false
if (syncSource != other.syncSource) return false
if (syncType != other.syncType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.CreateResourceDataSyncRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Amazon S3 configuration details for the sync. This parameter is required if the `SyncType` value is SyncToDestination.
*/
public var s3Destination: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncS3Destination? = null
/**
* A name for the configuration.
*/
public var syncName: kotlin.String? = null
/**
* Specify information about the data sources to synchronize. This parameter is required if the `SyncType` value is SyncFromSource.
*/
public var syncSource: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncSource? = null
/**
* Specify `SyncToDestination` to create a resource data sync that synchronizes data to an S3 bucket for Inventory. If you specify `SyncToDestination`, you must provide a value for `S3Destination`. Specify `SyncFromSource` to synchronize data from a single account and multiple Regions, or multiple Amazon Web Services accounts and Amazon Web Services Regions, as listed in Organizations for Explorer. If you specify `SyncFromSource`, you must provide a value for `SyncSource`. The default value is `SyncToDestination`.
*/
public var syncType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.CreateResourceDataSyncRequest) : this() {
this.s3Destination = x.s3Destination
this.syncName = x.syncName
this.syncSource = x.syncSource
this.syncType = x.syncType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.CreateResourceDataSyncRequest = CreateResourceDataSyncRequest(this)
/**
* construct an [aws.sdk.kotlin.services.ssm.model.ResourceDataSyncS3Destination] inside the given [block]
*/
public fun s3Destination(block: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncS3Destination.Builder.() -> kotlin.Unit) {
this.s3Destination = aws.sdk.kotlin.services.ssm.model.ResourceDataSyncS3Destination.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.ssm.model.ResourceDataSyncSource] inside the given [block]
*/
public fun syncSource(block: aws.sdk.kotlin.services.ssm.model.ResourceDataSyncSource.Builder.() -> kotlin.Unit) {
this.syncSource = aws.sdk.kotlin.services.ssm.model.ResourceDataSyncSource.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy