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