commonMain.aws.sdk.kotlin.services.iot.model.PresignedUrlConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iot Show documentation
Show all versions of iot Show documentation
The AWS SDK for Kotlin client for IoT
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Configuration for pre-signed S3 URLs.
*/
public class PresignedUrlConfig private constructor(builder: Builder) {
/**
* How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.
*/
public val expiresInSec: kotlin.Long? = builder.expiresInSec
/**
* The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.
*
* For information about addressing the confused deputy problem, see [cross-service confused deputy prevention](https://docs.aws.amazon.com/iot/latest/developerguide/cross-service-confused-deputy-prevention.html) in the *Amazon Web Services IoT Core developer guide*.
*/
public val roleArn: kotlin.String? = builder.roleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.PresignedUrlConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PresignedUrlConfig(")
append("expiresInSec=$expiresInSec,")
append("roleArn=$roleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expiresInSec?.hashCode() ?: 0
result = 31 * result + (roleArn?.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 PresignedUrlConfig
if (expiresInSec != other.expiresInSec) return false
if (roleArn != other.roleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.PresignedUrlConfig = Builder(this).apply(block).build()
public class Builder {
/**
* How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.
*/
public var expiresInSec: kotlin.Long? = null
/**
* The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.
*
* For information about addressing the confused deputy problem, see [cross-service confused deputy prevention](https://docs.aws.amazon.com/iot/latest/developerguide/cross-service-confused-deputy-prevention.html) in the *Amazon Web Services IoT Core developer guide*.
*/
public var roleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.PresignedUrlConfig) : this() {
this.expiresInSec = x.expiresInSec
this.roleArn = x.roleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.PresignedUrlConfig = PresignedUrlConfig(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy