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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.devcenter.models.HibernateSupport;
import com.azure.resourcemanager.devcenter.models.ProvisioningState;
import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of an image. */
@Immutable
public final class ImageProperties {
    /*
     * The description of the image.
     */
    @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
    private String description;

    /*
     * The publisher of the image.
     */
    @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY)
    private String publisher;

    /*
     * The name of the image offer.
     */
    @JsonProperty(value = "offer", access = JsonProperty.Access.WRITE_ONLY)
    private String offer;

    /*
     * The SKU name for the image.
     */
    @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
    private String sku;

    /*
     * The recommended machine configuration to use with the image.
     */
    @JsonProperty(value = "recommendedMachineConfiguration", access = JsonProperty.Access.WRITE_ONLY)
    private RecommendedMachineConfiguration recommendedMachineConfiguration;

    /*
     * The provisioning state of the resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To
     * find out more see https://aka.ms/devbox/hibernate
     */
    @JsonProperty(value = "hibernateSupport", access = JsonProperty.Access.WRITE_ONLY)
    private HibernateSupport hibernateSupport;

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

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

    /**
     * Get the publisher property: The publisher of the image.
     *
     * @return the publisher value.
     */
    public String publisher() {
        return this.publisher;
    }

    /**
     * Get the offer property: The name of the image offer.
     *
     * @return the offer value.
     */
    public String offer() {
        return this.offer;
    }

    /**
     * Get the sku property: The SKU name for the image.
     *
     * @return the sku value.
     */
    public String sku() {
        return this.sku;
    }

    /**
     * Get the recommendedMachineConfiguration property: The recommended machine configuration to use with the image.
     *
     * @return the recommendedMachineConfiguration value.
     */
    public RecommendedMachineConfiguration recommendedMachineConfiguration() {
        return this.recommendedMachineConfiguration;
    }

    /**
     * Get the provisioningState property: The provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the hibernateSupport property: Indicates whether this image has hibernate enabled. Not all images are capable
     * of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate.
     *
     * @return the hibernateSupport value.
     */
    public HibernateSupport hibernateSupport() {
        return this.hibernateSupport;
    }

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