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

package com.azure.resourcemanager.connectedvmware.models;

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

/** Defines the resource properties. */
@Fluent
public final class OsProfile {
    /*
     * Gets or sets computer name.
     */
    @JsonProperty(value = "computerName")
    private String computerName;

    /*
     * Gets or sets administrator username.
     */
    @JsonProperty(value = "adminUsername")
    private String adminUsername;

    /*
     * Gets or sets administrator password.
     */
    @JsonProperty(value = "adminPassword")
    private String adminPassword;

    /*
     * Gets or sets the guestId.
     */
    @JsonProperty(value = "guestId")
    private String guestId;

    /*
     * Gets or sets a value indicating whether the VM is ready for extension operations.
     */
    @JsonProperty(value = "allowExtensionOperations", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean allowExtensionOperations;

    /*
     * Gets or sets the type of the os.
     */
    @JsonProperty(value = "osType")
    private OsType osType;

    /*
     * Gets or sets os name.
     */
    @JsonProperty(value = "osName", access = JsonProperty.Access.WRITE_ONLY)
    private String osName;

    /*
     * Gets or sets the current running status of VMware Tools running in the guest operating system.
     */
    @JsonProperty(value = "toolsRunningStatus", access = JsonProperty.Access.WRITE_ONLY)
    private String toolsRunningStatus;

    /*
     * Gets or sets the current version status of VMware Tools installed in the guest operating system.
     */
    @JsonProperty(value = "toolsVersionStatus", access = JsonProperty.Access.WRITE_ONLY)
    private String toolsVersionStatus;

    /*
     * Gets or sets the current version of VMware Tools.
     */
    @JsonProperty(value = "toolsVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String toolsVersion;

    /*
     * Specifies the windows configuration for update management.
     */
    @JsonProperty(value = "windowsConfiguration")
    private OsProfileWindowsConfiguration windowsConfiguration;

    /*
     * Specifies the linux configuration for update management.
     */
    @JsonProperty(value = "linuxConfiguration")
    private OsProfileLinuxConfiguration linuxConfiguration;

    /**
     * Get the computerName property: Gets or sets computer name.
     *
     * @return the computerName value.
     */
    public String computerName() {
        return this.computerName;
    }

    /**
     * Set the computerName property: Gets or sets computer name.
     *
     * @param computerName the computerName value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withComputerName(String computerName) {
        this.computerName = computerName;
        return this;
    }

    /**
     * Get the adminUsername property: Gets or sets administrator username.
     *
     * @return the adminUsername value.
     */
    public String adminUsername() {
        return this.adminUsername;
    }

    /**
     * Set the adminUsername property: Gets or sets administrator username.
     *
     * @param adminUsername the adminUsername value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withAdminUsername(String adminUsername) {
        this.adminUsername = adminUsername;
        return this;
    }

    /**
     * Get the adminPassword property: Gets or sets administrator password.
     *
     * @return the adminPassword value.
     */
    public String adminPassword() {
        return this.adminPassword;
    }

    /**
     * Set the adminPassword property: Gets or sets administrator password.
     *
     * @param adminPassword the adminPassword value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withAdminPassword(String adminPassword) {
        this.adminPassword = adminPassword;
        return this;
    }

    /**
     * Get the guestId property: Gets or sets the guestId.
     *
     * @return the guestId value.
     */
    public String guestId() {
        return this.guestId;
    }

    /**
     * Set the guestId property: Gets or sets the guestId.
     *
     * @param guestId the guestId value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withGuestId(String guestId) {
        this.guestId = guestId;
        return this;
    }

    /**
     * Get the allowExtensionOperations property: Gets or sets a value indicating whether the VM is ready for extension
     * operations.
     *
     * @return the allowExtensionOperations value.
     */
    public Boolean allowExtensionOperations() {
        return this.allowExtensionOperations;
    }

    /**
     * Get the osType property: Gets or sets the type of the os.
     *
     * @return the osType value.
     */
    public OsType osType() {
        return this.osType;
    }

    /**
     * Set the osType property: Gets or sets the type of the os.
     *
     * @param osType the osType value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withOsType(OsType osType) {
        this.osType = osType;
        return this;
    }

    /**
     * Get the osName property: Gets or sets os name.
     *
     * @return the osName value.
     */
    public String osName() {
        return this.osName;
    }

    /**
     * Get the toolsRunningStatus property: Gets or sets the current running status of VMware Tools running in the guest
     * operating system.
     *
     * @return the toolsRunningStatus value.
     */
    public String toolsRunningStatus() {
        return this.toolsRunningStatus;
    }

    /**
     * Get the toolsVersionStatus property: Gets or sets the current version status of VMware Tools installed in the
     * guest operating system.
     *
     * @return the toolsVersionStatus value.
     */
    public String toolsVersionStatus() {
        return this.toolsVersionStatus;
    }

    /**
     * Get the toolsVersion property: Gets or sets the current version of VMware Tools.
     *
     * @return the toolsVersion value.
     */
    public String toolsVersion() {
        return this.toolsVersion;
    }

    /**
     * Get the windowsConfiguration property: Specifies the windows configuration for update management.
     *
     * @return the windowsConfiguration value.
     */
    public OsProfileWindowsConfiguration windowsConfiguration() {
        return this.windowsConfiguration;
    }

    /**
     * Set the windowsConfiguration property: Specifies the windows configuration for update management.
     *
     * @param windowsConfiguration the windowsConfiguration value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withWindowsConfiguration(OsProfileWindowsConfiguration windowsConfiguration) {
        this.windowsConfiguration = windowsConfiguration;
        return this;
    }

    /**
     * Get the linuxConfiguration property: Specifies the linux configuration for update management.
     *
     * @return the linuxConfiguration value.
     */
    public OsProfileLinuxConfiguration linuxConfiguration() {
        return this.linuxConfiguration;
    }

    /**
     * Set the linuxConfiguration property: Specifies the linux configuration for update management.
     *
     * @param linuxConfiguration the linuxConfiguration value to set.
     * @return the OsProfile object itself.
     */
    public OsProfile withLinuxConfiguration(OsProfileLinuxConfiguration linuxConfiguration) {
        this.linuxConfiguration = linuxConfiguration;
        return this;
    }

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