zio.aws.emrcontainers.model.DescribeJobTemplateResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-emrcontainers_2.12 Show documentation
Show all versions of zio-aws-emrcontainers_2.12 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.emrcontainers.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class DescribeJobTemplateResponse(
jobTemplate: Optional[zio.aws.emrcontainers.model.JobTemplate] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.emrcontainers.model.DescribeJobTemplateResponse = {
import DescribeJobTemplateResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.emrcontainers.model.DescribeJobTemplateResponse
.builder()
.optionallyWith(jobTemplate.map(value => value.buildAwsValue()))(
_.jobTemplate
)
.build()
}
def asReadOnly
: zio.aws.emrcontainers.model.DescribeJobTemplateResponse.ReadOnly =
zio.aws.emrcontainers.model.DescribeJobTemplateResponse
.wrap(buildAwsValue())
}
object DescribeJobTemplateResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.emrcontainers.model.DescribeJobTemplateResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.emrcontainers.model.DescribeJobTemplateResponse =
zio.aws.emrcontainers.model
.DescribeJobTemplateResponse(jobTemplate.map(value => value.asEditable))
def jobTemplate: Optional[zio.aws.emrcontainers.model.JobTemplate.ReadOnly]
def getJobTemplate
: ZIO[Any, AwsError, zio.aws.emrcontainers.model.JobTemplate.ReadOnly] =
AwsError.unwrapOptionField("jobTemplate", jobTemplate)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.emrcontainers.model.DescribeJobTemplateResponse
) extends zio.aws.emrcontainers.model.DescribeJobTemplateResponse.ReadOnly {
override val jobTemplate
: Optional[zio.aws.emrcontainers.model.JobTemplate.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.jobTemplate())
.map(value => zio.aws.emrcontainers.model.JobTemplate.wrap(value))
}
def wrap(
impl: software.amazon.awssdk.services.emrcontainers.model.DescribeJobTemplateResponse
): zio.aws.emrcontainers.model.DescribeJobTemplateResponse.ReadOnly =
new Wrapper(impl)
}