zio.aws.nimble.model.StudioComponentInitializationScript.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-nimble_3 Show documentation
Show all versions of zio-aws-nimble_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.nimble.model
import zio.aws.nimble.model.primitives.{
StudioComponentInitializationScriptContent,
LaunchProfileProtocolVersion
}
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class StudioComponentInitializationScript(
launchProfileProtocolVersion: Optional[LaunchProfileProtocolVersion] =
Optional.Absent,
platform: Optional[zio.aws.nimble.model.LaunchProfilePlatform] =
Optional.Absent,
runContext: Optional[
zio.aws.nimble.model.StudioComponentInitializationScriptRunContext
] = Optional.Absent,
script: Optional[StudioComponentInitializationScriptContent] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.nimble.model.StudioComponentInitializationScript = {
import StudioComponentInitializationScript.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.nimble.model.StudioComponentInitializationScript
.builder()
.optionallyWith(
launchProfileProtocolVersion.map(value =>
LaunchProfileProtocolVersion.unwrap(value): java.lang.String
)
)(_.launchProfileProtocolVersion)
.optionallyWith(platform.map(value => value.unwrap))(_.platform)
.optionallyWith(runContext.map(value => value.unwrap))(_.runContext)
.optionallyWith(
script.map(value =>
StudioComponentInitializationScriptContent.unwrap(
value
): java.lang.String
)
)(_.script)
.build()
}
def asReadOnly
: zio.aws.nimble.model.StudioComponentInitializationScript.ReadOnly =
zio.aws.nimble.model.StudioComponentInitializationScript
.wrap(buildAwsValue())
}
object StudioComponentInitializationScript {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.nimble.model.StudioComponentInitializationScript
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.nimble.model.StudioComponentInitializationScript =
zio.aws.nimble.model.StudioComponentInitializationScript(
launchProfileProtocolVersion.map(value => value),
platform.map(value => value),
runContext.map(value => value),
script.map(value => value)
)
def launchProfileProtocolVersion: Optional[LaunchProfileProtocolVersion]
def platform: Optional[zio.aws.nimble.model.LaunchProfilePlatform]
def runContext: Optional[
zio.aws.nimble.model.StudioComponentInitializationScriptRunContext
]
def script: Optional[StudioComponentInitializationScriptContent]
def getLaunchProfileProtocolVersion
: ZIO[Any, AwsError, LaunchProfileProtocolVersion] =
AwsError.unwrapOptionField(
"launchProfileProtocolVersion",
launchProfileProtocolVersion
)
def getPlatform
: ZIO[Any, AwsError, zio.aws.nimble.model.LaunchProfilePlatform] =
AwsError.unwrapOptionField("platform", platform)
def getRunContext: ZIO[
Any,
AwsError,
zio.aws.nimble.model.StudioComponentInitializationScriptRunContext
] = AwsError.unwrapOptionField("runContext", runContext)
def getScript
: ZIO[Any, AwsError, StudioComponentInitializationScriptContent] =
AwsError.unwrapOptionField("script", script)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.nimble.model.StudioComponentInitializationScript
) extends zio.aws.nimble.model.StudioComponentInitializationScript.ReadOnly {
override val launchProfileProtocolVersion
: Optional[LaunchProfileProtocolVersion] = zio.aws.core.internal
.optionalFromNullable(impl.launchProfileProtocolVersion())
.map(value =>
zio.aws.nimble.model.primitives.LaunchProfileProtocolVersion(value)
)
override val platform
: Optional[zio.aws.nimble.model.LaunchProfilePlatform] =
zio.aws.core.internal
.optionalFromNullable(impl.platform())
.map(value => zio.aws.nimble.model.LaunchProfilePlatform.wrap(value))
override val runContext: Optional[
zio.aws.nimble.model.StudioComponentInitializationScriptRunContext
] = zio.aws.core.internal
.optionalFromNullable(impl.runContext())
.map(value =>
zio.aws.nimble.model.StudioComponentInitializationScriptRunContext
.wrap(value)
)
override val script: Optional[StudioComponentInitializationScriptContent] =
zio.aws.core.internal
.optionalFromNullable(impl.script())
.map(value =>
zio.aws.nimble.model.primitives
.StudioComponentInitializationScriptContent(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.nimble.model.StudioComponentInitializationScript
): zio.aws.nimble.model.StudioComponentInitializationScript.ReadOnly =
new Wrapper(impl)
}