All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes.scala Maven / Gradle / Ivy

package io.github.vigoo.zioaws.swf.model
import zio.ZIO
import io.github.vigoo.zioaws.swf.model.primitives.{EventId, Data}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class DecisionTaskCompletedEventAttributes(
    executionContext: Option[Data] = None,
    scheduledEventId: EventId,
    startedEventId: EventId
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.swf.model.DecisionTaskCompletedEventAttributes = {
    import DecisionTaskCompletedEventAttributes.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.swf.model.DecisionTaskCompletedEventAttributes
      .builder()
      .optionallyWith(executionContext.map(value => value: java.lang.String))(
        _.executionContext
      )
      .scheduledEventId(scheduledEventId: java.lang.Long)
      .startedEventId(startedEventId: java.lang.Long)
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes.ReadOnly =
    io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes
      .wrap(buildAwsValue())
}
object DecisionTaskCompletedEventAttributes {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.swf.model.DecisionTaskCompletedEventAttributes
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes =
      io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes(
        executionContextValue.map(value => value),
        scheduledEventIdValue,
        startedEventIdValue
      )
    def executionContextValue: Option[Data]
    def scheduledEventIdValue: EventId
    def startedEventIdValue: EventId
    def executionContext: ZIO[Any, AwsError, Data] =
      AwsError.unwrapOptionField("executionContext", executionContextValue)
    def scheduledEventId: ZIO[Any, Nothing, EventId] =
      ZIO.succeed(scheduledEventIdValue)
    def startedEventId: ZIO[Any, Nothing, EventId] =
      ZIO.succeed(startedEventIdValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.swf.model.DecisionTaskCompletedEventAttributes
  ) extends io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes.ReadOnly {
    override def executionContextValue: Option[Data] =
      scala.Option(impl.executionContext()).map(value => value: Data)
    override def scheduledEventIdValue: EventId =
      impl.scheduledEventId(): EventId
    override def startedEventIdValue: EventId = impl.startedEventId(): EventId
  }
  def wrap(
      impl: software.amazon.awssdk.services.swf.model.DecisionTaskCompletedEventAttributes
  ): io.github.vigoo.zioaws.swf.model.DecisionTaskCompletedEventAttributes.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy