zio.aws.codepipeline.model.StopPipelineExecutionResponse.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.aws.codepipeline.model.primitives.PipelineExecutionId
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class StopPipelineExecutionResponse(
pipelineExecutionId: Optional[PipelineExecutionId] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codepipeline.model.StopPipelineExecutionResponse = {
import StopPipelineExecutionResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codepipeline.model.StopPipelineExecutionResponse
.builder()
.optionallyWith(
pipelineExecutionId.map(value =>
PipelineExecutionId.unwrap(value): java.lang.String
)
)(_.pipelineExecutionId)
.build()
}
def asReadOnly
: zio.aws.codepipeline.model.StopPipelineExecutionResponse.ReadOnly =
zio.aws.codepipeline.model.StopPipelineExecutionResponse
.wrap(buildAwsValue())
}
object StopPipelineExecutionResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codepipeline.model.StopPipelineExecutionResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codepipeline.model.StopPipelineExecutionResponse =
zio.aws.codepipeline.model
.StopPipelineExecutionResponse(pipelineExecutionId.map(value => value))
def pipelineExecutionId: Optional[PipelineExecutionId]
def getPipelineExecutionId: ZIO[Any, AwsError, PipelineExecutionId] =
AwsError.unwrapOptionField("pipelineExecutionId", pipelineExecutionId)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codepipeline.model.StopPipelineExecutionResponse
) extends zio.aws.codepipeline.model.StopPipelineExecutionResponse.ReadOnly {
override val pipelineExecutionId: Optional[PipelineExecutionId] =
zio.aws.core.internal
.optionalFromNullable(impl.pipelineExecutionId())
.map(value =>
zio.aws.codepipeline.model.primitives.PipelineExecutionId(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.codepipeline.model.StopPipelineExecutionResponse
): zio.aws.codepipeline.model.StopPipelineExecutionResponse.ReadOnly =
new Wrapper(impl)
}