zio.aws.nimble.model.LicenseServiceConfiguration.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
The newest version!
package zio.aws.nimble.model
import zio.aws.nimble.model.primitives.SensitiveString
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class LicenseServiceConfiguration(
endpoint: Optional[SensitiveString] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.nimble.model.LicenseServiceConfiguration = {
import LicenseServiceConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.nimble.model.LicenseServiceConfiguration
.builder()
.optionallyWith(
endpoint.map(value => SensitiveString.unwrap(value): java.lang.String)
)(_.endpoint)
.build()
}
def asReadOnly: zio.aws.nimble.model.LicenseServiceConfiguration.ReadOnly =
zio.aws.nimble.model.LicenseServiceConfiguration.wrap(buildAwsValue())
}
object LicenseServiceConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.nimble.model.LicenseServiceConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.nimble.model.LicenseServiceConfiguration =
zio.aws.nimble.model
.LicenseServiceConfiguration(endpoint.map(value => value))
def endpoint: Optional[SensitiveString]
def getEndpoint: ZIO[Any, AwsError, SensitiveString] =
AwsError.unwrapOptionField("endpoint", endpoint)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.nimble.model.LicenseServiceConfiguration
) extends zio.aws.nimble.model.LicenseServiceConfiguration.ReadOnly {
override val endpoint: Optional[SensitiveString] = zio.aws.core.internal
.optionalFromNullable(impl.endpoint())
.map(value => zio.aws.nimble.model.primitives.SensitiveString(value))
}
def wrap(
impl: software.amazon.awssdk.services.nimble.model.LicenseServiceConfiguration
): zio.aws.nimble.model.LicenseServiceConfiguration.ReadOnly = new Wrapper(
impl
)
}