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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** InMage Azure V2 input to update replication protected item. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
@JsonTypeName("A2A")
@Fluent
public final class A2AUpdateReplicationProtectedItemInput extends UpdateReplicationProtectedItemProviderInput {
    /*
     * The target cloud service ARM Id (for V1).
     */
    @JsonProperty(value = "recoveryCloudServiceId")
    private String recoveryCloudServiceId;

    /*
     * The target resource group ARM Id (for V2).
     */
    @JsonProperty(value = "recoveryResourceGroupId")
    private String recoveryResourceGroupId;

    /*
     * Managed disk update details.
     */
    @JsonProperty(value = "managedDiskUpdateDetails")
    private List<A2AVmManagedDiskUpdateDetails> managedDiskUpdateDetails;

    /*
     * The boot diagnostic storage account.
     */
    @JsonProperty(value = "recoveryBootDiagStorageAccountId")
    private String recoveryBootDiagStorageAccountId;

    /*
     * The recovery os disk encryption information.
     */
    @JsonProperty(value = "diskEncryptionInfo")
    private DiskEncryptionInfo diskEncryptionInfo;

    /*
     * The user given name for Test Failover VM.
     */
    @JsonProperty(value = "tfoAzureVMName")
    private String tfoAzureVMName;

    /*
     * The recovery proximity placement group Id.
     */
    @JsonProperty(value = "recoveryProximityPlacementGroupId")
    private String recoveryProximityPlacementGroupId;

    /*
     * The recovery virtual machine scale set Id.
     */
    @JsonProperty(value = "recoveryVirtualMachineScaleSetId")
    private String recoveryVirtualMachineScaleSetId;

    /*
     * The recovery capacity reservation group Id.
     */
    @JsonProperty(value = "recoveryCapacityReservationGroupId")
    private String recoveryCapacityReservationGroupId;

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

    /**
     * Get the recoveryCloudServiceId property: The target cloud service ARM Id (for V1).
     *
     * @return the recoveryCloudServiceId value.
     */
    public String recoveryCloudServiceId() {
        return this.recoveryCloudServiceId;
    }

    /**
     * Set the recoveryCloudServiceId property: The target cloud service ARM Id (for V1).
     *
     * @param recoveryCloudServiceId the recoveryCloudServiceId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryCloudServiceId(String recoveryCloudServiceId) {
        this.recoveryCloudServiceId = recoveryCloudServiceId;
        return this;
    }

    /**
     * Get the recoveryResourceGroupId property: The target resource group ARM Id (for V2).
     *
     * @return the recoveryResourceGroupId value.
     */
    public String recoveryResourceGroupId() {
        return this.recoveryResourceGroupId;
    }

    /**
     * Set the recoveryResourceGroupId property: The target resource group ARM Id (for V2).
     *
     * @param recoveryResourceGroupId the recoveryResourceGroupId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryResourceGroupId(String recoveryResourceGroupId) {
        this.recoveryResourceGroupId = recoveryResourceGroupId;
        return this;
    }

    /**
     * Get the managedDiskUpdateDetails property: Managed disk update details.
     *
     * @return the managedDiskUpdateDetails value.
     */
    public List<A2AVmManagedDiskUpdateDetails> managedDiskUpdateDetails() {
        return this.managedDiskUpdateDetails;
    }

    /**
     * Set the managedDiskUpdateDetails property: Managed disk update details.
     *
     * @param managedDiskUpdateDetails the managedDiskUpdateDetails value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withManagedDiskUpdateDetails(
        List<A2AVmManagedDiskUpdateDetails> managedDiskUpdateDetails) {
        this.managedDiskUpdateDetails = managedDiskUpdateDetails;
        return this;
    }

    /**
     * Get the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account.
     *
     * @return the recoveryBootDiagStorageAccountId value.
     */
    public String recoveryBootDiagStorageAccountId() {
        return this.recoveryBootDiagStorageAccountId;
    }

    /**
     * Set the recoveryBootDiagStorageAccountId property: The boot diagnostic storage account.
     *
     * @param recoveryBootDiagStorageAccountId the recoveryBootDiagStorageAccountId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryBootDiagStorageAccountId(
        String recoveryBootDiagStorageAccountId) {
        this.recoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId;
        return this;
    }

    /**
     * Get the diskEncryptionInfo property: The recovery os disk encryption information.
     *
     * @return the diskEncryptionInfo value.
     */
    public DiskEncryptionInfo diskEncryptionInfo() {
        return this.diskEncryptionInfo;
    }

    /**
     * Set the diskEncryptionInfo property: The recovery os disk encryption information.
     *
     * @param diskEncryptionInfo the diskEncryptionInfo value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withDiskEncryptionInfo(DiskEncryptionInfo diskEncryptionInfo) {
        this.diskEncryptionInfo = diskEncryptionInfo;
        return this;
    }

    /**
     * Get the tfoAzureVMName property: The user given name for Test Failover VM.
     *
     * @return the tfoAzureVMName value.
     */
    public String tfoAzureVMName() {
        return this.tfoAzureVMName;
    }

    /**
     * Set the tfoAzureVMName property: The user given name for Test Failover VM.
     *
     * @param tfoAzureVMName the tfoAzureVMName value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withTfoAzureVMName(String tfoAzureVMName) {
        this.tfoAzureVMName = tfoAzureVMName;
        return this;
    }

    /**
     * Get the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id.
     *
     * @return the recoveryProximityPlacementGroupId value.
     */
    public String recoveryProximityPlacementGroupId() {
        return this.recoveryProximityPlacementGroupId;
    }

    /**
     * Set the recoveryProximityPlacementGroupId property: The recovery proximity placement group Id.
     *
     * @param recoveryProximityPlacementGroupId the recoveryProximityPlacementGroupId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryProximityPlacementGroupId(
        String recoveryProximityPlacementGroupId) {
        this.recoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId;
        return this;
    }

    /**
     * Get the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set Id.
     *
     * @return the recoveryVirtualMachineScaleSetId value.
     */
    public String recoveryVirtualMachineScaleSetId() {
        return this.recoveryVirtualMachineScaleSetId;
    }

    /**
     * Set the recoveryVirtualMachineScaleSetId property: The recovery virtual machine scale set Id.
     *
     * @param recoveryVirtualMachineScaleSetId the recoveryVirtualMachineScaleSetId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryVirtualMachineScaleSetId(
        String recoveryVirtualMachineScaleSetId) {
        this.recoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId;
        return this;
    }

    /**
     * Get the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id.
     *
     * @return the recoveryCapacityReservationGroupId value.
     */
    public String recoveryCapacityReservationGroupId() {
        return this.recoveryCapacityReservationGroupId;
    }

    /**
     * Set the recoveryCapacityReservationGroupId property: The recovery capacity reservation group Id.
     *
     * @param recoveryCapacityReservationGroupId the recoveryCapacityReservationGroupId value to set.
     * @return the A2AUpdateReplicationProtectedItemInput object itself.
     */
    public A2AUpdateReplicationProtectedItemInput withRecoveryCapacityReservationGroupId(
        String recoveryCapacityReservationGroupId) {
        this.recoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (managedDiskUpdateDetails() != null) {
            managedDiskUpdateDetails().forEach(e -> e.validate());
        }
        if (diskEncryptionInfo() != null) {
            diskEncryptionInfo().validate();
        }
    }
}
