zio.aws.workmail.model.GetImpersonationRoleEffectRequest.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.aws.workmail.model.primitives.{
EntityIdentifier,
ImpersonationRoleId,
OrganizationId
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class GetImpersonationRoleEffectRequest(
organizationId: OrganizationId,
impersonationRoleId: ImpersonationRoleId,
targetUser: EntityIdentifier
) {
def buildAwsValue()
: software.amazon.awssdk.services.workmail.model.GetImpersonationRoleEffectRequest = {
import GetImpersonationRoleEffectRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.workmail.model.GetImpersonationRoleEffectRequest
.builder()
.organizationId(OrganizationId.unwrap(organizationId): java.lang.String)
.impersonationRoleId(
ImpersonationRoleId.unwrap(impersonationRoleId): java.lang.String
)
.targetUser(EntityIdentifier.unwrap(targetUser): java.lang.String)
.build()
}
def asReadOnly
: zio.aws.workmail.model.GetImpersonationRoleEffectRequest.ReadOnly =
zio.aws.workmail.model.GetImpersonationRoleEffectRequest
.wrap(buildAwsValue())
}
object GetImpersonationRoleEffectRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.workmail.model.GetImpersonationRoleEffectRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.workmail.model.GetImpersonationRoleEffectRequest =
zio.aws.workmail.model.GetImpersonationRoleEffectRequest(
organizationId,
impersonationRoleId,
targetUser
)
def organizationId: OrganizationId
def impersonationRoleId: ImpersonationRoleId
def targetUser: EntityIdentifier
def getOrganizationId: ZIO[Any, Nothing, OrganizationId] =
ZIO.succeed(organizationId)
def getImpersonationRoleId: ZIO[Any, Nothing, ImpersonationRoleId] =
ZIO.succeed(impersonationRoleId)
def getTargetUser: ZIO[Any, Nothing, EntityIdentifier] =
ZIO.succeed(targetUser)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.workmail.model.GetImpersonationRoleEffectRequest
) extends zio.aws.workmail.model.GetImpersonationRoleEffectRequest.ReadOnly {
override val organizationId: OrganizationId =
zio.aws.workmail.model.primitives.OrganizationId(impl.organizationId())
override val impersonationRoleId: ImpersonationRoleId =
zio.aws.workmail.model.primitives
.ImpersonationRoleId(impl.impersonationRoleId())
override val targetUser: EntityIdentifier =
zio.aws.workmail.model.primitives.EntityIdentifier(impl.targetUser())
}
def wrap(
impl: software.amazon.awssdk.services.workmail.model.GetImpersonationRoleEffectRequest
): zio.aws.workmail.model.GetImpersonationRoleEffectRequest.ReadOnly =
new Wrapper(impl)
}