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