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

package com.azure.maps.search.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.models.GeoPosition;
import com.azure.maps.search.implementation.models.LatLongPairAbbreviated;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Describes the address range on both sides of the street for a search result. Coordinates for the start and end
 * locations of the address range are included.
 */
@Fluent
public final class AddressRanges {
    /*
     * Address range on the left side of the street.
     */
    @JsonProperty(value = "rangeLeft")
    private String rangeLeft;

    /*
     * Address range on the right side of the street.
     */
    @JsonProperty(value = "rangeRight")
    private String rangeRight;

    /*
     * A location represented as a latitude and longitude using short names 'lat' & 'lon'.
     */
    @JsonProperty(value = "from")
    private LatLongPairAbbreviated from;

    /*
     * A location represented as a latitude and longitude using short names 'lat' & 'lon'.
     */
    @JsonProperty(value = "to")
    private LatLongPairAbbreviated to;

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

    /**
     * Get the rangeLeft property: Address range on the left side of the street.
     *
     * @return the rangeLeft value.
     */
    public String getRangeLeft() {
        return this.rangeLeft;
    }

    /**
     * Get the rangeRight property: Address range on the right side of the street.
     *
     * @return the rangeRight value.
     */
    public String getRangeRight() {
        return this.rangeRight;
    }

    /**
     * Get the from property: A location represented as a latitude and longitude using short names 'lat' &amp; 'lon'.
     *
     * @return the from value.
     */
    public GeoPosition getFrom() {
        LatLongPairAbbreviated returnValue = this.from;
        return new GeoPosition(returnValue.getLon(), returnValue.getLat());
    }

    /**
     * Get the to property: A location represented as a latitude and longitude using short names 'lat' &amp; 'lon'.
     *
     * @return the to value.
     */
    public GeoPosition getTo() {
        LatLongPairAbbreviated returnValue = this.to;
        return new GeoPosition(returnValue.getLon(), returnValue.getLat());
    }
}
