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