io.cloudshiftdev.awscdk.services.stepfunctions.MapBaseProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.stepfunctions
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.Any
import kotlin.Number
import kotlin.String
import kotlin.Unit
import kotlin.collections.Map
/**
* Properties for defining a Map state.
*
* 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.stepfunctions.*;
* Object itemSelector;
* Object resultSelector;
* MapBaseProps mapBaseProps = MapBaseProps.builder()
* .comment("comment")
* .inputPath("inputPath")
* .itemSelector(Map.of(
* "itemSelectorKey", itemSelector))
* .itemsPath("itemsPath")
* .maxConcurrency(123)
* .maxConcurrencyPath("maxConcurrencyPath")
* .outputPath("outputPath")
* .resultPath("resultPath")
* .resultSelector(Map.of(
* "resultSelectorKey", resultSelector))
* .stateName("stateName")
* .build();
* ```
*/
public interface MapBaseProps {
/**
* An optional description for this state.
*
* Default: No comment
*/
public fun comment(): String? = unwrap(this).getComment()
/**
* JSONPath expression to select part of the state to be the input to this state.
*
* May also be the special value JsonPath.DISCARD, which will cause the effective
* input to be the empty object {}.
*
* Default: $
*/
public fun inputPath(): String? = unwrap(this).getInputPath()
/**
* The JSON that you want to override your default iteration input (mutually exclusive with
* `parameters`).
*
* Default: $
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html)
*/
public fun itemSelector(): Map = unwrap(this).getItemSelector() ?: emptyMap()
/**
* JSONPath expression to select the array to iterate over.
*
* Default: $
*/
public fun itemsPath(): String? = unwrap(this).getItemsPath()
/**
* MaxConcurrency.
*
* An upper bound on the number of iterations you want running at once.
*
* Default: - full concurrency
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields)
*/
public fun maxConcurrency(): Number? = unwrap(this).getMaxConcurrency()
/**
* MaxConcurrencyPath.
*
* A JsonPath that specifies the maximum concurrency dynamically from the state input.
*
* Default: - full concurrency
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields)
*/
public fun maxConcurrencyPath(): String? = unwrap(this).getMaxConcurrencyPath()
/**
* JSONPath expression to select part of the state to be the output to this state.
*
* May also be the special value JsonPath.DISCARD, which will cause the effective
* output to be the empty object {}.
*
* Default: $
*/
public fun outputPath(): String? = unwrap(this).getOutputPath()
/**
* JSONPath expression to indicate where to inject the state's output.
*
* May also be the special value JsonPath.DISCARD, which will cause the state's
* input to become its output.
*
* Default: $
*/
public fun resultPath(): String? = unwrap(this).getResultPath()
/**
* The JSON that will replace the state's raw result and become the effective result before
* ResultPath is applied.
*
* You can use ResultSelector to create a payload with values that are static
* or selected from the state's raw result.
*
* Default: - None
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector)
*/
public fun resultSelector(): Map = unwrap(this).getResultSelector() ?: emptyMap()
/**
* Optional name for this state.
*
* Default: - The construct ID will be used as state name
*/
public fun stateName(): String? = unwrap(this).getStateName()
/**
* A builder for [MapBaseProps]
*/
@CdkDslMarker
public interface Builder {
/**
* @param comment An optional description for this state.
*/
public fun comment(comment: String)
/**
* @param inputPath JSONPath expression to select part of the state to be the input to this
* state.
* May also be the special value JsonPath.DISCARD, which will cause the effective
* input to be the empty object {}.
*/
public fun inputPath(inputPath: String)
/**
* @param itemSelector The JSON that you want to override your default iteration input (mutually
* exclusive with `parameters`).
*/
public fun itemSelector(itemSelector: Map)
/**
* @param itemsPath JSONPath expression to select the array to iterate over.
*/
public fun itemsPath(itemsPath: String)
/**
* @param maxConcurrency MaxConcurrency.
* An upper bound on the number of iterations you want running at once.
*/
public fun maxConcurrency(maxConcurrency: Number)
/**
* @param maxConcurrencyPath MaxConcurrencyPath.
* A JsonPath that specifies the maximum concurrency dynamically from the state input.
*/
public fun maxConcurrencyPath(maxConcurrencyPath: String)
/**
* @param outputPath JSONPath expression to select part of the state to be the output to this
* state.
* May also be the special value JsonPath.DISCARD, which will cause the effective
* output to be the empty object {}.
*/
public fun outputPath(outputPath: String)
/**
* @param resultPath JSONPath expression to indicate where to inject the state's output.
* May also be the special value JsonPath.DISCARD, which will cause the state's
* input to become its output.
*/
public fun resultPath(resultPath: String)
/**
* @param resultSelector The JSON that will replace the state's raw result and become the
* effective result before ResultPath is applied.
* You can use ResultSelector to create a payload with values that are static
* or selected from the state's raw result.
*/
public fun resultSelector(resultSelector: Map)
/**
* @param stateName Optional name for this state.
*/
public fun stateName(stateName: String)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.stepfunctions.MapBaseProps.Builder =
software.amazon.awscdk.services.stepfunctions.MapBaseProps.builder()
/**
* @param comment An optional description for this state.
*/
override fun comment(comment: String) {
cdkBuilder.comment(comment)
}
/**
* @param inputPath JSONPath expression to select part of the state to be the input to this
* state.
* May also be the special value JsonPath.DISCARD, which will cause the effective
* input to be the empty object {}.
*/
override fun inputPath(inputPath: String) {
cdkBuilder.inputPath(inputPath)
}
/**
* @param itemSelector The JSON that you want to override your default iteration input (mutually
* exclusive with `parameters`).
*/
override fun itemSelector(itemSelector: Map) {
cdkBuilder.itemSelector(itemSelector.mapValues{CdkObjectWrappers.unwrap(it.value)})
}
/**
* @param itemsPath JSONPath expression to select the array to iterate over.
*/
override fun itemsPath(itemsPath: String) {
cdkBuilder.itemsPath(itemsPath)
}
/**
* @param maxConcurrency MaxConcurrency.
* An upper bound on the number of iterations you want running at once.
*/
override fun maxConcurrency(maxConcurrency: Number) {
cdkBuilder.maxConcurrency(maxConcurrency)
}
/**
* @param maxConcurrencyPath MaxConcurrencyPath.
* A JsonPath that specifies the maximum concurrency dynamically from the state input.
*/
override fun maxConcurrencyPath(maxConcurrencyPath: String) {
cdkBuilder.maxConcurrencyPath(maxConcurrencyPath)
}
/**
* @param outputPath JSONPath expression to select part of the state to be the output to this
* state.
* May also be the special value JsonPath.DISCARD, which will cause the effective
* output to be the empty object {}.
*/
override fun outputPath(outputPath: String) {
cdkBuilder.outputPath(outputPath)
}
/**
* @param resultPath JSONPath expression to indicate where to inject the state's output.
* May also be the special value JsonPath.DISCARD, which will cause the state's
* input to become its output.
*/
override fun resultPath(resultPath: String) {
cdkBuilder.resultPath(resultPath)
}
/**
* @param resultSelector The JSON that will replace the state's raw result and become the
* effective result before ResultPath is applied.
* You can use ResultSelector to create a payload with values that are static
* or selected from the state's raw result.
*/
override fun resultSelector(resultSelector: Map) {
cdkBuilder.resultSelector(resultSelector.mapValues{CdkObjectWrappers.unwrap(it.value)})
}
/**
* @param stateName Optional name for this state.
*/
override fun stateName(stateName: String) {
cdkBuilder.stateName(stateName)
}
public fun build(): software.amazon.awscdk.services.stepfunctions.MapBaseProps =
cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.stepfunctions.MapBaseProps,
) : CdkObject(cdkObject),
MapBaseProps {
/**
* An optional description for this state.
*
* Default: No comment
*/
override fun comment(): String? = unwrap(this).getComment()
/**
* JSONPath expression to select part of the state to be the input to this state.
*
* May also be the special value JsonPath.DISCARD, which will cause the effective
* input to be the empty object {}.
*
* Default: $
*/
override fun inputPath(): String? = unwrap(this).getInputPath()
/**
* The JSON that you want to override your default iteration input (mutually exclusive with
* `parameters`).
*
* Default: $
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html)
*/
override fun itemSelector(): Map = unwrap(this).getItemSelector() ?: emptyMap()
/**
* JSONPath expression to select the array to iterate over.
*
* Default: $
*/
override fun itemsPath(): String? = unwrap(this).getItemsPath()
/**
* MaxConcurrency.
*
* An upper bound on the number of iterations you want running at once.
*
* Default: - full concurrency
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields)
*/
override fun maxConcurrency(): Number? = unwrap(this).getMaxConcurrency()
/**
* MaxConcurrencyPath.
*
* A JsonPath that specifies the maximum concurrency dynamically from the state input.
*
* Default: - full concurrency
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-additional-fields)
*/
override fun maxConcurrencyPath(): String? = unwrap(this).getMaxConcurrencyPath()
/**
* JSONPath expression to select part of the state to be the output to this state.
*
* May also be the special value JsonPath.DISCARD, which will cause the effective
* output to be the empty object {}.
*
* Default: $
*/
override fun outputPath(): String? = unwrap(this).getOutputPath()
/**
* JSONPath expression to indicate where to inject the state's output.
*
* May also be the special value JsonPath.DISCARD, which will cause the state's
* input to become its output.
*
* Default: $
*/
override fun resultPath(): String? = unwrap(this).getResultPath()
/**
* The JSON that will replace the state's raw result and become the effective result before
* ResultPath is applied.
*
* You can use ResultSelector to create a payload with values that are static
* or selected from the state's raw result.
*
* Default: - None
*
* [Documentation](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector)
*/
override fun resultSelector(): Map = unwrap(this).getResultSelector() ?: emptyMap()
/**
* Optional name for this state.
*
* Default: - The construct ID will be used as state name
*/
override fun stateName(): String? = unwrap(this).getStateName()
}
public companion object {
public operator fun invoke(block: Builder.() -> Unit = {}): MapBaseProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.stepfunctions.MapBaseProps):
MapBaseProps = CdkObjectWrappers.wrap(cdkObject) as? MapBaseProps ?: Wrapper(cdkObject)
internal fun unwrap(wrapped: MapBaseProps):
software.amazon.awscdk.services.stepfunctions.MapBaseProps = (wrapped as
CdkObject).cdkObject as software.amazon.awscdk.services.stepfunctions.MapBaseProps
}
}