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

package com.azure.resourcemanager.azurestack.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.azurestack.fluent.models.Uri;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Product information. */
@Immutable
public class VirtualMachineExtensionProductProperties {
    /*
     * Specifies kind of compute role included in the package.
     */
    @JsonProperty(value = "computeRole", access = JsonProperty.Access.WRITE_ONLY)
    private ComputeRole computeRole;

    /*
     * Specifies if product is a Virtual Machine Extension.
     */
    @JsonProperty(value = "isSystemExtension", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isSystemExtension;

    /*
     * Specifies a download location where content can be downloaded from.
     */
    @JsonProperty(value = "sourceBlob", access = JsonProperty.Access.WRITE_ONLY)
    private Uri innerSourceBlob;

    /*
     * Indicates if specified product supports multiple extensions.
     */
    @JsonProperty(value = "supportMultipleExtensions", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean supportMultipleExtensions;

    /*
     * Specifies product version.
     */
    @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY)
    private String version;

    /*
     * Specifies operating system used by the product.
     */
    @JsonProperty(value = "vmOsType", access = JsonProperty.Access.WRITE_ONLY)
    private OperatingSystem vmOsType;

    /*
     * Indicates if virtual machine Scale Set is enabled in the specified product.
     */
    @JsonProperty(value = "vmScaleSetEnabled", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean vmScaleSetEnabled;

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

    /**
     * Get the computeRole property: Specifies kind of compute role included in the package.
     *
     * @return the computeRole value.
     */
    public ComputeRole computeRole() {
        return this.computeRole;
    }

    /**
     * Get the isSystemExtension property: Specifies if product is a Virtual Machine Extension.
     *
     * @return the isSystemExtension value.
     */
    public Boolean isSystemExtension() {
        return this.isSystemExtension;
    }

    /**
     * Get the innerSourceBlob property: Specifies a download location where content can be downloaded from.
     *
     * @return the innerSourceBlob value.
     */
    private Uri innerSourceBlob() {
        return this.innerSourceBlob;
    }

    /**
     * Get the supportMultipleExtensions property: Indicates if specified product supports multiple extensions.
     *
     * @return the supportMultipleExtensions value.
     */
    public Boolean supportMultipleExtensions() {
        return this.supportMultipleExtensions;
    }

    /**
     * Get the version property: Specifies product version.
     *
     * @return the version value.
     */
    public String version() {
        return this.version;
    }

    /**
     * Get the vmOsType property: Specifies operating system used by the product.
     *
     * @return the vmOsType value.
     */
    public OperatingSystem vmOsType() {
        return this.vmOsType;
    }

    /**
     * Get the vmScaleSetEnabled property: Indicates if virtual machine Scale Set is enabled in the specified product.
     *
     * @return the vmScaleSetEnabled value.
     */
    public Boolean vmScaleSetEnabled() {
        return this.vmScaleSetEnabled;
    }

    /**
     * Get the uri property: The URI.
     *
     * @return the uri value.
     */
    public String uri() {
        return this.innerSourceBlob() == null ? null : this.innerSourceBlob().uri();
    }

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