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

zio.aws.workmail.model.DeleteAliasRequest.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,
  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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy