001    package com.google.gwt.maps.client.services;
002    
003    /**
004     * The top-level status about the request in general returned by the DistanceMatrixService upon completion of a distance matrix request.
005     * <br><br>
006     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#DistanceMatrixStatus">DistanceMatrixStatus API Doc</a>
007     */
008    public enum DistanceMatrixStatus {
009    
010      /**
011       * The provided request was invalid.
012       */
013      INVALID_REQUEST,
014      
015      /**
016       * The request contains more than 25 origins, or more than 25 destinations.
017       */
018      MAX_DIMENSIONS_EXCEEDED,
019      
020      /**
021       * The product of origins and destinations exceeds the per-query limit. 
022       */
023      MAX_ELEMENTS_EXCEEDED,
024      
025      /**
026       * The response contains a valid result.
027       */
028      OK,
029      
030      /**
031       * Too many elements have been requested within the allowed time period. The request should succeed if you try again after a reasonable amount of time. 
032       */
033      OVER_QUERY_LIMIT,
034      
035      /**
036       * The service denied use of the Distance Matrix service by your web page.
037       */
038      REQUEST_DENIED,
039      
040      /**
041       * A Distance Matrix request could not be processed due to a server error. The request may succeed if you try again.
042       */
043      UNKNOWN_ERROR;
044      
045      public String value() {
046        return name().toLowerCase();
047      }
048      
049      public static DistanceMatrixStatus fromValue(String type) {
050        return valueOf(type.toUpperCase());
051      }
052    
053      public String toString() {
054        return name();
055      }
056    }