zio.aws.tnb.model.ListSolNetworkOperationsInfo.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-tnb_3 Show documentation
Show all versions of zio-aws-tnb_3 Show documentation
Low-level AWS wrapper for ZIO
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
) {
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)
.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
)
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 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)
}
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())
}
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