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