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

zio.aws.codecatalyst.model.WorkflowSummary.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.codecatalyst.model
import zio.aws.codecatalyst.model.primitives.{
  SyntheticTimestamp_date_time,
  SourceRepositoryBranchString,
  SourceRepositoryNameString,
  Uuid
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import java.time.Instant
import scala.jdk.CollectionConverters.*
final case class WorkflowSummary(
    id: Uuid,
    name: String,
    sourceRepositoryName: SourceRepositoryNameString,
    sourceBranchName: SourceRepositoryBranchString,
    definition: zio.aws.codecatalyst.model.WorkflowDefinitionSummary,
    createdTime: SyntheticTimestamp_date_time,
    lastUpdatedTime: SyntheticTimestamp_date_time,
    runMode: zio.aws.codecatalyst.model.WorkflowRunMode,
    status: zio.aws.codecatalyst.model.WorkflowStatus
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.codecatalyst.model.WorkflowSummary = {
    import WorkflowSummary.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.codecatalyst.model.WorkflowSummary
      .builder()
      .id(Uuid.unwrap(id): java.lang.String)
      .name(name: java.lang.String)
      .sourceRepositoryName(
        SourceRepositoryNameString.unwrap(
          sourceRepositoryName
        ): java.lang.String
      )
      .sourceBranchName(
        SourceRepositoryBranchString.unwrap(sourceBranchName): java.lang.String
      )
      .definition(definition.buildAwsValue())
      .createdTime(SyntheticTimestamp_date_time.unwrap(createdTime): Instant)
      .lastUpdatedTime(
        SyntheticTimestamp_date_time.unwrap(lastUpdatedTime): Instant
      )
      .runMode(runMode.unwrap)
      .status(status.unwrap)
      .build()
  }
  def asReadOnly: zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly =
    zio.aws.codecatalyst.model.WorkflowSummary.wrap(buildAwsValue())
}
object WorkflowSummary {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.codecatalyst.model.WorkflowSummary
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.codecatalyst.model.WorkflowSummary =
      zio.aws.codecatalyst.model.WorkflowSummary(
        id,
        name,
        sourceRepositoryName,
        sourceBranchName,
        definition.asEditable,
        createdTime,
        lastUpdatedTime,
        runMode,
        status
      )
    def id: Uuid
    def name: String
    def sourceRepositoryName: SourceRepositoryNameString
    def sourceBranchName: SourceRepositoryBranchString
    def definition
        : zio.aws.codecatalyst.model.WorkflowDefinitionSummary.ReadOnly
    def createdTime: SyntheticTimestamp_date_time
    def lastUpdatedTime: SyntheticTimestamp_date_time
    def runMode: zio.aws.codecatalyst.model.WorkflowRunMode
    def status: zio.aws.codecatalyst.model.WorkflowStatus
    def getId: ZIO[Any, Nothing, Uuid] = ZIO.succeed(id)
    def getName: ZIO[Any, Nothing, String] = ZIO.succeed(name)
    def getSourceRepositoryName: ZIO[Any, Nothing, SourceRepositoryNameString] =
      ZIO.succeed(sourceRepositoryName)
    def getSourceBranchName: ZIO[Any, Nothing, SourceRepositoryBranchString] =
      ZIO.succeed(sourceBranchName)
    def getDefinition: ZIO[
      Any,
      Nothing,
      zio.aws.codecatalyst.model.WorkflowDefinitionSummary.ReadOnly
    ] = ZIO.succeed(definition)
    def getCreatedTime: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(createdTime)
    def getLastUpdatedTime: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
      ZIO.succeed(lastUpdatedTime)
    def getRunMode
        : ZIO[Any, Nothing, zio.aws.codecatalyst.model.WorkflowRunMode] =
      ZIO.succeed(runMode)
    def getStatus
        : ZIO[Any, Nothing, zio.aws.codecatalyst.model.WorkflowStatus] =
      ZIO.succeed(status)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.codecatalyst.model.WorkflowSummary
  ) extends zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly {
    override val id: Uuid =
      zio.aws.codecatalyst.model.primitives.Uuid(impl.id())
    override val name: String = impl.name(): String
    override val sourceRepositoryName: SourceRepositoryNameString =
      zio.aws.codecatalyst.model.primitives
        .SourceRepositoryNameString(impl.sourceRepositoryName())
    override val sourceBranchName: SourceRepositoryBranchString =
      zio.aws.codecatalyst.model.primitives
        .SourceRepositoryBranchString(impl.sourceBranchName())
    override val definition
        : zio.aws.codecatalyst.model.WorkflowDefinitionSummary.ReadOnly =
      zio.aws.codecatalyst.model.WorkflowDefinitionSummary
        .wrap(impl.definition())
    override val createdTime: SyntheticTimestamp_date_time =
      zio.aws.codecatalyst.model.primitives
        .SyntheticTimestamp_date_time(impl.createdTime())
    override val lastUpdatedTime: SyntheticTimestamp_date_time =
      zio.aws.codecatalyst.model.primitives
        .SyntheticTimestamp_date_time(impl.lastUpdatedTime())
    override val runMode: zio.aws.codecatalyst.model.WorkflowRunMode =
      zio.aws.codecatalyst.model.WorkflowRunMode.wrap(impl.runMode())
    override val status: zio.aws.codecatalyst.model.WorkflowStatus =
      zio.aws.codecatalyst.model.WorkflowStatus.wrap(impl.status())
  }
  def wrap(
      impl: software.amazon.awssdk.services.codecatalyst.model.WorkflowSummary
  ): zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy