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

package com.azure.resourcemanager.postgresqlflexibleserver.models;

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

/** Network properties of a server. */
@Fluent
public final class Network {
    /*
     * public network access is enabled or not
     */
    @JsonProperty(value = "publicNetworkAccess", access = JsonProperty.Access.WRITE_ONLY)
    private ServerPublicNetworkAccessState publicNetworkAccess;

    /*
     * Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be
     * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for
     * Private DNS zone.
     */
    @JsonProperty(value = "delegatedSubnetResourceId")
    private String delegatedSubnetResourceId;

    /*
     * Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be
     * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for
     * Private DNS zone.
     */
    @JsonProperty(value = "privateDnsZoneArmResourceId")
    private String privateDnsZoneArmResourceId;

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

    /**
     * Get the publicNetworkAccess property: public network access is enabled or not.
     *
     * @return the publicNetworkAccess value.
     */
    public ServerPublicNetworkAccessState publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Get the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed
     * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
     * this only if we want to update the value for Private DNS zone.
     *
     * @return the delegatedSubnetResourceId value.
     */
    public String delegatedSubnetResourceId() {
        return this.delegatedSubnetResourceId;
    }

    /**
     * Set the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed
     * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
     * this only if we want to update the value for Private DNS zone.
     *
     * @param delegatedSubnetResourceId the delegatedSubnetResourceId value to set.
     * @return the Network object itself.
     */
    public Network withDelegatedSubnetResourceId(String delegatedSubnetResourceId) {
        this.delegatedSubnetResourceId = delegatedSubnetResourceId;
        return this;
    }

    /**
     * Get the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed
     * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
     * this only if we want to update the value for Private DNS zone.
     *
     * @return the privateDnsZoneArmResourceId value.
     */
    public String privateDnsZoneArmResourceId() {
        return this.privateDnsZoneArmResourceId;
    }

    /**
     * Set the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed
     * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
     * this only if we want to update the value for Private DNS zone.
     *
     * @param privateDnsZoneArmResourceId the privateDnsZoneArmResourceId value to set.
     * @return the Network object itself.
     */
    public Network withPrivateDnsZoneArmResourceId(String privateDnsZoneArmResourceId) {
        this.privateDnsZoneArmResourceId = privateDnsZoneArmResourceId;
        return this;
    }

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