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