zio.aws.codepipeline.model.PollForThirdPartyJobsResponse.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 PollForThirdPartyJobsResponse(
jobs: Optional[Iterable[zio.aws.codepipeline.model.ThirdPartyJob]] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codepipeline.model.PollForThirdPartyJobsResponse = {
import PollForThirdPartyJobsResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codepipeline.model.PollForThirdPartyJobsResponse
.builder()
.optionallyWith(
jobs.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.jobs)
.build()
}
def asReadOnly
: zio.aws.codepipeline.model.PollForThirdPartyJobsResponse.ReadOnly =
zio.aws.codepipeline.model.PollForThirdPartyJobsResponse
.wrap(buildAwsValue())
}
object PollForThirdPartyJobsResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codepipeline.model.PollForThirdPartyJobsResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codepipeline.model.PollForThirdPartyJobsResponse =
zio.aws.codepipeline.model.PollForThirdPartyJobsResponse(
jobs.map(value =>
value.map { item =>
item.asEditable
}
)
)
def jobs: Optional[List[zio.aws.codepipeline.model.ThirdPartyJob.ReadOnly]]
def getJobs: ZIO[Any, AwsError, List[
zio.aws.codepipeline.model.ThirdPartyJob.ReadOnly
]] = AwsError.unwrapOptionField("jobs", jobs)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codepipeline.model.PollForThirdPartyJobsResponse
) extends zio.aws.codepipeline.model.PollForThirdPartyJobsResponse.ReadOnly {
override val jobs
: Optional[List[zio.aws.codepipeline.model.ThirdPartyJob.ReadOnly]] =
zio.aws.core.internal
.optionalFromNullable(impl.jobs())
.map(value =>
value.asScala.map { item =>
zio.aws.codepipeline.model.ThirdPartyJob.wrap(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.codepipeline.model.PollForThirdPartyJobsResponse
): zio.aws.codepipeline.model.PollForThirdPartyJobsResponse.ReadOnly =
new Wrapper(impl)
}