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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Settings for a personal compute instance. */
@Fluent
public final class PersonalComputeInstanceSettings {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(PersonalComputeInstanceSettings.class);

    /*
     * A user explicitly assigned to a personal compute instance.
     */
    @JsonProperty(value = "assignedUser")
    private AssignedUser assignedUser;

    /**
     * Get the assignedUser property: A user explicitly assigned to a personal compute instance.
     *
     * @return the assignedUser value.
     */
    public AssignedUser assignedUser() {
        return this.assignedUser;
    }

    /**
     * Set the assignedUser property: A user explicitly assigned to a personal compute instance.
     *
     * @param assignedUser the assignedUser value to set.
     * @return the PersonalComputeInstanceSettings object itself.
     */
    public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUser) {
        this.assignedUser = assignedUser;
        return this;
    }

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