commonMain.aws.sdk.kotlin.services.signer.model.SignPayloadRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.signer.model
import aws.smithy.kotlin.runtime.SdkDsl
public class SignPayloadRequest private constructor(builder: Builder) {
/**
* Specifies the object digest (hash) to sign.
*/
public val payload: kotlin.ByteArray? = builder.payload
/**
* Payload content type. The single valid type is `application/vnd.cncf.notary.payload.v1+json`.
*/
public val payloadFormat: kotlin.String? = builder.payloadFormat
/**
* The name of the signing profile.
*/
public val profileName: kotlin.String? = builder.profileName
/**
* The AWS account ID of the profile owner.
*/
public val profileOwner: kotlin.String? = builder.profileOwner
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.signer.model.SignPayloadRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SignPayloadRequest(")
append("payload=$payload,")
append("payloadFormat=$payloadFormat,")
append("profileName=$profileName,")
append("profileOwner=$profileOwner")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = payload?.contentHashCode() ?: 0
result = 31 * result + (payloadFormat?.hashCode() ?: 0)
result = 31 * result + (profileName?.hashCode() ?: 0)
result = 31 * result + (profileOwner?.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 SignPayloadRequest
if (payload != null) {
if (other.payload == null) return false
if (!payload.contentEquals(other.payload)) return false
} else if (other.payload != null) return false
if (payloadFormat != other.payloadFormat) return false
if (profileName != other.profileName) return false
if (profileOwner != other.profileOwner) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.signer.model.SignPayloadRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the object digest (hash) to sign.
*/
public var payload: kotlin.ByteArray? = null
/**
* Payload content type. The single valid type is `application/vnd.cncf.notary.payload.v1+json`.
*/
public var payloadFormat: kotlin.String? = null
/**
* The name of the signing profile.
*/
public var profileName: kotlin.String? = null
/**
* The AWS account ID of the profile owner.
*/
public var profileOwner: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.signer.model.SignPayloadRequest) : this() {
this.payload = x.payload
this.payloadFormat = x.payloadFormat
this.profileName = x.profileName
this.profileOwner = x.profileOwner
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.signer.model.SignPayloadRequest = SignPayloadRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}