zio.aws.codecatalyst.model.StartWorkflowRunRequest.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 zio.aws.codecatalyst.model.primitives.{
StartWorkflowRunRequestClientTokenString,
Uuid,
StartWorkflowRunRequestProjectNameString,
StartWorkflowRunRequestSpaceNameString
}
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class StartWorkflowRunRequest(
spaceName: StartWorkflowRunRequestSpaceNameString,
projectName: StartWorkflowRunRequestProjectNameString,
workflowId: Uuid,
clientToken: Optional[StartWorkflowRunRequestClientTokenString] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.StartWorkflowRunRequest = {
import StartWorkflowRunRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.StartWorkflowRunRequest
.builder()
.spaceName(
StartWorkflowRunRequestSpaceNameString.unwrap(
spaceName
): java.lang.String
)
.projectName(
StartWorkflowRunRequestProjectNameString.unwrap(
projectName
): java.lang.String
)
.workflowId(Uuid.unwrap(workflowId): java.lang.String)
.optionallyWith(
clientToken.map(value =>
StartWorkflowRunRequestClientTokenString.unwrap(
value
): java.lang.String
)
)(_.clientToken)
.build()
}
def asReadOnly: zio.aws.codecatalyst.model.StartWorkflowRunRequest.ReadOnly =
zio.aws.codecatalyst.model.StartWorkflowRunRequest.wrap(buildAwsValue())
}
object StartWorkflowRunRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.StartWorkflowRunRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.StartWorkflowRunRequest =
zio.aws.codecatalyst.model.StartWorkflowRunRequest(
spaceName,
projectName,
workflowId,
clientToken.map(value => value)
)
def spaceName: StartWorkflowRunRequestSpaceNameString
def projectName: StartWorkflowRunRequestProjectNameString
def workflowId: Uuid
def clientToken: Optional[StartWorkflowRunRequestClientTokenString]
def getSpaceName
: ZIO[Any, Nothing, StartWorkflowRunRequestSpaceNameString] =
ZIO.succeed(spaceName)
def getProjectName
: ZIO[Any, Nothing, StartWorkflowRunRequestProjectNameString] =
ZIO.succeed(projectName)
def getWorkflowId: ZIO[Any, Nothing, Uuid] = ZIO.succeed(workflowId)
def getClientToken
: ZIO[Any, AwsError, StartWorkflowRunRequestClientTokenString] =
AwsError.unwrapOptionField("clientToken", clientToken)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.StartWorkflowRunRequest
) extends zio.aws.codecatalyst.model.StartWorkflowRunRequest.ReadOnly {
override val spaceName: StartWorkflowRunRequestSpaceNameString =
zio.aws.codecatalyst.model.primitives
.StartWorkflowRunRequestSpaceNameString(impl.spaceName())
override val projectName: StartWorkflowRunRequestProjectNameString =
zio.aws.codecatalyst.model.primitives
.StartWorkflowRunRequestProjectNameString(impl.projectName())
override val workflowId: Uuid =
zio.aws.codecatalyst.model.primitives.Uuid(impl.workflowId())
override val clientToken
: Optional[StartWorkflowRunRequestClientTokenString] =
zio.aws.core.internal
.optionalFromNullable(impl.clientToken())
.map(value =>
zio.aws.codecatalyst.model.primitives
.StartWorkflowRunRequestClientTokenString(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.StartWorkflowRunRequest
): zio.aws.codecatalyst.model.StartWorkflowRunRequest.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy