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

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

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.workmail.model
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class Delegate(
    id: String,
    `type`: zio.aws.workmail.model.MemberType
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.workmail.model.Delegate = {
    import Delegate.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.workmail.model.Delegate
      .builder()
      .id(id: java.lang.String)
      .`type`(`type`.unwrap)
      .build()
  }
  def asReadOnly: zio.aws.workmail.model.Delegate.ReadOnly =
    zio.aws.workmail.model.Delegate.wrap(buildAwsValue())
}
object Delegate {
  private lazy val zioAwsBuilderHelper
      : BuilderHelper[software.amazon.awssdk.services.workmail.model.Delegate] =
    BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.workmail.model.Delegate =
      zio.aws.workmail.model.Delegate(id, `type`)
    def id: String
    def `type`: zio.aws.workmail.model.MemberType
    def getId: ZIO[Any, Nothing, String] = ZIO.succeed(id)
    def getType: ZIO[Any, Nothing, zio.aws.workmail.model.MemberType] =
      ZIO.succeed(`type`)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.workmail.model.Delegate
  ) extends zio.aws.workmail.model.Delegate.ReadOnly {
    override val id: String = impl.id(): String
    override val `type`: zio.aws.workmail.model.MemberType =
      zio.aws.workmail.model.MemberType.wrap(impl.`type`())
  }
  def wrap(
      impl: software.amazon.awssdk.services.workmail.model.Delegate
  ): zio.aws.workmail.model.Delegate.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy