zio.aws.verifiedpermissions.model.GetIdentitySourceRequest.scala Maven / Gradle / Ivy
package zio.aws.verifiedpermissions.model
import zio.aws.verifiedpermissions.model.primitives.{
IdentitySourceId,
PolicyStoreId
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class GetIdentitySourceRequest(
policyStoreId: PolicyStoreId,
identitySourceId: IdentitySourceId
) {
def buildAwsValue()
: software.amazon.awssdk.services.verifiedpermissions.model.GetIdentitySourceRequest = {
import GetIdentitySourceRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.verifiedpermissions.model.GetIdentitySourceRequest
.builder()
.policyStoreId(PolicyStoreId.unwrap(policyStoreId): java.lang.String)
.identitySourceId(
IdentitySourceId.unwrap(identitySourceId): java.lang.String
)
.build()
}
def asReadOnly
: zio.aws.verifiedpermissions.model.GetIdentitySourceRequest.ReadOnly =
zio.aws.verifiedpermissions.model.GetIdentitySourceRequest
.wrap(buildAwsValue())
}
object GetIdentitySourceRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.verifiedpermissions.model.GetIdentitySourceRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.verifiedpermissions.model.GetIdentitySourceRequest =
zio.aws.verifiedpermissions.model
.GetIdentitySourceRequest(policyStoreId, identitySourceId)
def policyStoreId: PolicyStoreId
def identitySourceId: IdentitySourceId
def getPolicyStoreId: ZIO[Any, Nothing, PolicyStoreId] =
ZIO.succeed(policyStoreId)
def getIdentitySourceId: ZIO[Any, Nothing, IdentitySourceId] =
ZIO.succeed(identitySourceId)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.verifiedpermissions.model.GetIdentitySourceRequest
) extends zio.aws.verifiedpermissions.model.GetIdentitySourceRequest.ReadOnly {
override val policyStoreId: PolicyStoreId =
zio.aws.verifiedpermissions.model.primitives
.PolicyStoreId(impl.policyStoreId())
override val identitySourceId: IdentitySourceId =
zio.aws.verifiedpermissions.model.primitives
.IdentitySourceId(impl.identitySourceId())
}
def wrap(
impl: software.amazon.awssdk.services.verifiedpermissions.model.GetIdentitySourceRequest
): zio.aws.verifiedpermissions.model.GetIdentitySourceRequest.ReadOnly =
new Wrapper(impl)
}