syntax = "proto3";

package com.igeolise.traveltime.rabbitmq.responses;

message TimeFilterFastResponse {
  message Properties {
    repeated sint32 travelTimes = 1;
    repeated int32 monthlyFares = 2;
    repeated int32 distances = 3;
  }

  message Error {
    ErrorType type = 1;
  }

  enum ErrorType {
    /*
     * Catch all unknown error type
     */
    UNKNOWN                                    = 0 [deprecated = true];
    /*
     * oneToManyRequest to many field must not be null
     */
    ONE_TO_MANY_MUST_NOT_BE_NULL               = 1 [deprecated = true];
    /*
     * Source (either departure or arrival location) must not be null
     */
    SOURCE_MUST_NOT_BE_NULL                    = 2 [deprecated = true];
    /*
     * Transportation mode must not be null.
     */
    TRANSPORTATION_MUST_NOT_BE_NULL            = 3 [deprecated = true];
    /*
     * Source (either departure or arrival location) must not be null
     */
    SOURCE_NOT_IN_GEOMETRY                     = 4 [deprecated = true];

    /*
     * Transportation mode unrecognized.
     */
    UNRECOGNIZED_TRANSPORTATION_MODE           = 5 [deprecated = true];

    /*
     * The travel time limit is too low to process this request.
     */
    TRAVEL_TIME_LIMIT_TOO_LOW                  = 6 [deprecated = true];

    /*
     * The travel time limit is too high to process this request.
     */
    TRAVEL_TIME_LIMIT_TOO_HIGH                 = 7 [deprecated = true];

    /*
     * User id not set.
     */
    AUTH_ERROR_NO_USER_ID                      = 8 [deprecated = true];

    /*
     * Message sent to wrong queue - transportation mode cannot be handled.
     */
    SERVICE_MISMATCH_WRONG_TRANSPORTATION_MODE = 9 [deprecated = true];

    /*
     * Source is in a area that doesn't have any points that can be out of
     * search e.g a lake, mountains or other desolate areas.
     */
    SOURCE_OUT_OF_REACH = 10 [deprecated = true];

    /*
     * The interleaved deltas array should have (lat/lon) deltas and have an
     * even number of elements
     */
    INTERLEAVED_DELTAS_INVALID_COORDINATE_PAIRS = 11 [deprecated = true];

    /*
     * Public transport requests do not support returning distances for
     * returned points.
     */
    DISTANCE_PROPERTY_NOT_SUPPORTED = 12 [deprecated = true];

    /*
     * ManyToOne and OneToMany cannot be sent at the same time
     */
    BOTH_MANY_TO_ONE_AND_ONE_TO_MANY_CANNOT_BE_SENT = 13 [deprecated = true];

    /*
     * ManyToOne or OneToMany cannot be null
     */
    ONE_TO_MANY_OR_MANY_TO_ONE_MUST_NOT_BE_NULL = 14 [deprecated = true];
    /*
     * Invalid proto request
     */
    INVALID_PROTO_REQUEST = 15 [deprecated = true];
  }

  Error error = 1 [deprecated = true];
  Properties properties = 2;
}