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

package com.azure.resourcemanager.databricks.models;

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

/** The object that contains details of encryption used on the workspace. */
@Fluent
public final class WorkspaceEncryptionParameter {
    /*
     * The type of variable that this is
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private CustomParameterType type;

    /*
     * The value which should be used for this field.
     */
    @JsonProperty(value = "value")
    private Encryption value;

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

    /**
     * Get the type property: The type of variable that this is.
     *
     * @return the type value.
     */
    public CustomParameterType type() {
        return this.type;
    }

    /**
     * Get the value property: The value which should be used for this field.
     *
     * @return the value value.
     */
    public Encryption value() {
        return this.value;
    }

    /**
     * Set the value property: The value which should be used for this field.
     *
     * @param value the value value to set.
     * @return the WorkspaceEncryptionParameter object itself.
     */
    public WorkspaceEncryptionParameter withValue(Encryption value) {
        this.value = value;
        return this;
    }

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