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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy