// 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.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkPatchProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The InternalNetwork patch resource definition. */
@Fluent
public final class InternalNetworkPatch {
    /*
     * InternalNetwork Patch properties.
     */
    @JsonProperty(value = "properties")
    private InternalNetworkPatchProperties innerProperties;

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

    /**
     * Get the innerProperties property: InternalNetwork Patch properties.
     *
     * @return the innerProperties value.
     */
    private InternalNetworkPatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the mtu property: Maximum transmission unit. Default value is 1500.
     *
     * @return the mtu value.
     */
    public Integer mtu() {
        return this.innerProperties() == null ? null : this.innerProperties().mtu();
    }

    /**
     * Set the mtu property: Maximum transmission unit. Default value is 1500.
     *
     * @param mtu the mtu value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withMtu(Integer mtu) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withMtu(mtu);
        return this;
    }

    /**
     * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets.
     *
     * @return the connectedIPv4Subnets value.
     */
    public List<ConnectedSubnet> connectedIPv4Subnets() {
        return this.innerProperties() == null ? null : this.innerProperties().connectedIPv4Subnets();
    }

    /**
     * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets.
     *
     * @param connectedIPv4Subnets the connectedIPv4Subnets value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withConnectedIPv4Subnets(List<ConnectedSubnet> connectedIPv4Subnets) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withConnectedIPv4Subnets(connectedIPv4Subnets);
        return this;
    }

    /**
     * Get the connectedIPv6Subnets property: List with object connected IPv6 Subnets.
     *
     * @return the connectedIPv6Subnets value.
     */
    public List<ConnectedSubnet> connectedIPv6Subnets() {
        return this.innerProperties() == null ? null : this.innerProperties().connectedIPv6Subnets();
    }

    /**
     * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets.
     *
     * @param connectedIPv6Subnets the connectedIPv6Subnets value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withConnectedIPv6Subnets(List<ConnectedSubnet> connectedIPv6Subnets) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withConnectedIPv6Subnets(connectedIPv6Subnets);
        return this;
    }

    /**
     * Get the staticRouteConfiguration property: Static Route Configuration properties.
     *
     * @return the staticRouteConfiguration value.
     */
    public StaticRouteConfiguration staticRouteConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration();
    }

    /**
     * Set the staticRouteConfiguration property: Static Route Configuration properties.
     *
     * @param staticRouteConfiguration the staticRouteConfiguration value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration);
        return this;
    }

    /**
     * Get the bgpConfiguration property: BGP configuration properties.
     *
     * @return the bgpConfiguration value.
     */
    public BgpConfiguration bgpConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration();
    }

    /**
     * Set the bgpConfiguration property: BGP configuration properties.
     *
     * @param bgpConfiguration the bgpConfiguration value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withBgpConfiguration(BgpConfiguration bgpConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withBgpConfiguration(bgpConfiguration);
        return this;
    }

    /**
     * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @return the importRoutePolicyId value.
     */
    public String importRoutePolicyId() {
        return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId();
    }

    /**
     * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @param importRoutePolicyId the importRoutePolicyId value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withImportRoutePolicyId(importRoutePolicyId);
        return this;
    }

    /**
     * Get the exportRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @return the exportRoutePolicyId value.
     */
    public String exportRoutePolicyId() {
        return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId();
    }

    /**
     * Set the exportRoutePolicyId property: ARM resource ID of importRoutePolicy.
     *
     * @param exportRoutePolicyId the exportRoutePolicyId value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId);
        return this;
    }

    /**
     * Get the annotation property: Switch configuration description.
     *
     * @return the annotation value.
     */
    public String annotation() {
        return this.innerProperties() == null ? null : this.innerProperties().annotation();
    }

    /**
     * Set the annotation property: Switch configuration description.
     *
     * @param annotation the annotation value to set.
     * @return the InternalNetworkPatch object itself.
     */
    public InternalNetworkPatch withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InternalNetworkPatchProperties();
        }
        this.innerProperties().withAnnotation(annotation);
        return this;
    }

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