All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.aws.workmail.model.DeleteOrganizationResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.workmail.model
import zio.aws.workmail.model.primitives.OrganizationId
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class DeleteOrganizationResponse(
    organizationId: Optional[OrganizationId] = Optional.Absent,
    state: Optional[String] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.workmail.model.DeleteOrganizationResponse = {
    import DeleteOrganizationResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.workmail.model.DeleteOrganizationResponse
      .builder()
      .optionallyWith(
        organizationId.map(value =>
          OrganizationId.unwrap(value): java.lang.String
        )
      )(_.organizationId)
      .optionallyWith(state.map(value => value: java.lang.String))(_.state)
      .build()
  }
  def asReadOnly: zio.aws.workmail.model.DeleteOrganizationResponse.ReadOnly =
    zio.aws.workmail.model.DeleteOrganizationResponse.wrap(buildAwsValue())
}
object DeleteOrganizationResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.workmail.model.DeleteOrganizationResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.workmail.model.DeleteOrganizationResponse =
      zio.aws.workmail.model.DeleteOrganizationResponse(
        organizationId.map(value => value),
        state.map(value => value)
      )
    def organizationId: Optional[OrganizationId]
    def state: Optional[String]
    def getOrganizationId: ZIO[Any, AwsError, OrganizationId] =
      AwsError.unwrapOptionField("organizationId", organizationId)
    def getState: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("state", state)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.workmail.model.DeleteOrganizationResponse
  ) extends zio.aws.workmail.model.DeleteOrganizationResponse.ReadOnly {
    override val organizationId: Optional[OrganizationId] =
      zio.aws.core.internal
        .optionalFromNullable(impl.organizationId())
        .map(value => zio.aws.workmail.model.primitives.OrganizationId(value))
    override val state: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.state())
      .map(value => value: String)
  }
  def wrap(
      impl: software.amazon.awssdk.services.workmail.model.DeleteOrganizationResponse
  ): zio.aws.workmail.model.DeleteOrganizationResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy