zio.aws.tnb.model.ToscaOverride.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-tnb_3 Show documentation
Show all versions of zio-aws-tnb_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.tnb.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class ToscaOverride(
defaultValue: Optional[String] = Optional.Absent,
name: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.ToscaOverride = {
import ToscaOverride.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.ToscaOverride
.builder()
.optionallyWith(defaultValue.map(value => value: java.lang.String))(
_.defaultValue
)
.optionallyWith(name.map(value => value: java.lang.String))(_.name)
.build()
}
def asReadOnly: zio.aws.tnb.model.ToscaOverride.ReadOnly =
zio.aws.tnb.model.ToscaOverride.wrap(buildAwsValue())
}
object ToscaOverride {
private lazy val zioAwsBuilderHelper
: BuilderHelper[software.amazon.awssdk.services.tnb.model.ToscaOverride] =
BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.ToscaOverride = zio.aws.tnb.model
.ToscaOverride(defaultValue.map(value => value), name.map(value => value))
def defaultValue: Optional[String]
def name: Optional[String]
def getDefaultValue: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("defaultValue", defaultValue)
def getName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("name", name)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.ToscaOverride
) extends zio.aws.tnb.model.ToscaOverride.ReadOnly {
override val defaultValue: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.defaultValue())
.map(value => value: String)
override val name: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.name())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.ToscaOverride
): zio.aws.tnb.model.ToscaOverride.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy