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

package com.azure.resourcemanager.connectedvmware.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.connectedvmware.fluent.models.PatchSettings;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Specifies the windows configuration for update management. */
@Fluent
public final class OsProfileUpdateWindowsConfiguration {
    /*
     * Specifies the patch settings.
     */
    @JsonProperty(value = "patchSettings")
    private PatchSettings innerPatchSettings;

    /**
     * Get the innerPatchSettings property: Specifies the patch settings.
     *
     * @return the innerPatchSettings value.
     */
    private PatchSettings innerPatchSettings() {
        return this.innerPatchSettings;
    }

    /**
     * Get the assessmentMode property: Specifies the assessment mode.
     *
     * @return the assessmentMode value.
     */
    public String assessmentMode() {
        return this.innerPatchSettings() == null ? null : this.innerPatchSettings().assessmentMode();
    }

    /**
     * Set the assessmentMode property: Specifies the assessment mode.
     *
     * @param assessmentMode the assessmentMode value to set.
     * @return the OsProfileUpdateWindowsConfiguration object itself.
     */
    public OsProfileUpdateWindowsConfiguration withAssessmentMode(String assessmentMode) {
        if (this.innerPatchSettings() == null) {
            this.innerPatchSettings = new PatchSettings();
        }
        this.innerPatchSettings().withAssessmentMode(assessmentMode);
        return this;
    }

    /**
     * Get the patchMode property: Specifies the patch mode.
     *
     * @return the patchMode value.
     */
    public String patchMode() {
        return this.innerPatchSettings() == null ? null : this.innerPatchSettings().patchMode();
    }

    /**
     * Set the patchMode property: Specifies the patch mode.
     *
     * @param patchMode the patchMode value to set.
     * @return the OsProfileUpdateWindowsConfiguration object itself.
     */
    public OsProfileUpdateWindowsConfiguration withPatchMode(String patchMode) {
        if (this.innerPatchSettings() == null) {
            this.innerPatchSettings = new PatchSettings();
        }
        this.innerPatchSettings().withPatchMode(patchMode);
        return this;
    }

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