com.pulumi.awsnative.licensemanager.kotlin.License.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.licensemanager.kotlin
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseConsumptionConfiguration
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseEntitlement
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseIssuerData
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseMetadata
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseValidityDateFormat
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.licensemanager.kotlin.outputs.LicenseConsumptionConfiguration.Companion.toKotlin as licenseConsumptionConfigurationToKotlin
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseEntitlement.Companion.toKotlin as licenseEntitlementToKotlin
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseIssuerData.Companion.toKotlin as licenseIssuerDataToKotlin
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseMetadata.Companion.toKotlin as licenseMetadataToKotlin
import com.pulumi.awsnative.licensemanager.kotlin.outputs.LicenseValidityDateFormat.Companion.toKotlin as licenseValidityDateFormatToKotlin
/**
* Builder for [License].
*/
@PulumiTagMarker
public class LicenseResourceBuilder internal constructor() {
public var name: String? = null
public var args: LicenseArgs = LicenseArgs()
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 LicenseArgsBuilder.() -> Unit) {
val builder = LicenseArgsBuilder()
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(): License {
val builtJavaResource = com.pulumi.awsnative.licensemanager.License(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return License(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::LicenseManager::License
*/
public class License internal constructor(
override val javaResource: com.pulumi.awsnative.licensemanager.License,
) : KotlinCustomResource(javaResource, LicenseMapper) {
/**
* Beneficiary of the license.
*/
public val beneficiary: Output?
get() = javaResource.beneficiary().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration for consumption of the license.
*/
public val consumptionConfiguration: Output
get() = javaResource.consumptionConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
licenseConsumptionConfigurationToKotlin(args0)
})
})
/**
* License entitlements.
*/
public val entitlements: Output>
get() = javaResource.entitlements().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
licenseEntitlementToKotlin(args0)
})
})
})
/**
* Home region for the created license.
*/
public val homeRegion: Output
get() = javaResource.homeRegion().applyValue({ args0 -> args0 })
/**
* License issuer.
*/
public val issuer: Output
get() = javaResource.issuer().applyValue({ args0 ->
args0.let({ args0 ->
licenseIssuerDataToKotlin(args0)
})
})
/**
* Amazon Resource Name is a unique name for each resource.
*/
public val licenseArn: Output
get() = javaResource.licenseArn().applyValue({ args0 -> args0 })
/**
* License metadata.
*/
public val licenseMetadata: Output>?
get() = javaResource.licenseMetadata().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> licenseMetadataToKotlin(args0) }) })
}).orElse(null)
})
/**
* Name for the created license.
*/
public val licenseName: Output
get() = javaResource.licenseName().applyValue({ args0 -> args0 })
/**
* Product name for the created license.
*/
public val productName: Output
get() = javaResource.productName().applyValue({ args0 -> args0 })
/**
* ProductSKU of the license.
*/
public val productSku: Output?
get() = javaResource.productSku().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* License status.
*/
public val status: Output?
get() = javaResource.status().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Date and time range during which the license is valid, in ISO8601-UTC format.
*/
public val validity: Output
get() = javaResource.validity().applyValue({ args0 ->
args0.let({ args0 ->
licenseValidityDateFormatToKotlin(args0)
})
})
/**
* The version of the license.
*/
public val version: Output
get() = javaResource.version().applyValue({ args0 -> args0 })
}
public object LicenseMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.licensemanager.License::class == javaResource::class
override fun map(javaResource: Resource): License = License(
javaResource as
com.pulumi.awsnative.licensemanager.License,
)
}
/**
* @see [License].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [License].
*/
public suspend fun license(name: String, block: suspend LicenseResourceBuilder.() -> Unit): License {
val builder = LicenseResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [License].
* @param name The _unique_ name of the resulting resource.
*/
public fun license(name: String): License {
val builder = LicenseResourceBuilder()
builder.name(name)
return builder.build()
}