io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-sfn_2.13 Show documentation
Show all versions of zio-aws-sfn_2.13 Show documentation
Low-level AWS wrapper for ZIO
package io.github.vigoo.zioaws.sfn.model
import zio.ZIO
import java.time.Instant
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import io.github.vigoo.zioaws.sfn.model.primitives.{
Timestamp,
Definition,
Name,
Arn
}
import scala.jdk.CollectionConverters._
final case class DescribeStateMachineForExecutionResponse(
stateMachineArn: Arn,
name: Name,
definition: Definition,
roleArn: Arn,
updateDate: Timestamp,
loggingConfiguration: Option[
io.github.vigoo.zioaws.sfn.model.LoggingConfiguration
] = None,
tracingConfiguration: Option[
io.github.vigoo.zioaws.sfn.model.TracingConfiguration
] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse = {
import DescribeStateMachineForExecutionResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse
.builder()
.stateMachineArn(stateMachineArn: java.lang.String)
.name(name: java.lang.String)
.definition(definition: java.lang.String)
.roleArn(roleArn: java.lang.String)
.updateDate(updateDate: Instant)
.optionallyWith(loggingConfiguration.map(value => value.buildAwsValue()))(
_.loggingConfiguration
)
.optionallyWith(tracingConfiguration.map(value => value.buildAwsValue()))(
_.tracingConfiguration
)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse.ReadOnly =
io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse
.wrap(buildAwsValue())
}
object DescribeStateMachineForExecutionResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse =
io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse(
stateMachineArnValue,
nameValue,
definitionValue,
roleArnValue,
updateDateValue,
loggingConfigurationValue.map(value => value.editable),
tracingConfigurationValue.map(value => value.editable)
)
def stateMachineArnValue: Arn
def nameValue: Name
def definitionValue: Definition
def roleArnValue: Arn
def updateDateValue: Timestamp
def loggingConfigurationValue
: Option[io.github.vigoo.zioaws.sfn.model.LoggingConfiguration.ReadOnly]
def tracingConfigurationValue
: Option[io.github.vigoo.zioaws.sfn.model.TracingConfiguration.ReadOnly]
def stateMachineArn: ZIO[Any, Nothing, Arn] =
ZIO.succeed(stateMachineArnValue)
def name: ZIO[Any, Nothing, Name] = ZIO.succeed(nameValue)
def definition: ZIO[Any, Nothing, Definition] = ZIO.succeed(definitionValue)
def roleArn: ZIO[Any, Nothing, Arn] = ZIO.succeed(roleArnValue)
def updateDate: ZIO[Any, Nothing, Timestamp] = ZIO.succeed(updateDateValue)
def loggingConfiguration: ZIO[
Any,
AwsError,
io.github.vigoo.zioaws.sfn.model.LoggingConfiguration.ReadOnly
] = AwsError.unwrapOptionField(
"loggingConfiguration",
loggingConfigurationValue
)
def tracingConfiguration: ZIO[
Any,
AwsError,
io.github.vigoo.zioaws.sfn.model.TracingConfiguration.ReadOnly
] = AwsError.unwrapOptionField(
"tracingConfiguration",
tracingConfigurationValue
)
}
private class Wrapper(
impl: software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse
) extends io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse.ReadOnly {
override def stateMachineArnValue: Arn = impl.stateMachineArn(): Arn
override def nameValue: Name = impl.name(): Name
override def definitionValue: Definition = impl.definition(): Definition
override def roleArnValue: Arn = impl.roleArn(): Arn
override def updateDateValue: Timestamp = impl.updateDate(): Timestamp
override def loggingConfigurationValue: Option[
io.github.vigoo.zioaws.sfn.model.LoggingConfiguration.ReadOnly
] = scala
.Option(impl.loggingConfiguration())
.map(value =>
io.github.vigoo.zioaws.sfn.model.LoggingConfiguration.wrap(value)
)
override def tracingConfigurationValue: Option[
io.github.vigoo.zioaws.sfn.model.TracingConfiguration.ReadOnly
] = scala
.Option(impl.tracingConfiguration())
.map(value =>
io.github.vigoo.zioaws.sfn.model.TracingConfiguration.wrap(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse
): io.github.vigoo.zioaws.sfn.model.DescribeStateMachineForExecutionResponse.ReadOnly =
new Wrapper(impl)
}