// 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.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Azure VM unmanaged disk input details. */
@Fluent
public final class A2AProtectionIntentDiskInputDetails {
    /*
     * The disk Uri.
     */
    @JsonProperty(value = "diskUri", required = true)
    private String diskUri;

    /*
     * The recovery VHD storage account input.
     */
    @JsonProperty(value = "recoveryAzureStorageAccountCustomInput")
    private StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput;

    /*
     * The primary staging storage account input.
     */
    @JsonProperty(value = "primaryStagingStorageAccountCustomInput")
    private StorageAccountCustomDetails primaryStagingStorageAccountCustomInput;

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

    /**
     * Get the diskUri property: The disk Uri.
     *
     * @return the diskUri value.
     */
    public String diskUri() {
        return this.diskUri;
    }

    /**
     * Set the diskUri property: The disk Uri.
     *
     * @param diskUri the diskUri value to set.
     * @return the A2AProtectionIntentDiskInputDetails object itself.
     */
    public A2AProtectionIntentDiskInputDetails withDiskUri(String diskUri) {
        this.diskUri = diskUri;
        return this;
    }

    /**
     * Get the recoveryAzureStorageAccountCustomInput property: The recovery VHD storage account input.
     *
     * @return the recoveryAzureStorageAccountCustomInput value.
     */
    public StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput() {
        return this.recoveryAzureStorageAccountCustomInput;
    }

    /**
     * Set the recoveryAzureStorageAccountCustomInput property: The recovery VHD storage account input.
     *
     * @param recoveryAzureStorageAccountCustomInput the recoveryAzureStorageAccountCustomInput value to set.
     * @return the A2AProtectionIntentDiskInputDetails object itself.
     */
    public A2AProtectionIntentDiskInputDetails withRecoveryAzureStorageAccountCustomInput(
        StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput) {
        this.recoveryAzureStorageAccountCustomInput = recoveryAzureStorageAccountCustomInput;
        return this;
    }

    /**
     * Get the primaryStagingStorageAccountCustomInput property: The primary staging storage account input.
     *
     * @return the primaryStagingStorageAccountCustomInput value.
     */
    public StorageAccountCustomDetails primaryStagingStorageAccountCustomInput() {
        return this.primaryStagingStorageAccountCustomInput;
    }

    /**
     * Set the primaryStagingStorageAccountCustomInput property: The primary staging storage account input.
     *
     * @param primaryStagingStorageAccountCustomInput the primaryStagingStorageAccountCustomInput value to set.
     * @return the A2AProtectionIntentDiskInputDetails object itself.
     */
    public A2AProtectionIntentDiskInputDetails withPrimaryStagingStorageAccountCustomInput(
        StorageAccountCustomDetails primaryStagingStorageAccountCustomInput) {
        this.primaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (diskUri() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property diskUri in model A2AProtectionIntentDiskInputDetails"));
        }
        if (recoveryAzureStorageAccountCustomInput() != null) {
            recoveryAzureStorageAccountCustomInput().validate();
        }
        if (primaryStagingStorageAccountCustomInput() != null) {
            primaryStagingStorageAccountCustomInput().validate();
        }
    }

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