zio.aws.organizations.model.MoveAccountRequest.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-organizations_2.12 Show documentation
Show all versions of zio-aws-organizations_2.12 Show documentation
Low-level AWS wrapper for ZIO
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)
}