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

package com.azure.resourcemanager.managednetworkfabric.models;

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

/** layer3Configuration. */
@Fluent
public final class Layer3Configuration extends Layer3IpPrefixProperties {
    /*
     * importRoutePolicyId
     */
    @JsonProperty(value = "importRoutePolicyId")
    private String importRoutePolicyId;

    /*
     * exportRoutePolicyId
     */
    @JsonProperty(value = "exportRoutePolicyId")
    private String exportRoutePolicyId;

    /*
     * ASN of PE devices for CE/PE connectivity.Example : 28
     */
    @JsonProperty(value = "peerASN")
    private Integer peerAsn;

    /*
     * VLAN for CE/PE Layer 3 connectivity.Example : 501
     */
    @JsonProperty(value = "vlanId")
    private Integer vlanId;

    /*
     * ASN of CE devices for CE/PE connectivity.
     */
    @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY)
    private Integer fabricAsn;

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

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

    /**
     * Set the importRoutePolicyId property: importRoutePolicyId.
     *
     * @param importRoutePolicyId the importRoutePolicyId value to set.
     * @return the Layer3Configuration object itself.
     */
    public Layer3Configuration withImportRoutePolicyId(String importRoutePolicyId) {
        this.importRoutePolicyId = importRoutePolicyId;
        return this;
    }

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

    /**
     * Set the exportRoutePolicyId property: exportRoutePolicyId.
     *
     * @param exportRoutePolicyId the exportRoutePolicyId value to set.
     * @return the Layer3Configuration object itself.
     */
    public Layer3Configuration withExportRoutePolicyId(String exportRoutePolicyId) {
        this.exportRoutePolicyId = exportRoutePolicyId;
        return this;
    }

    /**
     * Get the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28.
     *
     * @return the peerAsn value.
     */
    public Integer peerAsn() {
        return this.peerAsn;
    }

    /**
     * Set the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28.
     *
     * @param peerAsn the peerAsn value to set.
     * @return the Layer3Configuration object itself.
     */
    public Layer3Configuration withPeerAsn(Integer peerAsn) {
        this.peerAsn = peerAsn;
        return this;
    }

    /**
     * Get the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501.
     *
     * @return the vlanId value.
     */
    public Integer vlanId() {
        return this.vlanId;
    }

    /**
     * Set the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501.
     *
     * @param vlanId the vlanId value to set.
     * @return the Layer3Configuration object itself.
     */
    public Layer3Configuration withVlanId(Integer vlanId) {
        this.vlanId = vlanId;
        return this;
    }

    /**
     * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity.
     *
     * @return the fabricAsn value.
     */
    public Integer fabricAsn() {
        return this.fabricAsn;
    }

    /** {@inheritDoc} */
    @Override
    public Layer3Configuration withPrimaryIpv4Prefix(String primaryIpv4Prefix) {
        super.withPrimaryIpv4Prefix(primaryIpv4Prefix);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public Layer3Configuration withPrimaryIpv6Prefix(String primaryIpv6Prefix) {
        super.withPrimaryIpv6Prefix(primaryIpv6Prefix);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public Layer3Configuration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) {
        super.withSecondaryIpv4Prefix(secondaryIpv4Prefix);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public Layer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) {
        super.withSecondaryIpv6Prefix(secondaryIpv6Prefix);
        return this;
    }

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