zio.aws.codecatalyst.model.GetWorkflowRunResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-codecatalyst_3 Show documentation
Show all versions of zio-aws-codecatalyst_3 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.codecatalyst.model
import java.time.Instant
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import zio.aws.codecatalyst.model.primitives.{
SyntheticTimestamp_date_time,
Uuid,
NameString
}
import scala.jdk.CollectionConverters.*
final case class GetWorkflowRunResponse(
spaceName: NameString,
projectName: NameString,
id: Uuid,
workflowId: Uuid,
status: zio.aws.codecatalyst.model.WorkflowRunStatus,
statusReasons: Optional[
Iterable[zio.aws.codecatalyst.model.WorkflowRunStatusReason]
] = Optional.Absent,
startTime: SyntheticTimestamp_date_time,
endTime: Optional[SyntheticTimestamp_date_time] = Optional.Absent,
lastUpdatedTime: SyntheticTimestamp_date_time
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.GetWorkflowRunResponse = {
import GetWorkflowRunResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.GetWorkflowRunResponse
.builder()
.spaceName(NameString.unwrap(spaceName): java.lang.String)
.projectName(NameString.unwrap(projectName): java.lang.String)
.id(Uuid.unwrap(id): java.lang.String)
.workflowId(Uuid.unwrap(workflowId): java.lang.String)
.status(status.unwrap)
.optionallyWith(
statusReasons.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.statusReasons)
.startTime(SyntheticTimestamp_date_time.unwrap(startTime): Instant)
.optionallyWith(
endTime.map(value =>
SyntheticTimestamp_date_time.unwrap(value): Instant
)
)(_.endTime)
.lastUpdatedTime(
SyntheticTimestamp_date_time.unwrap(lastUpdatedTime): Instant
)
.build()
}
def asReadOnly: zio.aws.codecatalyst.model.GetWorkflowRunResponse.ReadOnly =
zio.aws.codecatalyst.model.GetWorkflowRunResponse.wrap(buildAwsValue())
}
object GetWorkflowRunResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.GetWorkflowRunResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.GetWorkflowRunResponse =
zio.aws.codecatalyst.model.GetWorkflowRunResponse(
spaceName,
projectName,
id,
workflowId,
status,
statusReasons.map(value =>
value.map { item =>
item.asEditable
}
),
startTime,
endTime.map(value => value),
lastUpdatedTime
)
def spaceName: NameString
def projectName: NameString
def id: Uuid
def workflowId: Uuid
def status: zio.aws.codecatalyst.model.WorkflowRunStatus
def statusReasons: Optional[
List[zio.aws.codecatalyst.model.WorkflowRunStatusReason.ReadOnly]
]
def startTime: SyntheticTimestamp_date_time
def endTime: Optional[SyntheticTimestamp_date_time]
def lastUpdatedTime: SyntheticTimestamp_date_time
def getSpaceName: ZIO[Any, Nothing, NameString] = ZIO.succeed(spaceName)
def getProjectName: ZIO[Any, Nothing, NameString] = ZIO.succeed(projectName)
def getId: ZIO[Any, Nothing, Uuid] = ZIO.succeed(id)
def getWorkflowId: ZIO[Any, Nothing, Uuid] = ZIO.succeed(workflowId)
def getStatus
: ZIO[Any, Nothing, zio.aws.codecatalyst.model.WorkflowRunStatus] =
ZIO.succeed(status)
def getStatusReasons: ZIO[Any, AwsError, List[
zio.aws.codecatalyst.model.WorkflowRunStatusReason.ReadOnly
]] = AwsError.unwrapOptionField("statusReasons", statusReasons)
def getStartTime: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
ZIO.succeed(startTime)
def getEndTime: ZIO[Any, AwsError, SyntheticTimestamp_date_time] =
AwsError.unwrapOptionField("endTime", endTime)
def getLastUpdatedTime: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
ZIO.succeed(lastUpdatedTime)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.GetWorkflowRunResponse
) extends zio.aws.codecatalyst.model.GetWorkflowRunResponse.ReadOnly {
override val spaceName: NameString =
zio.aws.codecatalyst.model.primitives.NameString(impl.spaceName())
override val projectName: NameString =
zio.aws.codecatalyst.model.primitives.NameString(impl.projectName())
override val id: Uuid =
zio.aws.codecatalyst.model.primitives.Uuid(impl.id())
override val workflowId: Uuid =
zio.aws.codecatalyst.model.primitives.Uuid(impl.workflowId())
override val status: zio.aws.codecatalyst.model.WorkflowRunStatus =
zio.aws.codecatalyst.model.WorkflowRunStatus.wrap(impl.status())
override val statusReasons: Optional[
List[zio.aws.codecatalyst.model.WorkflowRunStatusReason.ReadOnly]
] = zio.aws.core.internal
.optionalFromNullable(impl.statusReasons())
.map(value =>
value.asScala.map { item =>
zio.aws.codecatalyst.model.WorkflowRunStatusReason.wrap(item)
}.toList
)
override val startTime: SyntheticTimestamp_date_time =
zio.aws.codecatalyst.model.primitives
.SyntheticTimestamp_date_time(impl.startTime())
override val endTime: Optional[SyntheticTimestamp_date_time] =
zio.aws.core.internal
.optionalFromNullable(impl.endTime())
.map(value =>
zio.aws.codecatalyst.model.primitives
.SyntheticTimestamp_date_time(value)
)
override val lastUpdatedTime: SyntheticTimestamp_date_time =
zio.aws.codecatalyst.model.primitives
.SyntheticTimestamp_date_time(impl.lastUpdatedTime())
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.GetWorkflowRunResponse
): zio.aws.codecatalyst.model.GetWorkflowRunResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy