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

io.opencannabis.schema.geo.DistanceUnit Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019, Momentum Ideas Co.
 *
 * 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.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: geo/Distance.proto

package io.opencannabis.schema.geo;

/**
 * 
 * Enumeration of recognized units of distance.
 * 
* * Protobuf enum {@code opencannabis.geo.DistanceUnit} */ public enum DistanceUnit implements com.google.protobuf.ProtocolMessageEnum { /** *
   * Distance in meters.
   * 
* * METERS = 0; */ METERS(0), /** *
   * Distance in inches.
   * 
* * INCHES = 1; */ INCHES(1), /** *
   * Distance in feet.
   * 
* * FEET = 2; */ FEET(2), /** *
   * Distance in millimeters.
   * 
* * MILLIMETERS = 3; */ MILLIMETERS(3), /** *
   * Distance in centimeters.
   * 
* * CENTIMETERS = 4; */ CENTIMETERS(4), /** *
   * Distance in kilometers.
   * 
* * KILOMETERS = 5; */ KILOMETERS(5), /** *
   * Distance in miles.
   * 
* * MILES = 6; */ MILES(6), UNRECOGNIZED(-1), ; /** *
   * Distance in meters.
   * 
* * METERS = 0; */ public static final int METERS_VALUE = 0; /** *
   * Distance in inches.
   * 
* * INCHES = 1; */ public static final int INCHES_VALUE = 1; /** *
   * Distance in feet.
   * 
* * FEET = 2; */ public static final int FEET_VALUE = 2; /** *
   * Distance in millimeters.
   * 
* * MILLIMETERS = 3; */ public static final int MILLIMETERS_VALUE = 3; /** *
   * Distance in centimeters.
   * 
* * CENTIMETERS = 4; */ public static final int CENTIMETERS_VALUE = 4; /** *
   * Distance in kilometers.
   * 
* * KILOMETERS = 5; */ public static final int KILOMETERS_VALUE = 5; /** *
   * Distance in miles.
   * 
* * MILES = 6; */ public static final int MILES_VALUE = 6; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static DistanceUnit valueOf(int value) { return forNumber(value); } public static DistanceUnit forNumber(int value) { switch (value) { case 0: return METERS; case 1: return INCHES; case 2: return FEET; case 3: return MILLIMETERS; case 4: return CENTIMETERS; case 5: return KILOMETERS; case 6: return MILES; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< DistanceUnit> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public DistanceUnit findValueByNumber(int number) { return DistanceUnit.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.opencannabis.schema.geo.DistanceOuterClass.getDescriptor().getEnumTypes().get(0); } private static final DistanceUnit[] VALUES = values(); public static DistanceUnit valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private DistanceUnit(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:opencannabis.geo.DistanceUnit) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy