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

zio.aws.verifiedpermissions.model.GetSchemaResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.verifiedpermissions.model
import zio.aws.verifiedpermissions.model.primitives.{
  TimestampFormat,
  SchemaJson,
  PolicyStoreId
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import java.time.Instant
import scala.jdk.CollectionConverters._
final case class GetSchemaResponse(
    policyStoreId: PolicyStoreId,
    schema: SchemaJson,
    createdDate: TimestampFormat,
    lastUpdatedDate: TimestampFormat
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.verifiedpermissions.model.GetSchemaResponse = {
    import GetSchemaResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.verifiedpermissions.model.GetSchemaResponse
      .builder()
      .policyStoreId(PolicyStoreId.unwrap(policyStoreId): java.lang.String)
      .schema(SchemaJson.unwrap(schema): java.lang.String)
      .createdDate(TimestampFormat.unwrap(createdDate): Instant)
      .lastUpdatedDate(TimestampFormat.unwrap(lastUpdatedDate): Instant)
      .build()
  }
  def asReadOnly: zio.aws.verifiedpermissions.model.GetSchemaResponse.ReadOnly =
    zio.aws.verifiedpermissions.model.GetSchemaResponse.wrap(buildAwsValue())
}
object GetSchemaResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.verifiedpermissions.model.GetSchemaResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.verifiedpermissions.model.GetSchemaResponse =
      zio.aws.verifiedpermissions.model.GetSchemaResponse(
        policyStoreId,
        schema,
        createdDate,
        lastUpdatedDate
      )
    def policyStoreId: PolicyStoreId
    def schema: SchemaJson
    def createdDate: TimestampFormat
    def lastUpdatedDate: TimestampFormat
    def getPolicyStoreId: ZIO[Any, Nothing, PolicyStoreId] =
      ZIO.succeed(policyStoreId)
    def getSchema: ZIO[Any, Nothing, SchemaJson] = ZIO.succeed(schema)
    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.GetSchemaResponse
  ) extends zio.aws.verifiedpermissions.model.GetSchemaResponse.ReadOnly {
    override val policyStoreId: PolicyStoreId =
      zio.aws.verifiedpermissions.model.primitives
        .PolicyStoreId(impl.policyStoreId())
    override val schema: SchemaJson =
      zio.aws.verifiedpermissions.model.primitives.SchemaJson(impl.schema())
    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.GetSchemaResponse
  ): zio.aws.verifiedpermissions.model.GetSchemaResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy