com.google.maps.gwt.client.DirectionsStatus Maven / Gradle / Ivy
/*
* Copyright 2011 The Google Web Toolkit Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.maps.gwt.client;
import com.google.gwt.core.client.JavaScriptObject;
import java.util.HashMap;
import java.util.Map;
/**
* The status returned by the
* DirectionsService
*
* on the completion of a call to
* route()
*
* .
*
* THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
*/
public class DirectionsStatus extends JavaScriptObject {
/**
* The
* KmlLayer
*
* is invalid.
*/
public static final DirectionsStatus INVALID_REQUEST = getInvalidRequest();
/**
* Too many
* DirectionsWaypoint
*
* s were provided in the
* DirectionsRequest
*
* . The total allowed waypoints is 8, plus the origin and destination.
*/
public static final DirectionsStatus MAX_WAYPOINTS_EXCEEDED = getMaxWaypointsExceeded();
/**
* At least one of the origin, destination, or waypoints could not be geocoded.
*/
public static final DirectionsStatus NOT_FOUND = getNotFound();
/**
* The request was successful.
*/
public static final DirectionsStatus OK = getOk();
/**
* The webpage has gone over the requests limit in too short a period of time.
*/
public static final DirectionsStatus OVER_QUERY_LIMIT = getOverQueryLimit();
/**
* The webpage is not allowed to use the geocoder.
*/
public static final DirectionsStatus REQUEST_DENIED = getRequestDenied();
/**
* The request could not be successfully processed, yet the exact reason
* for failure is unknown.
*/
public static final DirectionsStatus UNKNOWN_ERROR = getUnknownError();
/**
* There are no nearby panoramas.
*/
public static final DirectionsStatus ZERO_RESULTS = getZeroResults();
/**
* Internal registry for value types.
*/
private static Map registry;
/**
* Access the enum instance using the underlying value of the type.
*/
public static final DirectionsStatus fromValue(String value){
return registry.get(value);
}
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getInvalidRequest()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.INVALID_REQUEST };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getMaxWaypointsExceeded()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.MAX_WAYPOINTS_EXCEEDED };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getNotFound()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.NOT_FOUND };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getOk()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.OK };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getOverQueryLimit()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.OVER_QUERY_LIMIT };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getRequestDenied()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.REQUEST_DENIED };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getUnknownError()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.UNKNOWN_ERROR };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native DirectionsStatus getZeroResults()/*-{
var instance = { 'value' : $wnd.google.maps.DirectionsStatus.ZERO_RESULTS };
@com.google.maps.gwt.client.DirectionsStatus::register(Lcom/google/maps/gwt/client/DirectionsStatus;)(instance);
return instance;
}-*/;
/**
* Internal registration of type for future access.
*/
private static final void register(DirectionsStatus value){
if (registry == null) {
registry = new HashMap();
}
registry.put(value.getValue(),value);
}
/**
* Protected constructor avoids default public constructor.
*/
protected DirectionsStatus() {
/* Java constructor is protected, */
}
/**
* Access the underlying value of the type.
*/
public final native String getValue()/*-{
return this.value;
}-*/;
}