zio.aws.codecatalyst.model.ProjectSummary.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 ProjectSummary(
name: String,
displayName: Optional[String] = Optional.Absent,
description: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.codecatalyst.model.ProjectSummary = {
import ProjectSummary.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.codecatalyst.model.ProjectSummary
.builder()
.name(name: java.lang.String)
.optionallyWith(displayName.map(value => value: java.lang.String))(
_.displayName
)
.optionallyWith(description.map(value => value: java.lang.String))(
_.description
)
.build()
}
def asReadOnly: zio.aws.codecatalyst.model.ProjectSummary.ReadOnly =
zio.aws.codecatalyst.model.ProjectSummary.wrap(buildAwsValue())
}
object ProjectSummary {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.codecatalyst.model.ProjectSummary
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.codecatalyst.model.ProjectSummary =
zio.aws.codecatalyst.model.ProjectSummary(
name,
displayName.map(value => value),
description.map(value => value)
)
def name: String
def displayName: Optional[String]
def description: Optional[String]
def getName: ZIO[Any, Nothing, String] = ZIO.succeed(name)
def getDisplayName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("displayName", displayName)
def getDescription: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("description", description)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.codecatalyst.model.ProjectSummary
) extends zio.aws.codecatalyst.model.ProjectSummary.ReadOnly {
override val name: String = impl.name(): String
override val displayName: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.displayName())
.map(value => value: String)
override val description: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.description())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.codecatalyst.model.ProjectSummary
): zio.aws.codecatalyst.model.ProjectSummary.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy