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

zio.aws.tnb.model.ListSolNetworkOperationsInfo.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.{NsInstanceId, NsLcmOpOccId, NsLcmOpOccArn}
import scala.jdk.CollectionConverters.*
final case class ListSolNetworkOperationsInfo(
    arn: NsLcmOpOccArn,
    error: Optional[zio.aws.tnb.model.ProblemDetails] = Optional.Absent,
    id: NsLcmOpOccId,
    lcmOperationType: zio.aws.tnb.model.LcmOperationType,
    metadata: Optional[zio.aws.tnb.model.ListSolNetworkOperationsMetadata] =
      Optional.Absent,
    nsInstanceId: NsInstanceId,
    operationState: zio.aws.tnb.model.NsLcmOperationState,
    updateType: Optional[zio.aws.tnb.model.UpdateSolNetworkType] =
      Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsInfo = {
    import ListSolNetworkOperationsInfo.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsInfo
      .builder()
      .arn(NsLcmOpOccArn.unwrap(arn): java.lang.String)
      .optionallyWith(error.map(value => value.buildAwsValue()))(_.error)
      .id(NsLcmOpOccId.unwrap(id): java.lang.String)
      .lcmOperationType(lcmOperationType.unwrap)
      .optionallyWith(metadata.map(value => value.buildAwsValue()))(_.metadata)
      .nsInstanceId(NsInstanceId.unwrap(nsInstanceId): java.lang.String)
      .operationState(operationState.unwrap)
      .optionallyWith(updateType.map(value => value.unwrap))(_.updateType)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.ListSolNetworkOperationsInfo.ReadOnly =
    zio.aws.tnb.model.ListSolNetworkOperationsInfo.wrap(buildAwsValue())
}
object ListSolNetworkOperationsInfo {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsInfo
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.ListSolNetworkOperationsInfo =
      zio.aws.tnb.model.ListSolNetworkOperationsInfo(
        arn,
        error.map(value => value.asEditable),
        id,
        lcmOperationType,
        metadata.map(value => value.asEditable),
        nsInstanceId,
        operationState,
        updateType.map(value => value)
      )
    def arn: NsLcmOpOccArn
    def error: Optional[zio.aws.tnb.model.ProblemDetails.ReadOnly]
    def id: NsLcmOpOccId
    def lcmOperationType: zio.aws.tnb.model.LcmOperationType
    def metadata
        : Optional[zio.aws.tnb.model.ListSolNetworkOperationsMetadata.ReadOnly]
    def nsInstanceId: NsInstanceId
    def operationState: zio.aws.tnb.model.NsLcmOperationState
    def updateType: Optional[zio.aws.tnb.model.UpdateSolNetworkType]
    def getArn: ZIO[Any, Nothing, NsLcmOpOccArn] = ZIO.succeed(arn)
    def getError
        : ZIO[Any, AwsError, zio.aws.tnb.model.ProblemDetails.ReadOnly] =
      AwsError.unwrapOptionField("error", error)
    def getId: ZIO[Any, Nothing, NsLcmOpOccId] = ZIO.succeed(id)
    def getLcmOperationType
        : ZIO[Any, Nothing, zio.aws.tnb.model.LcmOperationType] =
      ZIO.succeed(lcmOperationType)
    def getMetadata: ZIO[
      Any,
      AwsError,
      zio.aws.tnb.model.ListSolNetworkOperationsMetadata.ReadOnly
    ] = AwsError.unwrapOptionField("metadata", metadata)
    def getNsInstanceId: ZIO[Any, Nothing, NsInstanceId] =
      ZIO.succeed(nsInstanceId)
    def getOperationState
        : ZIO[Any, Nothing, zio.aws.tnb.model.NsLcmOperationState] =
      ZIO.succeed(operationState)
    def getUpdateType
        : ZIO[Any, AwsError, zio.aws.tnb.model.UpdateSolNetworkType] =
      AwsError.unwrapOptionField("updateType", updateType)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsInfo
  ) extends zio.aws.tnb.model.ListSolNetworkOperationsInfo.ReadOnly {
    override val arn: NsLcmOpOccArn =
      zio.aws.tnb.model.primitives.NsLcmOpOccArn(impl.arn())
    override val error: Optional[zio.aws.tnb.model.ProblemDetails.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.error())
        .map(value => zio.aws.tnb.model.ProblemDetails.wrap(value))
    override val id: NsLcmOpOccId =
      zio.aws.tnb.model.primitives.NsLcmOpOccId(impl.id())
    override val lcmOperationType: zio.aws.tnb.model.LcmOperationType =
      zio.aws.tnb.model.LcmOperationType.wrap(impl.lcmOperationType())
    override val metadata: Optional[
      zio.aws.tnb.model.ListSolNetworkOperationsMetadata.ReadOnly
    ] = zio.aws.core.internal
      .optionalFromNullable(impl.metadata())
      .map(value =>
        zio.aws.tnb.model.ListSolNetworkOperationsMetadata.wrap(value)
      )
    override val nsInstanceId: NsInstanceId =
      zio.aws.tnb.model.primitives.NsInstanceId(impl.nsInstanceId())
    override val operationState: zio.aws.tnb.model.NsLcmOperationState =
      zio.aws.tnb.model.NsLcmOperationState.wrap(impl.operationState())
    override val updateType: Optional[zio.aws.tnb.model.UpdateSolNetworkType] =
      zio.aws.core.internal
        .optionalFromNullable(impl.updateType())
        .map(value => zio.aws.tnb.model.UpdateSolNetworkType.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkOperationsInfo
  ): zio.aws.tnb.model.ListSolNetworkOperationsInfo.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy