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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.network.models.ExpressRouteServiceProviderBandwidthsOffered;
import com.azure.resourcemanager.network.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** A ExpressRouteResourceProvider object. */
@Fluent
public final class ExpressRouteServiceProviderInner extends Resource {
    /*
     * Properties of the express route service provider.
     */
    @JsonProperty(value = "properties")
    private ExpressRouteServiceProviderPropertiesFormat innerProperties;

    /*
     * Resource ID.
     */
    @JsonProperty(value = "id")
    private String id;

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

    /**
     * Get the innerProperties property: Properties of the express route service provider.
     *
     * @return the innerProperties value.
     */
    private ExpressRouteServiceProviderPropertiesFormat innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the id property: Resource ID.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: Resource ID.
     *
     * @param id the id value to set.
     * @return the ExpressRouteServiceProviderInner object itself.
     */
    public ExpressRouteServiceProviderInner withId(String id) {
        this.id = id;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ExpressRouteServiceProviderInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ExpressRouteServiceProviderInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the peeringLocations property: A list of peering locations.
     *
     * @return the peeringLocations value.
     */
    public List<String> peeringLocations() {
        return this.innerProperties() == null ? null : this.innerProperties().peeringLocations();
    }

    /**
     * Set the peeringLocations property: A list of peering locations.
     *
     * @param peeringLocations the peeringLocations value to set.
     * @return the ExpressRouteServiceProviderInner object itself.
     */
    public ExpressRouteServiceProviderInner withPeeringLocations(List<String> peeringLocations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExpressRouteServiceProviderPropertiesFormat();
        }
        this.innerProperties().withPeeringLocations(peeringLocations);
        return this;
    }

    /**
     * Get the bandwidthsOffered property: A list of bandwidths offered.
     *
     * @return the bandwidthsOffered value.
     */
    public List<ExpressRouteServiceProviderBandwidthsOffered> bandwidthsOffered() {
        return this.innerProperties() == null ? null : this.innerProperties().bandwidthsOffered();
    }

    /**
     * Set the bandwidthsOffered property: A list of bandwidths offered.
     *
     * @param bandwidthsOffered the bandwidthsOffered value to set.
     * @return the ExpressRouteServiceProviderInner object itself.
     */
    public ExpressRouteServiceProviderInner withBandwidthsOffered(
        List<ExpressRouteServiceProviderBandwidthsOffered> bandwidthsOffered) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ExpressRouteServiceProviderPropertiesFormat();
        }
        this.innerProperties().withBandwidthsOffered(bandwidthsOffered);
        return this;
    }

    /**
     * Get the provisioningState property: The provisioning state of the express route service provider resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

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