io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-rdsdata_3 Show documentation
Show all versions of zio-aws-rdsdata_3 Show documentation
Low-level AWS wrapper for ZIO
package io.github.vigoo.zioaws.rdsdata.model
import zio.ZIO
import io.github.vigoo.zioaws.rdsdata.model.primitives.Integer
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters.*
final case class ColumnMetadata(
arrayBaseColumnType: Option[Integer] = None,
isAutoIncrement: Option[Boolean] = None,
isCaseSensitive: Option[Boolean] = None,
isCurrency: Option[Boolean] = None,
isSigned: Option[Boolean] = None,
label: Option[String] = None,
name: Option[String] = None,
nullable: Option[Integer] = None,
precision: Option[Integer] = None,
scale: Option[Integer] = None,
schemaName: Option[String] = None,
tableName: Option[String] = None,
`type`: Option[Integer] = None,
typeName: Option[String] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.rdsdata.model.ColumnMetadata = {
import ColumnMetadata.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.rdsdata.model.ColumnMetadata
.builder()
.optionallyWith(
arrayBaseColumnType.map(value => value: java.lang.Integer)
)(_.arrayBaseColumnType)
.optionallyWith(isAutoIncrement.map(value => value: java.lang.Boolean))(
_.isAutoIncrement
)
.optionallyWith(isCaseSensitive.map(value => value: java.lang.Boolean))(
_.isCaseSensitive
)
.optionallyWith(isCurrency.map(value => value: java.lang.Boolean))(
_.isCurrency
)
.optionallyWith(isSigned.map(value => value: java.lang.Boolean))(
_.isSigned
)
.optionallyWith(label.map(value => value: java.lang.String))(_.label)
.optionallyWith(name.map(value => value: java.lang.String))(_.name)
.optionallyWith(nullable.map(value => value: java.lang.Integer))(
_.nullable
)
.optionallyWith(precision.map(value => value: java.lang.Integer))(
_.precision
)
.optionallyWith(scale.map(value => value: java.lang.Integer))(_.scale)
.optionallyWith(schemaName.map(value => value: java.lang.String))(
_.schemaName
)
.optionallyWith(tableName.map(value => value: java.lang.String))(
_.tableName
)
.optionallyWith(`type`.map(value => value: java.lang.Integer))(_.`type`)
.optionallyWith(typeName.map(value => value: java.lang.String))(
_.typeName
)
.build()
}
def asReadOnly: io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata.ReadOnly =
io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata.wrap(buildAwsValue())
}
object ColumnMetadata {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.rdsdata.model.ColumnMetadata
] = BuilderHelper.apply
trait ReadOnly {
def editable: io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata =
io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata(
arrayBaseColumnTypeValue.map(value => value),
isAutoIncrementValue.map(value => value),
isCaseSensitiveValue.map(value => value),
isCurrencyValue.map(value => value),
isSignedValue.map(value => value),
labelValue.map(value => value),
nameValue.map(value => value),
nullableValue.map(value => value),
precisionValue.map(value => value),
scaleValue.map(value => value),
schemaNameValue.map(value => value),
tableNameValue.map(value => value),
typeValue.map(value => value),
typeNameValue.map(value => value)
)
def arrayBaseColumnTypeValue: Option[Integer]
def isAutoIncrementValue: Option[Boolean]
def isCaseSensitiveValue: Option[Boolean]
def isCurrencyValue: Option[Boolean]
def isSignedValue: Option[Boolean]
def labelValue: Option[String]
def nameValue: Option[String]
def nullableValue: Option[Integer]
def precisionValue: Option[Integer]
def scaleValue: Option[Integer]
def schemaNameValue: Option[String]
def tableNameValue: Option[String]
def typeValue: Option[Integer]
def typeNameValue: Option[String]
def arrayBaseColumnType: ZIO[Any, AwsError, Integer] = AwsError
.unwrapOptionField("arrayBaseColumnType", arrayBaseColumnTypeValue)
def isAutoIncrement: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("isAutoIncrement", isAutoIncrementValue)
def isCaseSensitive: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("isCaseSensitive", isCaseSensitiveValue)
def isCurrency: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("isCurrency", isCurrencyValue)
def isSigned: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("isSigned", isSignedValue)
def label: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("label", labelValue)
def name: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("name", nameValue)
def nullable: ZIO[Any, AwsError, Integer] =
AwsError.unwrapOptionField("nullable", nullableValue)
def precision: ZIO[Any, AwsError, Integer] =
AwsError.unwrapOptionField("precision", precisionValue)
def scale: ZIO[Any, AwsError, Integer] =
AwsError.unwrapOptionField("scale", scaleValue)
def schemaName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("schemaName", schemaNameValue)
def tableName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("tableName", tableNameValue)
def `type`: ZIO[Any, AwsError, Integer] =
AwsError.unwrapOptionField("type", typeValue)
def typeName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("typeName", typeNameValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.rdsdata.model.ColumnMetadata
) extends io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata.ReadOnly {
override def arrayBaseColumnTypeValue: Option[Integer] =
scala.Option(impl.arrayBaseColumnType()).map(value => value: Integer)
override def isAutoIncrementValue: Option[Boolean] =
scala.Option(impl.isAutoIncrement()).map(value => value: Boolean)
override def isCaseSensitiveValue: Option[Boolean] =
scala.Option(impl.isCaseSensitive()).map(value => value: Boolean)
override def isCurrencyValue: Option[Boolean] =
scala.Option(impl.isCurrency()).map(value => value: Boolean)
override def isSignedValue: Option[Boolean] =
scala.Option(impl.isSigned()).map(value => value: Boolean)
override def labelValue: Option[String] =
scala.Option(impl.label()).map(value => value: String)
override def nameValue: Option[String] =
scala.Option(impl.name()).map(value => value: String)
override def nullableValue: Option[Integer] =
scala.Option(impl.nullable()).map(value => value: Integer)
override def precisionValue: Option[Integer] =
scala.Option(impl.precision()).map(value => value: Integer)
override def scaleValue: Option[Integer] =
scala.Option(impl.scale()).map(value => value: Integer)
override def schemaNameValue: Option[String] =
scala.Option(impl.schemaName()).map(value => value: String)
override def tableNameValue: Option[String] =
scala.Option(impl.tableName()).map(value => value: String)
override def typeValue: Option[Integer] =
scala.Option(impl.`type`()).map(value => value: Integer)
override def typeNameValue: Option[String] =
scala.Option(impl.typeName()).map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.rdsdata.model.ColumnMetadata
): io.github.vigoo.zioaws.rdsdata.model.ColumnMetadata.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy