zio.aws.transcribe.model.UpdateMedicalVocabularyResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-transcribe_2.12 Show documentation
Show all versions of zio-aws-transcribe_2.12 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.transcribe.model
import java.time.Instant
import zio.prelude.data.Optional
import zio.aws.core.{AwsError, BuilderHelper}
import zio.aws.transcribe.model.primitives.{DateTime, VocabularyName}
import zio.ZIO
import scala.jdk.CollectionConverters._
final case class UpdateMedicalVocabularyResponse(
vocabularyName: Optional[VocabularyName] = Optional.Absent,
languageCode: Optional[zio.aws.transcribe.model.LanguageCode] =
Optional.Absent,
lastModifiedTime: Optional[DateTime] = Optional.Absent,
vocabularyState: Optional[zio.aws.transcribe.model.VocabularyState] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.transcribe.model.UpdateMedicalVocabularyResponse = {
import UpdateMedicalVocabularyResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.transcribe.model.UpdateMedicalVocabularyResponse
.builder()
.optionallyWith(
vocabularyName.map(value =>
VocabularyName.unwrap(value): java.lang.String
)
)(_.vocabularyName)
.optionallyWith(languageCode.map(value => value.unwrap))(_.languageCode)
.optionallyWith(
lastModifiedTime.map(value => DateTime.unwrap(value): Instant)
)(_.lastModifiedTime)
.optionallyWith(vocabularyState.map(value => value.unwrap))(
_.vocabularyState
)
.build()
}
def asReadOnly
: zio.aws.transcribe.model.UpdateMedicalVocabularyResponse.ReadOnly =
zio.aws.transcribe.model.UpdateMedicalVocabularyResponse
.wrap(buildAwsValue())
}
object UpdateMedicalVocabularyResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.transcribe.model.UpdateMedicalVocabularyResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.transcribe.model.UpdateMedicalVocabularyResponse =
zio.aws.transcribe.model.UpdateMedicalVocabularyResponse(
vocabularyName.map(value => value),
languageCode.map(value => value),
lastModifiedTime.map(value => value),
vocabularyState.map(value => value)
)
def vocabularyName: Optional[VocabularyName]
def languageCode: Optional[zio.aws.transcribe.model.LanguageCode]
def lastModifiedTime: Optional[DateTime]
def vocabularyState: Optional[zio.aws.transcribe.model.VocabularyState]
def getVocabularyName: ZIO[Any, AwsError, VocabularyName] =
AwsError.unwrapOptionField("vocabularyName", vocabularyName)
def getLanguageCode
: ZIO[Any, AwsError, zio.aws.transcribe.model.LanguageCode] =
AwsError.unwrapOptionField("languageCode", languageCode)
def getLastModifiedTime: ZIO[Any, AwsError, DateTime] =
AwsError.unwrapOptionField("lastModifiedTime", lastModifiedTime)
def getVocabularyState
: ZIO[Any, AwsError, zio.aws.transcribe.model.VocabularyState] =
AwsError.unwrapOptionField("vocabularyState", vocabularyState)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.transcribe.model.UpdateMedicalVocabularyResponse
) extends zio.aws.transcribe.model.UpdateMedicalVocabularyResponse.ReadOnly {
override val vocabularyName: Optional[VocabularyName] =
zio.aws.core.internal
.optionalFromNullable(impl.vocabularyName())
.map(value => zio.aws.transcribe.model.primitives.VocabularyName(value))
override val languageCode: Optional[zio.aws.transcribe.model.LanguageCode] =
zio.aws.core.internal
.optionalFromNullable(impl.languageCode())
.map(value => zio.aws.transcribe.model.LanguageCode.wrap(value))
override val lastModifiedTime: Optional[DateTime] = zio.aws.core.internal
.optionalFromNullable(impl.lastModifiedTime())
.map(value => zio.aws.transcribe.model.primitives.DateTime(value))
override val vocabularyState
: Optional[zio.aws.transcribe.model.VocabularyState] =
zio.aws.core.internal
.optionalFromNullable(impl.vocabularyState())
.map(value => zio.aws.transcribe.model.VocabularyState.wrap(value))
}
def wrap(
impl: software.amazon.awssdk.services.transcribe.model.UpdateMedicalVocabularyResponse
): zio.aws.transcribe.model.UpdateMedicalVocabularyResponse.ReadOnly =
new Wrapper(impl)
}