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

com.pulumi.awsnative.b2bi.kotlin.Profile.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.b2bi.kotlin

import com.pulumi.awsnative.b2bi.kotlin.enums.ProfileLogging
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.b2bi.kotlin.enums.ProfileLogging.Companion.toKotlin as profileLoggingToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [Profile].
 */
@PulumiTagMarker
public class ProfileResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ProfileArgs = ProfileArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend ProfileArgsBuilder.() -> Unit) {
        val builder = ProfileArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Profile {
        val builtJavaResource = com.pulumi.awsnative.b2bi.Profile(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Profile(builtJavaResource)
    }
}

/**
 * Definition of AWS::B2BI::Profile Resource Type
 */
public class Profile internal constructor(
    override val javaResource: com.pulumi.awsnative.b2bi.Profile,
) : KotlinCustomResource(javaResource, ProfileMapper) {
    /**
     * Returns the name for the business associated with this profile.
     */
    public val businessName: Output
        get() = javaResource.businessName().applyValue({ args0 -> args0 })

    /**
     * Returns the timestamp for creation date and time of the profile.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    public val email: Output?
        get() = javaResource.email().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Returns the name of the logging group.
     */
    public val logGroupName: Output
        get() = javaResource.logGroupName().applyValue({ args0 -> args0 })

    /**
     * Specifies whether or not logging is enabled for this profile.
     */
    public val logging: Output
        get() = javaResource.logging().applyValue({ args0 ->
            args0.let({ args0 ->
                profileLoggingToKotlin(args0)
            })
        })

    /**
     * Returns the timestamp that identifies the most recent date and time that the profile was modified.
     */
    public val modifiedAt: Output
        get() = javaResource.modifiedAt().applyValue({ args0 -> args0 })

    /**
     * Returns the display name for profile.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val phone: Output
        get() = javaResource.phone().applyValue({ args0 -> args0 })

    /**
     * Returns an Amazon Resource Name (ARN) for the profile.
     */
    public val profileArn: Output
        get() = javaResource.profileArn().applyValue({ args0 -> args0 })

    public val profileId: Output
        get() = javaResource.profileId().applyValue({ args0 -> args0 })

    /**
     * A key-value pair for a specific profile. Tags are metadata that you can use to search for and group capabilities for various purposes.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ProfileMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.b2bi.Profile::class == javaResource::class

    override fun map(javaResource: Resource): Profile = Profile(
        javaResource as
            com.pulumi.awsnative.b2bi.Profile,
    )
}

/**
 * @see [Profile].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Profile].
 */
public suspend fun profile(name: String, block: suspend ProfileResourceBuilder.() -> Unit): Profile {
    val builder = ProfileResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Profile].
 * @param name The _unique_ name of the resulting resource.
 */
public fun profile(name: String): Profile {
    val builder = ProfileResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy