
io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest.scala Maven / Gradle / Ivy
package io.github.vigoo.zioaws.elasticbeanstalk.model
import zio.ZIO
import io.github.vigoo.zioaws.elasticbeanstalk.model.primitives.{
Description,
VersionLabel,
ApplicationName
}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class UpdateApplicationVersionRequest(
applicationName: ApplicationName,
versionLabel: VersionLabel,
description: Option[Description] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest = {
import UpdateApplicationVersionRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest
.builder()
.applicationName(applicationName: java.lang.String)
.versionLabel(versionLabel: java.lang.String)
.optionallyWith(description.map(value => value: java.lang.String))(
_.description
)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest.ReadOnly =
io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest
.wrap(buildAwsValue())
}
object UpdateApplicationVersionRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest =
io.github.vigoo.zioaws.elasticbeanstalk.model
.UpdateApplicationVersionRequest(
applicationNameValue,
versionLabelValue,
descriptionValue.map(value => value)
)
def applicationNameValue: ApplicationName
def versionLabelValue: VersionLabel
def descriptionValue: Option[Description]
def applicationName: ZIO[Any, Nothing, ApplicationName] =
ZIO.succeed(applicationNameValue)
def versionLabel: ZIO[Any, Nothing, VersionLabel] =
ZIO.succeed(versionLabelValue)
def description: ZIO[Any, AwsError, Description] =
AwsError.unwrapOptionField("description", descriptionValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest
) extends io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest.ReadOnly {
override def applicationNameValue: ApplicationName =
impl.applicationName(): ApplicationName
override def versionLabelValue: VersionLabel =
impl.versionLabel(): VersionLabel
override def descriptionValue: Option[Description] =
scala.Option(impl.description()).map(value => value: Description)
}
def wrap(
impl: software.amazon.awssdk.services.elasticbeanstalk.model.UpdateApplicationVersionRequest
): io.github.vigoo.zioaws.elasticbeanstalk.model.UpdateApplicationVersionRequest.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy