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

com.pulumi.awsnative.verifiedpermissions.kotlin.PolicyArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.verifiedpermissions.kotlin

import com.pulumi.awsnative.verifiedpermissions.PolicyArgs.builder
import com.pulumi.awsnative.verifiedpermissions.kotlin.inputs.PolicyDefinition0PropertiesArgs
import com.pulumi.awsnative.verifiedpermissions.kotlin.inputs.PolicyDefinition1PropertiesArgs
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Definition of AWS::VerifiedPermissions::Policy Resource Type
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property definition Specifies the policy type and content to use for the new or updated policy. The definition structure must include either a `Static` or a `TemplateLinked` element.
 * @property policyStoreId Specifies the `PolicyStoreId` of the policy store you want to store the policy in.
 */
public data class PolicyArgs(
    public val definition: Output>? = null,
    public val policyStoreId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.verifiedpermissions.PolicyArgs =
        com.pulumi.awsnative.verifiedpermissions.PolicyArgs.builder()
            .definition(
                definition?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .policyStoreId(policyStoreId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PolicyArgs].
 */
@PulumiTagMarker
public class PolicyArgsBuilder internal constructor() {
    private var definition:
        Output>? = null

    private var policyStoreId: Output? = null

    /**
     * @param value Specifies the policy type and content to use for the new or updated policy. The definition structure must include either a `Static` or a `TemplateLinked` element.
     */
    @JvmName("aikrcsmtkpytuocf")
    public suspend fun definition(`value`: Output>) {
        this.definition = value
    }

    /**
     * @param value Specifies the `PolicyStoreId` of the policy store you want to store the policy in.
     */
    @JvmName("exixurbdektwecom")
    public suspend fun policyStoreId(`value`: Output) {
        this.policyStoreId = value
    }

    /**
     * @param value Specifies the policy type and content to use for the new or updated policy. The definition structure must include either a `Static` or a `TemplateLinked` element.
     */
    @JvmName("hbqfvuubgxwqssqp")
    public suspend fun definition(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.definition = mapped
    }

    /**
     * @param value Specifies the policy type and content to use for the new or updated policy. The definition structure must include either a `Static` or a `TemplateLinked` element.
     */
    @JvmName("wecutikgeferfgwc")
    public fun definition(`value`: PolicyDefinition0PropertiesArgs) {
        val toBeMapped = Either.ofLeft<
            PolicyDefinition0PropertiesArgs,
            PolicyDefinition1PropertiesArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.definition = mapped
    }

    /**
     * @param value Specifies the policy type and content to use for the new or updated policy. The definition structure must include either a `Static` or a `TemplateLinked` element.
     */
    @JvmName("lttdvfabwjobaksl")
    public fun definition(`value`: PolicyDefinition1PropertiesArgs) {
        val toBeMapped = Either.ofRight<
            PolicyDefinition0PropertiesArgs,
            PolicyDefinition1PropertiesArgs,
            >(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.definition = mapped
    }

    /**
     * @param value Specifies the `PolicyStoreId` of the policy store you want to store the policy in.
     */
    @JvmName("cdrrlrfipeebjqmq")
    public suspend fun policyStoreId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyStoreId = mapped
    }

    internal fun build(): PolicyArgs = PolicyArgs(
        definition = definition,
        policyStoreId = policyStoreId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy