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

zio.aws.workmail.model.CreateOrganizationResponse.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 CreateOrganizationResponse(
    organizationId: Optional[OrganizationId] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.workmail.model.CreateOrganizationResponse = {
    import CreateOrganizationResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.workmail.model.CreateOrganizationResponse
      .builder()
      .optionallyWith(
        organizationId.map(value =>
          OrganizationId.unwrap(value): java.lang.String
        )
      )(_.organizationId)
      .build()
  }
  def asReadOnly: zio.aws.workmail.model.CreateOrganizationResponse.ReadOnly =
    zio.aws.workmail.model.CreateOrganizationResponse.wrap(buildAwsValue())
}
object CreateOrganizationResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.workmail.model.CreateOrganizationResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.workmail.model.CreateOrganizationResponse =
      zio.aws.workmail.model
        .CreateOrganizationResponse(organizationId.map(value => value))
    def organizationId: Optional[OrganizationId]
    def getOrganizationId: ZIO[Any, AwsError, OrganizationId] =
      AwsError.unwrapOptionField("organizationId", organizationId)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.workmail.model.CreateOrganizationResponse
  ) extends zio.aws.workmail.model.CreateOrganizationResponse.ReadOnly {
    override val organizationId: Optional[OrganizationId] =
      zio.aws.core.internal
        .optionalFromNullable(impl.organizationId())
        .map(value => zio.aws.workmail.model.primitives.OrganizationId(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.workmail.model.CreateOrganizationResponse
  ): zio.aws.workmail.model.CreateOrganizationResponse.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy