// 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;

/** Recovery disk encryption info (BEK and KEK). */
@Fluent
public final class DiskEncryptionInfo {
    /*
     * The recovery KeyVault reference for secret.
     */
    @JsonProperty(value = "diskEncryptionKeyInfo")
    private DiskEncryptionKeyInfo diskEncryptionKeyInfo;

    /*
     * The recovery KeyVault reference for key.
     */
    @JsonProperty(value = "keyEncryptionKeyInfo")
    private KeyEncryptionKeyInfo keyEncryptionKeyInfo;

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

    /**
     * Get the diskEncryptionKeyInfo property: The recovery KeyVault reference for secret.
     *
     * @return the diskEncryptionKeyInfo value.
     */
    public DiskEncryptionKeyInfo diskEncryptionKeyInfo() {
        return this.diskEncryptionKeyInfo;
    }

    /**
     * Set the diskEncryptionKeyInfo property: The recovery KeyVault reference for secret.
     *
     * @param diskEncryptionKeyInfo the diskEncryptionKeyInfo value to set.
     * @return the DiskEncryptionInfo object itself.
     */
    public DiskEncryptionInfo withDiskEncryptionKeyInfo(DiskEncryptionKeyInfo diskEncryptionKeyInfo) {
        this.diskEncryptionKeyInfo = diskEncryptionKeyInfo;
        return this;
    }

    /**
     * Get the keyEncryptionKeyInfo property: The recovery KeyVault reference for key.
     *
     * @return the keyEncryptionKeyInfo value.
     */
    public KeyEncryptionKeyInfo keyEncryptionKeyInfo() {
        return this.keyEncryptionKeyInfo;
    }

    /**
     * Set the keyEncryptionKeyInfo property: The recovery KeyVault reference for key.
     *
     * @param keyEncryptionKeyInfo the keyEncryptionKeyInfo value to set.
     * @return the DiskEncryptionInfo object itself.
     */
    public DiskEncryptionInfo withKeyEncryptionKeyInfo(KeyEncryptionKeyInfo keyEncryptionKeyInfo) {
        this.keyEncryptionKeyInfo = keyEncryptionKeyInfo;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (diskEncryptionKeyInfo() != null) {
            diskEncryptionKeyInfo().validate();
        }
        if (keyEncryptionKeyInfo() != null) {
            keyEncryptionKeyInfo().validate();
        }
    }
}
