zio.aws.tnb.model.GetSolNetworkOperationTaskDetails.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.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 GetSolNetworkOperationTaskDetails(
taskContext: Optional[Map[String, String]] = Optional.Absent,
taskEndTime: Optional[SyntheticTimestamp_date_time] = Optional.Absent,
taskErrorDetails: Optional[zio.aws.tnb.model.ErrorInfo] = Optional.Absent,
taskName: Optional[String] = Optional.Absent,
taskStartTime: Optional[SyntheticTimestamp_date_time] = Optional.Absent,
taskStatus: Optional[zio.aws.tnb.model.TaskStatus] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolNetworkOperationTaskDetails = {
import GetSolNetworkOperationTaskDetails.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolNetworkOperationTaskDetails
.builder()
.optionallyWith(
taskContext.map(value =>
value
.map({ case (key, value) =>
(key: java.lang.String) -> (value: java.lang.String)
})
.asJava
)
)(_.taskContext)
.optionallyWith(
taskEndTime.map(value =>
SyntheticTimestamp_date_time.unwrap(value): Instant
)
)(_.taskEndTime)
.optionallyWith(taskErrorDetails.map(value => value.buildAwsValue()))(
_.taskErrorDetails
)
.optionallyWith(taskName.map(value => value: java.lang.String))(
_.taskName
)
.optionallyWith(
taskStartTime.map(value =>
SyntheticTimestamp_date_time.unwrap(value): Instant
)
)(_.taskStartTime)
.optionallyWith(taskStatus.map(value => value.unwrap))(_.taskStatus)
.build()
}
def asReadOnly: zio.aws.tnb.model.GetSolNetworkOperationTaskDetails.ReadOnly =
zio.aws.tnb.model.GetSolNetworkOperationTaskDetails.wrap(buildAwsValue())
}
object GetSolNetworkOperationTaskDetails {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolNetworkOperationTaskDetails
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolNetworkOperationTaskDetails =
zio.aws.tnb.model.GetSolNetworkOperationTaskDetails(
taskContext.map(value => value),
taskEndTime.map(value => value),
taskErrorDetails.map(value => value.asEditable),
taskName.map(value => value),
taskStartTime.map(value => value),
taskStatus.map(value => value)
)
def taskContext: Optional[Map[String, String]]
def taskEndTime: Optional[SyntheticTimestamp_date_time]
def taskErrorDetails: Optional[zio.aws.tnb.model.ErrorInfo.ReadOnly]
def taskName: Optional[String]
def taskStartTime: Optional[SyntheticTimestamp_date_time]
def taskStatus: Optional[zio.aws.tnb.model.TaskStatus]
def getTaskContext: ZIO[Any, AwsError, Map[String, String]] =
AwsError.unwrapOptionField("taskContext", taskContext)
def getTaskEndTime: ZIO[Any, AwsError, SyntheticTimestamp_date_time] =
AwsError.unwrapOptionField("taskEndTime", taskEndTime)
def getTaskErrorDetails
: ZIO[Any, AwsError, zio.aws.tnb.model.ErrorInfo.ReadOnly] =
AwsError.unwrapOptionField("taskErrorDetails", taskErrorDetails)
def getTaskName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("taskName", taskName)
def getTaskStartTime: ZIO[Any, AwsError, SyntheticTimestamp_date_time] =
AwsError.unwrapOptionField("taskStartTime", taskStartTime)
def getTaskStatus: ZIO[Any, AwsError, zio.aws.tnb.model.TaskStatus] =
AwsError.unwrapOptionField("taskStatus", taskStatus)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkOperationTaskDetails
) extends zio.aws.tnb.model.GetSolNetworkOperationTaskDetails.ReadOnly {
override val taskContext: Optional[Map[String, String]] =
zio.aws.core.internal
.optionalFromNullable(impl.taskContext())
.map(value =>
value.asScala
.map({ case (key, value) =>
(key: String) -> (value: String)
})
.toMap
)
override val taskEndTime: Optional[SyntheticTimestamp_date_time] =
zio.aws.core.internal
.optionalFromNullable(impl.taskEndTime())
.map(value =>
zio.aws.tnb.model.primitives.SyntheticTimestamp_date_time(value)
)
override val taskErrorDetails
: Optional[zio.aws.tnb.model.ErrorInfo.ReadOnly] = zio.aws.core.internal
.optionalFromNullable(impl.taskErrorDetails())
.map(value => zio.aws.tnb.model.ErrorInfo.wrap(value))
override val taskName: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.taskName())
.map(value => value: String)
override val taskStartTime: Optional[SyntheticTimestamp_date_time] =
zio.aws.core.internal
.optionalFromNullable(impl.taskStartTime())
.map(value =>
zio.aws.tnb.model.primitives.SyntheticTimestamp_date_time(value)
)
override val taskStatus: Optional[zio.aws.tnb.model.TaskStatus] =
zio.aws.core.internal
.optionalFromNullable(impl.taskStatus())
.map(value => zio.aws.tnb.model.TaskStatus.wrap(value))
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkOperationTaskDetails
): zio.aws.tnb.model.GetSolNetworkOperationTaskDetails.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy