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

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

There is a newer version: 1.8
Show newest version
/*
 * Copyright 2018, Momentum Ideas, Co. All rights reserved.
 *
 * Source and object computer code contained herein is the private intellectual
 * property of Momentum Ideas Co., a Delaware Corporation. Use of this
 * code in source form requires permission in writing before use or the
 * assembly, distribution, or publishing of derivative works, for commercial
 * purposes or any other purpose, from a duly authorized officer of Momentum
 * Ideas Co.
 *
 * 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;

/**
 * 
 * Represents an estimate of location accuracy.
 * 
* * Protobuf type {@code opencannabis.geo.LocationAccuracy} */ public final class LocationAccuracy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.geo.LocationAccuracy) LocationAccuracyOrBuilder { private static final long serialVersionUID = 0L; // Use LocationAccuracy.newBuilder() to construct. private LocationAccuracy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LocationAccuracy() { estimate_ = false; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private LocationAccuracy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { estimate_ = input.readBool(); break; } case 18: { io.opencannabis.schema.geo.DistanceValue.Builder subBuilder = null; if (value_ != null) { subBuilder = value_.toBuilder(); } value_ = input.readMessage(io.opencannabis.schema.geo.DistanceValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(value_); value_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.geo.DistanceOuterClass.internal_static_opencannabis_geo_LocationAccuracy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.geo.DistanceOuterClass.internal_static_opencannabis_geo_LocationAccuracy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.geo.LocationAccuracy.class, io.opencannabis.schema.geo.LocationAccuracy.Builder.class); } public static final int ESTIMATE_FIELD_NUMBER = 1; private boolean estimate_; /** *
   * Specifies whether this accuracy rating is an estimate.
   * 
* * bool estimate = 1 [(.gen_bq_schema.description) = "Specifies whether this accuracy rating is an estimate."]; */ public boolean getEstimate() { return estimate_; } public static final int VALUE_FIELD_NUMBER = 2; private io.opencannabis.schema.geo.DistanceValue value_; /** *
   * Distance value for the accuracy specified.
   * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public boolean hasValue() { return value_ != null; } /** *
   * Distance value for the accuracy specified.
   * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public io.opencannabis.schema.geo.DistanceValue getValue() { return value_ == null ? io.opencannabis.schema.geo.DistanceValue.getDefaultInstance() : value_; } /** *
   * Distance value for the accuracy specified.
   * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public io.opencannabis.schema.geo.DistanceValueOrBuilder getValueOrBuilder() { return getValue(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (estimate_ != false) { output.writeBool(1, estimate_); } if (value_ != null) { output.writeMessage(2, getValue()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (estimate_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, estimate_); } if (value_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getValue()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opencannabis.schema.geo.LocationAccuracy)) { return super.equals(obj); } io.opencannabis.schema.geo.LocationAccuracy other = (io.opencannabis.schema.geo.LocationAccuracy) obj; boolean result = true; result = result && (getEstimate() == other.getEstimate()); result = result && (hasValue() == other.hasValue()); if (hasValue()) { result = result && getValue() .equals(other.getValue()); } result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ESTIMATE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getEstimate()); if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.geo.LocationAccuracy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.geo.LocationAccuracy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.geo.LocationAccuracy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.opencannabis.schema.geo.LocationAccuracy prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Represents an estimate of location accuracy.
   * 
* * Protobuf type {@code opencannabis.geo.LocationAccuracy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.geo.LocationAccuracy) io.opencannabis.schema.geo.LocationAccuracyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.geo.DistanceOuterClass.internal_static_opencannabis_geo_LocationAccuracy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.geo.DistanceOuterClass.internal_static_opencannabis_geo_LocationAccuracy_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.geo.LocationAccuracy.class, io.opencannabis.schema.geo.LocationAccuracy.Builder.class); } // Construct using io.opencannabis.schema.geo.LocationAccuracy.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); estimate_ = false; if (valueBuilder_ == null) { value_ = null; } else { value_ = null; valueBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.geo.DistanceOuterClass.internal_static_opencannabis_geo_LocationAccuracy_descriptor; } @java.lang.Override public io.opencannabis.schema.geo.LocationAccuracy getDefaultInstanceForType() { return io.opencannabis.schema.geo.LocationAccuracy.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.geo.LocationAccuracy build() { io.opencannabis.schema.geo.LocationAccuracy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.geo.LocationAccuracy buildPartial() { io.opencannabis.schema.geo.LocationAccuracy result = new io.opencannabis.schema.geo.LocationAccuracy(this); result.estimate_ = estimate_; if (valueBuilder_ == null) { result.value_ = value_; } else { result.value_ = valueBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.geo.LocationAccuracy) { return mergeFrom((io.opencannabis.schema.geo.LocationAccuracy)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.geo.LocationAccuracy other) { if (other == io.opencannabis.schema.geo.LocationAccuracy.getDefaultInstance()) return this; if (other.getEstimate() != false) { setEstimate(other.getEstimate()); } if (other.hasValue()) { mergeValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opencannabis.schema.geo.LocationAccuracy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.geo.LocationAccuracy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private boolean estimate_ ; /** *
     * Specifies whether this accuracy rating is an estimate.
     * 
* * bool estimate = 1 [(.gen_bq_schema.description) = "Specifies whether this accuracy rating is an estimate."]; */ public boolean getEstimate() { return estimate_; } /** *
     * Specifies whether this accuracy rating is an estimate.
     * 
* * bool estimate = 1 [(.gen_bq_schema.description) = "Specifies whether this accuracy rating is an estimate."]; */ public Builder setEstimate(boolean value) { estimate_ = value; onChanged(); return this; } /** *
     * Specifies whether this accuracy rating is an estimate.
     * 
* * bool estimate = 1 [(.gen_bq_schema.description) = "Specifies whether this accuracy rating is an estimate."]; */ public Builder clearEstimate() { estimate_ = false; onChanged(); return this; } private io.opencannabis.schema.geo.DistanceValue value_ = null; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.geo.DistanceValue, io.opencannabis.schema.geo.DistanceValue.Builder, io.opencannabis.schema.geo.DistanceValueOrBuilder> valueBuilder_; /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public boolean hasValue() { return valueBuilder_ != null || value_ != null; } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public io.opencannabis.schema.geo.DistanceValue getValue() { if (valueBuilder_ == null) { return value_ == null ? io.opencannabis.schema.geo.DistanceValue.getDefaultInstance() : value_; } else { return valueBuilder_.getMessage(); } } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public Builder setValue(io.opencannabis.schema.geo.DistanceValue value) { if (valueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); } else { valueBuilder_.setMessage(value); } return this; } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public Builder setValue( io.opencannabis.schema.geo.DistanceValue.Builder builderForValue) { if (valueBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { valueBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public Builder mergeValue(io.opencannabis.schema.geo.DistanceValue value) { if (valueBuilder_ == null) { if (value_ != null) { value_ = io.opencannabis.schema.geo.DistanceValue.newBuilder(value_).mergeFrom(value).buildPartial(); } else { value_ = value; } onChanged(); } else { valueBuilder_.mergeFrom(value); } return this; } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public Builder clearValue() { if (valueBuilder_ == null) { value_ = null; onChanged(); } else { value_ = null; valueBuilder_ = null; } return this; } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public io.opencannabis.schema.geo.DistanceValue.Builder getValueBuilder() { onChanged(); return getValueFieldBuilder().getBuilder(); } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ public io.opencannabis.schema.geo.DistanceValueOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { return valueBuilder_.getMessageOrBuilder(); } else { return value_ == null ? io.opencannabis.schema.geo.DistanceValue.getDefaultInstance() : value_; } } /** *
     * Distance value for the accuracy specified.
     * 
* * .opencannabis.geo.DistanceValue value = 2 [(.gen_bq_schema.description) = "Distance value for the accuracy specified."]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.geo.DistanceValue, io.opencannabis.schema.geo.DistanceValue.Builder, io.opencannabis.schema.geo.DistanceValueOrBuilder> getValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.geo.DistanceValue, io.opencannabis.schema.geo.DistanceValue.Builder, io.opencannabis.schema.geo.DistanceValueOrBuilder>( getValue(), getParentForChildren(), isClean()); value_ = null; } return valueBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opencannabis.geo.LocationAccuracy) } // @@protoc_insertion_point(class_scope:opencannabis.geo.LocationAccuracy) private static final io.opencannabis.schema.geo.LocationAccuracy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.geo.LocationAccuracy(); } public static io.opencannabis.schema.geo.LocationAccuracy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LocationAccuracy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LocationAccuracy(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opencannabis.schema.geo.LocationAccuracy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy