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

com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * Prepare DataMove Request.
 */
@Fluent
public final class PrepareDataMoveRequest {
    /*
     * ARM Id of target vault
     */
    @JsonProperty(value = "targetResourceId", required = true)
    private String targetResourceId;

    /*
     * Target Region
     */
    @JsonProperty(value = "targetRegion", required = true)
    private String targetRegion;

    /*
     * DataMove Level
     */
    @JsonProperty(value = "dataMoveLevel", required = true)
    private DataMoveLevel dataMoveLevel;

    /*
     * Source Container ArmIds
     * This needs to be populated only if DataMoveLevel is set to container
     */
    @JsonProperty(value = "sourceContainerArmIds")
    private List sourceContainerArmIds;

    /*
     * Ignore the artifacts which are already moved.
     */
    @JsonProperty(value = "ignoreMoved")
    private Boolean ignoreMoved;

    /**
     * Creates an instance of PrepareDataMoveRequest class.
     */
    public PrepareDataMoveRequest() {
    }

    /**
     * Get the targetResourceId property: ARM Id of target vault.
     * 
     * @return the targetResourceId value.
     */
    public String targetResourceId() {
        return this.targetResourceId;
    }

    /**
     * Set the targetResourceId property: ARM Id of target vault.
     * 
     * @param targetResourceId the targetResourceId value to set.
     * @return the PrepareDataMoveRequest object itself.
     */
    public PrepareDataMoveRequest withTargetResourceId(String targetResourceId) {
        this.targetResourceId = targetResourceId;
        return this;
    }

    /**
     * Get the targetRegion property: Target Region.
     * 
     * @return the targetRegion value.
     */
    public String targetRegion() {
        return this.targetRegion;
    }

    /**
     * Set the targetRegion property: Target Region.
     * 
     * @param targetRegion the targetRegion value to set.
     * @return the PrepareDataMoveRequest object itself.
     */
    public PrepareDataMoveRequest withTargetRegion(String targetRegion) {
        this.targetRegion = targetRegion;
        return this;
    }

    /**
     * Get the dataMoveLevel property: DataMove Level.
     * 
     * @return the dataMoveLevel value.
     */
    public DataMoveLevel dataMoveLevel() {
        return this.dataMoveLevel;
    }

    /**
     * Set the dataMoveLevel property: DataMove Level.
     * 
     * @param dataMoveLevel the dataMoveLevel value to set.
     * @return the PrepareDataMoveRequest object itself.
     */
    public PrepareDataMoveRequest withDataMoveLevel(DataMoveLevel dataMoveLevel) {
        this.dataMoveLevel = dataMoveLevel;
        return this;
    }

    /**
     * Get the sourceContainerArmIds property: Source Container ArmIds
     * This needs to be populated only if DataMoveLevel is set to container.
     * 
     * @return the sourceContainerArmIds value.
     */
    public List sourceContainerArmIds() {
        return this.sourceContainerArmIds;
    }

    /**
     * Set the sourceContainerArmIds property: Source Container ArmIds
     * This needs to be populated only if DataMoveLevel is set to container.
     * 
     * @param sourceContainerArmIds the sourceContainerArmIds value to set.
     * @return the PrepareDataMoveRequest object itself.
     */
    public PrepareDataMoveRequest withSourceContainerArmIds(List sourceContainerArmIds) {
        this.sourceContainerArmIds = sourceContainerArmIds;
        return this;
    }

    /**
     * Get the ignoreMoved property: Ignore the artifacts which are already moved.
     * 
     * @return the ignoreMoved value.
     */
    public Boolean ignoreMoved() {
        return this.ignoreMoved;
    }

    /**
     * Set the ignoreMoved property: Ignore the artifacts which are already moved.
     * 
     * @param ignoreMoved the ignoreMoved value to set.
     * @return the PrepareDataMoveRequest object itself.
     */
    public PrepareDataMoveRequest withIgnoreMoved(Boolean ignoreMoved) {
        this.ignoreMoved = ignoreMoved;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (targetResourceId() == null) {
            throw LOGGER.logExceptionAsError(new IllegalArgumentException(
                "Missing required property targetResourceId in model PrepareDataMoveRequest"));
        }
        if (targetRegion() == null) {
            throw LOGGER.logExceptionAsError(
                new IllegalArgumentException("Missing required property targetRegion in model PrepareDataMoveRequest"));
        }
        if (dataMoveLevel() == null) {
            throw LOGGER.logExceptionAsError(new IllegalArgumentException(
                "Missing required property dataMoveLevel in model PrepareDataMoveRequest"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(PrepareDataMoveRequest.class);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy