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

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

There is a newer version: 7.28.29.10
Show newest version
package zio.aws.tnb.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import zio.aws.tnb.model.primitives.{
  VnfPkgId,
  NsInstanceId,
  VnfInstanceId,
  VnfInstanceArn
}
import scala.jdk.CollectionConverters.*
final case class ListSolFunctionInstanceInfo(
    arn: VnfInstanceArn,
    id: VnfInstanceId,
    instantiatedVnfInfo: Optional[zio.aws.tnb.model.GetSolInstantiatedVnfInfo] =
      Optional.Absent,
    instantiationState: zio.aws.tnb.model.VnfInstantiationState,
    metadata: zio.aws.tnb.model.ListSolFunctionInstanceMetadata,
    nsInstanceId: NsInstanceId,
    vnfPkgId: VnfPkgId,
    vnfPkgName: Optional[String] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.ListSolFunctionInstanceInfo = {
    import ListSolFunctionInstanceInfo.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.ListSolFunctionInstanceInfo
      .builder()
      .arn(VnfInstanceArn.unwrap(arn): java.lang.String)
      .id(VnfInstanceId.unwrap(id): java.lang.String)
      .optionallyWith(instantiatedVnfInfo.map(value => value.buildAwsValue()))(
        _.instantiatedVnfInfo
      )
      .instantiationState(instantiationState.unwrap)
      .metadata(metadata.buildAwsValue())
      .nsInstanceId(NsInstanceId.unwrap(nsInstanceId): java.lang.String)
      .vnfPkgId(VnfPkgId.unwrap(vnfPkgId): java.lang.String)
      .optionallyWith(vnfPkgName.map(value => value: java.lang.String))(
        _.vnfPkgName
      )
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly =
    zio.aws.tnb.model.ListSolFunctionInstanceInfo.wrap(buildAwsValue())
}
object ListSolFunctionInstanceInfo {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.ListSolFunctionInstanceInfo
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.ListSolFunctionInstanceInfo =
      zio.aws.tnb.model.ListSolFunctionInstanceInfo(
        arn,
        id,
        instantiatedVnfInfo.map(value => value.asEditable),
        instantiationState,
        metadata.asEditable,
        nsInstanceId,
        vnfPkgId,
        vnfPkgName.map(value => value)
      )
    def arn: VnfInstanceArn
    def id: VnfInstanceId
    def instantiatedVnfInfo
        : Optional[zio.aws.tnb.model.GetSolInstantiatedVnfInfo.ReadOnly]
    def instantiationState: zio.aws.tnb.model.VnfInstantiationState
    def metadata: zio.aws.tnb.model.ListSolFunctionInstanceMetadata.ReadOnly
    def nsInstanceId: NsInstanceId
    def vnfPkgId: VnfPkgId
    def vnfPkgName: Optional[String]
    def getArn: ZIO[Any, Nothing, VnfInstanceArn] = ZIO.succeed(arn)
    def getId: ZIO[Any, Nothing, VnfInstanceId] = ZIO.succeed(id)
    def getInstantiatedVnfInfo: ZIO[
      Any,
      AwsError,
      zio.aws.tnb.model.GetSolInstantiatedVnfInfo.ReadOnly
    ] = AwsError.unwrapOptionField("instantiatedVnfInfo", instantiatedVnfInfo)
    def getInstantiationState
        : ZIO[Any, Nothing, zio.aws.tnb.model.VnfInstantiationState] =
      ZIO.succeed(instantiationState)
    def getMetadata: ZIO[
      Any,
      Nothing,
      zio.aws.tnb.model.ListSolFunctionInstanceMetadata.ReadOnly
    ] = ZIO.succeed(metadata)
    def getNsInstanceId: ZIO[Any, Nothing, NsInstanceId] =
      ZIO.succeed(nsInstanceId)
    def getVnfPkgId: ZIO[Any, Nothing, VnfPkgId] = ZIO.succeed(vnfPkgId)
    def getVnfPkgName: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("vnfPkgName", vnfPkgName)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.ListSolFunctionInstanceInfo
  ) extends zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly {
    override val arn: VnfInstanceArn =
      zio.aws.tnb.model.primitives.VnfInstanceArn(impl.arn())
    override val id: VnfInstanceId =
      zio.aws.tnb.model.primitives.VnfInstanceId(impl.id())
    override val instantiatedVnfInfo
        : Optional[zio.aws.tnb.model.GetSolInstantiatedVnfInfo.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.instantiatedVnfInfo())
        .map(value => zio.aws.tnb.model.GetSolInstantiatedVnfInfo.wrap(value))
    override val instantiationState: zio.aws.tnb.model.VnfInstantiationState =
      zio.aws.tnb.model.VnfInstantiationState.wrap(impl.instantiationState())
    override val metadata
        : zio.aws.tnb.model.ListSolFunctionInstanceMetadata.ReadOnly =
      zio.aws.tnb.model.ListSolFunctionInstanceMetadata.wrap(impl.metadata())
    override val nsInstanceId: NsInstanceId =
      zio.aws.tnb.model.primitives.NsInstanceId(impl.nsInstanceId())
    override val vnfPkgId: VnfPkgId =
      zio.aws.tnb.model.primitives.VnfPkgId(impl.vnfPkgId())
    override val vnfPkgName: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.vnfPkgName())
      .map(value => value: String)
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.ListSolFunctionInstanceInfo
  ): zio.aws.tnb.model.ListSolFunctionInstanceInfo.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy