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