zio.aws.codepipeline.model.GetPipelineExecutionResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-codepipeline_2.12 Show documentation
Show all versions of zio-aws-codepipeline_2.12 Show documentation
Low-level AWS wrapper for ZIO
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)
}