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

zio.aws.codepipeline.model.ActionExecutionResult.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.codepipeline.model
import zio.aws.codepipeline.model.primitives.{
  Url,
  ExternalExecutionSummary,
  ExternalExecutionId
}
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class ActionExecutionResult(
    externalExecutionId: Optional[ExternalExecutionId] = Optional.Absent,
    externalExecutionSummary: Optional[ExternalExecutionSummary] =
      Optional.Absent,
    externalExecutionUrl: Optional[Url] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.codepipeline.model.ActionExecutionResult = {
    import ActionExecutionResult.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.codepipeline.model.ActionExecutionResult
      .builder()
      .optionallyWith(
        externalExecutionId.map(value =>
          ExternalExecutionId.unwrap(value): java.lang.String
        )
      )(_.externalExecutionId)
      .optionallyWith(
        externalExecutionSummary.map(value =>
          ExternalExecutionSummary.unwrap(value): java.lang.String
        )
      )(_.externalExecutionSummary)
      .optionallyWith(
        externalExecutionUrl.map(value => Url.unwrap(value): java.lang.String)
      )(_.externalExecutionUrl)
      .build()
  }
  def asReadOnly: zio.aws.codepipeline.model.ActionExecutionResult.ReadOnly =
    zio.aws.codepipeline.model.ActionExecutionResult.wrap(buildAwsValue())
}
object ActionExecutionResult {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.codepipeline.model.ActionExecutionResult
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.codepipeline.model.ActionExecutionResult =
      zio.aws.codepipeline.model.ActionExecutionResult(
        externalExecutionId.map(value => value),
        externalExecutionSummary.map(value => value),
        externalExecutionUrl.map(value => value)
      )
    def externalExecutionId: Optional[ExternalExecutionId]
    def externalExecutionSummary: Optional[ExternalExecutionSummary]
    def externalExecutionUrl: Optional[Url]
    def getExternalExecutionId: ZIO[Any, AwsError, ExternalExecutionId] =
      AwsError.unwrapOptionField("externalExecutionId", externalExecutionId)
    def getExternalExecutionSummary
        : ZIO[Any, AwsError, ExternalExecutionSummary] = AwsError
      .unwrapOptionField("externalExecutionSummary", externalExecutionSummary)
    def getExternalExecutionUrl: ZIO[Any, AwsError, Url] =
      AwsError.unwrapOptionField("externalExecutionUrl", externalExecutionUrl)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.codepipeline.model.ActionExecutionResult
  ) extends zio.aws.codepipeline.model.ActionExecutionResult.ReadOnly {
    override val externalExecutionId: Optional[ExternalExecutionId] =
      zio.aws.core.internal
        .optionalFromNullable(impl.externalExecutionId())
        .map(value =>
          zio.aws.codepipeline.model.primitives.ExternalExecutionId(value)
        )
    override val externalExecutionSummary: Optional[ExternalExecutionSummary] =
      zio.aws.core.internal
        .optionalFromNullable(impl.externalExecutionSummary())
        .map(value =>
          zio.aws.codepipeline.model.primitives.ExternalExecutionSummary(value)
        )
    override val externalExecutionUrl: Optional[Url] = zio.aws.core.internal
      .optionalFromNullable(impl.externalExecutionUrl())
      .map(value => zio.aws.codepipeline.model.primitives.Url(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.codepipeline.model.ActionExecutionResult
  ): zio.aws.codepipeline.model.ActionExecutionResult.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy