com.pulumi.awsnative.transfer.kotlin.Profile.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.transfer.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.transfer.kotlin.enums.ProfileType
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.transfer.kotlin.enums.ProfileType.Companion.toKotlin as profileTypeToKotlin
/**
* 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.transfer.Profile(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Profile(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Transfer::Profile
*/
public class Profile internal constructor(
override val javaResource: com.pulumi.awsnative.transfer.Profile,
) : KotlinCustomResource(javaResource, ProfileMapper) {
/**
* Specifies the unique Amazon Resource Name (ARN) for the profile.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* AS2 identifier agreed with a trading partner.
*/
public val as2Id: Output
get() = javaResource.as2Id().applyValue({ args0 -> args0 })
/**
* List of the certificate IDs associated with this profile to be used for encryption and signing of AS2 messages.
*/
public val certificateIds: Output>?
get() = javaResource.certificateIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* A unique identifier for the profile
*/
public val profileId: Output
get() = javaResource.profileId().applyValue({ args0 -> args0 })
/**
* Enum specifying whether the profile is local or associated with a trading partner.
*/
public val profileType: Output
get() = javaResource.profileType().applyValue({ args0 ->
args0.let({ args0 ->
profileTypeToKotlin(args0)
})
})
/**
* An array of key-value pairs to apply to this resource.
*/
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.transfer.Profile::class == javaResource::class
override fun map(javaResource: Resource): Profile = Profile(
javaResource as
com.pulumi.awsnative.transfer.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()
}