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

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

package io.github.vigoo.zioaws.swf.model
import zio.ZIO
import io.github.vigoo.zioaws.swf.model.primitives.{
  Data,
  WorkflowRunIdOptional,
  WorkflowId
}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class RequestCancelExternalWorkflowExecutionDecisionAttributes(
    workflowId: WorkflowId,
    runId: Option[WorkflowRunIdOptional] = None,
    control: Option[Data] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes = {
    import RequestCancelExternalWorkflowExecutionDecisionAttributes.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes
      .builder()
      .workflowId(workflowId: java.lang.String)
      .optionallyWith(runId.map(value => value: java.lang.String))(_.runId)
      .optionallyWith(control.map(value => value: java.lang.String))(_.control)
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes.ReadOnly =
    io.github.vigoo.zioaws.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes
      .wrap(buildAwsValue())
}
object RequestCancelExternalWorkflowExecutionDecisionAttributes {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes =
      io.github.vigoo.zioaws.swf.model
        .RequestCancelExternalWorkflowExecutionDecisionAttributes(
          workflowIdValue,
          runIdValue.map(value => value),
          controlValue.map(value => value)
        )
    def workflowIdValue: WorkflowId
    def runIdValue: Option[WorkflowRunIdOptional]
    def controlValue: Option[Data]
    def workflowId: ZIO[Any, Nothing, WorkflowId] = ZIO.succeed(workflowIdValue)
    def runId: ZIO[Any, AwsError, WorkflowRunIdOptional] =
      AwsError.unwrapOptionField("runId", runIdValue)
    def control: ZIO[Any, AwsError, Data] =
      AwsError.unwrapOptionField("control", controlValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes
  ) extends io.github.vigoo.zioaws.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes.ReadOnly {
    override def workflowIdValue: WorkflowId = impl.workflowId(): WorkflowId
    override def runIdValue: Option[WorkflowRunIdOptional] =
      scala.Option(impl.runId()).map(value => value: WorkflowRunIdOptional)
    override def controlValue: Option[Data] =
      scala.Option(impl.control()).map(value => value: Data)
  }
  def wrap(
      impl: software.amazon.awssdk.services.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes
  ): io.github.vigoo.zioaws.swf.model.RequestCancelExternalWorkflowExecutionDecisionAttributes.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy