proto.com.cognite.client.dto.TimeseriesPointPost Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: timeseries.proto
package com.cognite.client.dto;
/**
*
*The time series data point, write-version. This is a write-optimized version of the TS data point that is only used
*when writing data points to CDF.
*
*
* Protobuf type {@code com.cognite.beam.proto.TimeseriesPointPost}
*/
public final class TimeseriesPointPost extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.cognite.beam.proto.TimeseriesPointPost)
TimeseriesPointPostOrBuilder {
private static final long serialVersionUID = 0L;
// Use TimeseriesPointPost.newBuilder() to construct.
private TimeseriesPointPost(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TimeseriesPointPost() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TimeseriesPointPost();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TimeseriesPointPost(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
idType_ = input.readInt64();
idTypeCase_ = 1;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
idTypeCase_ = 2;
idType_ = s;
break;
}
case 24: {
timestamp_ = input.readInt64();
break;
}
case 33: {
valueType_ = input.readDouble();
valueTypeCase_ = 4;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
valueTypeCase_ = 5;
valueType_ = s;
break;
}
case 48: {
isStep_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesPointPost_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesPointPost_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.TimeseriesPointPost.class, com.cognite.client.dto.TimeseriesPointPost.Builder.class);
}
private int idTypeCase_ = 0;
private java.lang.Object idType_;
public enum IdTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ID(1),
EXTERNAL_ID(2),
IDTYPE_NOT_SET(0);
private final int value;
private IdTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static IdTypeCase valueOf(int value) {
return forNumber(value);
}
public static IdTypeCase forNumber(int value) {
switch (value) {
case 1: return ID;
case 2: return EXTERNAL_ID;
case 0: return IDTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public IdTypeCase
getIdTypeCase() {
return IdTypeCase.forNumber(
idTypeCase_);
}
private int valueTypeCase_ = 0;
private java.lang.Object valueType_;
public enum ValueTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
VALUE_NUM(4),
VALUE_STRING(5),
VALUETYPE_NOT_SET(0);
private final int value;
private ValueTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueTypeCase valueOf(int value) {
return forNumber(value);
}
public static ValueTypeCase forNumber(int value) {
switch (value) {
case 4: return VALUE_NUM;
case 5: return VALUE_STRING;
case 0: return VALUETYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueTypeCase
getValueTypeCase() {
return ValueTypeCase.forNumber(
valueTypeCase_);
}
public static final int ID_FIELD_NUMBER = 1;
/**
* int64 id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return idTypeCase_ == 1;
}
/**
* int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
if (idTypeCase_ == 1) {
return (java.lang.Long) idType_;
}
return 0L;
}
public static final int EXTERNAL_ID_FIELD_NUMBER = 2;
/**
* string external_id = 2;
* @return Whether the externalId field is set.
*/
public boolean hasExternalId() {
return idTypeCase_ == 2;
}
/**
* string external_id = 2;
* @return The externalId.
*/
public java.lang.String getExternalId() {
java.lang.Object ref = "";
if (idTypeCase_ == 2) {
ref = idType_;
}
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 (idTypeCase_ == 2) {
idType_ = s;
}
return s;
}
}
/**
* string external_id = 2;
* @return The bytes for externalId.
*/
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = "";
if (idTypeCase_ == 2) {
ref = idType_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (idTypeCase_ == 2) {
idType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
private long timestamp_;
/**
* int64 timestamp = 3;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
public static final int VALUE_NUM_FIELD_NUMBER = 4;
/**
* double value_num = 4;
* @return Whether the valueNum field is set.
*/
@java.lang.Override
public boolean hasValueNum() {
return valueTypeCase_ == 4;
}
/**
* double value_num = 4;
* @return The valueNum.
*/
@java.lang.Override
public double getValueNum() {
if (valueTypeCase_ == 4) {
return (java.lang.Double) valueType_;
}
return 0D;
}
public static final int VALUE_STRING_FIELD_NUMBER = 5;
/**
* string value_string = 5;
* @return Whether the valueString field is set.
*/
public boolean hasValueString() {
return valueTypeCase_ == 5;
}
/**
* string value_string = 5;
* @return The valueString.
*/
public java.lang.String getValueString() {
java.lang.Object ref = "";
if (valueTypeCase_ == 5) {
ref = valueType_;
}
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 (valueTypeCase_ == 5) {
valueType_ = s;
}
return s;
}
}
/**
* string value_string = 5;
* @return The bytes for valueString.
*/
public com.google.protobuf.ByteString
getValueStringBytes() {
java.lang.Object ref = "";
if (valueTypeCase_ == 5) {
ref = valueType_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueTypeCase_ == 5) {
valueType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ISSTEP_FIELD_NUMBER = 6;
private boolean isStep_;
/**
* bool isStep = 6;
* @return The isStep.
*/
@java.lang.Override
public boolean getIsStep() {
return isStep_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (idTypeCase_ == 1) {
output.writeInt64(
1, (long)((java.lang.Long) idType_));
}
if (idTypeCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, idType_);
}
if (timestamp_ != 0L) {
output.writeInt64(3, timestamp_);
}
if (valueTypeCase_ == 4) {
output.writeDouble(
4, (double)((java.lang.Double) valueType_));
}
if (valueTypeCase_ == 5) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueType_);
}
if (isStep_ != false) {
output.writeBool(6, isStep_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (idTypeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
1, (long)((java.lang.Long) idType_));
}
if (idTypeCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, idType_);
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, timestamp_);
}
if (valueTypeCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
4, (double)((java.lang.Double) valueType_));
}
if (valueTypeCase_ == 5) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueType_);
}
if (isStep_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, isStep_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.cognite.client.dto.TimeseriesPointPost)) {
return super.equals(obj);
}
com.cognite.client.dto.TimeseriesPointPost other = (com.cognite.client.dto.TimeseriesPointPost) obj;
if (getTimestamp()
!= other.getTimestamp()) return false;
if (getIsStep()
!= other.getIsStep()) return false;
if (!getIdTypeCase().equals(other.getIdTypeCase())) return false;
switch (idTypeCase_) {
case 1:
if (getId()
!= other.getId()) return false;
break;
case 2:
if (!getExternalId()
.equals(other.getExternalId())) return false;
break;
case 0:
default:
}
if (!getValueTypeCase().equals(other.getValueTypeCase())) return false;
switch (valueTypeCase_) {
case 4:
if (java.lang.Double.doubleToLongBits(getValueNum())
!= java.lang.Double.doubleToLongBits(
other.getValueNum())) return false;
break;
case 5:
if (!getValueString()
.equals(other.getValueString())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (37 * hash) + ISSTEP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsStep());
switch (idTypeCase_) {
case 1:
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
break;
case 2:
hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
break;
case 0:
default:
}
switch (valueTypeCase_) {
case 4:
hash = (37 * hash) + VALUE_NUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValueNum()));
break;
case 5:
hash = (37 * hash) + VALUE_STRING_FIELD_NUMBER;
hash = (53 * hash) + getValueString().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.TimeseriesPointPost parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesPointPost 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 com.cognite.client.dto.TimeseriesPointPost parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesPointPost 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 com.cognite.client.dto.TimeseriesPointPost parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesPointPost 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(com.cognite.client.dto.TimeseriesPointPost 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;
}
/**
*
*The time series data point, write-version. This is a write-optimized version of the TS data point that is only used
*when writing data points to CDF.
*
*
* Protobuf type {@code com.cognite.beam.proto.TimeseriesPointPost}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.TimeseriesPointPost)
com.cognite.client.dto.TimeseriesPointPostOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesPointPost_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesPointPost_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.TimeseriesPointPost.class, com.cognite.client.dto.TimeseriesPointPost.Builder.class);
}
// Construct using com.cognite.client.dto.TimeseriesPointPost.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
timestamp_ = 0L;
isStep_ = false;
idTypeCase_ = 0;
idType_ = null;
valueTypeCase_ = 0;
valueType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesPointPost_descriptor;
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesPointPost getDefaultInstanceForType() {
return com.cognite.client.dto.TimeseriesPointPost.getDefaultInstance();
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesPointPost build() {
com.cognite.client.dto.TimeseriesPointPost result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesPointPost buildPartial() {
com.cognite.client.dto.TimeseriesPointPost result = new com.cognite.client.dto.TimeseriesPointPost(this);
if (idTypeCase_ == 1) {
result.idType_ = idType_;
}
if (idTypeCase_ == 2) {
result.idType_ = idType_;
}
result.timestamp_ = timestamp_;
if (valueTypeCase_ == 4) {
result.valueType_ = valueType_;
}
if (valueTypeCase_ == 5) {
result.valueType_ = valueType_;
}
result.isStep_ = isStep_;
result.idTypeCase_ = idTypeCase_;
result.valueTypeCase_ = valueTypeCase_;
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 com.cognite.client.dto.TimeseriesPointPost) {
return mergeFrom((com.cognite.client.dto.TimeseriesPointPost)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.cognite.client.dto.TimeseriesPointPost other) {
if (other == com.cognite.client.dto.TimeseriesPointPost.getDefaultInstance()) return this;
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
if (other.getIsStep() != false) {
setIsStep(other.getIsStep());
}
switch (other.getIdTypeCase()) {
case ID: {
setId(other.getId());
break;
}
case EXTERNAL_ID: {
idTypeCase_ = 2;
idType_ = other.idType_;
onChanged();
break;
}
case IDTYPE_NOT_SET: {
break;
}
}
switch (other.getValueTypeCase()) {
case VALUE_NUM: {
setValueNum(other.getValueNum());
break;
}
case VALUE_STRING: {
valueTypeCase_ = 5;
valueType_ = other.valueType_;
onChanged();
break;
}
case VALUETYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.cognite.client.dto.TimeseriesPointPost parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.cognite.client.dto.TimeseriesPointPost) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int idTypeCase_ = 0;
private java.lang.Object idType_;
public IdTypeCase
getIdTypeCase() {
return IdTypeCase.forNumber(
idTypeCase_);
}
public Builder clearIdType() {
idTypeCase_ = 0;
idType_ = null;
onChanged();
return this;
}
private int valueTypeCase_ = 0;
private java.lang.Object valueType_;
public ValueTypeCase
getValueTypeCase() {
return ValueTypeCase.forNumber(
valueTypeCase_);
}
public Builder clearValueType() {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return idTypeCase_ == 1;
}
/**
* int64 id = 1;
* @return The id.
*/
public long getId() {
if (idTypeCase_ == 1) {
return (java.lang.Long) idType_;
}
return 0L;
}
/**
* int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
idTypeCase_ = 1;
idType_ = value;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
if (idTypeCase_ == 1) {
idTypeCase_ = 0;
idType_ = null;
onChanged();
}
return this;
}
/**
* string external_id = 2;
* @return Whether the externalId field is set.
*/
@java.lang.Override
public boolean hasExternalId() {
return idTypeCase_ == 2;
}
/**
* string external_id = 2;
* @return The externalId.
*/
@java.lang.Override
public java.lang.String getExternalId() {
java.lang.Object ref = "";
if (idTypeCase_ == 2) {
ref = idType_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (idTypeCase_ == 2) {
idType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string external_id = 2;
* @return The bytes for externalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = "";
if (idTypeCase_ == 2) {
ref = idType_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (idTypeCase_ == 2) {
idType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string external_id = 2;
* @param value The externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
idTypeCase_ = 2;
idType_ = value;
onChanged();
return this;
}
/**
* string external_id = 2;
* @return This builder for chaining.
*/
public Builder clearExternalId() {
if (idTypeCase_ == 2) {
idTypeCase_ = 0;
idType_ = null;
onChanged();
}
return this;
}
/**
* string external_id = 2;
* @param value The bytes for externalId to set.
* @return This builder for chaining.
*/
public Builder setExternalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
idTypeCase_ = 2;
idType_ = value;
onChanged();
return this;
}
private long timestamp_ ;
/**
* int64 timestamp = 3;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
* int64 timestamp = 3;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
* int64 timestamp = 3;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
return this;
}
/**
* double value_num = 4;
* @return Whether the valueNum field is set.
*/
public boolean hasValueNum() {
return valueTypeCase_ == 4;
}
/**
* double value_num = 4;
* @return The valueNum.
*/
public double getValueNum() {
if (valueTypeCase_ == 4) {
return (java.lang.Double) valueType_;
}
return 0D;
}
/**
* double value_num = 4;
* @param value The valueNum to set.
* @return This builder for chaining.
*/
public Builder setValueNum(double value) {
valueTypeCase_ = 4;
valueType_ = value;
onChanged();
return this;
}
/**
* double value_num = 4;
* @return This builder for chaining.
*/
public Builder clearValueNum() {
if (valueTypeCase_ == 4) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
* string value_string = 5;
* @return Whether the valueString field is set.
*/
@java.lang.Override
public boolean hasValueString() {
return valueTypeCase_ == 5;
}
/**
* string value_string = 5;
* @return The valueString.
*/
@java.lang.Override
public java.lang.String getValueString() {
java.lang.Object ref = "";
if (valueTypeCase_ == 5) {
ref = valueType_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueTypeCase_ == 5) {
valueType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string value_string = 5;
* @return The bytes for valueString.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueStringBytes() {
java.lang.Object ref = "";
if (valueTypeCase_ == 5) {
ref = valueType_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueTypeCase_ == 5) {
valueType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string value_string = 5;
* @param value The valueString to set.
* @return This builder for chaining.
*/
public Builder setValueString(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueTypeCase_ = 5;
valueType_ = value;
onChanged();
return this;
}
/**
* string value_string = 5;
* @return This builder for chaining.
*/
public Builder clearValueString() {
if (valueTypeCase_ == 5) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
* string value_string = 5;
* @param value The bytes for valueString to set.
* @return This builder for chaining.
*/
public Builder setValueStringBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueTypeCase_ = 5;
valueType_ = value;
onChanged();
return this;
}
private boolean isStep_ ;
/**
* bool isStep = 6;
* @return The isStep.
*/
@java.lang.Override
public boolean getIsStep() {
return isStep_;
}
/**
* bool isStep = 6;
* @param value The isStep to set.
* @return This builder for chaining.
*/
public Builder setIsStep(boolean value) {
isStep_ = value;
onChanged();
return this;
}
/**
* bool isStep = 6;
* @return This builder for chaining.
*/
public Builder clearIsStep() {
isStep_ = false;
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:com.cognite.beam.proto.TimeseriesPointPost)
}
// @@protoc_insertion_point(class_scope:com.cognite.beam.proto.TimeseriesPointPost)
private static final com.cognite.client.dto.TimeseriesPointPost DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.cognite.client.dto.TimeseriesPointPost();
}
public static com.cognite.client.dto.TimeseriesPointPost getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TimeseriesPointPost parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TimeseriesPointPost(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesPointPost getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy