com.google.maps.gwt.client.StreetViewStatus 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
* StreetViewService
*
* on completion of a Street View request.
*
* THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
*/
public class StreetViewStatus extends JavaScriptObject {
/**
* The request was successful.
*/
public static final StreetViewStatus OK = getOk();
/**
* The request could not be successfully processed, yet the exact reason
* for failure is unknown.
*/
public static final StreetViewStatus UNKNOWN_ERROR = getUnknownError();
/**
* There are no nearby panoramas.
*/
public static final StreetViewStatus 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 StreetViewStatus fromValue(String value){
return registry.get(value);
}
/**
* Internal initialization method.
*/
private static final native StreetViewStatus getOk()/*-{
var instance = { 'value' : $wnd.google.maps.StreetViewStatus.OK };
@com.google.maps.gwt.client.StreetViewStatus::register(Lcom/google/maps/gwt/client/StreetViewStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native StreetViewStatus getUnknownError()/*-{
var instance = { 'value' : $wnd.google.maps.StreetViewStatus.UNKNOWN_ERROR };
@com.google.maps.gwt.client.StreetViewStatus::register(Lcom/google/maps/gwt/client/StreetViewStatus;)(instance);
return instance;
}-*/;
/**
* Internal initialization method.
*/
private static final native StreetViewStatus getZeroResults()/*-{
var instance = { 'value' : $wnd.google.maps.StreetViewStatus.ZERO_RESULTS };
@com.google.maps.gwt.client.StreetViewStatus::register(Lcom/google/maps/gwt/client/StreetViewStatus;)(instance);
return instance;
}-*/;
/**
* Internal registration of type for future access.
*/
private static final void register(StreetViewStatus value){
if (registry == null) {
registry = new HashMap();
}
registry.put(value.getValue(),value);
}
/**
* Protected constructor avoids default public constructor.
*/
protected StreetViewStatus() {
/* Java constructor is protected, */
}
/**
* Access the underlying value of the type.
*/
public final native String getValue()/*-{
return this.value;
}-*/;
}