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

package com.azure.resourcemanager.avs.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The properties of customer managed encryption key. */
@Fluent
public final class Encryption {
    /*
     * Status of customer managed encryption key
     */
    @JsonProperty(value = "status")
    private EncryptionState status;

    /*
     * The key vault where the encryption key is stored
     */
    @JsonProperty(value = "keyVaultProperties")
    private EncryptionKeyVaultProperties keyVaultProperties;

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

    /**
     * Get the status property: Status of customer managed encryption key.
     *
     * @return the status value.
     */
    public EncryptionState status() {
        return this.status;
    }

    /**
     * Set the status property: Status of customer managed encryption key.
     *
     * @param status the status value to set.
     * @return the Encryption object itself.
     */
    public Encryption withStatus(EncryptionState status) {
        this.status = status;
        return this;
    }

    /**
     * Get the keyVaultProperties property: The key vault where the encryption key is stored.
     *
     * @return the keyVaultProperties value.
     */
    public EncryptionKeyVaultProperties keyVaultProperties() {
        return this.keyVaultProperties;
    }

    /**
     * Set the keyVaultProperties property: The key vault where the encryption key is stored.
     *
     * @param keyVaultProperties the keyVaultProperties value to set.
     * @return the Encryption object itself.
     */
    public Encryption withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultProperties) {
        this.keyVaultProperties = keyVaultProperties;
        return this;
    }

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