com.pulumi.awsnative.transfer.kotlin.Agreement.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.AgreementStatus
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.AgreementStatus.Companion.toKotlin as agreementStatusToKotlin
/**
* Builder for [Agreement].
*/
@PulumiTagMarker
public class AgreementResourceBuilder internal constructor() {
public var name: String? = null
public var args: AgreementArgs = AgreementArgs()
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 AgreementArgsBuilder.() -> Unit) {
val builder = AgreementArgsBuilder()
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(): Agreement {
val builtJavaResource = com.pulumi.awsnative.transfer.Agreement(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Agreement(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Transfer::Agreement
*/
public class Agreement internal constructor(
override val javaResource: com.pulumi.awsnative.transfer.Agreement,
) : KotlinCustomResource(javaResource, AgreementMapper) {
/**
* Specifies the access role for the agreement.
*/
public val accessRole: Output
get() = javaResource.accessRole().applyValue({ args0 -> args0 })
/**
* A unique identifier for the agreement.
*/
public val agreementId: Output
get() = javaResource.agreementId().applyValue({ args0 -> args0 })
/**
* Specifies the unique Amazon Resource Name (ARN) for the agreement.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies the base directory for the agreement.
*/
public val baseDirectory: Output
get() = javaResource.baseDirectory().applyValue({ args0 -> args0 })
/**
* A textual description for the agreement.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A unique identifier for the local profile.
*/
public val localProfileId: Output
get() = javaResource.localProfileId().applyValue({ args0 -> args0 })
/**
* A unique identifier for the partner profile.
*/
public val partnerProfileId: Output
get() = javaResource.partnerProfileId().applyValue({ args0 -> args0 })
/**
* A unique identifier for the server.
*/
public val serverId: Output
get() = javaResource.serverId().applyValue({ args0 -> args0 })
/**
* Specifies the status of the agreement.
*/
public val status: Output?
get() = javaResource.status().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
agreementStatusToKotlin(args0)
})
}).orElse(null)
})
/**
* Key-value pairs that can be used to group and search for agreements. Tags are metadata attached to agreements for any purpose.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object AgreementMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.transfer.Agreement::class == javaResource::class
override fun map(javaResource: Resource): Agreement = Agreement(
javaResource as
com.pulumi.awsnative.transfer.Agreement,
)
}
/**
* @see [Agreement].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Agreement].
*/
public suspend fun agreement(name: String, block: suspend AgreementResourceBuilder.() -> Unit): Agreement {
val builder = AgreementResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Agreement].
* @param name The _unique_ name of the resulting resource.
*/
public fun agreement(name: String): Agreement {
val builder = AgreementResourceBuilder()
builder.name(name)
return builder.build()
}