// 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.util.logging.ClientLogger;
import com.azure.resourcemanager.network.models.ExpressRouteServiceProviderBandwidthsOffered;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties of ExpressRouteServiceProvider. */
@Fluent
public final class ExpressRouteServiceProviderPropertiesFormat {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ExpressRouteServiceProviderPropertiesFormat.class);

    /*
     * Get a list of peering locations.
     */
    @JsonProperty(value = "peeringLocations")
    private List<String> peeringLocations;

    /*
     * Gets bandwidths offered.
     */
    @JsonProperty(value = "bandwidthsOffered")
    private List<ExpressRouteServiceProviderBandwidthsOffered> bandwidthsOffered;

    /*
     * Gets the provisioning state of the resource.
     */
    @JsonProperty(value = "provisioningState")
    private String provisioningState;

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

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

    /**
     * Get the bandwidthsOffered property: Gets bandwidths offered.
     *
     * @return the bandwidthsOffered value.
     */
    public List<ExpressRouteServiceProviderBandwidthsOffered> bandwidthsOffered() {
        return this.bandwidthsOffered;
    }

    /**
     * Set the bandwidthsOffered property: Gets bandwidths offered.
     *
     * @param bandwidthsOffered the bandwidthsOffered value to set.
     * @return the ExpressRouteServiceProviderPropertiesFormat object itself.
     */
    public ExpressRouteServiceProviderPropertiesFormat withBandwidthsOffered(
        List<ExpressRouteServiceProviderBandwidthsOffered> bandwidthsOffered) {
        this.bandwidthsOffered = bandwidthsOffered;
        return this;
    }

    /**
     * Get the provisioningState property: Gets the provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Set the provisioningState property: Gets the provisioning state of the resource.
     *
     * @param provisioningState the provisioningState value to set.
     * @return the ExpressRouteServiceProviderPropertiesFormat object itself.
     */
    public ExpressRouteServiceProviderPropertiesFormat withProvisioningState(String provisioningState) {
        this.provisioningState = provisioningState;
        return this;
    }

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