// 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;
import java.util.List;

/** Route policy statement condition properties. */
@Fluent
public final class StatementConditionProperties extends IpCommunityIdList {
    /*
     * Type of the condition used.
     */
    @JsonProperty(value = "type")
    private RoutePolicyConditionType type;

    /*
     * Arm Resource Id of IpPrefix.
     */
    @JsonProperty(value = "ipPrefixId")
    private String ipPrefixId;

    /*
     * List of IP Extended Community resource IDs.
     */
    @JsonProperty(value = "ipExtendedCommunityIds")
    private List<String> ipExtendedCommunityIds;

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

    /**
     * Get the type property: Type of the condition used.
     *
     * @return the type value.
     */
    public RoutePolicyConditionType type() {
        return this.type;
    }

    /**
     * Set the type property: Type of the condition used.
     *
     * @param type the type value to set.
     * @return the StatementConditionProperties object itself.
     */
    public StatementConditionProperties withType(RoutePolicyConditionType type) {
        this.type = type;
        return this;
    }

    /**
     * Get the ipPrefixId property: Arm Resource Id of IpPrefix.
     *
     * @return the ipPrefixId value.
     */
    public String ipPrefixId() {
        return this.ipPrefixId;
    }

    /**
     * Set the ipPrefixId property: Arm Resource Id of IpPrefix.
     *
     * @param ipPrefixId the ipPrefixId value to set.
     * @return the StatementConditionProperties object itself.
     */
    public StatementConditionProperties withIpPrefixId(String ipPrefixId) {
        this.ipPrefixId = ipPrefixId;
        return this;
    }

    /**
     * Get the ipExtendedCommunityIds property: List of IP Extended Community resource IDs.
     *
     * @return the ipExtendedCommunityIds value.
     */
    public List<String> ipExtendedCommunityIds() {
        return this.ipExtendedCommunityIds;
    }

    /**
     * Set the ipExtendedCommunityIds property: List of IP Extended Community resource IDs.
     *
     * @param ipExtendedCommunityIds the ipExtendedCommunityIds value to set.
     * @return the StatementConditionProperties object itself.
     */
    public StatementConditionProperties withIpExtendedCommunityIds(List<String> ipExtendedCommunityIds) {
        this.ipExtendedCommunityIds = ipExtendedCommunityIds;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public StatementConditionProperties withIpCommunityIds(List<String> ipCommunityIds) {
        super.withIpCommunityIds(ipCommunityIds);
        return this;
    }

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