io.cloudshiftdev.awscdk.services.gamelift.CfnLocation.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.gamelift
import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.CfnTag
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.ITaggable
import io.cloudshiftdev.awscdk.TagManager
import io.cloudshiftdev.awscdk.TreeInspector
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct
/**
* The AWS::GameLift::Location resource creates a custom location for use in an Anywhere fleet.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.services.gamelift.*;
* CfnLocation cfnLocation = CfnLocation.Builder.create(this, "MyCfnLocation")
* .locationName("locationName")
* // the properties below are optional
* .tags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
* ```
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html)
*/
public open class CfnLocation(
cdkObject: software.amazon.awscdk.services.gamelift.CfnLocation,
) : CfnResource(cdkObject),
IInspectable,
ITaggable {
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLocationProps,
) :
this(software.amazon.awscdk.services.gamelift.CfnLocation(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
id, props.let(CfnLocationProps.Companion::unwrap))
)
public constructor(
scope: CloudshiftdevConstructsConstruct,
id: String,
props: CfnLocationProps.Builder.() -> Unit,
) : this(scope, id, CfnLocationProps(props)
)
/**
* A unique identifier for the custom location.
*
* For example,
* `arn:aws:gamelift:[region]::location/location-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912` .
*/
public open fun attrLocationArn(): String = unwrap(this).getAttrLocationArn()
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector tree inspector to collect and process attributes.
*/
public override fun inspect(inspector: TreeInspector) {
unwrap(this).inspect(inspector.let(TreeInspector.Companion::unwrap))
}
/**
* A descriptive name for the custom location.
*/
public open fun locationName(): String = unwrap(this).getLocationName()
/**
* A descriptive name for the custom location.
*/
public open fun locationName(`value`: String) {
unwrap(this).setLocationName(`value`)
}
/**
* Tag Manager which manages the tags for this resource.
*/
public override fun tags(): TagManager = unwrap(this).getTags().let(TagManager::wrap)
/**
* A list of labels to assign to the new resource.
*/
public open fun tagsRaw(): List = unwrap(this).getTagsRaw()?.map(CfnTag::wrap) ?:
emptyList()
/**
* A list of labels to assign to the new resource.
*/
public open fun tagsRaw(`value`: List) {
unwrap(this).setTagsRaw(`value`.map(CfnTag.Companion::unwrap))
}
/**
* A list of labels to assign to the new resource.
*/
public open fun tagsRaw(vararg `value`: CfnTag): Unit = tagsRaw(`value`.toList())
/**
* A fluent builder for [io.cloudshiftdev.awscdk.services.gamelift.CfnLocation].
*/
@CdkDslMarker
public interface Builder {
/**
* A descriptive name for the custom location.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-locationname)
* @param locationName A descriptive name for the custom location.
*/
public fun locationName(locationName: String)
/**
* A list of labels to assign to the new resource.
*
* Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource
* management, access management, and cost allocation. For more information, see [Tagging AWS
* Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General
* Rareference* .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-tags)
* @param tags A list of labels to assign to the new resource.
*/
public fun tags(tags: List)
/**
* A list of labels to assign to the new resource.
*
* Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource
* management, access management, and cost allocation. For more information, see [Tagging AWS
* Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General
* Rareference* .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-tags)
* @param tags A list of labels to assign to the new resource.
*/
public fun tags(vararg tags: CfnTag)
}
private class BuilderImpl(
scope: SoftwareConstructsConstruct,
id: String,
) : Builder {
private val cdkBuilder: software.amazon.awscdk.services.gamelift.CfnLocation.Builder =
software.amazon.awscdk.services.gamelift.CfnLocation.Builder.create(scope, id)
/**
* A descriptive name for the custom location.
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-locationname)
* @param locationName A descriptive name for the custom location.
*/
override fun locationName(locationName: String) {
cdkBuilder.locationName(locationName)
}
/**
* A list of labels to assign to the new resource.
*
* Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource
* management, access management, and cost allocation. For more information, see [Tagging AWS
* Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General
* Rareference* .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-tags)
* @param tags A list of labels to assign to the new resource.
*/
override fun tags(tags: List) {
cdkBuilder.tags(tags.map(CfnTag.Companion::unwrap))
}
/**
* A list of labels to assign to the new resource.
*
* Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource
* management, access management, and cost allocation. For more information, see [Tagging AWS
* Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General
* Rareference* .
*
* [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-location.html#cfn-gamelift-location-tags)
* @param tags A list of labels to assign to the new resource.
*/
override fun tags(vararg tags: CfnTag): Unit = tags(tags.toList())
public fun build(): software.amazon.awscdk.services.gamelift.CfnLocation = cdkBuilder.build()
}
public companion object {
public val CFN_RESOURCE_TYPE_NAME: String =
software.amazon.awscdk.services.gamelift.CfnLocation.CFN_RESOURCE_TYPE_NAME
public operator fun invoke(
scope: CloudshiftdevConstructsConstruct,
id: String,
block: Builder.() -> Unit = {},
): CfnLocation {
val builderImpl = BuilderImpl(CloudshiftdevConstructsConstruct.unwrap(scope), id)
return CfnLocation(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.gamelift.CfnLocation): CfnLocation
= CfnLocation(cdkObject)
internal fun unwrap(wrapped: CfnLocation): software.amazon.awscdk.services.gamelift.CfnLocation
= wrapped.cdkObject as software.amazon.awscdk.services.gamelift.CfnLocation
}
}