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

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

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Updatable properties of an Extension Patch Request. */
@Fluent
public final class PatchExtensionProperties {
    /*
     * Flag to note if this extension participates in auto upgrade of minor version, or not.
     */
    @JsonProperty(value = "autoUpgradeMinorVersion")
    private Boolean autoUpgradeMinorVersion;

    /*
     * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if
     * autoUpgradeMinorVersion is 'true'.
     */
    @JsonProperty(value = "releaseTrain")
    private String releaseTrain;

    /*
     * Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion
     * must be 'false'.
     */
    @JsonProperty(value = "version")
    private String version;

    /*
     * Configuration settings, as name-value pairs for configuring this extension.
     */
    @JsonProperty(value = "configurationSettings")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> configurationSettings;

    /*
     * Configuration settings that are sensitive, as name-value pairs for configuring this extension.
     */
    @JsonProperty(value = "configurationProtectedSettings")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> configurationProtectedSettings;

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

    /**
     * Get the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor
     * version, or not.
     *
     * @return the autoUpgradeMinorVersion value.
     */
    public Boolean autoUpgradeMinorVersion() {
        return this.autoUpgradeMinorVersion;
    }

    /**
     * Set the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor
     * version, or not.
     *
     * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
     * @return the PatchExtensionProperties object itself.
     */
    public PatchExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
        this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
        return this;
    }

    /**
     * Get the releaseTrain property: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable,
     * Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.
     *
     * @return the releaseTrain value.
     */
    public String releaseTrain() {
        return this.releaseTrain;
    }

    /**
     * Set the releaseTrain property: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable,
     * Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.
     *
     * @param releaseTrain the releaseTrain value to set.
     * @return the PatchExtensionProperties object itself.
     */
    public PatchExtensionProperties withReleaseTrain(String releaseTrain) {
        this.releaseTrain = releaseTrain;
        return this;
    }

    /**
     * Get the version property: Version of the extension for this extension, if it is 'pinned' to a specific version.
     * autoUpgradeMinorVersion must be 'false'.
     *
     * @return the version value.
     */
    public String version() {
        return this.version;
    }

    /**
     * Set the version property: Version of the extension for this extension, if it is 'pinned' to a specific version.
     * autoUpgradeMinorVersion must be 'false'.
     *
     * @param version the version value to set.
     * @return the PatchExtensionProperties object itself.
     */
    public PatchExtensionProperties withVersion(String version) {
        this.version = version;
        return this;
    }

    /**
     * Get the configurationSettings property: Configuration settings, as name-value pairs for configuring this
     * extension.
     *
     * @return the configurationSettings value.
     */
    public Map<String, String> configurationSettings() {
        return this.configurationSettings;
    }

    /**
     * Set the configurationSettings property: Configuration settings, as name-value pairs for configuring this
     * extension.
     *
     * @param configurationSettings the configurationSettings value to set.
     * @return the PatchExtensionProperties object itself.
     */
    public PatchExtensionProperties withConfigurationSettings(Map<String, String> configurationSettings) {
        this.configurationSettings = configurationSettings;
        return this;
    }

    /**
     * Get the configurationProtectedSettings property: Configuration settings that are sensitive, as name-value pairs
     * for configuring this extension.
     *
     * @return the configurationProtectedSettings value.
     */
    public Map<String, String> configurationProtectedSettings() {
        return this.configurationProtectedSettings;
    }

    /**
     * Set the configurationProtectedSettings property: Configuration settings that are sensitive, as name-value pairs
     * for configuring this extension.
     *
     * @param configurationProtectedSettings the configurationProtectedSettings value to set.
     * @return the PatchExtensionProperties object itself.
     */
    public PatchExtensionProperties withConfigurationProtectedSettings(
        Map<String, String> configurationProtectedSettings) {
        this.configurationProtectedSettings = configurationProtectedSettings;
        return this;
    }

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