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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy