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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy