All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.aws.workmail.model.UpdatePrimaryEmailAddressRequest.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy