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

zio.aws.tnb.model.GetSolFunctionPackageMetadata.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.10
Show newest version
package zio.aws.tnb.model
import zio.aws.tnb.model.primitives.SyntheticTimestamp_date_time
import java.time.Instant
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import scala.jdk.CollectionConverters.*
final case class GetSolFunctionPackageMetadata(
    createdAt: SyntheticTimestamp_date_time,
    lastModified: SyntheticTimestamp_date_time,
    vnfd: Optional[zio.aws.tnb.model.FunctionArtifactMeta] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata = {
    import GetSolFunctionPackageMetadata.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
      .builder()
      .createdAt(SyntheticTimestamp_date_time.unwrap(createdAt): Instant)
      .lastModified(SyntheticTimestamp_date_time.unwrap(lastModified): Instant)
      .optionallyWith(vnfd.map(value => value.buildAwsValue()))(_.vnfd)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly =
    zio.aws.tnb.model.GetSolFunctionPackageMetadata.wrap(buildAwsValue())
}
object GetSolFunctionPackageMetadata {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.GetSolFunctionPackageMetadata =
      zio.aws.tnb.model.GetSolFunctionPackageMetadata(
        createdAt,
        lastModified,
        vnfd.map(value => value.asEditable)
      )
    def createdAt: SyntheticTimestamp_date_time
    def lastModified: SyntheticTimestamp_date_time
    def vnfd: Optional[zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly]
    def getCreatedAt: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(createdAt)
    def getLastModified: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(lastModified)
    def getVnfd
        : ZIO[Any, AwsError, zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly] =
      AwsError.unwrapOptionField("vnfd", vnfd)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
  ) extends zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly {
    override val createdAt: SyntheticTimestamp_date_time =
      zio.aws.tnb.model.primitives
        .SyntheticTimestamp_date_time(impl.createdAt())
    override val lastModified: SyntheticTimestamp_date_time =
      zio.aws.tnb.model.primitives
        .SyntheticTimestamp_date_time(impl.lastModified())
    override val vnfd
        : Optional[zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.vnfd())
        .map(value => zio.aws.tnb.model.FunctionArtifactMeta.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
  ): zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy