
com.pulumi.awsnative.codegurureviewer.kotlin.RepositoryAssociation.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.codegurureviewer.kotlin
import com.pulumi.awsnative.codegurureviewer.kotlin.enums.RepositoryAssociationType
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
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.codegurureviewer.kotlin.enums.RepositoryAssociationType.Companion.toKotlin as repositoryAssociationTypeToKotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin
/**
* Builder for [RepositoryAssociation].
*/
@PulumiTagMarker
public class RepositoryAssociationResourceBuilder internal constructor() {
public var name: String? = null
public var args: RepositoryAssociationArgs = RepositoryAssociationArgs()
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 RepositoryAssociationArgsBuilder.() -> Unit) {
val builder = RepositoryAssociationArgsBuilder()
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(): RepositoryAssociation {
val builtJavaResource =
com.pulumi.awsnative.codegurureviewer.RepositoryAssociation(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RepositoryAssociation(builtJavaResource)
}
}
/**
* This resource schema represents the RepositoryAssociation resource in the Amazon CodeGuru Reviewer service.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class RepositoryAssociation internal constructor(
override val javaResource: com.pulumi.awsnative.codegurureviewer.RepositoryAssociation,
) : KotlinCustomResource(javaResource, RepositoryAssociationMapper) {
/**
* The Amazon Resource Name (ARN) of the repository association.
*/
public val associationArn: Output
get() = javaResource.associationArn().applyValue({ args0 -> args0 })
/**
* The name of the S3 bucket associated with an associated S3 repository. It must start with `codeguru-reviewer-`.
*/
public val bucketName: Output?
get() = javaResource.bucketName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection.
*/
public val connectionArn: Output?
get() = javaResource.connectionArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Name of the repository to be associated.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The owner of the repository. For a Bitbucket repository, this is the username for the account that owns the repository.
*/
public val owner: Output?
get() = javaResource.owner().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The tags associated with a repository association.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> createOnlyTagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The type of repository to be associated.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
repositoryAssociationTypeToKotlin(args0)
})
})
}
public object RepositoryAssociationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.codegurureviewer.RepositoryAssociation::class == javaResource::class
override fun map(javaResource: Resource): RepositoryAssociation =
RepositoryAssociation(
javaResource as
com.pulumi.awsnative.codegurureviewer.RepositoryAssociation,
)
}
/**
* @see [RepositoryAssociation].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [RepositoryAssociation].
*/
public suspend fun repositoryAssociation(
name: String,
block: suspend RepositoryAssociationResourceBuilder.() -> Unit,
): RepositoryAssociation {
val builder = RepositoryAssociationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [RepositoryAssociation].
* @param name The _unique_ name of the resulting resource.
*/
public fun repositoryAssociation(name: String): RepositoryAssociation {
val builder = RepositoryAssociationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy