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

package com.azure.maps.route.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** This object is returned from a successful Route Directions call. */
@Fluent
public class RouteDirections {
    /*
     * Format Version property
     */
    @JsonProperty(value = "formatVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String formatVersion;

    /*
     * Routes array
     */
    @JsonProperty(value = "routes", access = JsonProperty.Access.WRITE_ONLY)
    private List<MapsSearchRoute> routes;

    /*
     * Optimized sequence of waypoints. It shows the index from the user
     * provided waypoint sequence for the original and optimized list. For
     * instance, a response:
     *
     * ```
     * <optimizedWaypoints>
     * <waypoint providedIndex="0" optimizedIndex="1"/>
     * <waypoint providedIndex="1" optimizedIndex="2"/>
     * <waypoint providedIndex="2" optimizedIndex="0"/>
     * </optimizedWaypoints>
     * ```
     *
     * means that the original sequence is [0, 1, 2] and optimized sequence is
     * [1, 2, 0]. Since the index starts by 0 the original is "first, second,
     * third" while the optimized is "second, third, first".
     */
    @JsonProperty(value = "optimizedWaypoints", access = JsonProperty.Access.WRITE_ONLY)
    private List<RouteOptimizedWaypoint> optimizedWaypoints;

    /*
     * Reports the effective settings used in the current call.
     */
    @JsonProperty(value = "report")
    private RouteReport report;

    /**
     * Get the formatVersion property: Format Version property.
     *
     * @return the formatVersion value.
     */
    public String getFormatVersion() {
        return this.formatVersion;
    }

    /**
     * Get the routes property: Routes array.
     *
     * @return the routes value.
     */
    public List<MapsSearchRoute> getRoutes() {
        return this.routes;
    }

    /**
     * Get the optimizedWaypoints property: Optimized sequence of waypoints. It shows the index from the user provided
     * waypoint sequence for the original and optimized list. For instance, a response:
     *
     * <p>``` &lt;optimizedWaypoints&gt; &lt;waypoint providedIndex="0" optimizedIndex="1"/&gt; &lt;waypoint
     * providedIndex="1" optimizedIndex="2"/&gt; &lt;waypoint providedIndex="2" optimizedIndex="0"/&gt;
     * &lt;/optimizedWaypoints&gt; ```
     *
     * <p>means that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0
     * the original is "first, second, third" while the optimized is "second, third, first".
     *
     * @return the optimizedWaypoints value.
     */
    public List<RouteOptimizedWaypoint> getOptimizedWaypoints() {
        return this.optimizedWaypoints;
    }

    /**
     * Get the report property: Reports the effective settings used in the current call.
     *
     * @return the report value.
     */
    public RouteReport getReport() {
        return this.report;
    }

    /**
     * Set the report property: Reports the effective settings used in the current call.
     *
     * @param report the report value to set.
     * @return the RouteDirections object itself.
     */
    public RouteDirections setReport(RouteReport report) {
        this.report = report;
        return this;
    }
}
