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