io.cloudshiftdev.awscdk.services.stepfunctions.SucceedProps.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.String
import kotlin.Unit
/**
* Properties for defining a Succeed 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.*;
* SucceedProps succeedProps = SucceedProps.builder()
* .comment("comment")
* .inputPath("inputPath")
* .outputPath("outputPath")
* .stateName("stateName")
* .build();
* ```
*/
public interface SucceedProps {
/**
* 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()
/**
* 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()
/**
* 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 [SucceedProps]
*/
@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 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 stateName Optional name for this state.
*/
public fun stateName(stateName: String)
}
private class BuilderImpl : Builder {
private val cdkBuilder: software.amazon.awscdk.services.stepfunctions.SucceedProps.Builder =
software.amazon.awscdk.services.stepfunctions.SucceedProps.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 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 stateName Optional name for this state.
*/
override fun stateName(stateName: String) {
cdkBuilder.stateName(stateName)
}
public fun build(): software.amazon.awscdk.services.stepfunctions.SucceedProps =
cdkBuilder.build()
}
private class Wrapper(
cdkObject: software.amazon.awscdk.services.stepfunctions.SucceedProps,
) : CdkObject(cdkObject),
SucceedProps {
/**
* 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()
/**
* 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()
/**
* 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 = {}): SucceedProps {
val builderImpl = BuilderImpl()
return Wrapper(builderImpl.apply(block).build())
}
internal fun wrap(cdkObject: software.amazon.awscdk.services.stepfunctions.SucceedProps):
SucceedProps = CdkObjectWrappers.wrap(cdkObject) as? SucceedProps ?: Wrapper(cdkObject)
internal fun unwrap(wrapped: SucceedProps):
software.amazon.awscdk.services.stepfunctions.SucceedProps = (wrapped as
CdkObject).cdkObject as software.amazon.awscdk.services.stepfunctions.SucceedProps
}
}