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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy