// 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.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Schema for Desktop properties. */
@Fluent
public final class DesktopInner extends ProxyResource {
    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Detailed properties for Desktop
     */
    @JsonProperty(value = "properties")
    private DesktopProperties innerProperties;

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

    /**
     * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the innerProperties property: Detailed properties for Desktop.
     *
     * @return the innerProperties value.
     */
    private DesktopProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the objectId property: ObjectId of Desktop. (internal use).
     *
     * @return the objectId value.
     */
    public String objectId() {
        return this.innerProperties() == null ? null : this.innerProperties().objectId();
    }

    /**
     * Get the description property: Description of Desktop.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Description of Desktop.
     *
     * @param description the description value to set.
     * @return the DesktopInner object itself.
     */
    public DesktopInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DesktopProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the friendlyName property: Friendly name of Desktop.
     *
     * @return the friendlyName value.
     */
    public String friendlyName() {
        return this.innerProperties() == null ? null : this.innerProperties().friendlyName();
    }

    /**
     * Set the friendlyName property: Friendly name of Desktop.
     *
     * @param friendlyName the friendlyName value to set.
     * @return the DesktopInner object itself.
     */
    public DesktopInner withFriendlyName(String friendlyName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DesktopProperties();
        }
        this.innerProperties().withFriendlyName(friendlyName);
        return this;
    }

    /**
     * Get the iconHash property: Hash of the icon.
     *
     * @return the iconHash value.
     */
    public String iconHash() {
        return this.innerProperties() == null ? null : this.innerProperties().iconHash();
    }

    /**
     * Get the iconContent property: The icon a 64 bit string as a byte array.
     *
     * @return the iconContent value.
     */
    public byte[] iconContent() {
        return this.innerProperties() == null ? new byte[0] : this.innerProperties().iconContent();
    }

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