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

com.pulumi.azurenative.keyvault.kotlin.inputs.KeyPropertiesArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.keyvault.kotlin.inputs

import com.pulumi.azurenative.keyvault.inputs.KeyPropertiesArgs.builder
import com.pulumi.azurenative.keyvault.kotlin.enums.JsonWebKeyCurveName
import com.pulumi.azurenative.keyvault.kotlin.enums.JsonWebKeyOperation
import com.pulumi.azurenative.keyvault.kotlin.enums.JsonWebKeyType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The properties of the key.
 * @property attributes The attributes of the key.
 * @property curveName The elliptic curve name. For valid values, see JsonWebKeyCurveName.
 * @property keyOps
 * @property keySize The key size in bits. For example: 2048, 3072, or 4096 for RSA.
 * @property kty The type of the key. For valid values, see JsonWebKeyType.
 * @property releasePolicy Key release policy in response. It will be used for both output and input. Omitted if empty
 * @property rotationPolicy Key rotation policy in response. It will be used for both output and input. Omitted if empty
 */
public data class KeyPropertiesArgs(
    public val attributes: Output? = null,
    public val curveName: Output>? = null,
    public val keyOps: Output>>? = null,
    public val keySize: Output? = null,
    public val kty: Output>? = null,
    public val releasePolicy: Output? = null,
    public val rotationPolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.keyvault.inputs.KeyPropertiesArgs =
        com.pulumi.azurenative.keyvault.inputs.KeyPropertiesArgs.builder()
            .attributes(attributes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .curveName(
                curveName?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .keyOps(
                keyOps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .keySize(keySize?.applyValue({ args0 -> args0 }))
            .kty(
                kty?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .releasePolicy(releasePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .rotationPolicy(
                rotationPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [KeyPropertiesArgs].
 */
@PulumiTagMarker
public class KeyPropertiesArgsBuilder internal constructor() {
    private var attributes: Output? = null

    private var curveName: Output>? = null

    private var keyOps: Output>>? = null

    private var keySize: Output? = null

    private var kty: Output>? = null

    private var releasePolicy: Output? = null

    private var rotationPolicy: Output? = null

    /**
     * @param value The attributes of the key.
     */
    @JvmName("cqmuvqqqklvjooda")
    public suspend fun attributes(`value`: Output) {
        this.attributes = value
    }

    /**
     * @param value The elliptic curve name. For valid values, see JsonWebKeyCurveName.
     */
    @JvmName("hmlbdkapoiaflnst")
    public suspend fun curveName(`value`: Output>) {
        this.curveName = value
    }

    /**
     * @param value
     */
    @JvmName("iytawyktfjblkbmc")
    public suspend fun keyOps(`value`: Output>>) {
        this.keyOps = value
    }

    @JvmName("moqmmysahntlauxw")
    public suspend fun keyOps(vararg values: Output>) {
        this.keyOps = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("vqymdvttbwsaobmx")
    public suspend fun keyOps(values: List>>) {
        this.keyOps = Output.all(values)
    }

    /**
     * @param value The key size in bits. For example: 2048, 3072, or 4096 for RSA.
     */
    @JvmName("xjuojbpfdkkphebs")
    public suspend fun keySize(`value`: Output) {
        this.keySize = value
    }

    /**
     * @param value The type of the key. For valid values, see JsonWebKeyType.
     */
    @JvmName("forxgtmlskwllmos")
    public suspend fun kty(`value`: Output>) {
        this.kty = value
    }

    /**
     * @param value Key release policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("jbabnvgvrdjblvgx")
    public suspend fun releasePolicy(`value`: Output) {
        this.releasePolicy = value
    }

    /**
     * @param value Key rotation policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("ycxvhitvcqyasuog")
    public suspend fun rotationPolicy(`value`: Output) {
        this.rotationPolicy = value
    }

    /**
     * @param value The attributes of the key.
     */
    @JvmName("ogjogxhejiysjivx")
    public suspend fun attributes(`value`: KeyAttributesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param argument The attributes of the key.
     */
    @JvmName("tksjdvnjsubsbigm")
    public suspend fun attributes(argument: suspend KeyAttributesArgsBuilder.() -> Unit) {
        val toBeMapped = KeyAttributesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param value The elliptic curve name. For valid values, see JsonWebKeyCurveName.
     */
    @JvmName("iquogbqkcsrgnuni")
    public suspend fun curveName(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.curveName = mapped
    }

    /**
     * @param value The elliptic curve name. For valid values, see JsonWebKeyCurveName.
     */
    @JvmName("jiqhukgjyfmoyrbe")
    public fun curveName(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.curveName = mapped
    }

    /**
     * @param value The elliptic curve name. For valid values, see JsonWebKeyCurveName.
     */
    @JvmName("dgdetatkiycpmquu")
    public fun curveName(`value`: JsonWebKeyCurveName) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.curveName = mapped
    }

    /**
     * @param value
     */
    @JvmName("mdmgskyjfraxqffp")
    public suspend fun keyOps(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyOps = mapped
    }

    /**
     * @param values
     */
    @JvmName("ndrngwuwkehjvneb")
    public suspend fun keyOps(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keyOps = mapped
    }

    /**
     * @param value The key size in bits. For example: 2048, 3072, or 4096 for RSA.
     */
    @JvmName("chnknlhvyayumwbw")
    public suspend fun keySize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keySize = mapped
    }

    /**
     * @param value The type of the key. For valid values, see JsonWebKeyType.
     */
    @JvmName("ypnurdwwjcnwafej")
    public suspend fun kty(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kty = mapped
    }

    /**
     * @param value The type of the key. For valid values, see JsonWebKeyType.
     */
    @JvmName("hctavyxjsqkncjha")
    public fun kty(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kty = mapped
    }

    /**
     * @param value The type of the key. For valid values, see JsonWebKeyType.
     */
    @JvmName("xjlyupbcrknykxwm")
    public fun kty(`value`: JsonWebKeyType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kty = mapped
    }

    /**
     * @param value Key release policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("qudgjeunqrlmwnac")
    public suspend fun releasePolicy(`value`: KeyReleasePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.releasePolicy = mapped
    }

    /**
     * @param argument Key release policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("yqkmvweiygikrmms")
    public suspend fun releasePolicy(argument: suspend KeyReleasePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = KeyReleasePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.releasePolicy = mapped
    }

    /**
     * @param value Key rotation policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("iuggrvchstpffoai")
    public suspend fun rotationPolicy(`value`: RotationPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rotationPolicy = mapped
    }

    /**
     * @param argument Key rotation policy in response. It will be used for both output and input. Omitted if empty
     */
    @JvmName("mmksunlahtknpxmn")
    public suspend fun rotationPolicy(argument: suspend RotationPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RotationPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.rotationPolicy = mapped
    }

    internal fun build(): KeyPropertiesArgs = KeyPropertiesArgs(
        attributes = attributes,
        curveName = curveName,
        keyOps = keyOps,
        keySize = keySize,
        kty = kty,
        releasePolicy = releasePolicy,
        rotationPolicy = rotationPolicy,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy