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

com.pulumi.googlenative.privateca.v1.kotlin.inputs.SubjectConfigArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.privateca.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.privateca.v1.inputs.SubjectConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * These values are used to create the distinguished name and subject alternative name fields in an X.509 certificate.
 * @property subject Contains distinguished name fields such as the common name, location and organization.
 * @property subjectAltName Optional. The subject alternative name fields.
 */
public data class SubjectConfigArgs(
    public val subject: Output,
    public val subjectAltName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.privateca.v1.inputs.SubjectConfigArgs =
        com.pulumi.googlenative.privateca.v1.inputs.SubjectConfigArgs.builder()
            .subject(subject.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .subjectAltName(
                subjectAltName?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [SubjectConfigArgs].
 */
@PulumiTagMarker
public class SubjectConfigArgsBuilder internal constructor() {
    private var subject: Output? = null

    private var subjectAltName: Output? = null

    /**
     * @param value Contains distinguished name fields such as the common name, location and organization.
     */
    @JvmName("dbvuerqvhiwkncvc")
    public suspend fun subject(`value`: Output) {
        this.subject = value
    }

    /**
     * @param value Optional. The subject alternative name fields.
     */
    @JvmName("syyvhwvxnexcvkpg")
    public suspend fun subjectAltName(`value`: Output) {
        this.subjectAltName = value
    }

    /**
     * @param value Contains distinguished name fields such as the common name, location and organization.
     */
    @JvmName("uulmlarwqypflmqk")
    public suspend fun subject(`value`: SubjectArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subject = mapped
    }

    /**
     * @param argument Contains distinguished name fields such as the common name, location and organization.
     */
    @JvmName("cwkyultruphitrcf")
    public suspend fun subject(argument: suspend SubjectArgsBuilder.() -> Unit) {
        val toBeMapped = SubjectArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subject = mapped
    }

    /**
     * @param value Optional. The subject alternative name fields.
     */
    @JvmName("oavudjqioyqeimiu")
    public suspend fun subjectAltName(`value`: SubjectAltNamesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subjectAltName = mapped
    }

    /**
     * @param argument Optional. The subject alternative name fields.
     */
    @JvmName("lxebgjbxypaawcnv")
    public suspend fun subjectAltName(argument: suspend SubjectAltNamesArgsBuilder.() -> Unit) {
        val toBeMapped = SubjectAltNamesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subjectAltName = mapped
    }

    internal fun build(): SubjectConfigArgs = SubjectConfigArgs(
        subject = subject ?: throw PulumiNullFieldException("subject"),
        subjectAltName = subjectAltName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy