// 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;

/** The peering service location. */
@Fluent
public final class PeeringServiceLocationInner extends ProxyResource {
    /*
     * The properties that define a peering service location.
     */
    @JsonProperty(value = "properties")
    private PeeringServiceLocationProperties innerProperties;

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

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

    /**
     * Get the country property: Country of the customer.
     *
     * @return the country value.
     */
    public String country() {
        return this.innerProperties() == null ? null : this.innerProperties().country();
    }

    /**
     * Set the country property: Country of the customer.
     *
     * @param country the country value to set.
     * @return the PeeringServiceLocationInner object itself.
     */
    public PeeringServiceLocationInner withCountry(String country) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PeeringServiceLocationProperties();
        }
        this.innerProperties().withCountry(country);
        return this;
    }

    /**
     * Get the state property: State of the customer.
     *
     * @return the state value.
     */
    public String state() {
        return this.innerProperties() == null ? null : this.innerProperties().state();
    }

    /**
     * Set the state property: State of the customer.
     *
     * @param state the state value to set.
     * @return the PeeringServiceLocationInner object itself.
     */
    public PeeringServiceLocationInner withState(String state) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PeeringServiceLocationProperties();
        }
        this.innerProperties().withState(state);
        return this;
    }

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

    /**
     * Set the azureRegion property: Azure region for the location.
     *
     * @param azureRegion the azureRegion value to set.
     * @return the PeeringServiceLocationInner object itself.
     */
    public PeeringServiceLocationInner withAzureRegion(String azureRegion) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PeeringServiceLocationProperties();
        }
        this.innerProperties().withAzureRegion(azureRegion);
        return this;
    }

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