// 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.Immutable;
import com.azure.core.models.GeoPosition;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Result object for a Search Address Reverse Cross Street response. */
@Immutable
public final class ReverseSearchCrossStreetAddressResultItem {
    /*
     * The address of the result
     */
    @JsonProperty(value = "address", access = JsonProperty.Access.WRITE_ONLY)
    private MapsSearchAddress address;

    /*
     * Position property in the form of "{latitude},{longitude}"
     */
    @JsonProperty(value = "position", access = JsonProperty.Access.WRITE_ONLY)
    private String position;

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

    /**
     * Get the address property: The address of the result.
     *
     * @return the address value.
     */
    public MapsSearchAddress getAddress() {
        return this.address;
    }

    /**
     * Get the position property: Position property in the form of "{latitude},{longitude}".
     *
     * @return the position value.
     */
    public GeoPosition getPosition() {
        String returnValue = this.position;
        return com.azure.maps.search.implementation.helpers.Utility.fromCommaSeparatedString(returnValue);
    }
}
