![JAR search and dependency download from the Maven repository](/logo.png)
zio.aws.lexruntimev2.model.Button.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-lexruntimev2_2.13 Show documentation
Show all versions of zio-aws-lexruntimev2_2.13 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.lexruntimev2.model
import zio.aws.lexruntimev2.model.primitives.{ButtonValue, ButtonText}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class Button(text: ButtonText, value: ButtonValue) {
def buildAwsValue()
: software.amazon.awssdk.services.lexruntimev2.model.Button = {
import Button.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.lexruntimev2.model.Button
.builder()
.text(ButtonText.unwrap(text): java.lang.String)
.value(ButtonValue.unwrap(value): java.lang.String)
.build()
}
def asReadOnly: zio.aws.lexruntimev2.model.Button.ReadOnly =
zio.aws.lexruntimev2.model.Button.wrap(buildAwsValue())
}
object Button {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.lexruntimev2.model.Button
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.lexruntimev2.model.Button =
zio.aws.lexruntimev2.model.Button(text, value)
def text: ButtonText
def value: ButtonValue
def getText: ZIO[Any, Nothing, ButtonText] = ZIO.succeed(text)
def getValue: ZIO[Any, Nothing, ButtonValue] = ZIO.succeed(value)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.lexruntimev2.model.Button
) extends zio.aws.lexruntimev2.model.Button.ReadOnly {
override val text: ButtonText =
zio.aws.lexruntimev2.model.primitives.ButtonText(impl.text())
override val value: ButtonValue =
zio.aws.lexruntimev2.model.primitives.ButtonValue(impl.value())
}
def wrap(
impl: software.amazon.awssdk.services.lexruntimev2.model.Button
): zio.aws.lexruntimev2.model.Button.ReadOnly = new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy