All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.gwt.client.ElevationStatus 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 
 * ElevationService
 * 
 * upon completion of an elevation requerst.
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class ElevationStatus extends JavaScriptObject {

  /**
   * The 
   * KmlLayer
   * 
   * is invalid.
   */ 
  public static final ElevationStatus INVALID_REQUEST = getInvalidRequest();

  /**
   * The request was successful.
   */ 
  public static final ElevationStatus OK = getOk();

  /**
   * The webpage has gone over the requests limit in too short a period of time.
   */ 
  public static final ElevationStatus OVER_QUERY_LIMIT = getOverQueryLimit();

  /**
   * The webpage is not allowed to use the geocoder.
   */ 
  public static final ElevationStatus REQUEST_DENIED = getRequestDenied();

  /**
   * The request could not be successfully processed, yet the exact reason
   * for failure is unknown.
   */ 
  public static final ElevationStatus UNKNOWN_ERROR = getUnknownError();

  /**
   * Internal registry for value types.
   */ 
  private static Map registry;

  /**
   * Access the enum instance using the underlying value of the type.
   */ 
  public static final ElevationStatus fromValue(String value){
    return registry.get(value);
  }

  /**
   * Internal initialization method.
   */ 
  private static final native ElevationStatus getInvalidRequest()/*-{
    var instance = { 'value' : $wnd.google.maps.ElevationStatus.INVALID_REQUEST };
    @com.google.maps.gwt.client.ElevationStatus::register(Lcom/google/maps/gwt/client/ElevationStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native ElevationStatus getOk()/*-{
    var instance = { 'value' : $wnd.google.maps.ElevationStatus.OK };
    @com.google.maps.gwt.client.ElevationStatus::register(Lcom/google/maps/gwt/client/ElevationStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native ElevationStatus getOverQueryLimit()/*-{
    var instance = { 'value' : $wnd.google.maps.ElevationStatus.OVER_QUERY_LIMIT };
    @com.google.maps.gwt.client.ElevationStatus::register(Lcom/google/maps/gwt/client/ElevationStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native ElevationStatus getRequestDenied()/*-{
    var instance = { 'value' : $wnd.google.maps.ElevationStatus.REQUEST_DENIED };
    @com.google.maps.gwt.client.ElevationStatus::register(Lcom/google/maps/gwt/client/ElevationStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native ElevationStatus getUnknownError()/*-{
    var instance = { 'value' : $wnd.google.maps.ElevationStatus.UNKNOWN_ERROR };
    @com.google.maps.gwt.client.ElevationStatus::register(Lcom/google/maps/gwt/client/ElevationStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal registration of type for future access.
   */ 
  private static final void register(ElevationStatus value){
    if (registry == null) {
      registry = new HashMap();
    }
    registry.put(value.getValue(),value);
  }


  /**
   * Protected constructor avoids default public constructor.
   */
  protected ElevationStatus() {
    /* Java constructor is protected, */
  }

  /**
   * Access the underlying value of the type.
   */ 
  public final native String getValue()/*-{
    return this.value;
  }-*/;

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy