
io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes.scala Maven / Gradle / Ivy
package io.github.vigoo.zioaws.swf.model
import zio.ZIO
import io.github.vigoo.zioaws.swf.model.primitives.{Data, EventId}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class LambdaFunctionCompletedEventAttributes(
scheduledEventId: EventId,
startedEventId: EventId,
result: Option[Data] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.swf.model.LambdaFunctionCompletedEventAttributes = {
import LambdaFunctionCompletedEventAttributes.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.swf.model.LambdaFunctionCompletedEventAttributes
.builder()
.scheduledEventId(scheduledEventId: java.lang.Long)
.startedEventId(startedEventId: java.lang.Long)
.optionallyWith(result.map(value => value: java.lang.String))(_.result)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes.ReadOnly =
io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes
.wrap(buildAwsValue())
}
object LambdaFunctionCompletedEventAttributes {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.swf.model.LambdaFunctionCompletedEventAttributes
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes =
io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes(
scheduledEventIdValue,
startedEventIdValue,
resultValue.map(value => value)
)
def scheduledEventIdValue: EventId
def startedEventIdValue: EventId
def resultValue: Option[Data]
def scheduledEventId: ZIO[Any, Nothing, EventId] =
ZIO.succeed(scheduledEventIdValue)
def startedEventId: ZIO[Any, Nothing, EventId] =
ZIO.succeed(startedEventIdValue)
def result: ZIO[Any, AwsError, Data] =
AwsError.unwrapOptionField("result", resultValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.swf.model.LambdaFunctionCompletedEventAttributes
) extends io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes.ReadOnly {
override def scheduledEventIdValue: EventId =
impl.scheduledEventId(): EventId
override def startedEventIdValue: EventId = impl.startedEventId(): EventId
override def resultValue: Option[Data] =
scala.Option(impl.result()).map(value => value: Data)
}
def wrap(
impl: software.amazon.awssdk.services.swf.model.LambdaFunctionCompletedEventAttributes
): io.github.vigoo.zioaws.swf.model.LambdaFunctionCompletedEventAttributes.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy