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

zio.aws.tnb.model.ListSolNetworkOperationsMetadata.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.{
  VnfInstanceId,
  NsdInfoId,
  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 ListSolNetworkOperationsMetadata(
    createdAt: SyntheticTimestamp_date_time,
    lastModified: SyntheticTimestamp_date_time,
    nsdInfoId: Optional[NsdInfoId] = Optional.Absent,
    vnfInstanceId: Optional[VnfInstanceId] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsMetadata = {
    import ListSolNetworkOperationsMetadata.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsMetadata
      .builder()
      .createdAt(SyntheticTimestamp_date_time.unwrap(createdAt): Instant)
      .lastModified(SyntheticTimestamp_date_time.unwrap(lastModified): Instant)
      .optionallyWith(
        nsdInfoId.map(value => NsdInfoId.unwrap(value): java.lang.String)
      )(_.nsdInfoId)
      .optionallyWith(
        vnfInstanceId.map(value =>
          VnfInstanceId.unwrap(value): java.lang.String
        )
      )(_.vnfInstanceId)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.ListSolNetworkOperationsMetadata.ReadOnly =
    zio.aws.tnb.model.ListSolNetworkOperationsMetadata.wrap(buildAwsValue())
}
object ListSolNetworkOperationsMetadata {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsMetadata
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.ListSolNetworkOperationsMetadata =
      zio.aws.tnb.model.ListSolNetworkOperationsMetadata(
        createdAt,
        lastModified,
        nsdInfoId.map(value => value),
        vnfInstanceId.map(value => value)
      )
    def createdAt: SyntheticTimestamp_date_time
    def lastModified: SyntheticTimestamp_date_time
    def nsdInfoId: Optional[NsdInfoId]
    def vnfInstanceId: Optional[VnfInstanceId]
    def getCreatedAt: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(createdAt)
    def getLastModified: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(lastModified)
    def getNsdInfoId: ZIO[Any, AwsError, NsdInfoId] =
      AwsError.unwrapOptionField("nsdInfoId", nsdInfoId)
    def getVnfInstanceId: ZIO[Any, AwsError, VnfInstanceId] =
      AwsError.unwrapOptionField("vnfInstanceId", vnfInstanceId)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsMetadata
  ) extends zio.aws.tnb.model.ListSolNetworkOperationsMetadata.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 nsdInfoId: Optional[NsdInfoId] = zio.aws.core.internal
      .optionalFromNullable(impl.nsdInfoId())
      .map(value => zio.aws.tnb.model.primitives.NsdInfoId(value))
    override val vnfInstanceId: Optional[VnfInstanceId] = zio.aws.core.internal
      .optionalFromNullable(impl.vnfInstanceId())
      .map(value => zio.aws.tnb.model.primitives.VnfInstanceId(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsMetadata
  ): zio.aws.tnb.model.ListSolNetworkOperationsMetadata.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy