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

package com.azure.resourcemanager.nginx.models;

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

/** The NginxDeploymentProperties model. */
@Fluent
public final class NginxDeploymentProperties {
    /*
     * The provisioningState property.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * The nginxVersion property.
     */
    @JsonProperty(value = "nginxVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String nginxVersion;

    /*
     * The managed resource group to deploy VNet injection related network resources.
     */
    @JsonProperty(value = "managedResourceGroup")
    private String managedResourceGroup;

    /*
     * The networkProfile property.
     */
    @JsonProperty(value = "networkProfile")
    private NginxNetworkProfile networkProfile;

    /*
     * The IP address of the deployment.
     */
    @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String ipAddress;

    /*
     * The enableDiagnosticsSupport property.
     */
    @JsonProperty(value = "enableDiagnosticsSupport")
    private Boolean enableDiagnosticsSupport;

    /*
     * The logging property.
     */
    @JsonProperty(value = "logging")
    private NginxLogging logging;

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

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

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

    /**
     * Get the managedResourceGroup property: The managed resource group to deploy VNet injection related network
     * resources.
     *
     * @return the managedResourceGroup value.
     */
    public String managedResourceGroup() {
        return this.managedResourceGroup;
    }

    /**
     * Set the managedResourceGroup property: The managed resource group to deploy VNet injection related network
     * resources.
     *
     * @param managedResourceGroup the managedResourceGroup value to set.
     * @return the NginxDeploymentProperties object itself.
     */
    public NginxDeploymentProperties withManagedResourceGroup(String managedResourceGroup) {
        this.managedResourceGroup = managedResourceGroup;
        return this;
    }

    /**
     * Get the networkProfile property: The networkProfile property.
     *
     * @return the networkProfile value.
     */
    public NginxNetworkProfile networkProfile() {
        return this.networkProfile;
    }

    /**
     * Set the networkProfile property: The networkProfile property.
     *
     * @param networkProfile the networkProfile value to set.
     * @return the NginxDeploymentProperties object itself.
     */
    public NginxDeploymentProperties withNetworkProfile(NginxNetworkProfile networkProfile) {
        this.networkProfile = networkProfile;
        return this;
    }

    /**
     * Get the ipAddress property: The IP address of the deployment.
     *
     * @return the ipAddress value.
     */
    public String ipAddress() {
        return this.ipAddress;
    }

    /**
     * Get the enableDiagnosticsSupport property: The enableDiagnosticsSupport property.
     *
     * @return the enableDiagnosticsSupport value.
     */
    public Boolean enableDiagnosticsSupport() {
        return this.enableDiagnosticsSupport;
    }

    /**
     * Set the enableDiagnosticsSupport property: The enableDiagnosticsSupport property.
     *
     * @param enableDiagnosticsSupport the enableDiagnosticsSupport value to set.
     * @return the NginxDeploymentProperties object itself.
     */
    public NginxDeploymentProperties withEnableDiagnosticsSupport(Boolean enableDiagnosticsSupport) {
        this.enableDiagnosticsSupport = enableDiagnosticsSupport;
        return this;
    }

    /**
     * Get the logging property: The logging property.
     *
     * @return the logging value.
     */
    public NginxLogging logging() {
        return this.logging;
    }

    /**
     * Set the logging property: The logging property.
     *
     * @param logging the logging value to set.
     * @return the NginxDeploymentProperties object itself.
     */
    public NginxDeploymentProperties withLogging(NginxLogging logging) {
        this.logging = logging;
        return this;
    }

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