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