zio.aws.tnb.model.GetSolFunctionPackageMetadata.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.aws.tnb.model.primitives.SyntheticTimestamp_date_time
import java.time.Instant
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.ZIO
import scala.jdk.CollectionConverters.*
final case class GetSolFunctionPackageMetadata(
createdAt: SyntheticTimestamp_date_time,
lastModified: SyntheticTimestamp_date_time,
vnfd: Optional[zio.aws.tnb.model.FunctionArtifactMeta] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata = {
import GetSolFunctionPackageMetadata.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
.builder()
.createdAt(SyntheticTimestamp_date_time.unwrap(createdAt): Instant)
.lastModified(SyntheticTimestamp_date_time.unwrap(lastModified): Instant)
.optionallyWith(vnfd.map(value => value.buildAwsValue()))(_.vnfd)
.build()
}
def asReadOnly: zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly =
zio.aws.tnb.model.GetSolFunctionPackageMetadata.wrap(buildAwsValue())
}
object GetSolFunctionPackageMetadata {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolFunctionPackageMetadata =
zio.aws.tnb.model.GetSolFunctionPackageMetadata(
createdAt,
lastModified,
vnfd.map(value => value.asEditable)
)
def createdAt: SyntheticTimestamp_date_time
def lastModified: SyntheticTimestamp_date_time
def vnfd: Optional[zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly]
def getCreatedAt: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
ZIO.succeed(createdAt)
def getLastModified: ZIO[Any, Nothing, SyntheticTimestamp_date_time] =
ZIO.succeed(lastModified)
def getVnfd
: ZIO[Any, AwsError, zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly] =
AwsError.unwrapOptionField("vnfd", vnfd)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
) extends zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly {
override val createdAt: SyntheticTimestamp_date_time =
zio.aws.tnb.model.primitives
.SyntheticTimestamp_date_time(impl.createdAt())
override val lastModified: SyntheticTimestamp_date_time =
zio.aws.tnb.model.primitives
.SyntheticTimestamp_date_time(impl.lastModified())
override val vnfd
: Optional[zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.vnfd())
.map(value => zio.aws.tnb.model.FunctionArtifactMeta.wrap(value))
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.GetSolFunctionPackageMetadata
): zio.aws.tnb.model.GetSolFunctionPackageMetadata.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy