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

package com.azure.resourcemanager.desktopvirtualization.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Schema for ApplicationGroup properties. */
@Fluent
public final class ApplicationGroupProperties {
    /*
     * ObjectId of ApplicationGroup. (internal use)
     */
    @JsonProperty(value = "objectId", access = JsonProperty.Access.WRITE_ONLY)
    private String objectId;

    /*
     * Description of ApplicationGroup.
     */
    @JsonProperty(value = "description")
    private String description;

    /*
     * Friendly name of ApplicationGroup.
     */
    @JsonProperty(value = "friendlyName")
    private String friendlyName;

    /*
     * HostPool arm path of ApplicationGroup.
     */
    @JsonProperty(value = "hostPoolArmPath", required = true)
    private String hostPoolArmPath;

    /*
     * Workspace arm path of ApplicationGroup.
     */
    @JsonProperty(value = "workspaceArmPath", access = JsonProperty.Access.WRITE_ONLY)
    private String workspaceArmPath;

    /*
     * Resource Type of ApplicationGroup.
     */
    @JsonProperty(value = "applicationGroupType", required = true)
    private ApplicationGroupType applicationGroupType;

    /*
     * Is cloud pc resource.
     */
    @JsonProperty(value = "cloudPcResource", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean cloudPcResource;

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

    /**
     * Get the objectId property: ObjectId of ApplicationGroup. (internal use).
     *
     * @return the objectId value.
     */
    public String objectId() {
        return this.objectId;
    }

    /**
     * Get the description property: Description of ApplicationGroup.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: Description of ApplicationGroup.
     *
     * @param description the description value to set.
     * @return the ApplicationGroupProperties object itself.
     */
    public ApplicationGroupProperties withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the friendlyName property: Friendly name of ApplicationGroup.
     *
     * @return the friendlyName value.
     */
    public String friendlyName() {
        return this.friendlyName;
    }

    /**
     * Set the friendlyName property: Friendly name of ApplicationGroup.
     *
     * @param friendlyName the friendlyName value to set.
     * @return the ApplicationGroupProperties object itself.
     */
    public ApplicationGroupProperties withFriendlyName(String friendlyName) {
        this.friendlyName = friendlyName;
        return this;
    }

    /**
     * Get the hostPoolArmPath property: HostPool arm path of ApplicationGroup.
     *
     * @return the hostPoolArmPath value.
     */
    public String hostPoolArmPath() {
        return this.hostPoolArmPath;
    }

    /**
     * Set the hostPoolArmPath property: HostPool arm path of ApplicationGroup.
     *
     * @param hostPoolArmPath the hostPoolArmPath value to set.
     * @return the ApplicationGroupProperties object itself.
     */
    public ApplicationGroupProperties withHostPoolArmPath(String hostPoolArmPath) {
        this.hostPoolArmPath = hostPoolArmPath;
        return this;
    }

    /**
     * Get the workspaceArmPath property: Workspace arm path of ApplicationGroup.
     *
     * @return the workspaceArmPath value.
     */
    public String workspaceArmPath() {
        return this.workspaceArmPath;
    }

    /**
     * Get the applicationGroupType property: Resource Type of ApplicationGroup.
     *
     * @return the applicationGroupType value.
     */
    public ApplicationGroupType applicationGroupType() {
        return this.applicationGroupType;
    }

    /**
     * Set the applicationGroupType property: Resource Type of ApplicationGroup.
     *
     * @param applicationGroupType the applicationGroupType value to set.
     * @return the ApplicationGroupProperties object itself.
     */
    public ApplicationGroupProperties withApplicationGroupType(ApplicationGroupType applicationGroupType) {
        this.applicationGroupType = applicationGroupType;
        return this;
    }

    /**
     * Get the cloudPcResource property: Is cloud pc resource.
     *
     * @return the cloudPcResource value.
     */
    public Boolean cloudPcResource() {
        return this.cloudPcResource;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (hostPoolArmPath() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property hostPoolArmPath in model ApplicationGroupProperties"));
        }
        if (applicationGroupType() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property applicationGroupType in model ApplicationGroupProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ApplicationGroupProperties.class);
}
