zio.aws.storagegateway.model.JoinDomainResponse.scala Maven / Gradle / Ivy
package zio.aws.storagegateway.model
import zio.aws.storagegateway.model.primitives.GatewayARN
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class JoinDomainResponse(
gatewayARN: Optional[GatewayARN] = Optional.Absent,
activeDirectoryStatus: Optional[
zio.aws.storagegateway.model.ActiveDirectoryStatus
] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.storagegateway.model.JoinDomainResponse = {
import JoinDomainResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.storagegateway.model.JoinDomainResponse
.builder()
.optionallyWith(
gatewayARN.map(value => GatewayARN.unwrap(value): java.lang.String)
)(_.gatewayARN)
.optionallyWith(activeDirectoryStatus.map(value => value.unwrap))(
_.activeDirectoryStatus
)
.build()
}
def asReadOnly: zio.aws.storagegateway.model.JoinDomainResponse.ReadOnly =
zio.aws.storagegateway.model.JoinDomainResponse.wrap(buildAwsValue())
}
object JoinDomainResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.storagegateway.model.JoinDomainResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.storagegateway.model.JoinDomainResponse =
zio.aws.storagegateway.model.JoinDomainResponse(
gatewayARN.map(value => value),
activeDirectoryStatus.map(value => value)
)
def gatewayARN: Optional[GatewayARN]
def activeDirectoryStatus
: Optional[zio.aws.storagegateway.model.ActiveDirectoryStatus]
def getGatewayARN: ZIO[Any, AwsError, GatewayARN] =
AwsError.unwrapOptionField("gatewayARN", gatewayARN)
def getActiveDirectoryStatus: ZIO[
Any,
AwsError,
zio.aws.storagegateway.model.ActiveDirectoryStatus
] =
AwsError.unwrapOptionField("activeDirectoryStatus", activeDirectoryStatus)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.storagegateway.model.JoinDomainResponse
) extends zio.aws.storagegateway.model.JoinDomainResponse.ReadOnly {
override val gatewayARN: Optional[GatewayARN] = zio.aws.core.internal
.optionalFromNullable(impl.gatewayARN())
.map(value => zio.aws.storagegateway.model.primitives.GatewayARN(value))
override val activeDirectoryStatus
: Optional[zio.aws.storagegateway.model.ActiveDirectoryStatus] =
zio.aws.core.internal
.optionalFromNullable(impl.activeDirectoryStatus())
.map(value =>
zio.aws.storagegateway.model.ActiveDirectoryStatus.wrap(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.storagegateway.model.JoinDomainResponse
): zio.aws.storagegateway.model.JoinDomainResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy