zio.aws.workmail.model.DeleteAliasRequest.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.{
EmailAddress,
WorkMailIdentifier,
OrganizationId
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class DeleteAliasRequest(
organizationId: OrganizationId,
entityId: WorkMailIdentifier,
alias: EmailAddress
) {
def buildAwsValue()
: software.amazon.awssdk.services.workmail.model.DeleteAliasRequest = {
import DeleteAliasRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.workmail.model.DeleteAliasRequest
.builder()
.organizationId(OrganizationId.unwrap(organizationId): java.lang.String)
.entityId(WorkMailIdentifier.unwrap(entityId): java.lang.String)
.alias(EmailAddress.unwrap(alias): java.lang.String)
.build()
}
def asReadOnly: zio.aws.workmail.model.DeleteAliasRequest.ReadOnly =
zio.aws.workmail.model.DeleteAliasRequest.wrap(buildAwsValue())
}
object DeleteAliasRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.workmail.model.DeleteAliasRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.workmail.model.DeleteAliasRequest =
zio.aws.workmail.model.DeleteAliasRequest(organizationId, entityId, alias)
def organizationId: OrganizationId
def entityId: WorkMailIdentifier
def alias: EmailAddress
def getOrganizationId: ZIO[Any, Nothing, OrganizationId] =
ZIO.succeed(organizationId)
def getEntityId: ZIO[Any, Nothing, WorkMailIdentifier] =
ZIO.succeed(entityId)
def getAlias: ZIO[Any, Nothing, EmailAddress] = ZIO.succeed(alias)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.workmail.model.DeleteAliasRequest
) extends zio.aws.workmail.model.DeleteAliasRequest.ReadOnly {
override val organizationId: OrganizationId =
zio.aws.workmail.model.primitives.OrganizationId(impl.organizationId())
override val entityId: WorkMailIdentifier =
zio.aws.workmail.model.primitives.WorkMailIdentifier(impl.entityId())
override val alias: EmailAddress =
zio.aws.workmail.model.primitives.EmailAddress(impl.alias())
}
def wrap(
impl: software.amazon.awssdk.services.workmail.model.DeleteAliasRequest
): zio.aws.workmail.model.DeleteAliasRequest.ReadOnly = new Wrapper(impl)
}