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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Datastore account key secrets. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType")
@JsonTypeName("AccountKey")
@Fluent
public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner {
    /*
     * Storage account key.
     */
    @JsonProperty(value = "key")
    private String key;

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

    /**
     * Get the key property: Storage account key.
     *
     * @return the key value.
     */
    public String key() {
        return this.key;
    }

    /**
     * Set the key property: Storage account key.
     *
     * @param key the key value to set.
     * @return the AccountKeyDatastoreSecrets object itself.
     */
    public AccountKeyDatastoreSecrets withKey(String key) {
        this.key = key;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
