
commonMain.aws.sdk.kotlin.services.guardduty.model.CreatePublishingDestinationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.guardduty.model
class CreatePublishingDestinationRequest private constructor(builder: Builder) {
/**
* The idempotency token for the request.
*/
val clientToken: kotlin.String? = builder.clientToken
/**
* The properties of the publishing destination, including the ARNs for the destination and the KMS key used for encryption.
*/
val destinationProperties: aws.sdk.kotlin.services.guardduty.model.DestinationProperties? = builder.destinationProperties
/**
* The type of resource for the publishing destination. Currently only Amazon S3 buckets are supported.
*/
val destinationType: aws.sdk.kotlin.services.guardduty.model.DestinationType? = builder.destinationType
/**
* The ID of the GuardDuty detector associated with the publishing destination.
*/
val detectorId: kotlin.String? = builder.detectorId
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.guardduty.model.CreatePublishingDestinationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePublishingDestinationRequest(")
append("clientToken=$clientToken,")
append("destinationProperties=$destinationProperties,")
append("destinationType=$destinationType,")
append("detectorId=$detectorId)")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (destinationProperties?.hashCode() ?: 0)
result = 31 * result + (destinationType?.hashCode() ?: 0)
result = 31 * result + (detectorId?.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 CreatePublishingDestinationRequest
if (clientToken != other.clientToken) return false
if (destinationProperties != other.destinationProperties) return false
if (destinationType != other.destinationType) return false
if (detectorId != other.detectorId) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.guardduty.model.CreatePublishingDestinationRequest = Builder(this).apply(block).build()
class Builder {
/**
* The idempotency token for the request.
*/
var clientToken: kotlin.String? = null
/**
* The properties of the publishing destination, including the ARNs for the destination and the KMS key used for encryption.
*/
var destinationProperties: aws.sdk.kotlin.services.guardduty.model.DestinationProperties? = null
/**
* The type of resource for the publishing destination. Currently only Amazon S3 buckets are supported.
*/
var destinationType: aws.sdk.kotlin.services.guardduty.model.DestinationType? = null
/**
* The ID of the GuardDuty detector associated with the publishing destination.
*/
var detectorId: kotlin.String? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.guardduty.model.CreatePublishingDestinationRequest) : this() {
this.clientToken = x.clientToken
this.destinationProperties = x.destinationProperties
this.destinationType = x.destinationType
this.detectorId = x.detectorId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.guardduty.model.CreatePublishingDestinationRequest = CreatePublishingDestinationRequest(this)
/**
* construct an [aws.sdk.kotlin.services.guardduty.model.DestinationProperties] inside the given [block]
*/
fun destinationProperties(block: aws.sdk.kotlin.services.guardduty.model.DestinationProperties.Builder.() -> kotlin.Unit) {
this.destinationProperties = aws.sdk.kotlin.services.guardduty.model.DestinationProperties.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy