// 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.ComputeSecretsInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Secrets related to a Machine Learning compute based on AKS. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType")
@JsonTypeName("VirtualMachine")
@Fluent
public final class VirtualMachineSecrets extends ComputeSecretsInner {
    /*
     * Admin credentials for virtual machine.
     */
    @JsonProperty(value = "administratorAccount")
    private VirtualMachineSshCredentials administratorAccount;

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

    /**
     * Get the administratorAccount property: Admin credentials for virtual machine.
     *
     * @return the administratorAccount value.
     */
    public VirtualMachineSshCredentials administratorAccount() {
        return this.administratorAccount;
    }

    /**
     * Set the administratorAccount property: Admin credentials for virtual machine.
     *
     * @param administratorAccount the administratorAccount value to set.
     * @return the VirtualMachineSecrets object itself.
     */
    public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) {
        this.administratorAccount = administratorAccount;
        return this;
    }

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