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

package com.azure.resourcemanager.databoxedge.models;

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

/** Symmetric key for authentication. */
@Fluent
public final class SymmetricKey {
    /*
     * Connection string based on the symmetric key.
     */
    @JsonProperty(value = "connectionString")
    private AsymmetricEncryptedSecret connectionString;

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

    /**
     * Get the connectionString property: Connection string based on the symmetric key.
     *
     * @return the connectionString value.
     */
    public AsymmetricEncryptedSecret connectionString() {
        return this.connectionString;
    }

    /**
     * Set the connectionString property: Connection string based on the symmetric key.
     *
     * @param connectionString the connectionString value to set.
     * @return the SymmetricKey object itself.
     */
    public SymmetricKey withConnectionString(AsymmetricEncryptedSecret connectionString) {
        this.connectionString = connectionString;
        return this;
    }

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