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

zio.aws.organizations.model.MoveAccountRequest.scala Maven / Gradle / Ivy

There is a newer version: 7.21.15.15
Show newest version
package zio.aws.organizations.model
import zio.aws.organizations.model.primitives.{ParentId, AccountId}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class MoveAccountRequest(
    accountId: AccountId,
    sourceParentId: ParentId,
    destinationParentId: ParentId
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.organizations.model.MoveAccountRequest = {
    import MoveAccountRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.organizations.model.MoveAccountRequest
      .builder()
      .accountId(AccountId.unwrap(accountId): java.lang.String)
      .sourceParentId(ParentId.unwrap(sourceParentId): java.lang.String)
      .destinationParentId(
        ParentId.unwrap(destinationParentId): java.lang.String
      )
      .build()
  }
  def asReadOnly: zio.aws.organizations.model.MoveAccountRequest.ReadOnly =
    zio.aws.organizations.model.MoveAccountRequest.wrap(buildAwsValue())
}
object MoveAccountRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.organizations.model.MoveAccountRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.organizations.model.MoveAccountRequest =
      zio.aws.organizations.model
        .MoveAccountRequest(accountId, sourceParentId, destinationParentId)
    def accountId: AccountId
    def sourceParentId: ParentId
    def destinationParentId: ParentId
    def getAccountId: ZIO[Any, Nothing, AccountId] = ZIO.succeed(accountId)
    def getSourceParentId: ZIO[Any, Nothing, ParentId] =
      ZIO.succeed(sourceParentId)
    def getDestinationParentId: ZIO[Any, Nothing, ParentId] =
      ZIO.succeed(destinationParentId)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.organizations.model.MoveAccountRequest
  ) extends zio.aws.organizations.model.MoveAccountRequest.ReadOnly {
    override val accountId: AccountId =
      zio.aws.organizations.model.primitives.AccountId(impl.accountId())
    override val sourceParentId: ParentId =
      zio.aws.organizations.model.primitives.ParentId(impl.sourceParentId())
    override val destinationParentId: ParentId =
      zio.aws.organizations.model.primitives
        .ParentId(impl.destinationParentId())
  }
  def wrap(
      impl: software.amazon.awssdk.services.organizations.model.MoveAccountRequest
  ): zio.aws.organizations.model.MoveAccountRequest.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy