// 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.L3IsolationDomainPatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The L3IsolationDomain patch resource definition. */
@Fluent
public final class L3IsolationDomainPatch {
    /*
     * Resource properties.
     */
    @JsonProperty(value = "properties")
    private L3IsolationDomainPatchProperties innerProperties;

    /*
     * Resource tags
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the innerProperties property: Resource properties.
     *
     * @return the innerProperties value.
     */
    private L3IsolationDomainPatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: Resource tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Resource tags.
     *
     * @param tags the tags value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False".
     *
     * @return the redistributeConnectedSubnets value.
     */
    public RedistributeConnectedSubnets redistributeConnectedSubnets() {
        return this.innerProperties() == null ? null : this.innerProperties().redistributeConnectedSubnets();
    }

    /**
     * Set the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False".
     *
     * @param redistributeConnectedSubnets the redistributeConnectedSubnets value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withRedistributeConnectedSubnets(
        RedistributeConnectedSubnets redistributeConnectedSubnets) {
        if (this.innerProperties() == null) {
            this.innerProperties = new L3IsolationDomainPatchProperties();
        }
        this.innerProperties().withRedistributeConnectedSubnets(redistributeConnectedSubnets);
        return this;
    }

    /**
     * Get the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False".
     *
     * @return the redistributeStaticRoutes value.
     */
    public RedistributeStaticRoutes redistributeStaticRoutes() {
        return this.innerProperties() == null ? null : this.innerProperties().redistributeStaticRoutes();
    }

    /**
     * Set the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False".
     *
     * @param redistributeStaticRoutes the redistributeStaticRoutes value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withRedistributeStaticRoutes(RedistributeStaticRoutes redistributeStaticRoutes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new L3IsolationDomainPatchProperties();
        }
        this.innerProperties().withRedistributeStaticRoutes(redistributeStaticRoutes);
        return this;
    }

    /**
     * Get the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations.
     *
     * @return the aggregateRouteConfiguration value.
     */
    public AggregateRouteConfiguration aggregateRouteConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().aggregateRouteConfiguration();
    }

    /**
     * Set the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations.
     *
     * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withAggregateRouteConfiguration(
        AggregateRouteConfiguration aggregateRouteConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new L3IsolationDomainPatchProperties();
        }
        this.innerProperties().withAggregateRouteConfiguration(aggregateRouteConfiguration);
        return this;
    }

    /**
     * Get the description property: L3 Isolation Domain description.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: L3 Isolation Domain description.
     *
     * @param description the description value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new L3IsolationDomainPatchProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy.
     *
     * @return the connectedSubnetRoutePolicy value.
     */
    public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() {
        return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy();
    }

    /**
     * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy.
     *
     * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set.
     * @return the L3IsolationDomainPatch object itself.
     */
    public L3IsolationDomainPatch withConnectedSubnetRoutePolicy(
        L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) {
        if (this.innerProperties() == null) {
            this.innerProperties = new L3IsolationDomainPatchProperties();
        }
        this.innerProperties().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy);
        return this;
    }

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