commonMain.aws.sdk.kotlin.services.codegurusecurity.model.CreateUploadUrlResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codegurusecurity-jvm Show documentation
Show all versions of codegurusecurity-jvm Show documentation
The AWS SDK for Kotlin client for CodeGuru Security
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codegurusecurity.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateUploadUrlResponse private constructor(builder: Builder) {
/**
* The identifier for the uploaded code resource. Pass this to `CreateScan` to use the uploaded resources.
*/
public val codeArtifactId: kotlin.String = requireNotNull(builder.codeArtifactId) { "A non-null value must be provided for codeArtifactId" }
/**
* A set of key-value pairs that contain the required headers when uploading your resource.
*/
public val requestHeaders: Map = requireNotNull(builder.requestHeaders) { "A non-null value must be provided for requestHeaders" }
/**
* A pre-signed S3 URL. You can upload the code file you want to scan with the required `requestHeaders` using any HTTP client.
*/
public val s3Url: kotlin.String = requireNotNull(builder.s3Url) { "A non-null value must be provided for s3Url" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codegurusecurity.model.CreateUploadUrlResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateUploadUrlResponse(")
append("codeArtifactId=$codeArtifactId,")
append("requestHeaders=*** Sensitive Data Redacted ***,")
append("s3Url=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = codeArtifactId.hashCode()
result = 31 * result + (requestHeaders.hashCode())
result = 31 * result + (s3Url.hashCode())
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 CreateUploadUrlResponse
if (codeArtifactId != other.codeArtifactId) return false
if (requestHeaders != other.requestHeaders) return false
if (s3Url != other.s3Url) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codegurusecurity.model.CreateUploadUrlResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The identifier for the uploaded code resource. Pass this to `CreateScan` to use the uploaded resources.
*/
public var codeArtifactId: kotlin.String? = null
/**
* A set of key-value pairs that contain the required headers when uploading your resource.
*/
public var requestHeaders: Map? = null
/**
* A pre-signed S3 URL. You can upload the code file you want to scan with the required `requestHeaders` using any HTTP client.
*/
public var s3Url: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codegurusecurity.model.CreateUploadUrlResponse) : this() {
this.codeArtifactId = x.codeArtifactId
this.requestHeaders = x.requestHeaders
this.s3Url = x.s3Url
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codegurusecurity.model.CreateUploadUrlResponse = CreateUploadUrlResponse(this)
internal fun correctErrors(): Builder {
if (codeArtifactId == null) codeArtifactId = ""
if (requestHeaders == null) requestHeaders = emptyMap()
if (s3Url == null) s3Url = ""
return this
}
}
}