com.cognite.v1.timeseries.proto.DataPointInsertionItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognite-sdk-scala_2.13 Show documentation
Show all versions of cognite-sdk-scala_2.13 Show documentation
Scala SDK for Cognite Data Fusion.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: data_point_insertion_request.proto
package com.cognite.v1.timeseries.proto;
/**
* Protobuf type {@code com.cognite.v1.timeseries.proto.DataPointInsertionItem}
*/
public final class DataPointInsertionItem extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.cognite.v1.timeseries.proto.DataPointInsertionItem)
DataPointInsertionItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataPointInsertionItem.newBuilder() to construct.
private DataPointInsertionItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataPointInsertionItem() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataPointInsertionItem();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.v1.timeseries.proto.DataPointInsertionRequestOuterClass.internal_static_com_cognite_v1_timeseries_proto_DataPointInsertionItem_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.v1.timeseries.proto.DataPointInsertionRequestOuterClass.internal_static_com_cognite_v1_timeseries_proto_DataPointInsertionItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.v1.timeseries.proto.DataPointInsertionItem.class, com.cognite.v1.timeseries.proto.DataPointInsertionItem.Builder.class);
}
private int idOrExternalIdCase_ = 0;
private java.lang.Object idOrExternalId_;
public enum IdOrExternalIdCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ID(1),
EXTERNALID(2),
IDOREXTERNALID_NOT_SET(0);
private final int value;
private IdOrExternalIdCase(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 IdOrExternalIdCase valueOf(int value) {
return forNumber(value);
}
public static IdOrExternalIdCase forNumber(int value) {
switch (value) {
case 1: return ID;
case 2: return EXTERNALID;
case 0: return IDOREXTERNALID_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public IdOrExternalIdCase
getIdOrExternalIdCase() {
return IdOrExternalIdCase.forNumber(
idOrExternalIdCase_);
}
private int datapointTypeCase_ = 0;
private java.lang.Object datapointType_;
public enum DatapointTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NUMERICDATAPOINTS(3),
STRINGDATAPOINTS(4),
DATAPOINTTYPE_NOT_SET(0);
private final int value;
private DatapointTypeCase(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 DatapointTypeCase valueOf(int value) {
return forNumber(value);
}
public static DatapointTypeCase forNumber(int value) {
switch (value) {
case 3: return NUMERICDATAPOINTS;
case 4: return STRINGDATAPOINTS;
case 0: return DATAPOINTTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public DatapointTypeCase
getDatapointTypeCase() {
return DatapointTypeCase.forNumber(
datapointTypeCase_);
}
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 idOrExternalIdCase_ == 1;
}
/**
* int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
if (idOrExternalIdCase_ == 1) {
return (java.lang.Long) idOrExternalId_;
}
return 0L;
}
public static final int EXTERNALID_FIELD_NUMBER = 2;
/**
* string externalId = 2;
* @return Whether the externalId field is set.
*/
public boolean hasExternalId() {
return idOrExternalIdCase_ == 2;
}
/**
* string externalId = 2;
* @return The externalId.
*/
public java.lang.String getExternalId() {
java.lang.Object ref = "";
if (idOrExternalIdCase_ == 2) {
ref = idOrExternalId_;
}
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 (idOrExternalIdCase_ == 2) {
idOrExternalId_ = s;
}
return s;
}
}
/**
* string externalId = 2;
* @return The bytes for externalId.
*/
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = "";
if (idOrExternalIdCase_ == 2) {
ref = idOrExternalId_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (idOrExternalIdCase_ == 2) {
idOrExternalId_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NUMERICDATAPOINTS_FIELD_NUMBER = 3;
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
* @return Whether the numericDatapoints field is set.
*/
@java.lang.Override
public boolean hasNumericDatapoints() {
return datapointTypeCase_ == 3;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
* @return The numericDatapoints.
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.NumericDatapoints getNumericDatapoints() {
if (datapointTypeCase_ == 3) {
return (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.NumericDatapointsOrBuilder getNumericDatapointsOrBuilder() {
if (datapointTypeCase_ == 3) {
return (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
}
public static final int STRINGDATAPOINTS_FIELD_NUMBER = 4;
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
* @return Whether the stringDatapoints field is set.
*/
@java.lang.Override
public boolean hasStringDatapoints() {
return datapointTypeCase_ == 4;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
* @return The stringDatapoints.
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.StringDatapoints getStringDatapoints() {
if (datapointTypeCase_ == 4) {
return (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.StringDatapointsOrBuilder getStringDatapointsOrBuilder() {
if (datapointTypeCase_ == 4) {
return (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
}
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 (idOrExternalIdCase_ == 1) {
output.writeInt64(
1, (long)((java.lang.Long) idOrExternalId_));
}
if (idOrExternalIdCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, idOrExternalId_);
}
if (datapointTypeCase_ == 3) {
output.writeMessage(3, (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_);
}
if (datapointTypeCase_ == 4) {
output.writeMessage(4, (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (idOrExternalIdCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
1, (long)((java.lang.Long) idOrExternalId_));
}
if (idOrExternalIdCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, idOrExternalId_);
}
if (datapointTypeCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_);
}
if (datapointTypeCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.cognite.v1.timeseries.proto.DataPointInsertionItem)) {
return super.equals(obj);
}
com.cognite.v1.timeseries.proto.DataPointInsertionItem other = (com.cognite.v1.timeseries.proto.DataPointInsertionItem) obj;
if (!getIdOrExternalIdCase().equals(other.getIdOrExternalIdCase())) return false;
switch (idOrExternalIdCase_) {
case 1:
if (getId()
!= other.getId()) return false;
break;
case 2:
if (!getExternalId()
.equals(other.getExternalId())) return false;
break;
case 0:
default:
}
if (!getDatapointTypeCase().equals(other.getDatapointTypeCase())) return false;
switch (datapointTypeCase_) {
case 3:
if (!getNumericDatapoints()
.equals(other.getNumericDatapoints())) return false;
break;
case 4:
if (!getStringDatapoints()
.equals(other.getStringDatapoints())) return false;
break;
case 0:
default:
}
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();
switch (idOrExternalIdCase_) {
case 1:
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
break;
case 2:
hash = (37 * hash) + EXTERNALID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
break;
case 0:
default:
}
switch (datapointTypeCase_) {
case 3:
hash = (37 * hash) + NUMERICDATAPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getNumericDatapoints().hashCode();
break;
case 4:
hash = (37 * hash) + STRINGDATAPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getStringDatapoints().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem 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.v1.timeseries.proto.DataPointInsertionItem parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem 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.v1.timeseries.proto.DataPointInsertionItem parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem 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.v1.timeseries.proto.DataPointInsertionItem parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem 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.v1.timeseries.proto.DataPointInsertionItem 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 com.cognite.v1.timeseries.proto.DataPointInsertionItem}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.cognite.v1.timeseries.proto.DataPointInsertionItem)
com.cognite.v1.timeseries.proto.DataPointInsertionItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.v1.timeseries.proto.DataPointInsertionRequestOuterClass.internal_static_com_cognite_v1_timeseries_proto_DataPointInsertionItem_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.v1.timeseries.proto.DataPointInsertionRequestOuterClass.internal_static_com_cognite_v1_timeseries_proto_DataPointInsertionItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.v1.timeseries.proto.DataPointInsertionItem.class, com.cognite.v1.timeseries.proto.DataPointInsertionItem.Builder.class);
}
// Construct using com.cognite.v1.timeseries.proto.DataPointInsertionItem.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (numericDatapointsBuilder_ != null) {
numericDatapointsBuilder_.clear();
}
if (stringDatapointsBuilder_ != null) {
stringDatapointsBuilder_.clear();
}
idOrExternalIdCase_ = 0;
idOrExternalId_ = null;
datapointTypeCase_ = 0;
datapointType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.cognite.v1.timeseries.proto.DataPointInsertionRequestOuterClass.internal_static_com_cognite_v1_timeseries_proto_DataPointInsertionItem_descriptor;
}
@java.lang.Override
public com.cognite.v1.timeseries.proto.DataPointInsertionItem getDefaultInstanceForType() {
return com.cognite.v1.timeseries.proto.DataPointInsertionItem.getDefaultInstance();
}
@java.lang.Override
public com.cognite.v1.timeseries.proto.DataPointInsertionItem build() {
com.cognite.v1.timeseries.proto.DataPointInsertionItem result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.cognite.v1.timeseries.proto.DataPointInsertionItem buildPartial() {
com.cognite.v1.timeseries.proto.DataPointInsertionItem result = new com.cognite.v1.timeseries.proto.DataPointInsertionItem(this);
if (idOrExternalIdCase_ == 1) {
result.idOrExternalId_ = idOrExternalId_;
}
if (idOrExternalIdCase_ == 2) {
result.idOrExternalId_ = idOrExternalId_;
}
if (datapointTypeCase_ == 3) {
if (numericDatapointsBuilder_ == null) {
result.datapointType_ = datapointType_;
} else {
result.datapointType_ = numericDatapointsBuilder_.build();
}
}
if (datapointTypeCase_ == 4) {
if (stringDatapointsBuilder_ == null) {
result.datapointType_ = datapointType_;
} else {
result.datapointType_ = stringDatapointsBuilder_.build();
}
}
result.idOrExternalIdCase_ = idOrExternalIdCase_;
result.datapointTypeCase_ = datapointTypeCase_;
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.v1.timeseries.proto.DataPointInsertionItem) {
return mergeFrom((com.cognite.v1.timeseries.proto.DataPointInsertionItem)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.cognite.v1.timeseries.proto.DataPointInsertionItem other) {
if (other == com.cognite.v1.timeseries.proto.DataPointInsertionItem.getDefaultInstance()) return this;
switch (other.getIdOrExternalIdCase()) {
case ID: {
setId(other.getId());
break;
}
case EXTERNALID: {
idOrExternalIdCase_ = 2;
idOrExternalId_ = other.idOrExternalId_;
onChanged();
break;
}
case IDOREXTERNALID_NOT_SET: {
break;
}
}
switch (other.getDatapointTypeCase()) {
case NUMERICDATAPOINTS: {
mergeNumericDatapoints(other.getNumericDatapoints());
break;
}
case STRINGDATAPOINTS: {
mergeStringDatapoints(other.getStringDatapoints());
break;
}
case DATAPOINTTYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
idOrExternalId_ = input.readInt64();
idOrExternalIdCase_ = 1;
break;
} // case 8
case 18: {
java.lang.String s = input.readStringRequireUtf8();
idOrExternalIdCase_ = 2;
idOrExternalId_ = s;
break;
} // case 18
case 26: {
input.readMessage(
getNumericDatapointsFieldBuilder().getBuilder(),
extensionRegistry);
datapointTypeCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getStringDatapointsFieldBuilder().getBuilder(),
extensionRegistry);
datapointTypeCase_ = 4;
break;
} // case 34
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 idOrExternalIdCase_ = 0;
private java.lang.Object idOrExternalId_;
public IdOrExternalIdCase
getIdOrExternalIdCase() {
return IdOrExternalIdCase.forNumber(
idOrExternalIdCase_);
}
public Builder clearIdOrExternalId() {
idOrExternalIdCase_ = 0;
idOrExternalId_ = null;
onChanged();
return this;
}
private int datapointTypeCase_ = 0;
private java.lang.Object datapointType_;
public DatapointTypeCase
getDatapointTypeCase() {
return DatapointTypeCase.forNumber(
datapointTypeCase_);
}
public Builder clearDatapointType() {
datapointTypeCase_ = 0;
datapointType_ = null;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return idOrExternalIdCase_ == 1;
}
/**
* int64 id = 1;
* @return The id.
*/
public long getId() {
if (idOrExternalIdCase_ == 1) {
return (java.lang.Long) idOrExternalId_;
}
return 0L;
}
/**
* int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
idOrExternalIdCase_ = 1;
idOrExternalId_ = value;
onChanged();
return this;
}
/**
* int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
if (idOrExternalIdCase_ == 1) {
idOrExternalIdCase_ = 0;
idOrExternalId_ = null;
onChanged();
}
return this;
}
/**
* string externalId = 2;
* @return Whether the externalId field is set.
*/
@java.lang.Override
public boolean hasExternalId() {
return idOrExternalIdCase_ == 2;
}
/**
* string externalId = 2;
* @return The externalId.
*/
@java.lang.Override
public java.lang.String getExternalId() {
java.lang.Object ref = "";
if (idOrExternalIdCase_ == 2) {
ref = idOrExternalId_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (idOrExternalIdCase_ == 2) {
idOrExternalId_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string externalId = 2;
* @return The bytes for externalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = "";
if (idOrExternalIdCase_ == 2) {
ref = idOrExternalId_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (idOrExternalIdCase_ == 2) {
idOrExternalId_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string externalId = 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();
}
idOrExternalIdCase_ = 2;
idOrExternalId_ = value;
onChanged();
return this;
}
/**
* string externalId = 2;
* @return This builder for chaining.
*/
public Builder clearExternalId() {
if (idOrExternalIdCase_ == 2) {
idOrExternalIdCase_ = 0;
idOrExternalId_ = null;
onChanged();
}
return this;
}
/**
* string externalId = 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);
idOrExternalIdCase_ = 2;
idOrExternalId_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.NumericDatapoints, com.cognite.v1.timeseries.proto.NumericDatapoints.Builder, com.cognite.v1.timeseries.proto.NumericDatapointsOrBuilder> numericDatapointsBuilder_;
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
* @return Whether the numericDatapoints field is set.
*/
@java.lang.Override
public boolean hasNumericDatapoints() {
return datapointTypeCase_ == 3;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
* @return The numericDatapoints.
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.NumericDatapoints getNumericDatapoints() {
if (numericDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 3) {
return (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
} else {
if (datapointTypeCase_ == 3) {
return numericDatapointsBuilder_.getMessage();
}
return com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
}
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
public Builder setNumericDatapoints(com.cognite.v1.timeseries.proto.NumericDatapoints value) {
if (numericDatapointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
datapointType_ = value;
onChanged();
} else {
numericDatapointsBuilder_.setMessage(value);
}
datapointTypeCase_ = 3;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
public Builder setNumericDatapoints(
com.cognite.v1.timeseries.proto.NumericDatapoints.Builder builderForValue) {
if (numericDatapointsBuilder_ == null) {
datapointType_ = builderForValue.build();
onChanged();
} else {
numericDatapointsBuilder_.setMessage(builderForValue.build());
}
datapointTypeCase_ = 3;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
public Builder mergeNumericDatapoints(com.cognite.v1.timeseries.proto.NumericDatapoints value) {
if (numericDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 3 &&
datapointType_ != com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance()) {
datapointType_ = com.cognite.v1.timeseries.proto.NumericDatapoints.newBuilder((com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_)
.mergeFrom(value).buildPartial();
} else {
datapointType_ = value;
}
onChanged();
} else {
if (datapointTypeCase_ == 3) {
numericDatapointsBuilder_.mergeFrom(value);
} else {
numericDatapointsBuilder_.setMessage(value);
}
}
datapointTypeCase_ = 3;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
public Builder clearNumericDatapoints() {
if (numericDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 3) {
datapointTypeCase_ = 0;
datapointType_ = null;
onChanged();
}
} else {
if (datapointTypeCase_ == 3) {
datapointTypeCase_ = 0;
datapointType_ = null;
}
numericDatapointsBuilder_.clear();
}
return this;
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
public com.cognite.v1.timeseries.proto.NumericDatapoints.Builder getNumericDatapointsBuilder() {
return getNumericDatapointsFieldBuilder().getBuilder();
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.NumericDatapointsOrBuilder getNumericDatapointsOrBuilder() {
if ((datapointTypeCase_ == 3) && (numericDatapointsBuilder_ != null)) {
return numericDatapointsBuilder_.getMessageOrBuilder();
} else {
if (datapointTypeCase_ == 3) {
return (com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
}
}
/**
* .com.cognite.v1.timeseries.proto.NumericDatapoints numericDatapoints = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.NumericDatapoints, com.cognite.v1.timeseries.proto.NumericDatapoints.Builder, com.cognite.v1.timeseries.proto.NumericDatapointsOrBuilder>
getNumericDatapointsFieldBuilder() {
if (numericDatapointsBuilder_ == null) {
if (!(datapointTypeCase_ == 3)) {
datapointType_ = com.cognite.v1.timeseries.proto.NumericDatapoints.getDefaultInstance();
}
numericDatapointsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.NumericDatapoints, com.cognite.v1.timeseries.proto.NumericDatapoints.Builder, com.cognite.v1.timeseries.proto.NumericDatapointsOrBuilder>(
(com.cognite.v1.timeseries.proto.NumericDatapoints) datapointType_,
getParentForChildren(),
isClean());
datapointType_ = null;
}
datapointTypeCase_ = 3;
onChanged();;
return numericDatapointsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.StringDatapoints, com.cognite.v1.timeseries.proto.StringDatapoints.Builder, com.cognite.v1.timeseries.proto.StringDatapointsOrBuilder> stringDatapointsBuilder_;
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
* @return Whether the stringDatapoints field is set.
*/
@java.lang.Override
public boolean hasStringDatapoints() {
return datapointTypeCase_ == 4;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
* @return The stringDatapoints.
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.StringDatapoints getStringDatapoints() {
if (stringDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 4) {
return (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
} else {
if (datapointTypeCase_ == 4) {
return stringDatapointsBuilder_.getMessage();
}
return com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
}
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
public Builder setStringDatapoints(com.cognite.v1.timeseries.proto.StringDatapoints value) {
if (stringDatapointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
datapointType_ = value;
onChanged();
} else {
stringDatapointsBuilder_.setMessage(value);
}
datapointTypeCase_ = 4;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
public Builder setStringDatapoints(
com.cognite.v1.timeseries.proto.StringDatapoints.Builder builderForValue) {
if (stringDatapointsBuilder_ == null) {
datapointType_ = builderForValue.build();
onChanged();
} else {
stringDatapointsBuilder_.setMessage(builderForValue.build());
}
datapointTypeCase_ = 4;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
public Builder mergeStringDatapoints(com.cognite.v1.timeseries.proto.StringDatapoints value) {
if (stringDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 4 &&
datapointType_ != com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance()) {
datapointType_ = com.cognite.v1.timeseries.proto.StringDatapoints.newBuilder((com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_)
.mergeFrom(value).buildPartial();
} else {
datapointType_ = value;
}
onChanged();
} else {
if (datapointTypeCase_ == 4) {
stringDatapointsBuilder_.mergeFrom(value);
} else {
stringDatapointsBuilder_.setMessage(value);
}
}
datapointTypeCase_ = 4;
return this;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
public Builder clearStringDatapoints() {
if (stringDatapointsBuilder_ == null) {
if (datapointTypeCase_ == 4) {
datapointTypeCase_ = 0;
datapointType_ = null;
onChanged();
}
} else {
if (datapointTypeCase_ == 4) {
datapointTypeCase_ = 0;
datapointType_ = null;
}
stringDatapointsBuilder_.clear();
}
return this;
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
public com.cognite.v1.timeseries.proto.StringDatapoints.Builder getStringDatapointsBuilder() {
return getStringDatapointsFieldBuilder().getBuilder();
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
@java.lang.Override
public com.cognite.v1.timeseries.proto.StringDatapointsOrBuilder getStringDatapointsOrBuilder() {
if ((datapointTypeCase_ == 4) && (stringDatapointsBuilder_ != null)) {
return stringDatapointsBuilder_.getMessageOrBuilder();
} else {
if (datapointTypeCase_ == 4) {
return (com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_;
}
return com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
}
}
/**
* .com.cognite.v1.timeseries.proto.StringDatapoints stringDatapoints = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.StringDatapoints, com.cognite.v1.timeseries.proto.StringDatapoints.Builder, com.cognite.v1.timeseries.proto.StringDatapointsOrBuilder>
getStringDatapointsFieldBuilder() {
if (stringDatapointsBuilder_ == null) {
if (!(datapointTypeCase_ == 4)) {
datapointType_ = com.cognite.v1.timeseries.proto.StringDatapoints.getDefaultInstance();
}
stringDatapointsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.cognite.v1.timeseries.proto.StringDatapoints, com.cognite.v1.timeseries.proto.StringDatapoints.Builder, com.cognite.v1.timeseries.proto.StringDatapointsOrBuilder>(
(com.cognite.v1.timeseries.proto.StringDatapoints) datapointType_,
getParentForChildren(),
isClean());
datapointType_ = null;
}
datapointTypeCase_ = 4;
onChanged();;
return stringDatapointsBuilder_;
}
@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.v1.timeseries.proto.DataPointInsertionItem)
}
// @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.DataPointInsertionItem)
private static final com.cognite.v1.timeseries.proto.DataPointInsertionItem DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.cognite.v1.timeseries.proto.DataPointInsertionItem();
}
public static com.cognite.v1.timeseries.proto.DataPointInsertionItem getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataPointInsertionItem parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.cognite.v1.timeseries.proto.DataPointInsertionItem getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy