zio.aws.codecatalyst.model.ListWorkflowsRequest.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.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import zio.aws.codecatalyst.model.primitives.{
ListWorkflowsRequestMaxResultsInteger,
ListWorkflowsRequestNextTokenString,
NameString,
ListWorkflowsRequestSpaceNameString
}
import java.lang.Integer
import scala.jdk.CollectionConverters.*
final case class ListWorkflowsRequest(
spaceName: ListWorkflowsRequestSpaceNameString,
projectName: NameString,
nextToken: Optional[ListWorkflowsRequestNextTokenString] = Optional.Absent,
maxResults: Optional[ListWorkflowsRequestMaxResultsInteger] =
Optional.Absent,
sortBy: Optional[
Iterable[zio.aws.codecatalyst.model.WorkflowSortCriteria]
] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsRequest = {
import ListWorkflowsRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsRequest
.builder()
.spaceName(
ListWorkflowsRequestSpaceNameString.unwrap(spaceName): java.lang.String
)
.projectName(NameString.unwrap(projectName): java.lang.String)
.optionallyWith(
nextToken.map(value =>
ListWorkflowsRequestNextTokenString.unwrap(value): java.lang.String
)
)(_.nextToken)
.optionallyWith(
maxResults.map(value =>
ListWorkflowsRequestMaxResultsInteger.unwrap(value): Integer
)
)(_.maxResults)
.optionallyWith(
sortBy.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.sortBy)
.build()
}
def asReadOnly: zio.aws.codecatalyst.model.ListWorkflowsRequest.ReadOnly =
zio.aws.codecatalyst.model.ListWorkflowsRequest.wrap(buildAwsValue())
}
object ListWorkflowsRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.ListWorkflowsRequest =
zio.aws.codecatalyst.model.ListWorkflowsRequest(
spaceName,
projectName,
nextToken.map(value => value),
maxResults.map(value => value),
sortBy.map(value =>
value.map { item =>
item.asEditable
}
)
)
def spaceName: ListWorkflowsRequestSpaceNameString
def projectName: NameString
def nextToken: Optional[ListWorkflowsRequestNextTokenString]
def maxResults: Optional[ListWorkflowsRequestMaxResultsInteger]
def sortBy: Optional[
List[zio.aws.codecatalyst.model.WorkflowSortCriteria.ReadOnly]
]
def getSpaceName: ZIO[Any, Nothing, ListWorkflowsRequestSpaceNameString] =
ZIO.succeed(spaceName)
def getProjectName: ZIO[Any, Nothing, NameString] = ZIO.succeed(projectName)
def getNextToken: ZIO[Any, AwsError, ListWorkflowsRequestNextTokenString] =
AwsError.unwrapOptionField("nextToken", nextToken)
def getMaxResults
: ZIO[Any, AwsError, ListWorkflowsRequestMaxResultsInteger] =
AwsError.unwrapOptionField("maxResults", maxResults)
def getSortBy: ZIO[Any, AwsError, List[
zio.aws.codecatalyst.model.WorkflowSortCriteria.ReadOnly
]] = AwsError.unwrapOptionField("sortBy", sortBy)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsRequest
) extends zio.aws.codecatalyst.model.ListWorkflowsRequest.ReadOnly {
override val spaceName: ListWorkflowsRequestSpaceNameString =
zio.aws.codecatalyst.model.primitives
.ListWorkflowsRequestSpaceNameString(impl.spaceName())
override val projectName: NameString =
zio.aws.codecatalyst.model.primitives.NameString(impl.projectName())
override val nextToken: Optional[ListWorkflowsRequestNextTokenString] =
zio.aws.core.internal
.optionalFromNullable(impl.nextToken())
.map(value =>
zio.aws.codecatalyst.model.primitives
.ListWorkflowsRequestNextTokenString(value)
)
override val maxResults: Optional[ListWorkflowsRequestMaxResultsInteger] =
zio.aws.core.internal
.optionalFromNullable(impl.maxResults())
.map(value =>
zio.aws.codecatalyst.model.primitives
.ListWorkflowsRequestMaxResultsInteger(value)
)
override val sortBy: Optional[
List[zio.aws.codecatalyst.model.WorkflowSortCriteria.ReadOnly]
] = zio.aws.core.internal
.optionalFromNullable(impl.sortBy())
.map(value =>
value.asScala.map { item =>
zio.aws.codecatalyst.model.WorkflowSortCriteria.wrap(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsRequest
): zio.aws.codecatalyst.model.ListWorkflowsRequest.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy