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

package com.azure.resourcemanager.logic.models;

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

/** The encryption configuration for the integration service environment. */
@Fluent
public final class IntegrationServiceEnvironmenEncryptionConfiguration {
    /*
     * The encryption key reference.
     */
    @JsonProperty(value = "encryptionKeyReference")
    private IntegrationServiceEnvironmenEncryptionKeyReference encryptionKeyReference;

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

    /**
     * Get the encryptionKeyReference property: The encryption key reference.
     *
     * @return the encryptionKeyReference value.
     */
    public IntegrationServiceEnvironmenEncryptionKeyReference encryptionKeyReference() {
        return this.encryptionKeyReference;
    }

    /**
     * Set the encryptionKeyReference property: The encryption key reference.
     *
     * @param encryptionKeyReference the encryptionKeyReference value to set.
     * @return the IntegrationServiceEnvironmenEncryptionConfiguration object itself.
     */
    public IntegrationServiceEnvironmenEncryptionConfiguration withEncryptionKeyReference(
        IntegrationServiceEnvironmenEncryptionKeyReference encryptionKeyReference) {
        this.encryptionKeyReference = encryptionKeyReference;
        return this;
    }

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