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

com.craxiom.networksurvey.messaging.DeviceStatus Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: craxiom/status.proto
// Protobuf Java Version: 4.27.3

package com.craxiom.networksurvey.messaging;

/**
 * 
 * A status message from the Network Survey Android App.
 *
 * device_serial_number:      The unique identifier for the Android Phone.  This should be consistent and should never change.  A good value is the IMEI of the device.
 * device_name:               A human readable identifier for the Android phone.  This value does not need to be consistent or unique.  E.g. "Bob's Phone".
 * device_time:               The timestamp of when this message was created in milliseconds since unix epoch time.
 * latitude:                  The latitude of where the android device is currently located.
 * longitude:                 The longitude of where the android device is currently located.
 * altitude:                  The altitude of the android device.
 * battery_level_percent:     The battery level percentage.
 * error:                     If this object is present, then a error has occured in the Network Survey App.
 * 
* * Protobuf type {@code DeviceStatus} */ @java.lang.Deprecated public final class DeviceStatus extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DeviceStatus) DeviceStatusOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, /* major= */ 4, /* minor= */ 27, /* patch= */ 3, /* suffix= */ "", DeviceStatus.class.getName()); } // Use DeviceStatus.newBuilder() to construct. private DeviceStatus(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DeviceStatus() { deviceSerialNumber_ = ""; deviceName_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.craxiom.networksurvey.messaging.Status.internal_static_DeviceStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.craxiom.networksurvey.messaging.Status.internal_static_DeviceStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( com.craxiom.networksurvey.messaging.DeviceStatus.class, com.craxiom.networksurvey.messaging.DeviceStatus.Builder.class); } private int bitField0_; public static final int DEVICESERIALNUMBER_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object deviceSerialNumber_ = ""; /** * string deviceSerialNumber = 1; * @return The deviceSerialNumber. */ @java.lang.Override public java.lang.String getDeviceSerialNumber() { java.lang.Object ref = deviceSerialNumber_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceSerialNumber_ = s; return s; } } /** * string deviceSerialNumber = 1; * @return The bytes for deviceSerialNumber. */ @java.lang.Override public com.google.protobuf.ByteString getDeviceSerialNumberBytes() { java.lang.Object ref = deviceSerialNumber_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceSerialNumber_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEVICENAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object deviceName_ = ""; /** * string deviceName = 2; * @return The deviceName. */ @java.lang.Override public java.lang.String getDeviceName() { java.lang.Object ref = deviceName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceName_ = s; return s; } } /** * string deviceName = 2; * @return The bytes for deviceName. */ @java.lang.Override public com.google.protobuf.ByteString getDeviceNameBytes() { java.lang.Object ref = deviceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEVICETIME_FIELD_NUMBER = 3; private long deviceTime_ = 0L; /** * uint64 deviceTime = 3; * @return The deviceTime. */ @java.lang.Override public long getDeviceTime() { return deviceTime_; } public static final int LATITUDE_FIELD_NUMBER = 4; private double latitude_ = 0D; /** * double latitude = 4; * @return The latitude. */ @java.lang.Override public double getLatitude() { return latitude_; } public static final int LONGITUDE_FIELD_NUMBER = 5; private double longitude_ = 0D; /** * double longitude = 5; * @return The longitude. */ @java.lang.Override public double getLongitude() { return longitude_; } public static final int ALTITUDE_FIELD_NUMBER = 6; private float altitude_ = 0F; /** * float altitude = 6; * @return The altitude. */ @java.lang.Override public float getAltitude() { return altitude_; } public static final int BATTERYLEVELPERCENT_FIELD_NUMBER = 7; private int batteryLevelPercent_ = 0; /** * int32 batteryLevelPercent = 7; * @return The batteryLevelPercent. */ @java.lang.Override public int getBatteryLevelPercent() { return batteryLevelPercent_; } public static final int ERROR_FIELD_NUMBER = 10; private com.craxiom.networksurvey.messaging.Error error_; /** * .Error error = 10; * @return Whether the error field is set. */ @java.lang.Override public boolean hasError() { return ((bitField0_ & 0x00000001) != 0); } /** * .Error error = 10; * @return The error. */ @java.lang.Override public com.craxiom.networksurvey.messaging.Error getError() { return error_ == null ? com.craxiom.networksurvey.messaging.Error.getDefaultInstance() : error_; } /** * .Error error = 10; */ @java.lang.Override public com.craxiom.networksurvey.messaging.ErrorOrBuilder getErrorOrBuilder() { return error_ == null ? com.craxiom.networksurvey.messaging.Error.getDefaultInstance() : error_; } 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceSerialNumber_)) { com.google.protobuf.GeneratedMessage.writeString(output, 1, deviceSerialNumber_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, deviceName_); } if (deviceTime_ != 0L) { output.writeUInt64(3, deviceTime_); } if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { output.writeDouble(4, latitude_); } if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { output.writeDouble(5, longitude_); } if (java.lang.Float.floatToRawIntBits(altitude_) != 0) { output.writeFloat(6, altitude_); } if (batteryLevelPercent_ != 0) { output.writeInt32(7, batteryLevelPercent_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(10, getError()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceSerialNumber_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, deviceSerialNumber_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(deviceName_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, deviceName_); } if (deviceTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, deviceTime_); } if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, latitude_); } if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(5, longitude_); } if (java.lang.Float.floatToRawIntBits(altitude_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(6, altitude_); } if (batteryLevelPercent_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, batteryLevelPercent_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getError()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.craxiom.networksurvey.messaging.DeviceStatus)) { return super.equals(obj); } com.craxiom.networksurvey.messaging.DeviceStatus other = (com.craxiom.networksurvey.messaging.DeviceStatus) obj; if (!getDeviceSerialNumber() .equals(other.getDeviceSerialNumber())) return false; if (!getDeviceName() .equals(other.getDeviceName())) return false; if (getDeviceTime() != other.getDeviceTime()) return false; if (java.lang.Double.doubleToLongBits(getLatitude()) != java.lang.Double.doubleToLongBits( other.getLatitude())) return false; if (java.lang.Double.doubleToLongBits(getLongitude()) != java.lang.Double.doubleToLongBits( other.getLongitude())) return false; if (java.lang.Float.floatToIntBits(getAltitude()) != java.lang.Float.floatToIntBits( other.getAltitude())) return false; if (getBatteryLevelPercent() != other.getBatteryLevelPercent()) return false; if (hasError() != other.hasError()) return false; if (hasError()) { if (!getError() .equals(other.getError())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DEVICESERIALNUMBER_FIELD_NUMBER; hash = (53 * hash) + getDeviceSerialNumber().hashCode(); hash = (37 * hash) + DEVICENAME_FIELD_NUMBER; hash = (53 * hash) + getDeviceName().hashCode(); hash = (37 * hash) + DEVICETIME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getDeviceTime()); hash = (37 * hash) + LATITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getLatitude())); hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getLongitude())); hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getAltitude()); hash = (37 * hash) + BATTERYLEVELPERCENT_FIELD_NUMBER; hash = (53 * hash) + getBatteryLevelPercent(); if (hasError()) { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.craxiom.networksurvey.messaging.DeviceStatus parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.craxiom.networksurvey.messaging.DeviceStatus 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.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A status message from the Network Survey Android App.
   *
   * device_serial_number:      The unique identifier for the Android Phone.  This should be consistent and should never change.  A good value is the IMEI of the device.
   * device_name:               A human readable identifier for the Android phone.  This value does not need to be consistent or unique.  E.g. "Bob's Phone".
   * device_time:               The timestamp of when this message was created in milliseconds since unix epoch time.
   * latitude:                  The latitude of where the android device is currently located.
   * longitude:                 The longitude of where the android device is currently located.
   * altitude:                  The altitude of the android device.
   * battery_level_percent:     The battery level percentage.
   * error:                     If this object is present, then a error has occured in the Network Survey App.
   * 
* * Protobuf type {@code DeviceStatus} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:DeviceStatus) com.craxiom.networksurvey.messaging.DeviceStatusOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.craxiom.networksurvey.messaging.Status.internal_static_DeviceStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.craxiom.networksurvey.messaging.Status.internal_static_DeviceStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( com.craxiom.networksurvey.messaging.DeviceStatus.class, com.craxiom.networksurvey.messaging.DeviceStatus.Builder.class); } // Construct using com.craxiom.networksurvey.messaging.DeviceStatus.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getErrorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; deviceSerialNumber_ = ""; deviceName_ = ""; deviceTime_ = 0L; latitude_ = 0D; longitude_ = 0D; altitude_ = 0F; batteryLevelPercent_ = 0; error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); errorBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.craxiom.networksurvey.messaging.Status.internal_static_DeviceStatus_descriptor; } @java.lang.Override public com.craxiom.networksurvey.messaging.DeviceStatus getDefaultInstanceForType() { return com.craxiom.networksurvey.messaging.DeviceStatus.getDefaultInstance(); } @java.lang.Override public com.craxiom.networksurvey.messaging.DeviceStatus build() { com.craxiom.networksurvey.messaging.DeviceStatus result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.craxiom.networksurvey.messaging.DeviceStatus buildPartial() { com.craxiom.networksurvey.messaging.DeviceStatus result = new com.craxiom.networksurvey.messaging.DeviceStatus(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.craxiom.networksurvey.messaging.DeviceStatus result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.deviceSerialNumber_ = deviceSerialNumber_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.deviceName_ = deviceName_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.deviceTime_ = deviceTime_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.latitude_ = latitude_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.longitude_ = longitude_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.altitude_ = altitude_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.batteryLevelPercent_ = batteryLevelPercent_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000080) != 0)) { result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.craxiom.networksurvey.messaging.DeviceStatus) { return mergeFrom((com.craxiom.networksurvey.messaging.DeviceStatus)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.craxiom.networksurvey.messaging.DeviceStatus other) { if (other == com.craxiom.networksurvey.messaging.DeviceStatus.getDefaultInstance()) return this; if (!other.getDeviceSerialNumber().isEmpty()) { deviceSerialNumber_ = other.deviceSerialNumber_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getDeviceName().isEmpty()) { deviceName_ = other.deviceName_; bitField0_ |= 0x00000002; onChanged(); } if (other.getDeviceTime() != 0L) { setDeviceTime(other.getDeviceTime()); } if (other.getLatitude() != 0D) { setLatitude(other.getLatitude()); } if (other.getLongitude() != 0D) { setLongitude(other.getLongitude()); } if (other.getAltitude() != 0F) { setAltitude(other.getAltitude()); } if (other.getBatteryLevelPercent() != 0) { setBatteryLevelPercent(other.getBatteryLevelPercent()); } if (other.hasError()) { mergeError(other.getError()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { deviceSerialNumber_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { deviceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { deviceTime_ = input.readUInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 33: { latitude_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 33 case 41: { longitude_ = input.readDouble(); bitField0_ |= 0x00000010; break; } // case 41 case 53: { altitude_ = input.readFloat(); bitField0_ |= 0x00000020; break; } // case 53 case 56: { batteryLevelPercent_ = input.readInt32(); bitField0_ |= 0x00000040; break; } // case 56 case 82: { input.readMessage( getErrorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object deviceSerialNumber_ = ""; /** * string deviceSerialNumber = 1; * @return The deviceSerialNumber. */ public java.lang.String getDeviceSerialNumber() { java.lang.Object ref = deviceSerialNumber_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceSerialNumber_ = s; return s; } else { return (java.lang.String) ref; } } /** * string deviceSerialNumber = 1; * @return The bytes for deviceSerialNumber. */ public com.google.protobuf.ByteString getDeviceSerialNumberBytes() { java.lang.Object ref = deviceSerialNumber_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceSerialNumber_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string deviceSerialNumber = 1; * @param value The deviceSerialNumber to set. * @return This builder for chaining. */ public Builder setDeviceSerialNumber( java.lang.String value) { if (value == null) { throw new NullPointerException(); } deviceSerialNumber_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * string deviceSerialNumber = 1; * @return This builder for chaining. */ public Builder clearDeviceSerialNumber() { deviceSerialNumber_ = getDefaultInstance().getDeviceSerialNumber(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string deviceSerialNumber = 1; * @param value The bytes for deviceSerialNumber to set. * @return This builder for chaining. */ public Builder setDeviceSerialNumberBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); deviceSerialNumber_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object deviceName_ = ""; /** * string deviceName = 2; * @return The deviceName. */ public java.lang.String getDeviceName() { java.lang.Object ref = deviceName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deviceName_ = s; return s; } else { return (java.lang.String) ref; } } /** * string deviceName = 2; * @return The bytes for deviceName. */ public com.google.protobuf.ByteString getDeviceNameBytes() { java.lang.Object ref = deviceName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string deviceName = 2; * @param value The deviceName to set. * @return This builder for chaining. */ public Builder setDeviceName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } deviceName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * string deviceName = 2; * @return This builder for chaining. */ public Builder clearDeviceName() { deviceName_ = getDefaultInstance().getDeviceName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string deviceName = 2; * @param value The bytes for deviceName to set. * @return This builder for chaining. */ public Builder setDeviceNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); deviceName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private long deviceTime_ ; /** * uint64 deviceTime = 3; * @return The deviceTime. */ @java.lang.Override public long getDeviceTime() { return deviceTime_; } /** * uint64 deviceTime = 3; * @param value The deviceTime to set. * @return This builder for chaining. */ public Builder setDeviceTime(long value) { deviceTime_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * uint64 deviceTime = 3; * @return This builder for chaining. */ public Builder clearDeviceTime() { bitField0_ = (bitField0_ & ~0x00000004); deviceTime_ = 0L; onChanged(); return this; } private double latitude_ ; /** * double latitude = 4; * @return The latitude. */ @java.lang.Override public double getLatitude() { return latitude_; } /** * double latitude = 4; * @param value The latitude to set. * @return This builder for chaining. */ public Builder setLatitude(double value) { latitude_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * double latitude = 4; * @return This builder for chaining. */ public Builder clearLatitude() { bitField0_ = (bitField0_ & ~0x00000008); latitude_ = 0D; onChanged(); return this; } private double longitude_ ; /** * double longitude = 5; * @return The longitude. */ @java.lang.Override public double getLongitude() { return longitude_; } /** * double longitude = 5; * @param value The longitude to set. * @return This builder for chaining. */ public Builder setLongitude(double value) { longitude_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * double longitude = 5; * @return This builder for chaining. */ public Builder clearLongitude() { bitField0_ = (bitField0_ & ~0x00000010); longitude_ = 0D; onChanged(); return this; } private float altitude_ ; /** * float altitude = 6; * @return The altitude. */ @java.lang.Override public float getAltitude() { return altitude_; } /** * float altitude = 6; * @param value The altitude to set. * @return This builder for chaining. */ public Builder setAltitude(float value) { altitude_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * float altitude = 6; * @return This builder for chaining. */ public Builder clearAltitude() { bitField0_ = (bitField0_ & ~0x00000020); altitude_ = 0F; onChanged(); return this; } private int batteryLevelPercent_ ; /** * int32 batteryLevelPercent = 7; * @return The batteryLevelPercent. */ @java.lang.Override public int getBatteryLevelPercent() { return batteryLevelPercent_; } /** * int32 batteryLevelPercent = 7; * @param value The batteryLevelPercent to set. * @return This builder for chaining. */ public Builder setBatteryLevelPercent(int value) { batteryLevelPercent_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * int32 batteryLevelPercent = 7; * @return This builder for chaining. */ public Builder clearBatteryLevelPercent() { bitField0_ = (bitField0_ & ~0x00000040); batteryLevelPercent_ = 0; onChanged(); return this; } private com.craxiom.networksurvey.messaging.Error error_; private com.google.protobuf.SingleFieldBuilder< com.craxiom.networksurvey.messaging.Error, com.craxiom.networksurvey.messaging.Error.Builder, com.craxiom.networksurvey.messaging.ErrorOrBuilder> errorBuilder_; /** * .Error error = 10; * @return Whether the error field is set. */ public boolean hasError() { return ((bitField0_ & 0x00000080) != 0); } /** * .Error error = 10; * @return The error. */ public com.craxiom.networksurvey.messaging.Error getError() { if (errorBuilder_ == null) { return error_ == null ? com.craxiom.networksurvey.messaging.Error.getDefaultInstance() : error_; } else { return errorBuilder_.getMessage(); } } /** * .Error error = 10; */ public Builder setError(com.craxiom.networksurvey.messaging.Error value) { if (errorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } error_ = value; } else { errorBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * .Error error = 10; */ public Builder setError( com.craxiom.networksurvey.messaging.Error.Builder builderForValue) { if (errorBuilder_ == null) { error_ = builderForValue.build(); } else { errorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * .Error error = 10; */ public Builder mergeError(com.craxiom.networksurvey.messaging.Error value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && error_ != null && error_ != com.craxiom.networksurvey.messaging.Error.getDefaultInstance()) { getErrorBuilder().mergeFrom(value); } else { error_ = value; } } else { errorBuilder_.mergeFrom(value); } if (error_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * .Error error = 10; */ public Builder clearError() { bitField0_ = (bitField0_ & ~0x00000080); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); errorBuilder_ = null; } onChanged(); return this; } /** * .Error error = 10; */ public com.craxiom.networksurvey.messaging.Error.Builder getErrorBuilder() { bitField0_ |= 0x00000080; onChanged(); return getErrorFieldBuilder().getBuilder(); } /** * .Error error = 10; */ public com.craxiom.networksurvey.messaging.ErrorOrBuilder getErrorOrBuilder() { if (errorBuilder_ != null) { return errorBuilder_.getMessageOrBuilder(); } else { return error_ == null ? com.craxiom.networksurvey.messaging.Error.getDefaultInstance() : error_; } } /** * .Error error = 10; */ private com.google.protobuf.SingleFieldBuilder< com.craxiom.networksurvey.messaging.Error, com.craxiom.networksurvey.messaging.Error.Builder, com.craxiom.networksurvey.messaging.ErrorOrBuilder> getErrorFieldBuilder() { if (errorBuilder_ == null) { errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.craxiom.networksurvey.messaging.Error, com.craxiom.networksurvey.messaging.Error.Builder, com.craxiom.networksurvey.messaging.ErrorOrBuilder>( getError(), getParentForChildren(), isClean()); error_ = null; } return errorBuilder_; } // @@protoc_insertion_point(builder_scope:DeviceStatus) } // @@protoc_insertion_point(class_scope:DeviceStatus) private static final com.craxiom.networksurvey.messaging.DeviceStatus DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.craxiom.networksurvey.messaging.DeviceStatus(); } public static com.craxiom.networksurvey.messaging.DeviceStatus getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DeviceStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.craxiom.networksurvey.messaging.DeviceStatus getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy