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

package com.azure.resourcemanager.imagebuilder.models;

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

/** Specifies optimization to be performed on image. */
@Fluent
public final class ImageTemplatePropertiesOptimize {
    /*
     * Optimization is applied on the image for a faster VM boot.
     */
    @JsonProperty(value = "vmBoot")
    private ImageTemplatePropertiesOptimizeVmBoot vmBoot;

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

    /**
     * Get the vmBoot property: Optimization is applied on the image for a faster VM boot.
     *
     * @return the vmBoot value.
     */
    public ImageTemplatePropertiesOptimizeVmBoot vmBoot() {
        return this.vmBoot;
    }

    /**
     * Set the vmBoot property: Optimization is applied on the image for a faster VM boot.
     *
     * @param vmBoot the vmBoot value to set.
     * @return the ImageTemplatePropertiesOptimize object itself.
     */
    public ImageTemplatePropertiesOptimize withVmBoot(ImageTemplatePropertiesOptimizeVmBoot vmBoot) {
        this.vmBoot = vmBoot;
        return this;
    }

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