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

package com.azure.resourcemanager.peering.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The CDN peering prefix. */
@Immutable
public final class CdnPeeringPrefixInner extends ProxyResource {
    /*
     * The properties that define a cdn peering prefix.
     */
    @JsonProperty(value = "properties")
    private CdnPeeringPrefixProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties that define a cdn peering prefix.
     *
     * @return the innerProperties value.
     */
    private CdnPeeringPrefixProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the prefix property: The prefix.
     *
     * @return the prefix value.
     */
    public String prefix() {
        return this.innerProperties() == null ? null : this.innerProperties().prefix();
    }

    /**
     * Get the azureRegion property: The Azure region.
     *
     * @return the azureRegion value.
     */
    public String azureRegion() {
        return this.innerProperties() == null ? null : this.innerProperties().azureRegion();
    }

    /**
     * Get the azureService property: The Azure service.
     *
     * @return the azureService value.
     */
    public String azureService() {
        return this.innerProperties() == null ? null : this.innerProperties().azureService();
    }

    /**
     * Get the isPrimaryRegion property: The flag that indicates whether or not this is the primary region.
     *
     * @return the isPrimaryRegion value.
     */
    public Boolean isPrimaryRegion() {
        return this.innerProperties() == null ? null : this.innerProperties().isPrimaryRegion();
    }

    /**
     * Get the bgpCommunity property: The BGP Community.
     *
     * @return the bgpCommunity value.
     */
    public String bgpCommunity() {
        return this.innerProperties() == null ? null : this.innerProperties().bgpCommunity();
    }

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