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

zio.aws.snowdevicemanagement.model.SoftwareInformation.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.snowdevicemanagement.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class SoftwareInformation(
    installState: Optional[String] = Optional.Absent,
    installedVersion: Optional[String] = Optional.Absent,
    installingVersion: Optional[String] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.snowdevicemanagement.model.SoftwareInformation = {
    import SoftwareInformation.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.snowdevicemanagement.model.SoftwareInformation
      .builder()
      .optionallyWith(installState.map(value => value: java.lang.String))(
        _.installState
      )
      .optionallyWith(installedVersion.map(value => value: java.lang.String))(
        _.installedVersion
      )
      .optionallyWith(installingVersion.map(value => value: java.lang.String))(
        _.installingVersion
      )
      .build()
  }
  def asReadOnly
      : zio.aws.snowdevicemanagement.model.SoftwareInformation.ReadOnly =
    zio.aws.snowdevicemanagement.model.SoftwareInformation.wrap(buildAwsValue())
}
object SoftwareInformation {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.snowdevicemanagement.model.SoftwareInformation
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.snowdevicemanagement.model.SoftwareInformation =
      zio.aws.snowdevicemanagement.model.SoftwareInformation(
        installState.map(value => value),
        installedVersion.map(value => value),
        installingVersion.map(value => value)
      )
    def installState: Optional[String]
    def installedVersion: Optional[String]
    def installingVersion: Optional[String]
    def getInstallState: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("installState", installState)
    def getInstalledVersion: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("installedVersion", installedVersion)
    def getInstallingVersion: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("installingVersion", installingVersion)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.snowdevicemanagement.model.SoftwareInformation
  ) extends zio.aws.snowdevicemanagement.model.SoftwareInformation.ReadOnly {
    override val installState: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.installState())
      .map(value => value: String)
    override val installedVersion: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.installedVersion())
      .map(value => value: String)
    override val installingVersion: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.installingVersion())
      .map(value => value: String)
  }
  def wrap(
      impl: software.amazon.awssdk.services.snowdevicemanagement.model.SoftwareInformation
  ): zio.aws.snowdevicemanagement.model.SoftwareInformation.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy