// 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.Fluent;
import com.azure.core.management.ProxyResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** PeeringService provider. */
@Fluent
public final class PeeringServiceProviderInner extends ProxyResource {
    /*
     * The properties that define a peering service provider.
     */
    @JsonProperty(value = "properties")
    private PeeringServiceProviderProperties innerProperties;

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

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

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

    /**
     * Set the serviceProviderName property: The name of the service provider.
     *
     * @param serviceProviderName the serviceProviderName value to set.
     * @return the PeeringServiceProviderInner object itself.
     */
    public PeeringServiceProviderInner withServiceProviderName(String serviceProviderName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PeeringServiceProviderProperties();
        }
        this.innerProperties().withServiceProviderName(serviceProviderName);
        return this;
    }

    /**
     * Get the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
     *
     * @return the peeringLocations value.
     */
    public List<String> peeringLocations() {
        return this.innerProperties() == null ? null : this.innerProperties().peeringLocations();
    }

    /**
     * Set the peeringLocations property: The list of locations at which the service provider peers with Microsoft.
     *
     * @param peeringLocations the peeringLocations value to set.
     * @return the PeeringServiceProviderInner object itself.
     */
    public PeeringServiceProviderInner withPeeringLocations(List<String> peeringLocations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PeeringServiceProviderProperties();
        }
        this.innerProperties().withPeeringLocations(peeringLocations);
        return this;
    }

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