// 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.ExternalNetworkPatchProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The ExternalNetwork patch resource definition. */
@Fluent
public final class ExternalNetworkPatch {
    /*
     * External Network Patch properties.
     */
    @JsonProperty(value = "properties")
    private ExternalNetworkPatchProperties innerProperties;

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

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

    /**
     * Get the peeringOption property: Peering option list.
     *
     * @return the peeringOption value.
     */
    public PeeringOption peeringOption() {
        return this.innerProperties() == null ? null : this.innerProperties().peeringOption();
    }

    /**
     * Set the peeringOption property: Peering option list.
     *
     * @param peeringOption the peeringOption value to set.
     * @return the ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withPeeringOption(PeeringOption peeringOption) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        this.innerProperties().withPeeringOption(peeringOption);
        return this;
    }

    /**
     * Get the optionBProperties property: option B properties object.
     *
     * @return the optionBProperties value.
     */
    public OptionBProperties optionBProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().optionBProperties();
    }

    /**
     * Set the optionBProperties property: option B properties object.
     *
     * @param optionBProperties the optionBProperties value to set.
     * @return the ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withOptionBProperties(OptionBProperties optionBProperties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        this.innerProperties().withOptionBProperties(optionBProperties);
        return this;
    }

    /**
     * Get the optionAProperties property: option A properties object.
     *
     * @return the optionAProperties value.
     */
    public Layer3OptionAProperties optionAProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().optionAProperties();
    }

    /**
     * Set the optionAProperties property: option A properties object.
     *
     * @param optionAProperties the optionAProperties value to set.
     * @return the ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withOptionAProperties(Layer3OptionAProperties optionAProperties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        this.innerProperties().withOptionAProperties(optionAProperties);
        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 ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        this.innerProperties().withImportRoutePolicyId(importRoutePolicyId);
        return this;
    }

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

    /**
     * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy.
     *
     * @param exportRoutePolicyId the exportRoutePolicyId value to set.
     * @return the ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        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 ExternalNetworkPatch object itself.
     */
    public ExternalNetworkPatch withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExternalNetworkPatchProperties();
        }
        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();
        }
    }
}
