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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.automation.models.EncryptionProperties;
import com.azure.resourcemanager.automation.models.Sku;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The parameters supplied to the update account properties. */
@Fluent
public final class AutomationAccountUpdateProperties {
    /*
     * Gets or sets account SKU.
     */
    @JsonProperty(value = "sku")
    private Sku sku;

    /*
     * Set the encryption properties for the automation account
     */
    @JsonProperty(value = "encryption")
    private EncryptionProperties encryption;

    /*
     * Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) is allowed from the public internet
     */
    @JsonProperty(value = "publicNetworkAccess")
    private Boolean publicNetworkAccess;

    /*
     * Indicates whether requests using non-AAD authentication are blocked
     */
    @JsonProperty(value = "disableLocalAuth")
    private Boolean disableLocalAuth;

    /**
     * Get the sku property: Gets or sets account SKU.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: Gets or sets account SKU.
     *
     * @param sku the sku value to set.
     * @return the AutomationAccountUpdateProperties object itself.
     */
    public AutomationAccountUpdateProperties withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the encryption property: Set the encryption properties for the automation account.
     *
     * @return the encryption value.
     */
    public EncryptionProperties encryption() {
        return this.encryption;
    }

    /**
     * Set the encryption property: Set the encryption properties for the automation account.
     *
     * @param encryption the encryption value to set.
     * @return the AutomationAccountUpdateProperties object itself.
     */
    public AutomationAccountUpdateProperties withEncryption(EncryptionProperties encryption) {
        this.encryption = encryption;
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) is
     * allowed from the public internet.
     *
     * @return the publicNetworkAccess value.
     */
    public Boolean publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Set the publicNetworkAccess property: Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) is
     * allowed from the public internet.
     *
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the AutomationAccountUpdateProperties object itself.
     */
    public AutomationAccountUpdateProperties withPublicNetworkAccess(Boolean publicNetworkAccess) {
        this.publicNetworkAccess = publicNetworkAccess;
        return this;
    }

    /**
     * Get the disableLocalAuth property: Indicates whether requests using non-AAD authentication are blocked.
     *
     * @return the disableLocalAuth value.
     */
    public Boolean disableLocalAuth() {
        return this.disableLocalAuth;
    }

    /**
     * Set the disableLocalAuth property: Indicates whether requests using non-AAD authentication are blocked.
     *
     * @param disableLocalAuth the disableLocalAuth value to set.
     * @return the AutomationAccountUpdateProperties object itself.
     */
    public AutomationAccountUpdateProperties withDisableLocalAuth(Boolean disableLocalAuth) {
        this.disableLocalAuth = disableLocalAuth;
        return this;
    }

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