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

zio.aws.workmail.model.CreateAliasRequest.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 CreateAliasRequest(
    organizationId: OrganizationId,
    entityId: WorkMailIdentifier,
    alias: EmailAddress
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.workmail.model.CreateAliasRequest = {
    import CreateAliasRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.workmail.model.CreateAliasRequest
      .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.CreateAliasRequest.ReadOnly =
    zio.aws.workmail.model.CreateAliasRequest.wrap(buildAwsValue())
}
object CreateAliasRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.workmail.model.CreateAliasRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.workmail.model.CreateAliasRequest =
      zio.aws.workmail.model.CreateAliasRequest(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.CreateAliasRequest
  ) extends zio.aws.workmail.model.CreateAliasRequest.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.CreateAliasRequest
  ): zio.aws.workmail.model.CreateAliasRequest.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy