zio.aws.workmail.model.GetMailDomainRequest.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-workmail_2.12 Show documentation
Show all versions of zio-aws-workmail_2.12 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.workmail.model
import zio.aws.workmail.model.primitives.{WorkMailDomainName, OrganizationId}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class GetMailDomainRequest(
organizationId: OrganizationId,
domainName: WorkMailDomainName
) {
def buildAwsValue()
: software.amazon.awssdk.services.workmail.model.GetMailDomainRequest = {
import GetMailDomainRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.workmail.model.GetMailDomainRequest
.builder()
.organizationId(OrganizationId.unwrap(organizationId): java.lang.String)
.domainName(WorkMailDomainName.unwrap(domainName): java.lang.String)
.build()
}
def asReadOnly: zio.aws.workmail.model.GetMailDomainRequest.ReadOnly =
zio.aws.workmail.model.GetMailDomainRequest.wrap(buildAwsValue())
}
object GetMailDomainRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.workmail.model.GetMailDomainRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.workmail.model.GetMailDomainRequest =
zio.aws.workmail.model.GetMailDomainRequest(organizationId, domainName)
def organizationId: OrganizationId
def domainName: WorkMailDomainName
def getOrganizationId: ZIO[Any, Nothing, OrganizationId] =
ZIO.succeed(organizationId)
def getDomainName: ZIO[Any, Nothing, WorkMailDomainName] =
ZIO.succeed(domainName)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.workmail.model.GetMailDomainRequest
) extends zio.aws.workmail.model.GetMailDomainRequest.ReadOnly {
override val organizationId: OrganizationId =
zio.aws.workmail.model.primitives.OrganizationId(impl.organizationId())
override val domainName: WorkMailDomainName =
zio.aws.workmail.model.primitives.WorkMailDomainName(impl.domainName())
}
def wrap(
impl: software.amazon.awssdk.services.workmail.model.GetMailDomainRequest
): zio.aws.workmail.model.GetMailDomainRequest.ReadOnly = new Wrapper(impl)
}