zio.aws.codecatalyst.model.ListWorkflowsResponse.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.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class ListWorkflowsResponse(
nextToken: Optional[String] = Optional.Absent,
items: Optional[Iterable[zio.aws.codecatalyst.model.WorkflowSummary]] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsResponse = {
import ListWorkflowsResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsResponse
.builder()
.optionallyWith(nextToken.map(value => value: java.lang.String))(
_.nextToken
)
.optionallyWith(
items.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.items)
.build()
}
def asReadOnly: zio.aws.codecatalyst.model.ListWorkflowsResponse.ReadOnly =
zio.aws.codecatalyst.model.ListWorkflowsResponse.wrap(buildAwsValue())
}
object ListWorkflowsResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.ListWorkflowsResponse =
zio.aws.codecatalyst.model.ListWorkflowsResponse(
nextToken.map(value => value),
items.map(value =>
value.map { item =>
item.asEditable
}
)
)
def nextToken: Optional[String]
def items
: Optional[List[zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly]]
def getNextToken: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nextToken", nextToken)
def getItems: ZIO[Any, AwsError, List[
zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly
]] = AwsError.unwrapOptionField("items", items)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsResponse
) extends zio.aws.codecatalyst.model.ListWorkflowsResponse.ReadOnly {
override val nextToken: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nextToken())
.map(value => value: String)
override val items
: Optional[List[zio.aws.codecatalyst.model.WorkflowSummary.ReadOnly]] =
zio.aws.core.internal
.optionalFromNullable(impl.items())
.map(value =>
value.asScala.map { item =>
zio.aws.codecatalyst.model.WorkflowSummary.wrap(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.ListWorkflowsResponse
): zio.aws.codecatalyst.model.ListWorkflowsResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy