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