All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.signer.model.AddProfilePermissionRequest.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 AddProfilePermissionRequest private constructor(builder: Builder) {
    /**
     * For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see [Using cross-account signing with signing profiles](https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html) in the *AWS Signer Developer Guide*.
     *
     * You can designate the following actions to an account.
     * + `signer:StartSigningJob`. This action isn't supported for container image workflows. For details, see StartSigningJob.
     * + `signer:SignPayload`. This action isn't supported for AWS Lambda workflows. For details, see SignPayload
     * + `signer:GetSigningProfile`. For details, see GetSigningProfile.
     * + `signer:RevokeSignature`. For details, see RevokeSignature.
     */
    public val action: kotlin.String? = builder.action
    /**
     * The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.
     */
    public val principal: kotlin.String? = builder.principal
    /**
     * The human-readable name of the signing profile.
     */
    public val profileName: kotlin.String? = builder.profileName
    /**
     * The version of the signing profile.
     */
    public val profileVersion: kotlin.String? = builder.profileVersion
    /**
     * A unique identifier for the current profile revision.
     */
    public val revisionId: kotlin.String? = builder.revisionId
    /**
     * A unique identifier for the cross-account permission statement.
     */
    public val statementId: kotlin.String? = builder.statementId

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.signer.model.AddProfilePermissionRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AddProfilePermissionRequest(")
        append("action=$action,")
        append("principal=$principal,")
        append("profileName=$profileName,")
        append("profileVersion=$profileVersion,")
        append("revisionId=$revisionId,")
        append("statementId=$statementId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = action?.hashCode() ?: 0
        result = 31 * result + (principal?.hashCode() ?: 0)
        result = 31 * result + (profileName?.hashCode() ?: 0)
        result = 31 * result + (profileVersion?.hashCode() ?: 0)
        result = 31 * result + (revisionId?.hashCode() ?: 0)
        result = 31 * result + (statementId?.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 AddProfilePermissionRequest

        if (action != other.action) return false
        if (principal != other.principal) return false
        if (profileName != other.profileName) return false
        if (profileVersion != other.profileVersion) return false
        if (revisionId != other.revisionId) return false
        if (statementId != other.statementId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.signer.model.AddProfilePermissionRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see [Using cross-account signing with signing profiles](https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html) in the *AWS Signer Developer Guide*.
         *
         * You can designate the following actions to an account.
         * + `signer:StartSigningJob`. This action isn't supported for container image workflows. For details, see StartSigningJob.
         * + `signer:SignPayload`. This action isn't supported for AWS Lambda workflows. For details, see SignPayload
         * + `signer:GetSigningProfile`. For details, see GetSigningProfile.
         * + `signer:RevokeSignature`. For details, see RevokeSignature.
         */
        public var action: kotlin.String? = null
        /**
         * The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.
         */
        public var principal: kotlin.String? = null
        /**
         * The human-readable name of the signing profile.
         */
        public var profileName: kotlin.String? = null
        /**
         * The version of the signing profile.
         */
        public var profileVersion: kotlin.String? = null
        /**
         * A unique identifier for the current profile revision.
         */
        public var revisionId: kotlin.String? = null
        /**
         * A unique identifier for the cross-account permission statement.
         */
        public var statementId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.signer.model.AddProfilePermissionRequest) : this() {
            this.action = x.action
            this.principal = x.principal
            this.profileName = x.profileName
            this.profileVersion = x.profileVersion
            this.revisionId = x.revisionId
            this.statementId = x.statementId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.signer.model.AddProfilePermissionRequest = AddProfilePermissionRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy