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

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

The newest version!
package zio.aws.codecatalyst.model
import zio.aws.codecatalyst.model.primitives.NameString
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class CreateProjectResponse(
    spaceName: Optional[NameString] = Optional.Absent,
    name: NameString,
    displayName: Optional[String] = Optional.Absent,
    description: Optional[String] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.codecatalyst.model.CreateProjectResponse = {
    import CreateProjectResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.codecatalyst.model.CreateProjectResponse
      .builder()
      .optionallyWith(
        spaceName.map(value => NameString.unwrap(value): java.lang.String)
      )(_.spaceName)
      .name(NameString.unwrap(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.CreateProjectResponse.ReadOnly =
    zio.aws.codecatalyst.model.CreateProjectResponse.wrap(buildAwsValue())
}
object CreateProjectResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.codecatalyst.model.CreateProjectResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.codecatalyst.model.CreateProjectResponse =
      zio.aws.codecatalyst.model.CreateProjectResponse(
        spaceName.map(value => value),
        name,
        displayName.map(value => value),
        description.map(value => value)
      )
    def spaceName: Optional[NameString]
    def name: NameString
    def displayName: Optional[String]
    def description: Optional[String]
    def getSpaceName: ZIO[Any, AwsError, NameString] =
      AwsError.unwrapOptionField("spaceName", spaceName)
    def getName: ZIO[Any, Nothing, NameString] = 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.CreateProjectResponse
  ) extends zio.aws.codecatalyst.model.CreateProjectResponse.ReadOnly {
    override val spaceName: Optional[NameString] = zio.aws.core.internal
      .optionalFromNullable(impl.spaceName())
      .map(value => zio.aws.codecatalyst.model.primitives.NameString(value))
    override val name: NameString =
      zio.aws.codecatalyst.model.primitives.NameString(impl.name())
    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.CreateProjectResponse
  ): zio.aws.codecatalyst.model.CreateProjectResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy