getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface KuraPositionOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraPosition)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ boolean hasLatitude();
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ double getLatitude();
+
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ boolean hasLongitude();
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ double getLongitude();
+
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ boolean hasAltitude();
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ double getAltitude();
+
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ boolean hasPrecision();
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ double getPrecision();
+
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ boolean hasHeading();
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ double getHeading();
+
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ boolean hasSpeed();
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ double getSpeed();
+
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ boolean hasSatellites();
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ int getSatellites();
+
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ boolean hasStatus();
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ int getStatus();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class KuraPosition extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraPosition)
+ KuraPositionOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraPosition.newBuilder() to construct.
+ private KuraPosition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private KuraPosition() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraPosition();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int LATITUDE_FIELD_NUMBER = 1;
+ private double latitude_;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+
+ public static final int LONGITUDE_FIELD_NUMBER = 2;
+ private double longitude_;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+
+ public static final int ALTITUDE_FIELD_NUMBER = 3;
+ private double altitude_;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+
+ public static final int PRECISION_FIELD_NUMBER = 4;
+ private double precision_;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+
+ public static final int HEADING_FIELD_NUMBER = 5;
+ private double heading_;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+
+ public static final int SPEED_FIELD_NUMBER = 6;
+ private double speed_;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 7;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int SATELLITES_FIELD_NUMBER = 8;
+ private int satellites_;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 9;
+ private int status_;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasLatitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasLongitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeDouble(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeDouble(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeDouble(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeDouble(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeDouble(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeDouble(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeInt64(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ output.writeInt32(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeInt32(9, status_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(9, status_);
+ }
+ 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 KuraPayloadProto.KuraPayload.KuraPosition)) {
+ return super.equals(obj);
+ }
+ KuraPayloadProto.KuraPayload.KuraPosition other = (KuraPayloadProto.KuraPayload.KuraPosition) obj;
+
+ if (hasLatitude() != other.hasLatitude()) return false;
+ if (hasLatitude()) {
+ if (java.lang.Double.doubleToLongBits(getLatitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLatitude())) return false;
+ }
+ if (hasLongitude() != other.hasLongitude()) return false;
+ if (hasLongitude()) {
+ if (java.lang.Double.doubleToLongBits(getLongitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLongitude())) return false;
+ }
+ if (hasAltitude() != other.hasAltitude()) return false;
+ if (hasAltitude()) {
+ if (java.lang.Double.doubleToLongBits(getAltitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getAltitude())) return false;
+ }
+ if (hasPrecision() != other.hasPrecision()) return false;
+ if (hasPrecision()) {
+ if (java.lang.Double.doubleToLongBits(getPrecision())
+ != java.lang.Double.doubleToLongBits(
+ other.getPrecision())) return false;
+ }
+ if (hasHeading() != other.hasHeading()) return false;
+ if (hasHeading()) {
+ if (java.lang.Double.doubleToLongBits(getHeading())
+ != java.lang.Double.doubleToLongBits(
+ other.getHeading())) return false;
+ }
+ if (hasSpeed() != other.hasSpeed()) return false;
+ if (hasSpeed()) {
+ if (java.lang.Double.doubleToLongBits(getSpeed())
+ != java.lang.Double.doubleToLongBits(
+ other.getSpeed())) return false;
+ }
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasSatellites() != other.hasSatellites()) return false;
+ if (hasSatellites()) {
+ if (getSatellites()
+ != other.getSatellites()) return false;
+ }
+ if (hasStatus() != other.hasStatus()) return false;
+ if (hasStatus()) {
+ if (getStatus()
+ != other.getStatus()) 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();
+ if (hasLatitude()) {
+ hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLatitude()));
+ }
+ if (hasLongitude()) {
+ hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLongitude()));
+ }
+ if (hasAltitude()) {
+ hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getAltitude()));
+ }
+ if (hasPrecision()) {
+ hash = (37 * hash) + PRECISION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getPrecision()));
+ }
+ if (hasHeading()) {
+ hash = (37 * hash) + HEADING_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getHeading()));
+ }
+ if (hasSpeed()) {
+ hash = (37 * hash) + SPEED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getSpeed()));
+ }
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasSatellites()) {
+ hash = (37 * hash) + SATELLITES_FIELD_NUMBER;
+ hash = (53 * hash) + getSatellites();
+ }
+ if (hasStatus()) {
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getStatus();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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(KuraPayloadProto.KuraPayload.KuraPosition 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraPosition)
+ KuraPayloadProto.KuraPayload.KuraPositionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ latitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ longitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ altitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ precision_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ heading_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ speed_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ satellites_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ status_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition build() {
+ KuraPayloadProto.KuraPayload.KuraPosition result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition buildPartial() {
+ KuraPayloadProto.KuraPayload.KuraPosition result = new KuraPayloadProto.KuraPayload.KuraPosition(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.latitude_ = latitude_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.longitude_ = longitude_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.altitude_ = altitude_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.precision_ = precision_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.heading_ = heading_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.speed_ = speed_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.satellites_ = satellites_;
+ to_bitField0_ |= 0x00000080;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.status_ = status_;
+ to_bitField0_ |= 0x00000100;
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof KuraPayloadProto.KuraPayload.KuraPosition) {
+ return mergeFrom((KuraPayloadProto.KuraPayload.KuraPosition)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(KuraPayloadProto.KuraPayload.KuraPosition other) {
+ if (other == KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) return this;
+ if (other.hasLatitude()) {
+ setLatitude(other.getLatitude());
+ }
+ if (other.hasLongitude()) {
+ setLongitude(other.getLongitude());
+ }
+ if (other.hasAltitude()) {
+ setAltitude(other.getAltitude());
+ }
+ if (other.hasPrecision()) {
+ setPrecision(other.getPrecision());
+ }
+ if (other.hasHeading()) {
+ setHeading(other.getHeading());
+ }
+ if (other.hasSpeed()) {
+ setSpeed(other.getSpeed());
+ }
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasSatellites()) {
+ setSatellites(other.getSatellites());
+ }
+ if (other.hasStatus()) {
+ setStatus(other.getStatus());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasLatitude()) {
+ return false;
+ }
+ if (!hasLongitude()) {
+ return false;
+ }
+ 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 9: {
+ latitude_ = input.readDouble();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 9
+ case 17: {
+ longitude_ = input.readDouble();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 17
+ case 25: {
+ altitude_ = input.readDouble();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 25
+ case 33: {
+ precision_ = input.readDouble();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 33
+ case 41: {
+ heading_ = input.readDouble();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 41
+ case 49: {
+ speed_ = input.readDouble();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 49
+ case 56: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 64: {
+ satellites_ = input.readInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 72: {
+ status_ = input.readInt32();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 72
+ 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 double latitude_ ;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+ /**
+ * required double latitude = 1;
+ * @param value The latitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLatitude(double value) {
+ bitField0_ |= 0x00000001;
+ latitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double latitude = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearLatitude() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ latitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double longitude_ ;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+ /**
+ * required double longitude = 2;
+ * @param value The longitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLongitude(double value) {
+ bitField0_ |= 0x00000002;
+ longitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double longitude = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearLongitude() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ longitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double altitude_ ;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+ /**
+ * optional double altitude = 3;
+ * @param value The altitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAltitude(double value) {
+ bitField0_ |= 0x00000004;
+ altitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional double altitude = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearAltitude() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ altitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double precision_ ;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @param value The precision to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPrecision(double value) {
+ bitField0_ |= 0x00000008;
+ precision_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearPrecision() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ precision_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double heading_ ;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @param value The heading to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHeading(double value) {
+ bitField0_ |= 0x00000010;
+ heading_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearHeading() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heading_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double speed_ ;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @param value The speed to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSpeed(double value) {
+ bitField0_ |= 0x00000020;
+ speed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearSpeed() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ speed_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000040;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int satellites_ ;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @param value The satellites to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSatellites(int value) {
+ bitField0_ |= 0x00000080;
+ satellites_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearSatellites() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ satellites_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int status_ ;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @param value The status to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStatus(int value) {
+ bitField0_ |= 0x00000100;
+ status_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearStatus() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ status_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraPosition)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraPosition)
+ private static final KuraPayloadProto.KuraPayload.KuraPosition DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload.KuraPosition();
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int TIMESTAMP_FIELD_NUMBER = 1;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int POSITION_FIELD_NUMBER = 2;
+ private KuraPayloadProto.KuraPayload.KuraPosition position_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ @java.lang.Override
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+
+ public static final int METRIC_FIELD_NUMBER = 5000;
+ private java.util.List metric_;
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List getMetricList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public int getMetricCount() {
+ return metric_.size();
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ return metric_.get(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ return metric_.get(index);
+ }
+
+ public static final int BODY_FIELD_NUMBER = 5001;
+ private com.google.protobuf.ByteString body_;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3
+ .ExtendableMessage.ExtensionWriter
+ extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeInt64(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getPosition());
+ }
+ extensionWriter.writeUntil(5000, output);
+ for (int i = 0; i < metric_.size(); i++) {
+ output.writeMessage(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeBytes(5001, body_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getPosition());
+ }
+ for (int i = 0; i < metric_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5001, body_);
+ }
+ size += extensionsSerializedSize();
+ 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 KuraPayloadProto.KuraPayload)) {
+ return super.equals(obj);
+ }
+ KuraPayloadProto.KuraPayload other = (KuraPayloadProto.KuraPayload) obj;
+
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasPosition() != other.hasPosition()) return false;
+ if (hasPosition()) {
+ if (!getPosition()
+ .equals(other.getPosition())) return false;
+ }
+ if (!getMetricList()
+ .equals(other.getMetricList())) return false;
+ if (hasBody() != other.hasBody()) return false;
+ if (hasBody()) {
+ if (!getBody()
+ .equals(other.getBody())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasPosition()) {
+ hash = (37 * hash) + POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + getPosition().hashCode();
+ }
+ if (getMetricCount() > 0) {
+ hash = (37 * hash) + METRIC_FIELD_NUMBER;
+ hash = (53 * hash) + getMetricList().hashCode();
+ }
+ if (hasBody()) {
+ hash = (37 * hash) + BODY_FIELD_NUMBER;
+ hash = (53 * hash) + getBody().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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 KuraPayloadProto.KuraPayload parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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 KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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(KuraPayloadProto.KuraPayload 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
+ KuraPayloadProto.KuraPayload, Builder> implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload)
+ KuraPayloadProto.KuraPayloadOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.class, KuraPayloadProto.KuraPayload.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto.KuraPayload.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getPositionFieldBuilder();
+ getMetricFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (positionBuilder_ == null) {
+ position_ = null;
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ } else {
+ metric_ = null;
+ metricBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ body_ = com.google.protobuf.ByteString.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return KuraPayloadProto.KuraPayload.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload build() {
+ KuraPayloadProto.KuraPayload result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload buildPartial() {
+ KuraPayloadProto.KuraPayload result = new KuraPayloadProto.KuraPayload(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ if (positionBuilder_ == null) {
+ result.position_ = position_;
+ } else {
+ result.position_ = positionBuilder_.build();
+ }
+ to_bitField0_ |= 0x00000002;
+ }
+ if (metricBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)) {
+ metric_ = java.util.Collections.unmodifiableList(metric_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.metric_ = metric_;
+ } else {
+ result.metric_ = metricBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.body_ = body_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof KuraPayloadProto.KuraPayload) {
+ return mergeFrom((KuraPayloadProto.KuraPayload)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(KuraPayloadProto.KuraPayload other) {
+ if (other == KuraPayloadProto.KuraPayload.getDefaultInstance()) return this;
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasPosition()) {
+ mergePosition(other.getPosition());
+ }
+ if (metricBuilder_ == null) {
+ if (!other.metric_.isEmpty()) {
+ if (metric_.isEmpty()) {
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureMetricIsMutable();
+ metric_.addAll(other.metric_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.metric_.isEmpty()) {
+ if (metricBuilder_.isEmpty()) {
+ metricBuilder_.dispose();
+ metricBuilder_ = null;
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ metricBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getMetricFieldBuilder() : null;
+ } else {
+ metricBuilder_.addAllMessages(other.metric_);
+ }
+ }
+ }
+ if (other.hasBody()) {
+ setBody(other.getBody());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ 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 8: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18: {
+ input.readMessage(
+ getPositionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 40002: {
+ KuraPayloadProto.KuraPayload.KuraMetric m =
+ input.readMessage(
+ KuraPayloadProto.KuraPayload.KuraMetric.PARSER,
+ extensionRegistry);
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(m);
+ } else {
+ metricBuilder_.addMessage(m);
+ }
+ break;
+ } // case 40002
+ case 40010: {
+ body_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 40010
+ 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 long timestamp_ ;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000001;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private KuraPayloadProto.KuraPayload.KuraPosition position_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder> positionBuilder_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ if (positionBuilder_ == null) {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ } else {
+ return positionBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ position_ = value;
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(
+ KuraPayloadProto.KuraPayload.KuraPosition.Builder builderForValue) {
+ if (positionBuilder_ == null) {
+ position_ = builderForValue.build();
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder mergePosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ position_ != null &&
+ position_ != KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) {
+ position_ =
+ KuraPayloadProto.KuraPayload.KuraPosition.newBuilder(position_).mergeFrom(value).buildPartial();
+ } else {
+ position_ = value;
+ }
+ onChanged();
+ } else {
+ positionBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder clearPosition() {
+ if (positionBuilder_ == null) {
+ position_ = null;
+ onChanged();
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public KuraPayloadProto.KuraPayload.KuraPosition.Builder getPositionBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getPositionFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ if (positionBuilder_ != null) {
+ return positionBuilder_.getMessageOrBuilder();
+ } else {
+ return position_ == null ?
+ KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>
+ getPositionFieldBuilder() {
+ if (positionBuilder_ == null) {
+ positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>(
+ getPosition(),
+ getParentForChildren(),
+ isClean());
+ position_ = null;
+ }
+ return positionBuilder_;
+ }
+
+ private java.util.List metric_ =
+ java.util.Collections.emptyList();
+ private void ensureMetricIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ metric_ = new java.util.ArrayList(metric_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder> metricBuilder_;
+
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List getMetricList() {
+ if (metricBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(metric_);
+ } else {
+ return metricBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public int getMetricCount() {
+ if (metricBuilder_ == null) {
+ return metric_.size();
+ } else {
+ return metricBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index);
+ } else {
+ return metricBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.set(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addAllMetric(
+ java.lang.Iterable extends KuraPayloadProto.KuraPayload.KuraMetric> values) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, metric_);
+ onChanged();
+ } else {
+ metricBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder clearMetric() {
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ metricBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder removeMetric(int index) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.remove(index);
+ onChanged();
+ } else {
+ metricBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder getMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index); } else {
+ return metricBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ if (metricBuilder_ != null) {
+ return metricBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(metric_);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder() {
+ return getMetricFieldBuilder().addBuilder(
+ KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().addBuilder(
+ index, KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List
+ getMetricBuilderList() {
+ return getMetricFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricFieldBuilder() {
+ if (metricBuilder_ == null) {
+ metricBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>(
+ metric_,
+ ((bitField0_ & 0x00000004) != 0),
+ getParentForChildren(),
+ isClean());
+ metric_ = null;
+ }
+ return metricBuilder_;
+ }
+
+ private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @param value The body to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBody(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ body_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return This builder for chaining.
+ */
+ public Builder clearBody() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ body_ = getDefaultInstance().getBody();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload)
+ private static final KuraPayloadProto.KuraPayload DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload();
+ }
+
+ public static KuraPayloadProto.KuraPayload getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPayload 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 KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\021kurapayload.proto\022\rkuradatatypes\"\243\005\n\013K" +
+ "uraPayload\022\021\n\ttimestamp\030\001 \001(\003\0229\n\010positio" +
+ "n\030\002 \001(\0132\'.kuradatatypes.KuraPayload.Kura" +
+ "Position\0226\n\006metric\030\210\' \003(\0132%.kuradatatype" +
+ "s.KuraPayload.KuraMetric\022\r\n\004body\030\211\' \001(\014\032" +
+ "\305\002\n\nKuraMetric\022\014\n\004name\030\001 \002(\t\022=\n\004type\030\002 \002" +
+ "(\0162/.kuradatatypes.KuraPayload.KuraMetri" +
+ "c.ValueType\022\024\n\014double_value\030\003 \001(\001\022\023\n\013flo" +
+ "at_value\030\004 \001(\002\022\022\n\nlong_value\030\005 \001(\003\022\021\n\tin" +
+ "t_value\030\006 \001(\005\022\022\n\nbool_value\030\007 \001(\010\022\024\n\014str" +
+ "ing_value\030\010 \001(\t\022\023\n\013bytes_value\030\t \001(\014\"Y\n\t" +
+ "ValueType\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\t\n\005INT6" +
+ "4\020\002\022\t\n\005INT32\020\003\022\010\n\004BOOL\020\004\022\n\n\006STRING\020\005\022\t\n\005" +
+ "BYTES\020\006\032\257\001\n\014KuraPosition\022\020\n\010latitude\030\001 \002" +
+ "(\001\022\021\n\tlongitude\030\002 \002(\001\022\020\n\010altitude\030\003 \001(\001\022" +
+ "\021\n\tprecision\030\004 \001(\001\022\017\n\007heading\030\005 \001(\001\022\r\n\005s" +
+ "peed\030\006 \001(\001\022\021\n\ttimestamp\030\007 \001(\003\022\022\n\nsatelli" +
+ "tes\030\010 \001(\005\022\016\n\006status\030\t \001(\005*\005\010\003\020\210\'BA\n-org." +
+ "eclipse.kapua.gateway.client.kura.payloa" +
+ "dB\020KuraPayloadProto"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_kuradatatypes_KuraPayload_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_descriptor,
+ new java.lang.String[] { "Timestamp", "Position", "Metric", "Body", });
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor,
+ new java.lang.String[] { "Name", "Type", "DoubleValue", "FloatValue", "LongValue", "IntValue", "BoolValue", "StringValue", "BytesValue", });
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(1);
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor,
+ new java.lang.String[] { "Latitude", "Longitude", "Altitude", "Precision", "Heading", "Speed", "Timestamp", "Satellites", "Status", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
\ No newline at end of file
diff --git a/client/gateway/profile/kura/src/test/java/org/eclipse/kapua/client/gateway/kura/internal/MetricsTest.java b/client/gateway/profile/kura/src/test/java/org/eclipse/kapua/client/gateway/kura/internal/MetricsTest.java
index 9ed31b11182..d8df4907a50 100644
--- a/client/gateway/profile/kura/src/test/java/org/eclipse/kapua/client/gateway/kura/internal/MetricsTest.java
+++ b/client/gateway/profile/kura/src/test/java/org/eclipse/kapua/client/gateway/kura/internal/MetricsTest.java
@@ -13,7 +13,7 @@
package org.eclipse.kapua.client.gateway.kura.internal;
import com.google.protobuf.ByteString;
-import org.eclipse.kapua.gateway.client.kura.payload.KuraPayloadProto;
+import org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto;
import org.eclipse.kapua.qa.markers.junit.JUnitTests;
import org.hamcrest.core.IsInstanceOf;
import org.junit.Assert;
@@ -23,10 +23,10 @@
import org.mockito.Mockito;
import java.nio.ByteBuffer;
-import java.util.Map;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
-import java.util.HashMap;
+import java.util.Map;
import java.util.TreeMap;
diff --git a/pom.xml b/pom.xml
index 4d604d30c83..065532bafda 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,7 +143,6 @@
4.1.1
1.9
1.6.5
- 3.8.0
1.5
2.20
@@ -268,9 +267,15 @@
- com.github.os72
- protoc-jar-maven-plugin
- ${protoc-jar-maven-plugin.version}
+ org.owasp
+ dependency-check-maven
+ ${dependency-check-maven.version}
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ ${nexus-staging-maven-plugin.version}
diff --git a/qa/common/src/main/java/org/eclipse/kapua/qa/common/SimulatedDeviceApplication.java b/qa/common/src/main/java/org/eclipse/kapua/qa/common/SimulatedDeviceApplication.java
index 883eed7d3f7..51577da9ba7 100644
--- a/qa/common/src/main/java/org/eclipse/kapua/qa/common/SimulatedDeviceApplication.java
+++ b/qa/common/src/main/java/org/eclipse/kapua/qa/common/SimulatedDeviceApplication.java
@@ -12,19 +12,19 @@
*******************************************************************************/
package org.eclipse.kapua.qa.common;
-import java.time.Instant;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
import org.eclipse.kapua.kura.simulator.app.Application;
import org.eclipse.kapua.kura.simulator.app.ApplicationContext;
import org.eclipse.kapua.kura.simulator.app.Descriptor;
import org.eclipse.kapua.kura.simulator.app.Handler;
import org.eclipse.kapua.kura.simulator.payload.Metrics;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
import org.eclipse.kapua.kura.simulator.topic.Topic;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
+
+import java.time.Instant;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
public class SimulatedDeviceApplication implements Application {
diff --git a/service/device/call/kura/pom.xml b/service/device/call/kura/pom.xml
index 54841f9d774..58e87199c41 100644
--- a/service/device/call/kura/pom.xml
+++ b/service/device/call/kura/pom.xml
@@ -72,28 +72,4 @@
-
-
-
- com.github.os72
- protoc-jar-maven-plugin
-
-
- generate-sources
-
- run
-
-
- ${protobuf.version}
- true
-
- src/main/protobuf
-
-
-
-
-
-
-
-
diff --git a/service/device/call/kura/src/main/java/org/eclipse/kapua/service/device/call/message/kura/proto/KuraPayloadProto.java b/service/device/call/kura/src/main/java/org/eclipse/kapua/service/device/call/message/kura/proto/KuraPayloadProto.java
new file mode 100644
index 00000000000..c8aa6ceca96
--- /dev/null
+++ b/service/device/call/kura/src/main/java/org/eclipse/kapua/service/device/call/message/kura/proto/KuraPayloadProto.java
@@ -0,0 +1,4588 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Eurotech
+ *******************************************************************************/
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: kurapayload.proto
+
+package org.eclipse.kapua.service.device.call.message.kura.proto;
+
+public final class KuraPayloadProto {
+ private KuraPayloadProto() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public interface KuraPayloadOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload)
+ com.google.protobuf.GeneratedMessageV3.
+ ExtendableMessageOrBuilder {
+
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ boolean hasPosition();
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getPosition();
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder();
+
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ java.util.List
+ getMetricList();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index);
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ int getMetricCount();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ java.util.List extends org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index);
+
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ boolean hasBody();
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ com.google.protobuf.ByteString getBody();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload}
+ */
+ public static final class KuraPayload extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
+ KuraPayload> implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload)
+ KuraPayloadOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraPayload.newBuilder() to construct.
+ private KuraPayload(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private KuraPayload() {
+ metric_ = java.util.Collections.emptyList();
+ body_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraPayload();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.Builder.class);
+ }
+
+ public interface KuraMetricOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraMetric)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ boolean hasName();
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ boolean hasType();
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType();
+
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ boolean hasDoubleValue();
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ double getDoubleValue();
+
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ boolean hasFloatValue();
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ float getFloatValue();
+
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ boolean hasLongValue();
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ long getLongValue();
+
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ boolean hasIntValue();
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ int getIntValue();
+
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ boolean hasBoolValue();
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ boolean getBoolValue();
+
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ boolean hasStringValue();
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ java.lang.String getStringValue();
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ com.google.protobuf.ByteString
+ getStringValueBytes();
+
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ boolean hasBytesValue();
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ com.google.protobuf.ByteString getBytesValue();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
+ */
+ public static final class KuraMetric extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraMetric)
+ KuraMetricOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraMetric.newBuilder() to construct.
+ private KuraMetric(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private KuraMetric() {
+ name_ = "";
+ type_ = 0;
+ stringValue_ = "";
+ bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraMetric();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code kuradatatypes.KuraPayload.KuraMetric.ValueType}
+ */
+ public enum ValueType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * DOUBLE = 0;
+ */
+ DOUBLE(0),
+ /**
+ * FLOAT = 1;
+ */
+ FLOAT(1),
+ /**
+ * INT64 = 2;
+ */
+ INT64(2),
+ /**
+ * INT32 = 3;
+ */
+ INT32(3),
+ /**
+ * BOOL = 4;
+ */
+ BOOL(4),
+ /**
+ * STRING = 5;
+ */
+ STRING(5),
+ /**
+ * BYTES = 6;
+ */
+ BYTES(6),
+ ;
+
+ /**
+ * DOUBLE = 0;
+ */
+ public static final int DOUBLE_VALUE = 0;
+ /**
+ * FLOAT = 1;
+ */
+ public static final int FLOAT_VALUE = 1;
+ /**
+ * INT64 = 2;
+ */
+ public static final int INT64_VALUE = 2;
+ /**
+ * INT32 = 3;
+ */
+ public static final int INT32_VALUE = 3;
+ /**
+ * BOOL = 4;
+ */
+ public static final int BOOL_VALUE = 4;
+ /**
+ * STRING = 5;
+ */
+ public static final int STRING_VALUE = 5;
+ /**
+ * BYTES = 6;
+ */
+ public static final int BYTES_VALUE = 6;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ValueType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ValueType forNumber(int value) {
+ switch (value) {
+ case 0: return DOUBLE;
+ case 1: return FLOAT;
+ case 2: return INT64;
+ case 3: return INT32;
+ case 4: return BOOL;
+ case 5: return STRING;
+ case 6: return BYTES;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ ValueType> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public ValueType findValueByNumber(int number) {
+ return ValueType.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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final ValueType[] VALUES = values();
+
+ public static ValueType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private ValueType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:kuradatatypes.KuraPayload.KuraMetric.ValueType)
+ }
+
+ private int bitField0_;
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ @java.lang.Override
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private int type_;
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ @java.lang.Override public boolean hasType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ @java.lang.Override public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
+ @SuppressWarnings("deprecation")
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
+ return result == null ? org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
+ }
+
+ public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
+ private double doubleValue_;
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasDoubleValue() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ @java.lang.Override
+ public double getDoubleValue() {
+ return doubleValue_;
+ }
+
+ public static final int FLOAT_VALUE_FIELD_NUMBER = 4;
+ private float floatValue_;
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasFloatValue() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ @java.lang.Override
+ public float getFloatValue() {
+ return floatValue_;
+ }
+
+ public static final int LONG_VALUE_FIELD_NUMBER = 5;
+ private long longValue_;
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongValue() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ @java.lang.Override
+ public long getLongValue() {
+ return longValue_;
+ }
+
+ public static final int INT_VALUE_FIELD_NUMBER = 6;
+ private int intValue_;
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasIntValue() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ @java.lang.Override
+ public int getIntValue() {
+ return intValue_;
+ }
+
+ public static final int BOOL_VALUE_FIELD_NUMBER = 7;
+ private boolean boolValue_;
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBoolValue() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ @java.lang.Override
+ public boolean getBoolValue() {
+ return boolValue_;
+ }
+
+ public static final int STRING_VALUE_FIELD_NUMBER = 8;
+ private volatile java.lang.Object stringValue_;
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasStringValue() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ @java.lang.Override
+ public java.lang.String getStringValue() {
+ java.lang.Object ref = stringValue_;
+ 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();
+ if (bs.isValidUtf8()) {
+ stringValue_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStringValueBytes() {
+ java.lang.Object ref = stringValue_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringValue_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BYTES_VALUE_FIELD_NUMBER = 9;
+ private com.google.protobuf.ByteString bytesValue_;
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBytesValue() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBytesValue() {
+ return bytesValue_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasName()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeEnum(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeDouble(3, doubleValue_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeFloat(4, floatValue_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeInt64(5, longValue_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeInt32(6, intValue_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeBool(7, boolValue_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, stringValue_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeBytes(9, bytesValue_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, doubleValue_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(4, floatValue_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(5, longValue_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(6, intValue_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(7, boolValue_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, stringValue_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(9, bytesValue_);
+ }
+ 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric)) {
+ return super.equals(obj);
+ }
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric other = (org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric) obj;
+
+ if (hasName() != other.hasName()) return false;
+ if (hasName()) {
+ if (!getName()
+ .equals(other.getName())) return false;
+ }
+ if (hasType() != other.hasType()) return false;
+ if (hasType()) {
+ if (type_ != other.type_) return false;
+ }
+ if (hasDoubleValue() != other.hasDoubleValue()) return false;
+ if (hasDoubleValue()) {
+ if (java.lang.Double.doubleToLongBits(getDoubleValue())
+ != java.lang.Double.doubleToLongBits(
+ other.getDoubleValue())) return false;
+ }
+ if (hasFloatValue() != other.hasFloatValue()) return false;
+ if (hasFloatValue()) {
+ if (java.lang.Float.floatToIntBits(getFloatValue())
+ != java.lang.Float.floatToIntBits(
+ other.getFloatValue())) return false;
+ }
+ if (hasLongValue() != other.hasLongValue()) return false;
+ if (hasLongValue()) {
+ if (getLongValue()
+ != other.getLongValue()) return false;
+ }
+ if (hasIntValue() != other.hasIntValue()) return false;
+ if (hasIntValue()) {
+ if (getIntValue()
+ != other.getIntValue()) return false;
+ }
+ if (hasBoolValue() != other.hasBoolValue()) return false;
+ if (hasBoolValue()) {
+ if (getBoolValue()
+ != other.getBoolValue()) return false;
+ }
+ if (hasStringValue() != other.hasStringValue()) return false;
+ if (hasStringValue()) {
+ if (!getStringValue()
+ .equals(other.getStringValue())) return false;
+ }
+ if (hasBytesValue() != other.hasBytesValue()) return false;
+ if (hasBytesValue()) {
+ if (!getBytesValue()
+ .equals(other.getBytesValue())) 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();
+ if (hasName()) {
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ }
+ if (hasType()) {
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ }
+ if (hasDoubleValue()) {
+ hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getDoubleValue()));
+ }
+ if (hasFloatValue()) {
+ hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getFloatValue());
+ }
+ if (hasLongValue()) {
+ hash = (37 * hash) + LONG_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getLongValue());
+ }
+ if (hasIntValue()) {
+ hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getIntValue();
+ }
+ if (hasBoolValue()) {
+ hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getBoolValue());
+ }
+ if (hasStringValue()) {
+ hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getStringValue().hashCode();
+ }
+ if (hasBytesValue()) {
+ hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getBytesValue().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric 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(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraMetric)
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ name_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ doubleValue_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ floatValue_ = 0F;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ longValue_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ intValue_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ boolValue_ = false;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ stringValue_ = "";
+ bitField0_ = (bitField0_ & ~0x00000080);
+ bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric build() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric buildPartial() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric result = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.name_ = name_;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.type_ = type_;
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.doubleValue_ = doubleValue_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.floatValue_ = floatValue_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.longValue_ = longValue_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.intValue_ = intValue_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.boolValue_ = boolValue_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ to_bitField0_ |= 0x00000080;
+ }
+ result.stringValue_ = stringValue_;
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ to_bitField0_ |= 0x00000100;
+ }
+ result.bytesValue_ = bytesValue_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric) {
+ return mergeFrom((org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric other) {
+ if (other == org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance()) return this;
+ if (other.hasName()) {
+ bitField0_ |= 0x00000001;
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.hasType()) {
+ setType(other.getType());
+ }
+ if (other.hasDoubleValue()) {
+ setDoubleValue(other.getDoubleValue());
+ }
+ if (other.hasFloatValue()) {
+ setFloatValue(other.getFloatValue());
+ }
+ if (other.hasLongValue()) {
+ setLongValue(other.getLongValue());
+ }
+ if (other.hasIntValue()) {
+ setIntValue(other.getIntValue());
+ }
+ if (other.hasBoolValue()) {
+ setBoolValue(other.getBoolValue());
+ }
+ if (other.hasStringValue()) {
+ bitField0_ |= 0x00000080;
+ stringValue_ = other.stringValue_;
+ onChanged();
+ }
+ if (other.hasBytesValue()) {
+ setBytesValue(other.getBytesValue());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasName()) {
+ return false;
+ }
+ if (!hasType()) {
+ return false;
+ }
+ 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: {
+ name_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ int tmpRaw = input.readEnum();
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType tmpValue =
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(2, tmpRaw);
+ } else {
+ type_ = tmpRaw;
+ bitField0_ |= 0x00000002;
+ }
+ break;
+ } // case 16
+ case 25: {
+ doubleValue_ = input.readDouble();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 25
+ case 37: {
+ floatValue_ = input.readFloat();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 37
+ case 40: {
+ longValue_ = input.readInt64();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ case 48: {
+ intValue_ = input.readInt32();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ case 56: {
+ boolValue_ = input.readBool();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 66: {
+ stringValue_ = input.readBytes();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 66
+ case 74: {
+ bytesValue_ = input.readBytes();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 74
+ 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 name_ = "";
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string name = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string name = 1;
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int type_ = 0;
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ @java.lang.Override public boolean hasType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
+ @SuppressWarnings("deprecation")
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
+ return result == null ? org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @param value The type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setType(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private double doubleValue_ ;
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasDoubleValue() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ @java.lang.Override
+ public double getDoubleValue() {
+ return doubleValue_;
+ }
+ /**
+ * optional double double_value = 3;
+ * @param value The doubleValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDoubleValue(double value) {
+ bitField0_ |= 0x00000004;
+ doubleValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional double double_value = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearDoubleValue() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ doubleValue_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private float floatValue_ ;
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasFloatValue() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ @java.lang.Override
+ public float getFloatValue() {
+ return floatValue_;
+ }
+ /**
+ * optional float float_value = 4;
+ * @param value The floatValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFloatValue(float value) {
+ bitField0_ |= 0x00000008;
+ floatValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional float float_value = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearFloatValue() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ floatValue_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private long longValue_ ;
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongValue() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ @java.lang.Override
+ public long getLongValue() {
+ return longValue_;
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @param value The longValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLongValue(long value) {
+ bitField0_ |= 0x00000010;
+ longValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearLongValue() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ longValue_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int intValue_ ;
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasIntValue() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ @java.lang.Override
+ public int getIntValue() {
+ return intValue_;
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @param value The intValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIntValue(int value) {
+ bitField0_ |= 0x00000020;
+ intValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearIntValue() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ intValue_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean boolValue_ ;
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBoolValue() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ @java.lang.Override
+ public boolean getBoolValue() {
+ return boolValue_;
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @param value The boolValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBoolValue(boolean value) {
+ bitField0_ |= 0x00000040;
+ boolValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearBoolValue() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ boolValue_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object stringValue_ = "";
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ public boolean hasStringValue() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ public java.lang.String getStringValue() {
+ java.lang.Object ref = stringValue_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stringValue_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ public com.google.protobuf.ByteString
+ getStringValueBytes() {
+ java.lang.Object ref = stringValue_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringValue_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @param value The stringValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringValue(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000080;
+ stringValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string string_value = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearStringValue() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ stringValue_ = getDefaultInstance().getStringValue();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string string_value = 8;
+ * @param value The bytes for stringValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringValueBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000080;
+ stringValue_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBytesValue() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBytesValue() {
+ return bytesValue_;
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @param value The bytesValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBytesValue(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000100;
+ bytesValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearBytesValue() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ bytesValue_ = getDefaultInstance().getBytesValue();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraMetric)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraMetric)
+ private static final org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric();
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraMetric 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface KuraPositionOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraPosition)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ boolean hasLatitude();
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ double getLatitude();
+
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ boolean hasLongitude();
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ double getLongitude();
+
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ boolean hasAltitude();
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ double getAltitude();
+
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ boolean hasPrecision();
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ double getPrecision();
+
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ boolean hasHeading();
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ double getHeading();
+
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ boolean hasSpeed();
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ double getSpeed();
+
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ boolean hasSatellites();
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ int getSatellites();
+
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ boolean hasStatus();
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ int getStatus();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class KuraPosition extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraPosition)
+ KuraPositionOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraPosition.newBuilder() to construct.
+ private KuraPosition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private KuraPosition() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraPosition();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int LATITUDE_FIELD_NUMBER = 1;
+ private double latitude_;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+
+ public static final int LONGITUDE_FIELD_NUMBER = 2;
+ private double longitude_;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+
+ public static final int ALTITUDE_FIELD_NUMBER = 3;
+ private double altitude_;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+
+ public static final int PRECISION_FIELD_NUMBER = 4;
+ private double precision_;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+
+ public static final int HEADING_FIELD_NUMBER = 5;
+ private double heading_;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+
+ public static final int SPEED_FIELD_NUMBER = 6;
+ private double speed_;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 7;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int SATELLITES_FIELD_NUMBER = 8;
+ private int satellites_;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 9;
+ private int status_;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasLatitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasLongitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeDouble(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeDouble(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeDouble(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeDouble(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeDouble(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeDouble(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeInt64(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ output.writeInt32(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeInt32(9, status_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(9, status_);
+ }
+ 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition)) {
+ return super.equals(obj);
+ }
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition other = (org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition) obj;
+
+ if (hasLatitude() != other.hasLatitude()) return false;
+ if (hasLatitude()) {
+ if (java.lang.Double.doubleToLongBits(getLatitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLatitude())) return false;
+ }
+ if (hasLongitude() != other.hasLongitude()) return false;
+ if (hasLongitude()) {
+ if (java.lang.Double.doubleToLongBits(getLongitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLongitude())) return false;
+ }
+ if (hasAltitude() != other.hasAltitude()) return false;
+ if (hasAltitude()) {
+ if (java.lang.Double.doubleToLongBits(getAltitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getAltitude())) return false;
+ }
+ if (hasPrecision() != other.hasPrecision()) return false;
+ if (hasPrecision()) {
+ if (java.lang.Double.doubleToLongBits(getPrecision())
+ != java.lang.Double.doubleToLongBits(
+ other.getPrecision())) return false;
+ }
+ if (hasHeading() != other.hasHeading()) return false;
+ if (hasHeading()) {
+ if (java.lang.Double.doubleToLongBits(getHeading())
+ != java.lang.Double.doubleToLongBits(
+ other.getHeading())) return false;
+ }
+ if (hasSpeed() != other.hasSpeed()) return false;
+ if (hasSpeed()) {
+ if (java.lang.Double.doubleToLongBits(getSpeed())
+ != java.lang.Double.doubleToLongBits(
+ other.getSpeed())) return false;
+ }
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasSatellites() != other.hasSatellites()) return false;
+ if (hasSatellites()) {
+ if (getSatellites()
+ != other.getSatellites()) return false;
+ }
+ if (hasStatus() != other.hasStatus()) return false;
+ if (hasStatus()) {
+ if (getStatus()
+ != other.getStatus()) 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();
+ if (hasLatitude()) {
+ hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLatitude()));
+ }
+ if (hasLongitude()) {
+ hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLongitude()));
+ }
+ if (hasAltitude()) {
+ hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getAltitude()));
+ }
+ if (hasPrecision()) {
+ hash = (37 * hash) + PRECISION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getPrecision()));
+ }
+ if (hasHeading()) {
+ hash = (37 * hash) + HEADING_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getHeading()));
+ }
+ if (hasSpeed()) {
+ hash = (37 * hash) + SPEED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getSpeed()));
+ }
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasSatellites()) {
+ hash = (37 * hash) + SATELLITES_FIELD_NUMBER;
+ hash = (53 * hash) + getSatellites();
+ }
+ if (hasStatus()) {
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getStatus();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition 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(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraPosition)
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ latitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ longitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ altitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ precision_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ heading_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ speed_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ satellites_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ status_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition build() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition buildPartial() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition result = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.latitude_ = latitude_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.longitude_ = longitude_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.altitude_ = altitude_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.precision_ = precision_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.heading_ = heading_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.speed_ = speed_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.satellites_ = satellites_;
+ to_bitField0_ |= 0x00000080;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.status_ = status_;
+ to_bitField0_ |= 0x00000100;
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition) {
+ return mergeFrom((org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition other) {
+ if (other == org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) return this;
+ if (other.hasLatitude()) {
+ setLatitude(other.getLatitude());
+ }
+ if (other.hasLongitude()) {
+ setLongitude(other.getLongitude());
+ }
+ if (other.hasAltitude()) {
+ setAltitude(other.getAltitude());
+ }
+ if (other.hasPrecision()) {
+ setPrecision(other.getPrecision());
+ }
+ if (other.hasHeading()) {
+ setHeading(other.getHeading());
+ }
+ if (other.hasSpeed()) {
+ setSpeed(other.getSpeed());
+ }
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasSatellites()) {
+ setSatellites(other.getSatellites());
+ }
+ if (other.hasStatus()) {
+ setStatus(other.getStatus());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasLatitude()) {
+ return false;
+ }
+ if (!hasLongitude()) {
+ return false;
+ }
+ 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 9: {
+ latitude_ = input.readDouble();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 9
+ case 17: {
+ longitude_ = input.readDouble();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 17
+ case 25: {
+ altitude_ = input.readDouble();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 25
+ case 33: {
+ precision_ = input.readDouble();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 33
+ case 41: {
+ heading_ = input.readDouble();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 41
+ case 49: {
+ speed_ = input.readDouble();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 49
+ case 56: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 64: {
+ satellites_ = input.readInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 72: {
+ status_ = input.readInt32();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 72
+ 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 double latitude_ ;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+ /**
+ * required double latitude = 1;
+ * @param value The latitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLatitude(double value) {
+ bitField0_ |= 0x00000001;
+ latitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double latitude = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearLatitude() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ latitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double longitude_ ;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+ /**
+ * required double longitude = 2;
+ * @param value The longitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLongitude(double value) {
+ bitField0_ |= 0x00000002;
+ longitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double longitude = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearLongitude() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ longitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double altitude_ ;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+ /**
+ * optional double altitude = 3;
+ * @param value The altitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAltitude(double value) {
+ bitField0_ |= 0x00000004;
+ altitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional double altitude = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearAltitude() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ altitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double precision_ ;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @param value The precision to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPrecision(double value) {
+ bitField0_ |= 0x00000008;
+ precision_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearPrecision() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ precision_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double heading_ ;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @param value The heading to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHeading(double value) {
+ bitField0_ |= 0x00000010;
+ heading_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearHeading() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heading_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double speed_ ;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @param value The speed to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSpeed(double value) {
+ bitField0_ |= 0x00000020;
+ speed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearSpeed() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ speed_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000040;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int satellites_ ;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @param value The satellites to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSatellites(int value) {
+ bitField0_ |= 0x00000080;
+ satellites_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearSatellites() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ satellites_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int status_ ;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @param value The status to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStatus(int value) {
+ bitField0_ |= 0x00000100;
+ status_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearStatus() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ status_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraPosition)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraPosition)
+ private static final org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition();
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPosition 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int TIMESTAMP_FIELD_NUMBER = 1;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int POSITION_FIELD_NUMBER = 2;
+ private org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition position_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ @java.lang.Override
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ return position_ == null ? org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ return position_ == null ? org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+
+ public static final int METRIC_FIELD_NUMBER = 5000;
+ private java.util.List metric_;
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List getMetricList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List extends org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public int getMetricCount() {
+ return metric_.size();
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ return metric_.get(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ return metric_.get(index);
+ }
+
+ public static final int BODY_FIELD_NUMBER = 5001;
+ private com.google.protobuf.ByteString body_;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3
+ .ExtendableMessage.ExtensionWriter
+ extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeInt64(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getPosition());
+ }
+ extensionWriter.writeUntil(5000, output);
+ for (int i = 0; i < metric_.size(); i++) {
+ output.writeMessage(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeBytes(5001, body_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getPosition());
+ }
+ for (int i = 0; i < metric_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5001, body_);
+ }
+ size += extensionsSerializedSize();
+ 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload)) {
+ return super.equals(obj);
+ }
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload other = (org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload) obj;
+
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasPosition() != other.hasPosition()) return false;
+ if (hasPosition()) {
+ if (!getPosition()
+ .equals(other.getPosition())) return false;
+ }
+ if (!getMetricList()
+ .equals(other.getMetricList())) return false;
+ if (hasBody() != other.hasBody()) return false;
+ if (hasBody()) {
+ if (!getBody()
+ .equals(other.getBody())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasPosition()) {
+ hash = (37 * hash) + POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + getPosition().hashCode();
+ }
+ if (getMetricCount() > 0) {
+ hash = (37 * hash) + METRIC_FIELD_NUMBER;
+ hash = (53 * hash) + getMetricList().hashCode();
+ }
+ if (hasBody()) {
+ hash = (37 * hash) + BODY_FIELD_NUMBER;
+ hash = (53 * hash) + getBody().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload 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(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload, Builder> implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload)
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayloadOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.class, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getPositionFieldBuilder();
+ getMetricFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (positionBuilder_ == null) {
+ position_ = null;
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ } else {
+ metric_ = null;
+ metricBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ body_ = com.google.protobuf.ByteString.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload build() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload buildPartial() {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload result = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ if (positionBuilder_ == null) {
+ result.position_ = position_;
+ } else {
+ result.position_ = positionBuilder_.build();
+ }
+ to_bitField0_ |= 0x00000002;
+ }
+ if (metricBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)) {
+ metric_ = java.util.Collections.unmodifiableList(metric_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.metric_ = metric_;
+ } else {
+ result.metric_ = metricBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.body_ = body_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload) {
+ return mergeFrom((org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload other) {
+ if (other == org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.getDefaultInstance()) return this;
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasPosition()) {
+ mergePosition(other.getPosition());
+ }
+ if (metricBuilder_ == null) {
+ if (!other.metric_.isEmpty()) {
+ if (metric_.isEmpty()) {
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureMetricIsMutable();
+ metric_.addAll(other.metric_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.metric_.isEmpty()) {
+ if (metricBuilder_.isEmpty()) {
+ metricBuilder_.dispose();
+ metricBuilder_ = null;
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ metricBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getMetricFieldBuilder() : null;
+ } else {
+ metricBuilder_.addAllMessages(other.metric_);
+ }
+ }
+ }
+ if (other.hasBody()) {
+ setBody(other.getBody());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ 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 8: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18: {
+ input.readMessage(
+ getPositionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 40002: {
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric m =
+ input.readMessage(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.PARSER,
+ extensionRegistry);
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(m);
+ } else {
+ metricBuilder_.addMessage(m);
+ }
+ break;
+ } // case 40002
+ case 40010: {
+ body_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 40010
+ 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 long timestamp_ ;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000001;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition position_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder> positionBuilder_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ if (positionBuilder_ == null) {
+ return position_ == null ? org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ } else {
+ return positionBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ position_ = value;
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder builderForValue) {
+ if (positionBuilder_ == null) {
+ position_ = builderForValue.build();
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder mergePosition(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ position_ != null &&
+ position_ != org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) {
+ position_ =
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.newBuilder(position_).mergeFrom(value).buildPartial();
+ } else {
+ position_ = value;
+ }
+ onChanged();
+ } else {
+ positionBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder clearPosition() {
+ if (positionBuilder_ == null) {
+ position_ = null;
+ onChanged();
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder getPositionBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getPositionFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ if (positionBuilder_ != null) {
+ return positionBuilder_.getMessageOrBuilder();
+ } else {
+ return position_ == null ?
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>
+ getPositionFieldBuilder() {
+ if (positionBuilder_ == null) {
+ positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>(
+ getPosition(),
+ getParentForChildren(),
+ isClean());
+ position_ = null;
+ }
+ return positionBuilder_;
+ }
+
+ private java.util.List metric_ =
+ java.util.Collections.emptyList();
+ private void ensureMetricIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ metric_ = new java.util.ArrayList(metric_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder> metricBuilder_;
+
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List getMetricList() {
+ if (metricBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(metric_);
+ } else {
+ return metricBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public int getMetricCount() {
+ if (metricBuilder_ == null) {
+ return metric_.size();
+ } else {
+ return metricBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index);
+ } else {
+ return metricBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.set(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addAllMetric(
+ java.lang.Iterable extends org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric> values) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, metric_);
+ onChanged();
+ } else {
+ metricBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder clearMetric() {
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ metricBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder removeMetric(int index) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.remove(index);
+ onChanged();
+ } else {
+ metricBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder getMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index); } else {
+ return metricBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List extends org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ if (metricBuilder_ != null) {
+ return metricBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(metric_);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder() {
+ return getMetricFieldBuilder().addBuilder(
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().addBuilder(
+ index, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List
+ getMetricBuilderList() {
+ return getMetricFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricFieldBuilder() {
+ if (metricBuilder_ == null) {
+ metricBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.Builder, org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>(
+ metric_,
+ ((bitField0_ & 0x00000004) != 0),
+ getParentForChildren(),
+ isClean());
+ metric_ = null;
+ }
+ return metricBuilder_;
+ }
+
+ private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @param value The body to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBody(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ body_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return This builder for chaining.
+ */
+ public Builder clearBody() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ body_ = getDefaultInstance().getBody();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload)
+ private static final org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload();
+ }
+
+ public static org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPayload 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 org.eclipse.kapua.service.device.call.message.kura.proto.KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\021kurapayload.proto\022\rkuradatatypes\"\243\005\n\013K" +
+ "uraPayload\022\021\n\ttimestamp\030\001 \001(\003\0229\n\010positio" +
+ "n\030\002 \001(\0132\'.kuradatatypes.KuraPayload.Kura" +
+ "Position\0226\n\006metric\030\210\' \003(\0132%.kuradatatype" +
+ "s.KuraPayload.KuraMetric\022\r\n\004body\030\211\' \001(\014\032" +
+ "\305\002\n\nKuraMetric\022\014\n\004name\030\001 \002(\t\022=\n\004type\030\002 \002" +
+ "(\0162/.kuradatatypes.KuraPayload.KuraMetri" +
+ "c.ValueType\022\024\n\014double_value\030\003 \001(\001\022\023\n\013flo" +
+ "at_value\030\004 \001(\002\022\022\n\nlong_value\030\005 \001(\003\022\021\n\tin" +
+ "t_value\030\006 \001(\005\022\022\n\nbool_value\030\007 \001(\010\022\024\n\014str" +
+ "ing_value\030\010 \001(\t\022\023\n\013bytes_value\030\t \001(\014\"Y\n\t" +
+ "ValueType\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\t\n\005INT6" +
+ "4\020\002\022\t\n\005INT32\020\003\022\010\n\004BOOL\020\004\022\n\n\006STRING\020\005\022\t\n\005" +
+ "BYTES\020\006\032\257\001\n\014KuraPosition\022\020\n\010latitude\030\001 \002" +
+ "(\001\022\021\n\tlongitude\030\002 \002(\001\022\020\n\010altitude\030\003 \001(\001\022" +
+ "\021\n\tprecision\030\004 \001(\001\022\017\n\007heading\030\005 \001(\001\022\r\n\005s" +
+ "peed\030\006 \001(\001\022\021\n\ttimestamp\030\007 \001(\003\022\022\n\nsatelli" +
+ "tes\030\010 \001(\005\022\016\n\006status\030\t \001(\005*\005\010\003\020\210\'BL\n8org." +
+ "eclipse.kapua.service.device.call.messag" +
+ "e.kura.protoB\020KuraPayloadProto"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_kuradatatypes_KuraPayload_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_descriptor,
+ new java.lang.String[] { "Timestamp", "Position", "Metric", "Body", });
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor,
+ new java.lang.String[] { "Name", "Type", "DoubleValue", "FloatValue", "LongValue", "IntValue", "BoolValue", "StringValue", "BytesValue", });
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(1);
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor,
+ new java.lang.String[] { "Latitude", "Longitude", "Altitude", "Precision", "Heading", "Speed", "Timestamp", "Satellites", "Status", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
\ No newline at end of file
diff --git a/service/device/call/kura/src/main/protobuf/kurapayload.proto b/service/device/call/kura/src/main/protobuf/kurapayload.proto
index 264543c472c..19f84f5cad5 100644
--- a/service/device/call/kura/src/main/protobuf/kurapayload.proto
+++ b/service/device/call/kura/src/main/protobuf/kurapayload.proto
@@ -1,6 +1,15 @@
-/*
- * This file originates from the Eclipse Kuraâ„¢ project
- */
+/*******************************************************************************
+ * Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Eurotech
+ *******************************************************************************/
//
// To compile:
diff --git a/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java b/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java
index 628572e9e75..9b82f195804 100644
--- a/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java
+++ b/service/device/registry/test-steps/src/main/java/org/eclipse/kapua/service/device/registry/steps/KuraDevice.java
@@ -13,10 +13,10 @@
package org.eclipse.kapua.service.device.registry.steps;
import com.google.protobuf.InvalidProtocolBufferException;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto;
import org.eclipse.kapua.qa.common.Suppressed;
import org.eclipse.kapua.service.device.call.message.kura.KuraPayload;
import org.eclipse.kapua.service.device.call.message.kura.app.request.KuraRequestPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
diff --git a/simulator-kura/pom.xml b/simulator-kura/pom.xml
index b83ff7348f4..67300ba55d9 100644
--- a/simulator-kura/pom.xml
+++ b/simulator-kura/pom.xml
@@ -111,25 +111,6 @@
-
- com.github.os72
- protoc-jar-maven-plugin
-
-
- generate-sources
-
- run
-
-
- ${protobuf.version}
- true
-
- src/main/protobuf
-
-
-
-
-
org.apache.maven.plugins
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Request.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Request.java
index 2aa845f7ed9..ed8b84fb5d8 100644
--- a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Request.java
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Request.java
@@ -12,19 +12,19 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.app;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.eclipse.kapua.kura.simulator.payload.Message;
import org.eclipse.kapua.kura.simulator.payload.Metrics;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder;
import org.eclipse.kapua.kura.simulator.topic.Topic;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.KuraMetricOrBuilder;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
public class Request {
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Sender.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Sender.java
index 7b7c1673784..eb5a9ed9489 100644
--- a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Sender.java
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/Sender.java
@@ -12,18 +12,17 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.app;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.util.Collections;
-import java.util.Map;
-
+import com.google.protobuf.ByteString;
import org.eclipse.kapua.kura.simulator.Transport;
import org.eclipse.kapua.kura.simulator.payload.Metrics;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
import org.eclipse.kapua.kura.simulator.topic.Topic;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
-import com.google.protobuf.ByteString;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Map;
public interface Sender {
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/PeriodicGenerator.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/PeriodicGenerator.java
index 047081fa037..d0780afd856 100644
--- a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/PeriodicGenerator.java
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/PeriodicGenerator.java
@@ -12,13 +12,6 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.app.data;
-import java.time.Instant;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Objects;
-
import org.eclipse.kapua.kura.simulator.app.ApplicationContext;
import org.eclipse.kapua.kura.simulator.app.Handler;
import org.eclipse.kapua.kura.simulator.app.Sender;
@@ -26,9 +19,16 @@
import org.eclipse.kapua.kura.simulator.generator.GeneratorScheduler;
import org.eclipse.kapua.kura.simulator.generator.Payload;
import org.eclipse.kapua.kura.simulator.payload.Metrics;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
import org.eclipse.kapua.kura.simulator.simulation.Configuration.MetricsMapping;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
+
+import java.time.Instant;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Objects;
public class PeriodicGenerator implements Handler {
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/SimplePeriodicGenerator.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/SimplePeriodicGenerator.java
index 3040588c6fd..18ba24f39d4 100644
--- a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/SimplePeriodicGenerator.java
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/app/data/SimplePeriodicGenerator.java
@@ -12,19 +12,19 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.app.data;
-import java.time.Instant;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.function.Function;
-
import org.eclipse.kapua.kura.simulator.app.ApplicationContext;
import org.eclipse.kapua.kura.simulator.app.Sender;
import org.eclipse.kapua.kura.simulator.generator.Generator;
import org.eclipse.kapua.kura.simulator.generator.GeneratorScheduler;
import org.eclipse.kapua.kura.simulator.generator.Payload;
import org.eclipse.kapua.kura.simulator.payload.Metrics;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
public class SimplePeriodicGenerator extends AbstractSingleTopicPeriodicGenerator {
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/payload/Metrics.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/payload/Metrics.java
index fe503bd3cce..5576ee21334 100644
--- a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/payload/Metrics.java
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/payload/Metrics.java
@@ -12,6 +12,16 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.payload;
+import com.google.protobuf.ByteString;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.reflect.MethodUtils;
+import org.eclipse.kapua.kura.simulator.generator.Payload;
+import org.eclipse.kapua.kura.simulator.generator.Position;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraMetric;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraMetric.ValueType;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraPosition;
+
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -21,17 +31,6 @@
import java.util.Objects;
import java.util.TreeMap;
-import org.apache.commons.lang3.reflect.FieldUtils;
-import org.apache.commons.lang3.reflect.MethodUtils;
-import org.eclipse.kapua.kura.simulator.generator.Payload;
-import org.eclipse.kapua.kura.simulator.generator.Position;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.KuraMetric;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.KuraMetric.ValueType;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.KuraPosition;
-
-import com.google.protobuf.ByteString;
-
public final class Metrics {
private Metrics() {
diff --git a/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/proto/KuraPayloadProto.java b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/proto/KuraPayloadProto.java
new file mode 100644
index 00000000000..0cd2abb83f1
--- /dev/null
+++ b/simulator-kura/src/main/java/org/eclipse/kapua/kura/simulator/proto/KuraPayloadProto.java
@@ -0,0 +1,4588 @@
+/*******************************************************************************
+ * Copyright (c) 2023 Eurotech and/or its affiliates and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Eurotech - initial API and implementation
+ *******************************************************************************/
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: kurapayload.proto
+
+package org.eclipse.kapua.kura.simulator.proto;
+
+public final class KuraPayloadProto {
+ private KuraPayloadProto() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public interface KuraPayloadOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload)
+ com.google.protobuf.GeneratedMessageV3.
+ ExtendableMessageOrBuilder {
+
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ boolean hasPosition();
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ KuraPayloadProto.KuraPayload.KuraPosition getPosition();
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder();
+
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ java.util.List
+ getMetricList();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index);
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ int getMetricCount();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ java.util.List extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList();
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index);
+
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ boolean hasBody();
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ com.google.protobuf.ByteString getBody();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload}
+ */
+ public static final class KuraPayload extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
+ KuraPayload> implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload)
+ KuraPayloadOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraPayload.newBuilder() to construct.
+ private KuraPayload(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
+ super(builder);
+ }
+ private KuraPayload() {
+ metric_ = java.util.Collections.emptyList();
+ body_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraPayload();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.class, KuraPayloadProto.KuraPayload.Builder.class);
+ }
+
+ public interface KuraMetricOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraMetric)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ boolean hasName();
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ boolean hasType();
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType();
+
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ boolean hasDoubleValue();
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ double getDoubleValue();
+
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ boolean hasFloatValue();
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ float getFloatValue();
+
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ boolean hasLongValue();
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ long getLongValue();
+
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ boolean hasIntValue();
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ int getIntValue();
+
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ boolean hasBoolValue();
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ boolean getBoolValue();
+
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ boolean hasStringValue();
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ java.lang.String getStringValue();
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ com.google.protobuf.ByteString
+ getStringValueBytes();
+
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ boolean hasBytesValue();
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ com.google.protobuf.ByteString getBytesValue();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
+ */
+ public static final class KuraMetric extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraMetric)
+ KuraMetricOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraMetric.newBuilder() to construct.
+ private KuraMetric(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private KuraMetric() {
+ name_ = "";
+ type_ = 0;
+ stringValue_ = "";
+ bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraMetric();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraMetric.class, KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code kuradatatypes.KuraPayload.KuraMetric.ValueType}
+ */
+ public enum ValueType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * DOUBLE = 0;
+ */
+ DOUBLE(0),
+ /**
+ * FLOAT = 1;
+ */
+ FLOAT(1),
+ /**
+ * INT64 = 2;
+ */
+ INT64(2),
+ /**
+ * INT32 = 3;
+ */
+ INT32(3),
+ /**
+ * BOOL = 4;
+ */
+ BOOL(4),
+ /**
+ * STRING = 5;
+ */
+ STRING(5),
+ /**
+ * BYTES = 6;
+ */
+ BYTES(6),
+ ;
+
+ /**
+ * DOUBLE = 0;
+ */
+ public static final int DOUBLE_VALUE = 0;
+ /**
+ * FLOAT = 1;
+ */
+ public static final int FLOAT_VALUE = 1;
+ /**
+ * INT64 = 2;
+ */
+ public static final int INT64_VALUE = 2;
+ /**
+ * INT32 = 3;
+ */
+ public static final int INT32_VALUE = 3;
+ /**
+ * BOOL = 4;
+ */
+ public static final int BOOL_VALUE = 4;
+ /**
+ * STRING = 5;
+ */
+ public static final int STRING_VALUE = 5;
+ /**
+ * BYTES = 6;
+ */
+ public static final int BYTES_VALUE = 6;
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ValueType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ValueType forNumber(int value) {
+ switch (value) {
+ case 0: return DOUBLE;
+ case 1: return FLOAT;
+ case 2: return INT64;
+ case 3: return INT32;
+ case 4: return BOOL;
+ case 5: return STRING;
+ case 6: return BYTES;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ ValueType> internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public ValueType findValueByNumber(int number) {
+ return ValueType.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 KuraPayloadProto.KuraPayload.KuraMetric.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final ValueType[] VALUES = values();
+
+ public static ValueType valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private ValueType(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:kuradatatypes.KuraPayload.KuraMetric.ValueType)
+ }
+
+ private int bitField0_;
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ @java.lang.Override
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private int type_;
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ @java.lang.Override public boolean hasType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ @java.lang.Override public KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
+ @SuppressWarnings("deprecation")
+ KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
+ return result == null ? KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
+ }
+
+ public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
+ private double doubleValue_;
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasDoubleValue() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ @java.lang.Override
+ public double getDoubleValue() {
+ return doubleValue_;
+ }
+
+ public static final int FLOAT_VALUE_FIELD_NUMBER = 4;
+ private float floatValue_;
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasFloatValue() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ @java.lang.Override
+ public float getFloatValue() {
+ return floatValue_;
+ }
+
+ public static final int LONG_VALUE_FIELD_NUMBER = 5;
+ private long longValue_;
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongValue() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ @java.lang.Override
+ public long getLongValue() {
+ return longValue_;
+ }
+
+ public static final int INT_VALUE_FIELD_NUMBER = 6;
+ private int intValue_;
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasIntValue() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ @java.lang.Override
+ public int getIntValue() {
+ return intValue_;
+ }
+
+ public static final int BOOL_VALUE_FIELD_NUMBER = 7;
+ private boolean boolValue_;
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBoolValue() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ @java.lang.Override
+ public boolean getBoolValue() {
+ return boolValue_;
+ }
+
+ public static final int STRING_VALUE_FIELD_NUMBER = 8;
+ private volatile java.lang.Object stringValue_;
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasStringValue() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ @java.lang.Override
+ public java.lang.String getStringValue() {
+ java.lang.Object ref = stringValue_;
+ 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();
+ if (bs.isValidUtf8()) {
+ stringValue_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getStringValueBytes() {
+ java.lang.Object ref = stringValue_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringValue_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BYTES_VALUE_FIELD_NUMBER = 9;
+ private com.google.protobuf.ByteString bytesValue_;
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBytesValue() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBytesValue() {
+ return bytesValue_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasName()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeEnum(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeDouble(3, doubleValue_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeFloat(4, floatValue_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeInt64(5, longValue_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeInt32(6, intValue_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeBool(7, boolValue_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, stringValue_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeBytes(9, bytesValue_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, doubleValue_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(4, floatValue_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(5, longValue_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(6, intValue_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(7, boolValue_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, stringValue_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(9, bytesValue_);
+ }
+ 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 KuraPayloadProto.KuraPayload.KuraMetric)) {
+ return super.equals(obj);
+ }
+ KuraPayloadProto.KuraPayload.KuraMetric other = (KuraPayloadProto.KuraPayload.KuraMetric) obj;
+
+ if (hasName() != other.hasName()) return false;
+ if (hasName()) {
+ if (!getName()
+ .equals(other.getName())) return false;
+ }
+ if (hasType() != other.hasType()) return false;
+ if (hasType()) {
+ if (type_ != other.type_) return false;
+ }
+ if (hasDoubleValue() != other.hasDoubleValue()) return false;
+ if (hasDoubleValue()) {
+ if (java.lang.Double.doubleToLongBits(getDoubleValue())
+ != java.lang.Double.doubleToLongBits(
+ other.getDoubleValue())) return false;
+ }
+ if (hasFloatValue() != other.hasFloatValue()) return false;
+ if (hasFloatValue()) {
+ if (java.lang.Float.floatToIntBits(getFloatValue())
+ != java.lang.Float.floatToIntBits(
+ other.getFloatValue())) return false;
+ }
+ if (hasLongValue() != other.hasLongValue()) return false;
+ if (hasLongValue()) {
+ if (getLongValue()
+ != other.getLongValue()) return false;
+ }
+ if (hasIntValue() != other.hasIntValue()) return false;
+ if (hasIntValue()) {
+ if (getIntValue()
+ != other.getIntValue()) return false;
+ }
+ if (hasBoolValue() != other.hasBoolValue()) return false;
+ if (hasBoolValue()) {
+ if (getBoolValue()
+ != other.getBoolValue()) return false;
+ }
+ if (hasStringValue() != other.hasStringValue()) return false;
+ if (hasStringValue()) {
+ if (!getStringValue()
+ .equals(other.getStringValue())) return false;
+ }
+ if (hasBytesValue() != other.hasBytesValue()) return false;
+ if (hasBytesValue()) {
+ if (!getBytesValue()
+ .equals(other.getBytesValue())) 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();
+ if (hasName()) {
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ }
+ if (hasType()) {
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ }
+ if (hasDoubleValue()) {
+ hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getDoubleValue()));
+ }
+ if (hasFloatValue()) {
+ hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getFloatValue());
+ }
+ if (hasLongValue()) {
+ hash = (37 * hash) + LONG_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getLongValue());
+ }
+ if (hasIntValue()) {
+ hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getIntValue();
+ }
+ if (hasBoolValue()) {
+ hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getBoolValue());
+ }
+ if (hasStringValue()) {
+ hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getStringValue().hashCode();
+ }
+ if (hasBytesValue()) {
+ hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getBytesValue().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric 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 KuraPayloadProto.KuraPayload.KuraMetric parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric 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 KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraMetric 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(KuraPayloadProto.KuraPayload.KuraMetric 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraMetric)
+ KuraPayloadProto.KuraPayload.KuraMetricOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraMetric.class, KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraMetric.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ name_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ doubleValue_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ floatValue_ = 0F;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ longValue_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ intValue_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ boolValue_ = false;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ stringValue_ = "";
+ bitField0_ = (bitField0_ & ~0x00000080);
+ bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
+ return KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric build() {
+ KuraPayloadProto.KuraPayload.KuraMetric result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric buildPartial() {
+ KuraPayloadProto.KuraPayload.KuraMetric result = new KuraPayloadProto.KuraPayload.KuraMetric(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.name_ = name_;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.type_ = type_;
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.doubleValue_ = doubleValue_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.floatValue_ = floatValue_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.longValue_ = longValue_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.intValue_ = intValue_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.boolValue_ = boolValue_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ to_bitField0_ |= 0x00000080;
+ }
+ result.stringValue_ = stringValue_;
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ to_bitField0_ |= 0x00000100;
+ }
+ result.bytesValue_ = bytesValue_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof KuraPayloadProto.KuraPayload.KuraMetric) {
+ return mergeFrom((KuraPayloadProto.KuraPayload.KuraMetric)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(KuraPayloadProto.KuraPayload.KuraMetric other) {
+ if (other == KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance()) return this;
+ if (other.hasName()) {
+ bitField0_ |= 0x00000001;
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.hasType()) {
+ setType(other.getType());
+ }
+ if (other.hasDoubleValue()) {
+ setDoubleValue(other.getDoubleValue());
+ }
+ if (other.hasFloatValue()) {
+ setFloatValue(other.getFloatValue());
+ }
+ if (other.hasLongValue()) {
+ setLongValue(other.getLongValue());
+ }
+ if (other.hasIntValue()) {
+ setIntValue(other.getIntValue());
+ }
+ if (other.hasBoolValue()) {
+ setBoolValue(other.getBoolValue());
+ }
+ if (other.hasStringValue()) {
+ bitField0_ |= 0x00000080;
+ stringValue_ = other.stringValue_;
+ onChanged();
+ }
+ if (other.hasBytesValue()) {
+ setBytesValue(other.getBytesValue());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasName()) {
+ return false;
+ }
+ if (!hasType()) {
+ return false;
+ }
+ 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: {
+ name_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16: {
+ int tmpRaw = input.readEnum();
+ KuraPayloadProto.KuraPayload.KuraMetric.ValueType tmpValue =
+ KuraPayloadProto.KuraPayload.KuraMetric.ValueType.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(2, tmpRaw);
+ } else {
+ type_ = tmpRaw;
+ bitField0_ |= 0x00000002;
+ }
+ break;
+ } // case 16
+ case 25: {
+ doubleValue_ = input.readDouble();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 25
+ case 37: {
+ floatValue_ = input.readFloat();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 37
+ case 40: {
+ longValue_ = input.readInt64();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ case 48: {
+ intValue_ = input.readInt32();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ case 56: {
+ boolValue_ = input.readBool();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 66: {
+ stringValue_ = input.readBytes();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 66
+ case 74: {
+ bytesValue_ = input.readBytes();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 74
+ 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 name_ = "";
+ /**
+ * required string name = 1;
+ * @return Whether the name field is set.
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required string name = 1;
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string name = 1;
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string name = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string name = 1;
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int type_ = 0;
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return Whether the type field is set.
+ */
+ @java.lang.Override public boolean hasType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return The type.
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
+ @SuppressWarnings("deprecation")
+ KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
+ return result == null ? KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @param value The type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setType(KuraPayloadProto.KuraPayload.KuraMetric.ValueType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ * required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private double doubleValue_ ;
+ /**
+ * optional double double_value = 3;
+ * @return Whether the doubleValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasDoubleValue() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double double_value = 3;
+ * @return The doubleValue.
+ */
+ @java.lang.Override
+ public double getDoubleValue() {
+ return doubleValue_;
+ }
+ /**
+ * optional double double_value = 3;
+ * @param value The doubleValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDoubleValue(double value) {
+ bitField0_ |= 0x00000004;
+ doubleValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional double double_value = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearDoubleValue() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ doubleValue_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private float floatValue_ ;
+ /**
+ * optional float float_value = 4;
+ * @return Whether the floatValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasFloatValue() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional float float_value = 4;
+ * @return The floatValue.
+ */
+ @java.lang.Override
+ public float getFloatValue() {
+ return floatValue_;
+ }
+ /**
+ * optional float float_value = 4;
+ * @param value The floatValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFloatValue(float value) {
+ bitField0_ |= 0x00000008;
+ floatValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional float float_value = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearFloatValue() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ floatValue_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private long longValue_ ;
+ /**
+ * optional int64 long_value = 5;
+ * @return Whether the longValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongValue() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return The longValue.
+ */
+ @java.lang.Override
+ public long getLongValue() {
+ return longValue_;
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @param value The longValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLongValue(long value) {
+ bitField0_ |= 0x00000010;
+ longValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 long_value = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearLongValue() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ longValue_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int intValue_ ;
+ /**
+ * optional int32 int_value = 6;
+ * @return Whether the intValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasIntValue() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return The intValue.
+ */
+ @java.lang.Override
+ public int getIntValue() {
+ return intValue_;
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @param value The intValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIntValue(int value) {
+ bitField0_ |= 0x00000020;
+ intValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int32 int_value = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearIntValue() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ intValue_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean boolValue_ ;
+ /**
+ * optional bool bool_value = 7;
+ * @return Whether the boolValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBoolValue() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return The boolValue.
+ */
+ @java.lang.Override
+ public boolean getBoolValue() {
+ return boolValue_;
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @param value The boolValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBoolValue(boolean value) {
+ bitField0_ |= 0x00000040;
+ boolValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bool bool_value = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearBoolValue() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ boolValue_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object stringValue_ = "";
+ /**
+ * optional string string_value = 8;
+ * @return Whether the stringValue field is set.
+ */
+ public boolean hasStringValue() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The stringValue.
+ */
+ public java.lang.String getStringValue() {
+ java.lang.Object ref = stringValue_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ stringValue_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @return The bytes for stringValue.
+ */
+ public com.google.protobuf.ByteString
+ getStringValueBytes() {
+ java.lang.Object ref = stringValue_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ stringValue_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string string_value = 8;
+ * @param value The stringValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringValue(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000080;
+ stringValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string string_value = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearStringValue() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ stringValue_ = getDefaultInstance().getStringValue();
+ onChanged();
+ return this;
+ }
+ /**
+ * optional string string_value = 8;
+ * @param value The bytes for stringValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStringValueBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000080;
+ stringValue_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString bytesValue_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes bytes_value = 9;
+ * @return Whether the bytesValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasBytesValue() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return The bytesValue.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBytesValue() {
+ return bytesValue_;
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @param value The bytesValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBytesValue(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000100;
+ bytesValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes bytes_value = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearBytesValue() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ bytesValue_ = getDefaultInstance().getBytesValue();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraMetric)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraMetric)
+ private static final KuraPayloadProto.KuraPayload.KuraMetric DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload.KuraMetric();
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraMetric 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 KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface KuraPositionOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraPosition)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ boolean hasLatitude();
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ double getLatitude();
+
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ boolean hasLongitude();
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ double getLongitude();
+
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ boolean hasAltitude();
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ double getAltitude();
+
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ boolean hasPrecision();
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ double getPrecision();
+
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ boolean hasHeading();
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ double getHeading();
+
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ boolean hasSpeed();
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ double getSpeed();
+
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ boolean hasSatellites();
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ int getSatellites();
+
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ boolean hasStatus();
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ int getStatus();
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class KuraPosition extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraPosition)
+ KuraPositionOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use KuraPosition.newBuilder() to construct.
+ private KuraPosition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private KuraPosition() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new KuraPosition();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int LATITUDE_FIELD_NUMBER = 1;
+ private double latitude_;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+
+ public static final int LONGITUDE_FIELD_NUMBER = 2;
+ private double longitude_;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+
+ public static final int ALTITUDE_FIELD_NUMBER = 3;
+ private double altitude_;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+
+ public static final int PRECISION_FIELD_NUMBER = 4;
+ private double precision_;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+
+ public static final int HEADING_FIELD_NUMBER = 5;
+ private double heading_;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+
+ public static final int SPEED_FIELD_NUMBER = 6;
+ private double speed_;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 7;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int SATELLITES_FIELD_NUMBER = 8;
+ private int satellites_;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 9;
+ private int status_;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasLatitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasLongitude()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeDouble(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeDouble(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeDouble(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeDouble(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeDouble(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ output.writeDouble(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeInt64(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ output.writeInt32(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ output.writeInt32(9, status_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, latitude_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, longitude_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, altitude_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, precision_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(5, heading_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(6, speed_);
+ }
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(7, timestamp_);
+ }
+ if (((bitField0_ & 0x00000080) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(8, satellites_);
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(9, status_);
+ }
+ 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 KuraPayloadProto.KuraPayload.KuraPosition)) {
+ return super.equals(obj);
+ }
+ KuraPayloadProto.KuraPayload.KuraPosition other = (KuraPayloadProto.KuraPayload.KuraPosition) obj;
+
+ if (hasLatitude() != other.hasLatitude()) return false;
+ if (hasLatitude()) {
+ if (java.lang.Double.doubleToLongBits(getLatitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLatitude())) return false;
+ }
+ if (hasLongitude() != other.hasLongitude()) return false;
+ if (hasLongitude()) {
+ if (java.lang.Double.doubleToLongBits(getLongitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getLongitude())) return false;
+ }
+ if (hasAltitude() != other.hasAltitude()) return false;
+ if (hasAltitude()) {
+ if (java.lang.Double.doubleToLongBits(getAltitude())
+ != java.lang.Double.doubleToLongBits(
+ other.getAltitude())) return false;
+ }
+ if (hasPrecision() != other.hasPrecision()) return false;
+ if (hasPrecision()) {
+ if (java.lang.Double.doubleToLongBits(getPrecision())
+ != java.lang.Double.doubleToLongBits(
+ other.getPrecision())) return false;
+ }
+ if (hasHeading() != other.hasHeading()) return false;
+ if (hasHeading()) {
+ if (java.lang.Double.doubleToLongBits(getHeading())
+ != java.lang.Double.doubleToLongBits(
+ other.getHeading())) return false;
+ }
+ if (hasSpeed() != other.hasSpeed()) return false;
+ if (hasSpeed()) {
+ if (java.lang.Double.doubleToLongBits(getSpeed())
+ != java.lang.Double.doubleToLongBits(
+ other.getSpeed())) return false;
+ }
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasSatellites() != other.hasSatellites()) return false;
+ if (hasSatellites()) {
+ if (getSatellites()
+ != other.getSatellites()) return false;
+ }
+ if (hasStatus() != other.hasStatus()) return false;
+ if (hasStatus()) {
+ if (getStatus()
+ != other.getStatus()) 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();
+ if (hasLatitude()) {
+ hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLatitude()));
+ }
+ if (hasLongitude()) {
+ hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getLongitude()));
+ }
+ if (hasAltitude()) {
+ hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getAltitude()));
+ }
+ if (hasPrecision()) {
+ hash = (37 * hash) + PRECISION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getPrecision()));
+ }
+ if (hasHeading()) {
+ hash = (37 * hash) + HEADING_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getHeading()));
+ }
+ if (hasSpeed()) {
+ hash = (37 * hash) + SPEED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getSpeed()));
+ }
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasSatellites()) {
+ hash = (37 * hash) + SATELLITES_FIELD_NUMBER;
+ hash = (53 * hash) + getSatellites();
+ }
+ if (hasStatus()) {
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + getStatus();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload.KuraPosition 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(KuraPayloadProto.KuraPayload.KuraPosition 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraPosition)
+ KuraPayloadProto.KuraPayload.KuraPositionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.KuraPosition.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ latitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ longitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ altitude_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ precision_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ heading_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ speed_ = 0D;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ satellites_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ status_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition build() {
+ KuraPayloadProto.KuraPayload.KuraPosition result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition buildPartial() {
+ KuraPayloadProto.KuraPayload.KuraPosition result = new KuraPayloadProto.KuraPayload.KuraPosition(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.latitude_ = latitude_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.longitude_ = longitude_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.altitude_ = altitude_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.precision_ = precision_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.heading_ = heading_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.speed_ = speed_;
+ to_bitField0_ |= 0x00000020;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000040;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.satellites_ = satellites_;
+ to_bitField0_ |= 0x00000080;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.status_ = status_;
+ to_bitField0_ |= 0x00000100;
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof KuraPayloadProto.KuraPayload.KuraPosition) {
+ return mergeFrom((KuraPayloadProto.KuraPayload.KuraPosition)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(KuraPayloadProto.KuraPayload.KuraPosition other) {
+ if (other == KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) return this;
+ if (other.hasLatitude()) {
+ setLatitude(other.getLatitude());
+ }
+ if (other.hasLongitude()) {
+ setLongitude(other.getLongitude());
+ }
+ if (other.hasAltitude()) {
+ setAltitude(other.getAltitude());
+ }
+ if (other.hasPrecision()) {
+ setPrecision(other.getPrecision());
+ }
+ if (other.hasHeading()) {
+ setHeading(other.getHeading());
+ }
+ if (other.hasSpeed()) {
+ setSpeed(other.getSpeed());
+ }
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasSatellites()) {
+ setSatellites(other.getSatellites());
+ }
+ if (other.hasStatus()) {
+ setStatus(other.getStatus());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (!hasLatitude()) {
+ return false;
+ }
+ if (!hasLongitude()) {
+ return false;
+ }
+ 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 9: {
+ latitude_ = input.readDouble();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 9
+ case 17: {
+ longitude_ = input.readDouble();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 17
+ case 25: {
+ altitude_ = input.readDouble();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 25
+ case 33: {
+ precision_ = input.readDouble();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 33
+ case 41: {
+ heading_ = input.readDouble();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 41
+ case 49: {
+ speed_ = input.readDouble();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 49
+ case 56: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 64: {
+ satellites_ = input.readInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 72: {
+ status_ = input.readInt32();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 72
+ 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 double latitude_ ;
+ /**
+ * required double latitude = 1;
+ * @return Whether the latitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLatitude() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * required double latitude = 1;
+ * @return The latitude.
+ */
+ @java.lang.Override
+ public double getLatitude() {
+ return latitude_;
+ }
+ /**
+ * required double latitude = 1;
+ * @param value The latitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLatitude(double value) {
+ bitField0_ |= 0x00000001;
+ latitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double latitude = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearLatitude() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ latitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double longitude_ ;
+ /**
+ * required double longitude = 2;
+ * @return Whether the longitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasLongitude() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * required double longitude = 2;
+ * @return The longitude.
+ */
+ @java.lang.Override
+ public double getLongitude() {
+ return longitude_;
+ }
+ /**
+ * required double longitude = 2;
+ * @param value The longitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLongitude(double value) {
+ bitField0_ |= 0x00000002;
+ longitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required double longitude = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearLongitude() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ longitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double altitude_ ;
+ /**
+ * optional double altitude = 3;
+ * @return Whether the altitude field is set.
+ */
+ @java.lang.Override
+ public boolean hasAltitude() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional double altitude = 3;
+ * @return The altitude.
+ */
+ @java.lang.Override
+ public double getAltitude() {
+ return altitude_;
+ }
+ /**
+ * optional double altitude = 3;
+ * @param value The altitude to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAltitude(double value) {
+ bitField0_ |= 0x00000004;
+ altitude_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional double altitude = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearAltitude() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ altitude_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double precision_ ;
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return Whether the precision field is set.
+ */
+ @java.lang.Override
+ public boolean hasPrecision() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return The precision.
+ */
+ @java.lang.Override
+ public double getPrecision() {
+ return precision_;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @param value The precision to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPrecision(double value) {
+ bitField0_ |= 0x00000008;
+ precision_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * dilution of precision of the current satellite fix.
+ *
+ *
+ * optional double precision = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearPrecision() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ precision_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double heading_ ;
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return Whether the heading field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeading() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return The heading.
+ */
+ @java.lang.Override
+ public double getHeading() {
+ return heading_;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @param value The heading to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHeading(double value) {
+ bitField0_ |= 0x00000010;
+ heading_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * heading in degrees
+ *
+ *
+ * optional double heading = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearHeading() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heading_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double speed_ ;
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return Whether the speed field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpeed() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return The speed.
+ */
+ @java.lang.Override
+ public double getSpeed() {
+ return speed_;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @param value The speed to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSpeed(double value) {
+ bitField0_ |= 0x00000020;
+ speed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * meters per second
+ *
+ *
+ * optional double speed = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearSpeed() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ speed_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ * optional int64 timestamp = 7;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000040;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int satellites_ ;
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return Whether the satellites field is set.
+ */
+ @java.lang.Override
+ public boolean hasSatellites() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return The satellites.
+ */
+ @java.lang.Override
+ public int getSatellites() {
+ return satellites_;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @param value The satellites to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSatellites(int value) {
+ bitField0_ |= 0x00000080;
+ satellites_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * number satellites locked by the GPS device
+ *
+ *
+ * optional int32 satellites = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearSatellites() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ satellites_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int status_ ;
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return Whether the status field is set.
+ */
+ @java.lang.Override
+ public boolean hasStatus() {
+ return ((bitField0_ & 0x00000100) != 0);
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return The status.
+ */
+ @java.lang.Override
+ public int getStatus() {
+ return status_;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @param value The status to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStatus(int value) {
+ bitField0_ |= 0x00000100;
+ status_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
+ *
+ *
+ * optional int32 status = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearStatus() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ status_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraPosition)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraPosition)
+ private static final KuraPayloadProto.KuraPayload.KuraPosition DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload.KuraPosition();
+ }
+
+ public static KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPosition 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 KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int TIMESTAMP_FIELD_NUMBER = 1;
+ private long timestamp_;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int POSITION_FIELD_NUMBER = 2;
+ private KuraPayloadProto.KuraPayload.KuraPosition position_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ @java.lang.Override
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+
+ public static final int METRIC_FIELD_NUMBER = 5000;
+ private java.util.List metric_;
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List getMetricList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public java.util.List extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ return metric_;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public int getMetricCount() {
+ return metric_.size();
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ return metric_.get(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ return metric_.get(index);
+ }
+
+ public static final int BODY_FIELD_NUMBER = 5001;
+ private com.google.protobuf.ByteString body_;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ com.google.protobuf.GeneratedMessageV3
+ .ExtendableMessage.ExtensionWriter
+ extensionWriter = newExtensionWriter();
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeInt64(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getPosition());
+ }
+ extensionWriter.writeUntil(5000, output);
+ for (int i = 0; i < metric_.size(); i++) {
+ output.writeMessage(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeBytes(5001, body_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(1, timestamp_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getPosition());
+ }
+ for (int i = 0; i < metric_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5000, metric_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5001, body_);
+ }
+ size += extensionsSerializedSize();
+ 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 KuraPayloadProto.KuraPayload)) {
+ return super.equals(obj);
+ }
+ KuraPayloadProto.KuraPayload other = (KuraPayloadProto.KuraPayload) obj;
+
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ }
+ if (hasPosition() != other.hasPosition()) return false;
+ if (hasPosition()) {
+ if (!getPosition()
+ .equals(other.getPosition())) return false;
+ }
+ if (!getMetricList()
+ .equals(other.getMetricList())) return false;
+ if (hasBody() != other.hasBody()) return false;
+ if (hasBody()) {
+ if (!getBody()
+ .equals(other.getBody())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ if (!getExtensionFields().equals(other.getExtensionFields()))
+ return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ }
+ if (hasPosition()) {
+ hash = (37 * hash) + POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + getPosition().hashCode();
+ }
+ if (getMetricCount() > 0) {
+ hash = (37 * hash) + METRIC_FIELD_NUMBER;
+ hash = (53 * hash) + getMetricList().hashCode();
+ }
+ if (hasBody()) {
+ hash = (37 * hash) + BODY_FIELD_NUMBER;
+ hash = (53 * hash) + getBody().hashCode();
+ }
+ hash = hashFields(hash, getExtensionFields());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static KuraPayloadProto.KuraPayload parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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 KuraPayloadProto.KuraPayload parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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 KuraPayloadProto.KuraPayload parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static KuraPayloadProto.KuraPayload 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(KuraPayloadProto.KuraPayload 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;
+ }
+ /**
+ * Protobuf type {@code kuradatatypes.KuraPayload}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
+ KuraPayloadProto.KuraPayload, Builder> implements
+ // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload)
+ KuraPayloadProto.KuraPayloadOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ KuraPayloadProto.KuraPayload.class, KuraPayloadProto.KuraPayload.Builder.class);
+ }
+
+ // Construct using org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getPositionFieldBuilder();
+ getMetricFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (positionBuilder_ == null) {
+ position_ = null;
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ } else {
+ metric_ = null;
+ metricBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ body_ = com.google.protobuf.ByteString.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return KuraPayloadProto.KuraPayload.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload build() {
+ KuraPayloadProto.KuraPayload result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public KuraPayloadProto.KuraPayload buildPartial() {
+ KuraPayloadProto.KuraPayload result = new KuraPayloadProto.KuraPayload(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.timestamp_ = timestamp_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ if (positionBuilder_ == null) {
+ result.position_ = position_;
+ } else {
+ result.position_ = positionBuilder_.build();
+ }
+ to_bitField0_ |= 0x00000002;
+ }
+ if (metricBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)) {
+ metric_ = java.util.Collections.unmodifiableList(metric_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.metric_ = metric_;
+ } else {
+ result.metric_ = metricBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.body_ = body_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, Type> extension,
+ Type value) {
+ return super.setExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder setExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, java.util.List> extension,
+ int index, Type value) {
+ return super.setExtension(extension, index, value);
+ }
+ @java.lang.Override
+ public Builder addExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, java.util.List> extension,
+ Type value) {
+ return super.addExtension(extension, value);
+ }
+ @java.lang.Override
+ public Builder clearExtension(
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ KuraPayloadProto.KuraPayload, Type> extension) {
+ return super.clearExtension(extension);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof KuraPayloadProto.KuraPayload) {
+ return mergeFrom((KuraPayloadProto.KuraPayload)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(KuraPayloadProto.KuraPayload other) {
+ if (other == KuraPayloadProto.KuraPayload.getDefaultInstance()) return this;
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.hasPosition()) {
+ mergePosition(other.getPosition());
+ }
+ if (metricBuilder_ == null) {
+ if (!other.metric_.isEmpty()) {
+ if (metric_.isEmpty()) {
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureMetricIsMutable();
+ metric_.addAll(other.metric_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.metric_.isEmpty()) {
+ if (metricBuilder_.isEmpty()) {
+ metricBuilder_.dispose();
+ metricBuilder_ = null;
+ metric_ = other.metric_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ metricBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getMetricFieldBuilder() : null;
+ } else {
+ metricBuilder_.addAllMessages(other.metric_);
+ }
+ }
+ }
+ if (other.hasBody()) {
+ setBody(other.getBody());
+ }
+ this.mergeExtensionFields(other);
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ if (hasPosition()) {
+ if (!getPosition().isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getMetricCount(); i++) {
+ if (!getMetric(i).isInitialized()) {
+ return false;
+ }
+ }
+ if (!extensionsAreInitialized()) {
+ return false;
+ }
+ 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 8: {
+ timestamp_ = input.readInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18: {
+ input.readMessage(
+ getPositionFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 40002: {
+ KuraPayloadProto.KuraPayload.KuraMetric m =
+ input.readMessage(
+ KuraPayloadProto.KuraPayload.KuraMetric.PARSER,
+ extensionRegistry);
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(m);
+ } else {
+ metricBuilder_.addMessage(m);
+ }
+ break;
+ } // case 40002
+ case 40010: {
+ body_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 40010
+ 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 long timestamp_ ;
+ /**
+ * optional int64 timestamp = 1;
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000001;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int64 timestamp = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private KuraPayloadProto.KuraPayload.KuraPosition position_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder> positionBuilder_;
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return Whether the position field is set.
+ */
+ public boolean hasPosition() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ * @return The position.
+ */
+ public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
+ if (positionBuilder_ == null) {
+ return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ } else {
+ return positionBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ position_ = value;
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder setPosition(
+ KuraPayloadProto.KuraPayload.KuraPosition.Builder builderForValue) {
+ if (positionBuilder_ == null) {
+ position_ = builderForValue.build();
+ onChanged();
+ } else {
+ positionBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder mergePosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
+ if (positionBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ position_ != null &&
+ position_ != KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) {
+ position_ =
+ KuraPayloadProto.KuraPayload.KuraPosition.newBuilder(position_).mergeFrom(value).buildPartial();
+ } else {
+ position_ = value;
+ }
+ onChanged();
+ } else {
+ positionBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public Builder clearPosition() {
+ if (positionBuilder_ == null) {
+ position_ = null;
+ onChanged();
+ } else {
+ positionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public KuraPayloadProto.KuraPayload.KuraPosition.Builder getPositionBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getPositionFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
+ if (positionBuilder_ != null) {
+ return positionBuilder_.getMessageOrBuilder();
+ } else {
+ return position_ == null ?
+ KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
+ }
+ }
+ /**
+ * optional .kuradatatypes.KuraPayload.KuraPosition position = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>
+ getPositionFieldBuilder() {
+ if (positionBuilder_ == null) {
+ positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>(
+ getPosition(),
+ getParentForChildren(),
+ isClean());
+ position_ = null;
+ }
+ return positionBuilder_;
+ }
+
+ private java.util.List metric_ =
+ java.util.Collections.emptyList();
+ private void ensureMetricIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ metric_ = new java.util.ArrayList(metric_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder> metricBuilder_;
+
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List getMetricList() {
+ if (metricBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(metric_);
+ } else {
+ return metricBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public int getMetricCount() {
+ if (metricBuilder_ == null) {
+ return metric_.size();
+ } else {
+ return metricBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index);
+ } else {
+ return metricBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.set(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder setMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
+ if (metricBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetricIsMutable();
+ metric_.add(index, value);
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addMetric(
+ int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ metricBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder addAllMetric(
+ java.lang.Iterable extends KuraPayloadProto.KuraPayload.KuraMetric> values) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, metric_);
+ onChanged();
+ } else {
+ metricBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder clearMetric() {
+ if (metricBuilder_ == null) {
+ metric_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ metricBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public Builder removeMetric(int index) {
+ if (metricBuilder_ == null) {
+ ensureMetricIsMutable();
+ metric_.remove(index);
+ onChanged();
+ } else {
+ metricBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder getMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
+ int index) {
+ if (metricBuilder_ == null) {
+ return metric_.get(index); } else {
+ return metricBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricOrBuilderList() {
+ if (metricBuilder_ != null) {
+ return metricBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(metric_);
+ }
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder() {
+ return getMetricFieldBuilder().addBuilder(
+ KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder(
+ int index) {
+ return getMetricFieldBuilder().addBuilder(
+ index, KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
+ }
+ /**
+ *
+ * can be zero, so optional
+ *
+ *
+ * repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;
+ */
+ public java.util.List
+ getMetricBuilderList() {
+ return getMetricFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
+ getMetricFieldBuilder() {
+ if (metricBuilder_ == null) {
+ metricBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>(
+ metric_,
+ ((bitField0_ & 0x00000004) != 0),
+ getParentForChildren(),
+ isClean());
+ metric_ = null;
+ }
+ return metricBuilder_;
+ }
+
+ private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes body = 5001;
+ * @return Whether the body field is set.
+ */
+ @java.lang.Override
+ public boolean hasBody() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return The body.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @param value The body to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBody(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ body_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes body = 5001;
+ * @return This builder for chaining.
+ */
+ public Builder clearBody() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ body_ = getDefaultInstance().getBody();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload)
+ }
+
+ // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload)
+ private static final KuraPayloadProto.KuraPayload DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload();
+ }
+
+ public static KuraPayloadProto.KuraPayload getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public KuraPayload 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 KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\021kurapayload.proto\022\rkuradatatypes\"\243\005\n\013K" +
+ "uraPayload\022\021\n\ttimestamp\030\001 \001(\003\0229\n\010positio" +
+ "n\030\002 \001(\0132\'.kuradatatypes.KuraPayload.Kura" +
+ "Position\0226\n\006metric\030\210\' \003(\0132%.kuradatatype" +
+ "s.KuraPayload.KuraMetric\022\r\n\004body\030\211\' \001(\014\032" +
+ "\305\002\n\nKuraMetric\022\014\n\004name\030\001 \002(\t\022=\n\004type\030\002 \002" +
+ "(\0162/.kuradatatypes.KuraPayload.KuraMetri" +
+ "c.ValueType\022\024\n\014double_value\030\003 \001(\001\022\023\n\013flo" +
+ "at_value\030\004 \001(\002\022\022\n\nlong_value\030\005 \001(\003\022\021\n\tin" +
+ "t_value\030\006 \001(\005\022\022\n\nbool_value\030\007 \001(\010\022\024\n\014str" +
+ "ing_value\030\010 \001(\t\022\023\n\013bytes_value\030\t \001(\014\"Y\n\t" +
+ "ValueType\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\t\n\005INT6" +
+ "4\020\002\022\t\n\005INT32\020\003\022\010\n\004BOOL\020\004\022\n\n\006STRING\020\005\022\t\n\005" +
+ "BYTES\020\006\032\257\001\n\014KuraPosition\022\020\n\010latitude\030\001 \002" +
+ "(\001\022\021\n\tlongitude\030\002 \002(\001\022\020\n\010altitude\030\003 \001(\001\022" +
+ "\021\n\tprecision\030\004 \001(\001\022\017\n\007heading\030\005 \001(\001\022\r\n\005s" +
+ "peed\030\006 \001(\001\022\021\n\ttimestamp\030\007 \001(\003\022\022\n\nsatelli" +
+ "tes\030\010 \001(\005\022\016\n\006status\030\t \001(\005*\005\010\003\020\210\'B:\n&org." +
+ "eclipse.kura.core.message.protobufB\020Kura" +
+ "PayloadProto"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_kuradatatypes_KuraPayload_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_descriptor,
+ new java.lang.String[] { "Timestamp", "Position", "Metric", "Body", });
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(0);
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor,
+ new java.lang.String[] { "Name", "Type", "DoubleValue", "FloatValue", "LongValue", "IntValue", "BoolValue", "StringValue", "BytesValue", });
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor =
+ internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(1);
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor,
+ new java.lang.String[] { "Latitude", "Longitude", "Altitude", "Precision", "Heading", "Speed", "Timestamp", "Satellites", "Status", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
\ No newline at end of file
diff --git a/simulator-kura/src/test/java/org/eclipse/kapua/kura/simulator/main/simulation/AppTest.java b/simulator-kura/src/test/java/org/eclipse/kapua/kura/simulator/main/simulation/AppTest.java
index 04187aca01d..a0cae791e94 100644
--- a/simulator-kura/src/test/java/org/eclipse/kapua/kura/simulator/main/simulation/AppTest.java
+++ b/simulator-kura/src/test/java/org/eclipse/kapua/kura/simulator/main/simulation/AppTest.java
@@ -12,25 +12,25 @@
*******************************************************************************/
package org.eclipse.kapua.kura.simulator.main.simulation;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
import org.eclipse.kapua.kura.simulator.app.Application;
import org.eclipse.kapua.kura.simulator.app.ApplicationContext;
import org.eclipse.kapua.kura.simulator.app.Handler;
import org.eclipse.kapua.kura.simulator.app.Sender;
+import org.eclipse.kapua.kura.simulator.proto.KuraPayloadProto.KuraPayload.Builder;
import org.eclipse.kapua.kura.simulator.simulation.Configuration;
import org.eclipse.kapua.kura.simulator.simulation.Configuration.MetricsMapping;
import org.eclipse.kapua.kura.simulator.simulation.Configuration.Topic;
import org.eclipse.kapua.kura.simulator.simulation.Configurations;
import org.eclipse.kapua.kura.simulator.simulation.Simulation;
import org.eclipse.kapua.qa.markers.junit.JUnitTests;
-import org.eclipse.kura.core.message.protobuf.KuraPayloadProto.KuraPayload.Builder;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
@Category(JUnitTests.class)
public class AppTest {