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

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

The newest version!
package zio.aws.codepipeline.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class GetPipelineExecutionResponse(
    pipelineExecution: Optional[zio.aws.codepipeline.model.PipelineExecution] =
      Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.codepipeline.model.GetPipelineExecutionResponse = {
    import GetPipelineExecutionResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.codepipeline.model.GetPipelineExecutionResponse
      .builder()
      .optionallyWith(pipelineExecution.map(value => value.buildAwsValue()))(
        _.pipelineExecution
      )
      .build()
  }
  def asReadOnly
      : zio.aws.codepipeline.model.GetPipelineExecutionResponse.ReadOnly =
    zio.aws.codepipeline.model.GetPipelineExecutionResponse
      .wrap(buildAwsValue())
}
object GetPipelineExecutionResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.codepipeline.model.GetPipelineExecutionResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.codepipeline.model.GetPipelineExecutionResponse =
      zio.aws.codepipeline.model.GetPipelineExecutionResponse(
        pipelineExecution.map(value => value.asEditable)
      )
    def pipelineExecution
        : Optional[zio.aws.codepipeline.model.PipelineExecution.ReadOnly]
    def getPipelineExecution: ZIO[
      Any,
      AwsError,
      zio.aws.codepipeline.model.PipelineExecution.ReadOnly
    ] = AwsError.unwrapOptionField("pipelineExecution", pipelineExecution)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.codepipeline.model.GetPipelineExecutionResponse
  ) extends zio.aws.codepipeline.model.GetPipelineExecutionResponse.ReadOnly {
    override val pipelineExecution
        : Optional[zio.aws.codepipeline.model.PipelineExecution.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.pipelineExecution())
        .map(value => zio.aws.codepipeline.model.PipelineExecution.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.codepipeline.model.GetPipelineExecutionResponse
  ): zio.aws.codepipeline.model.GetPipelineExecutionResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy