proto.com.cognite.client.dto.TimeseriesMetadata 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 header.
*
*
* Protobuf type {@code com.cognite.beam.proto.TimeseriesMetadata}
*/
public final class TimeseriesMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.cognite.beam.proto.TimeseriesMetadata)
TimeseriesMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use TimeseriesMetadata.newBuilder() to construct.
private TimeseriesMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TimeseriesMetadata() {
externalId_ = "";
name_ = "";
description_ = "";
unit_ = "";
securityCategories_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TimeseriesMetadata();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TimeseriesMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
bitField0_ |= 0x00000001;
id_ = input.readInt64();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
externalId_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
name_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
description_ = s;
break;
}
case 40: {
isString_ = input.readBool();
break;
}
case 48: {
isStep_ = input.readBool();
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
unit_ = s;
break;
}
case 64: {
bitField0_ |= 0x00000020;
assetId_ = input.readInt64();
break;
}
case 72: {
if (!((mutable_bitField0_ & 0x00000040) != 0)) {
securityCategories_ = newLongList();
mutable_bitField0_ |= 0x00000040;
}
securityCategories_.addLong(input.readInt64());
break;
}
case 74: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
securityCategories_ = newLongList();
mutable_bitField0_ |= 0x00000040;
}
while (input.getBytesUntilLimit() > 0) {
securityCategories_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 80: {
bitField0_ |= 0x00000040;
createdTime_ = input.readInt64();
break;
}
case 88: {
bitField0_ |= 0x00000080;
lastUpdatedTime_ = input.readInt64();
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000200) != 0)) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000200;
}
com.google.protobuf.MapEntry
metadata__ = input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metadata_.getMutableMap().put(
metadata__.getKey(), metadata__.getValue());
break;
}
case 104: {
bitField0_ |= 0x00000100;
dataSetId_ = input.readInt64();
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 {
if (((mutable_bitField0_ & 0x00000040) != 0)) {
securityCategories_.makeImmutable(); // C
}
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_TimeseriesMetadata_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 12:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.TimeseriesMetadata.class, com.cognite.client.dto.TimeseriesMetadata.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* optional int64 id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int EXTERNAL_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object externalId_;
/**
* optional string external_id = 2;
* @return Whether the externalId field is set.
*/
@java.lang.Override
public boolean hasExternalId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string external_id = 2;
* @return The externalId.
*/
@java.lang.Override
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
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();
externalId_ = s;
return s;
}
}
/**
* optional string external_id = 2;
* @return The bytes for externalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 3;
private volatile java.lang.Object name_;
/**
* optional string name = 3;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string name = 3;
* @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();
name_ = s;
return s;
}
}
/**
* optional string name = 3;
* @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 DESCRIPTION_FIELD_NUMBER = 4;
private volatile java.lang.Object description_;
/**
* optional string description = 4;
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string description = 4;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
* optional string description = 4;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_STRING_FIELD_NUMBER = 5;
private boolean isString_;
/**
* bool is_string = 5;
* @return The isString.
*/
@java.lang.Override
public boolean getIsString() {
return isString_;
}
public static final int IS_STEP_FIELD_NUMBER = 6;
private boolean isStep_;
/**
* bool is_step = 6;
* @return The isStep.
*/
@java.lang.Override
public boolean getIsStep() {
return isStep_;
}
public static final int UNIT_FIELD_NUMBER = 7;
private volatile java.lang.Object unit_;
/**
* optional string unit = 7;
* @return Whether the unit field is set.
*/
@java.lang.Override
public boolean hasUnit() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string unit = 7;
* @return The unit.
*/
@java.lang.Override
public java.lang.String getUnit() {
java.lang.Object ref = unit_;
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();
unit_ = s;
return s;
}
}
/**
* optional string unit = 7;
* @return The bytes for unit.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUnitBytes() {
java.lang.Object ref = unit_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
unit_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ASSET_ID_FIELD_NUMBER = 8;
private long assetId_;
/**
* optional int64 asset_id = 8;
* @return Whether the assetId field is set.
*/
@java.lang.Override
public boolean hasAssetId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional int64 asset_id = 8;
* @return The assetId.
*/
@java.lang.Override
public long getAssetId() {
return assetId_;
}
public static final int SECURITY_CATEGORIES_FIELD_NUMBER = 9;
private com.google.protobuf.Internal.LongList securityCategories_;
/**
* repeated int64 security_categories = 9;
* @return A list containing the securityCategories.
*/
@java.lang.Override
public java.util.List
getSecurityCategoriesList() {
return securityCategories_;
}
/**
* repeated int64 security_categories = 9;
* @return The count of securityCategories.
*/
public int getSecurityCategoriesCount() {
return securityCategories_.size();
}
/**
* repeated int64 security_categories = 9;
* @param index The index of the element to return.
* @return The securityCategories at the given index.
*/
public long getSecurityCategories(int index) {
return securityCategories_.getLong(index);
}
private int securityCategoriesMemoizedSerializedSize = -1;
public static final int CREATED_TIME_FIELD_NUMBER = 10;
private long createdTime_;
/**
* optional int64 created_time = 10;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional int64 created_time = 10;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
public static final int LAST_UPDATED_TIME_FIELD_NUMBER = 11;
private long lastUpdatedTime_;
/**
* optional int64 last_updated_time = 11;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional int64 last_updated_time = 11;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
public static final int METADATA_FIELD_NUMBER = 12;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesMetadata_MetadataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metadata_;
private com.google.protobuf.MapField
internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.lang.String getMetadataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int DATA_SET_ID_FIELD_NUMBER = 13;
private long dataSetId_;
/**
* optional int64 data_set_id = 13;
* @return Whether the dataSetId field is set.
*/
@java.lang.Override
public boolean hasDataSetId() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional int64 data_set_id = 13;
* @return The dataSetId.
*/
@java.lang.Override
public long getDataSetId() {
return dataSetId_;
}
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 {
getSerializedSize();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
}
if (isString_ != false) {
output.writeBool(5, isString_);
}
if (isStep_ != false) {
output.writeBool(6, isStep_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, unit_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeInt64(8, assetId_);
}
if (getSecurityCategoriesList().size() > 0) {
output.writeUInt32NoTag(74);
output.writeUInt32NoTag(securityCategoriesMemoizedSerializedSize);
}
for (int i = 0; i < securityCategories_.size(); i++) {
output.writeInt64NoTag(securityCategories_.getLong(i));
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeInt64(10, createdTime_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeInt64(11, lastUpdatedTime_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetadata(),
MetadataDefaultEntryHolder.defaultEntry,
12);
if (((bitField0_ & 0x00000100) != 0)) {
output.writeInt64(13, dataSetId_);
}
unknownFields.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, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
}
if (isString_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, isString_);
}
if (isStep_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, isStep_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, unit_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, assetId_);
}
{
int dataSize = 0;
for (int i = 0; i < securityCategories_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(securityCategories_.getLong(i));
}
size += dataSize;
if (!getSecurityCategoriesList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
securityCategoriesMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, createdTime_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, lastUpdatedTime_);
}
for (java.util.Map.Entry entry
: internalGetMetadata().getMap().entrySet()) {
com.google.protobuf.MapEntry
metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, metadata__);
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, dataSetId_);
}
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.TimeseriesMetadata)) {
return super.equals(obj);
}
com.cognite.client.dto.TimeseriesMetadata other = (com.cognite.client.dto.TimeseriesMetadata) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId()
!= other.getId()) return false;
}
if (hasExternalId() != other.hasExternalId()) return false;
if (hasExternalId()) {
if (!getExternalId()
.equals(other.getExternalId())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (getIsString()
!= other.getIsString()) return false;
if (getIsStep()
!= other.getIsStep()) return false;
if (hasUnit() != other.hasUnit()) return false;
if (hasUnit()) {
if (!getUnit()
.equals(other.getUnit())) return false;
}
if (hasAssetId() != other.hasAssetId()) return false;
if (hasAssetId()) {
if (getAssetId()
!= other.getAssetId()) return false;
}
if (!getSecurityCategoriesList()
.equals(other.getSecurityCategoriesList())) return false;
if (hasCreatedTime() != other.hasCreatedTime()) return false;
if (hasCreatedTime()) {
if (getCreatedTime()
!= other.getCreatedTime()) return false;
}
if (hasLastUpdatedTime() != other.hasLastUpdatedTime()) return false;
if (hasLastUpdatedTime()) {
if (getLastUpdatedTime()
!= other.getLastUpdatedTime()) return false;
}
if (!internalGetMetadata().equals(
other.internalGetMetadata())) return false;
if (hasDataSetId() != other.hasDataSetId()) return false;
if (hasDataSetId()) {
if (getDataSetId()
!= other.getDataSetId()) return false;
}
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();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
}
if (hasExternalId()) {
hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER;
hash = (53 * hash) + getExternalId().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
hash = (37 * hash) + IS_STRING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsString());
hash = (37 * hash) + IS_STEP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsStep());
if (hasUnit()) {
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + getUnit().hashCode();
}
if (hasAssetId()) {
hash = (37 * hash) + ASSET_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAssetId());
}
if (getSecurityCategoriesCount() > 0) {
hash = (37 * hash) + SECURITY_CATEGORIES_FIELD_NUMBER;
hash = (53 * hash) + getSecurityCategoriesList().hashCode();
}
if (hasCreatedTime()) {
hash = (37 * hash) + CREATED_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCreatedTime());
}
if (hasLastUpdatedTime()) {
hash = (37 * hash) + LAST_UPDATED_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLastUpdatedTime());
}
if (!internalGetMetadata().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetadata().hashCode();
}
if (hasDataSetId()) {
hash = (37 * hash) + DATA_SET_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getDataSetId());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.cognite.client.dto.TimeseriesMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesMetadata 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.TimeseriesMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesMetadata 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.TimeseriesMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.TimeseriesMetadata parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.TimeseriesMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesMetadata 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.TimeseriesMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesMetadata 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.TimeseriesMetadata parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.TimeseriesMetadata 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.TimeseriesMetadata 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 header.
*
*
* Protobuf type {@code com.cognite.beam.proto.TimeseriesMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.TimeseriesMetadata)
com.cognite.client.dto.TimeseriesMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesMetadata_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 12:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 12:
return internalGetMutableMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.TimeseriesMetadata.class, com.cognite.client.dto.TimeseriesMetadata.Builder.class);
}
// Construct using com.cognite.client.dto.TimeseriesMetadata.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();
id_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
externalId_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
description_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
isString_ = false;
isStep_ = false;
unit_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
assetId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000020);
securityCategories_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000040);
createdTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000080);
lastUpdatedTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000100);
internalGetMutableMetadata().clear();
dataSetId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000400);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.cognite.client.dto.Timeseries.internal_static_com_cognite_beam_proto_TimeseriesMetadata_descriptor;
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesMetadata getDefaultInstanceForType() {
return com.cognite.client.dto.TimeseriesMetadata.getDefaultInstance();
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesMetadata build() {
com.cognite.client.dto.TimeseriesMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.cognite.client.dto.TimeseriesMetadata buildPartial() {
com.cognite.client.dto.TimeseriesMetadata result = new com.cognite.client.dto.TimeseriesMetadata(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.externalId_ = externalId_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000008;
}
result.description_ = description_;
result.isString_ = isString_;
result.isStep_ = isStep_;
if (((from_bitField0_ & 0x00000010) != 0)) {
to_bitField0_ |= 0x00000010;
}
result.unit_ = unit_;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.assetId_ = assetId_;
to_bitField0_ |= 0x00000020;
}
if (((bitField0_ & 0x00000040) != 0)) {
securityCategories_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.securityCategories_ = securityCategories_;
if (((from_bitField0_ & 0x00000080) != 0)) {
result.createdTime_ = createdTime_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.lastUpdatedTime_ = lastUpdatedTime_;
to_bitField0_ |= 0x00000080;
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
if (((from_bitField0_ & 0x00000400) != 0)) {
result.dataSetId_ = dataSetId_;
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 com.cognite.client.dto.TimeseriesMetadata) {
return mergeFrom((com.cognite.client.dto.TimeseriesMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.cognite.client.dto.TimeseriesMetadata other) {
if (other == com.cognite.client.dto.TimeseriesMetadata.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasExternalId()) {
bitField0_ |= 0x00000002;
externalId_ = other.externalId_;
onChanged();
}
if (other.hasName()) {
bitField0_ |= 0x00000004;
name_ = other.name_;
onChanged();
}
if (other.hasDescription()) {
bitField0_ |= 0x00000008;
description_ = other.description_;
onChanged();
}
if (other.getIsString() != false) {
setIsString(other.getIsString());
}
if (other.getIsStep() != false) {
setIsStep(other.getIsStep());
}
if (other.hasUnit()) {
bitField0_ |= 0x00000010;
unit_ = other.unit_;
onChanged();
}
if (other.hasAssetId()) {
setAssetId(other.getAssetId());
}
if (!other.securityCategories_.isEmpty()) {
if (securityCategories_.isEmpty()) {
securityCategories_ = other.securityCategories_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureSecurityCategoriesIsMutable();
securityCategories_.addAll(other.securityCategories_);
}
onChanged();
}
if (other.hasCreatedTime()) {
setCreatedTime(other.getCreatedTime());
}
if (other.hasLastUpdatedTime()) {
setLastUpdatedTime(other.getLastUpdatedTime());
}
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
if (other.hasDataSetId()) {
setDataSetId(other.getDataSetId());
}
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.TimeseriesMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.cognite.client.dto.TimeseriesMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long id_ ;
/**
* optional int64 id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int64 id = 1;
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
* optional int64 id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* optional int64 id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object externalId_ = "";
/**
* optional string external_id = 2;
* @return Whether the externalId field is set.
*/
public boolean hasExternalId() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string external_id = 2;
* @return The externalId.
*/
public java.lang.String getExternalId() {
java.lang.Object ref = externalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
externalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string external_id = 2;
* @return The bytes for externalId.
*/
public com.google.protobuf.ByteString
getExternalIdBytes() {
java.lang.Object ref = externalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
externalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional 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();
}
bitField0_ |= 0x00000002;
externalId_ = value;
onChanged();
return this;
}
/**
* optional string external_id = 2;
* @return This builder for chaining.
*/
public Builder clearExternalId() {
bitField0_ = (bitField0_ & ~0x00000002);
externalId_ = getDefaultInstance().getExternalId();
onChanged();
return this;
}
/**
* optional 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);
bitField0_ |= 0x00000002;
externalId_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
* optional string name = 3;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string name = 3;
* @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();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 3;
* @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;
}
}
/**
* optional string name = 3;
* @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_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 3;
* @return This builder for chaining.
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000004);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 3;
* @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();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* optional string description = 4;
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string description = 4;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string description = 4;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string description = 4;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
description_ = value;
onChanged();
return this;
}
/**
* optional string description = 4;
* @return This builder for chaining.
*/
public Builder clearDescription() {
bitField0_ = (bitField0_ & ~0x00000008);
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
* optional string description = 4;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000008;
description_ = value;
onChanged();
return this;
}
private boolean isString_ ;
/**
* bool is_string = 5;
* @return The isString.
*/
@java.lang.Override
public boolean getIsString() {
return isString_;
}
/**
* bool is_string = 5;
* @param value The isString to set.
* @return This builder for chaining.
*/
public Builder setIsString(boolean value) {
isString_ = value;
onChanged();
return this;
}
/**
* bool is_string = 5;
* @return This builder for chaining.
*/
public Builder clearIsString() {
isString_ = false;
onChanged();
return this;
}
private boolean isStep_ ;
/**
* bool is_step = 6;
* @return The isStep.
*/
@java.lang.Override
public boolean getIsStep() {
return isStep_;
}
/**
* bool is_step = 6;
* @param value The isStep to set.
* @return This builder for chaining.
*/
public Builder setIsStep(boolean value) {
isStep_ = value;
onChanged();
return this;
}
/**
* bool is_step = 6;
* @return This builder for chaining.
*/
public Builder clearIsStep() {
isStep_ = false;
onChanged();
return this;
}
private java.lang.Object unit_ = "";
/**
* optional string unit = 7;
* @return Whether the unit field is set.
*/
public boolean hasUnit() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string unit = 7;
* @return The unit.
*/
public java.lang.String getUnit() {
java.lang.Object ref = unit_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
unit_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string unit = 7;
* @return The bytes for unit.
*/
public com.google.protobuf.ByteString
getUnitBytes() {
java.lang.Object ref = unit_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
unit_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string unit = 7;
* @param value The unit to set.
* @return This builder for chaining.
*/
public Builder setUnit(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
unit_ = value;
onChanged();
return this;
}
/**
* optional string unit = 7;
* @return This builder for chaining.
*/
public Builder clearUnit() {
bitField0_ = (bitField0_ & ~0x00000010);
unit_ = getDefaultInstance().getUnit();
onChanged();
return this;
}
/**
* optional string unit = 7;
* @param value The bytes for unit to set.
* @return This builder for chaining.
*/
public Builder setUnitBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000010;
unit_ = value;
onChanged();
return this;
}
private long assetId_ ;
/**
* optional int64 asset_id = 8;
* @return Whether the assetId field is set.
*/
@java.lang.Override
public boolean hasAssetId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional int64 asset_id = 8;
* @return The assetId.
*/
@java.lang.Override
public long getAssetId() {
return assetId_;
}
/**
* optional int64 asset_id = 8;
* @param value The assetId to set.
* @return This builder for chaining.
*/
public Builder setAssetId(long value) {
bitField0_ |= 0x00000020;
assetId_ = value;
onChanged();
return this;
}
/**
* optional int64 asset_id = 8;
* @return This builder for chaining.
*/
public Builder clearAssetId() {
bitField0_ = (bitField0_ & ~0x00000020);
assetId_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList securityCategories_ = emptyLongList();
private void ensureSecurityCategoriesIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
securityCategories_ = mutableCopy(securityCategories_);
bitField0_ |= 0x00000040;
}
}
/**
* repeated int64 security_categories = 9;
* @return A list containing the securityCategories.
*/
public java.util.List
getSecurityCategoriesList() {
return ((bitField0_ & 0x00000040) != 0) ?
java.util.Collections.unmodifiableList(securityCategories_) : securityCategories_;
}
/**
* repeated int64 security_categories = 9;
* @return The count of securityCategories.
*/
public int getSecurityCategoriesCount() {
return securityCategories_.size();
}
/**
* repeated int64 security_categories = 9;
* @param index The index of the element to return.
* @return The securityCategories at the given index.
*/
public long getSecurityCategories(int index) {
return securityCategories_.getLong(index);
}
/**
* repeated int64 security_categories = 9;
* @param index The index to set the value at.
* @param value The securityCategories to set.
* @return This builder for chaining.
*/
public Builder setSecurityCategories(
int index, long value) {
ensureSecurityCategoriesIsMutable();
securityCategories_.setLong(index, value);
onChanged();
return this;
}
/**
* repeated int64 security_categories = 9;
* @param value The securityCategories to add.
* @return This builder for chaining.
*/
public Builder addSecurityCategories(long value) {
ensureSecurityCategoriesIsMutable();
securityCategories_.addLong(value);
onChanged();
return this;
}
/**
* repeated int64 security_categories = 9;
* @param values The securityCategories to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityCategories(
java.lang.Iterable extends java.lang.Long> values) {
ensureSecurityCategoriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, securityCategories_);
onChanged();
return this;
}
/**
* repeated int64 security_categories = 9;
* @return This builder for chaining.
*/
public Builder clearSecurityCategories() {
securityCategories_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
private long createdTime_ ;
/**
* optional int64 created_time = 10;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional int64 created_time = 10;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
/**
* optional int64 created_time = 10;
* @param value The createdTime to set.
* @return This builder for chaining.
*/
public Builder setCreatedTime(long value) {
bitField0_ |= 0x00000080;
createdTime_ = value;
onChanged();
return this;
}
/**
* optional int64 created_time = 10;
* @return This builder for chaining.
*/
public Builder clearCreatedTime() {
bitField0_ = (bitField0_ & ~0x00000080);
createdTime_ = 0L;
onChanged();
return this;
}
private long lastUpdatedTime_ ;
/**
* optional int64 last_updated_time = 11;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional int64 last_updated_time = 11;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
/**
* optional int64 last_updated_time = 11;
* @param value The lastUpdatedTime to set.
* @return This builder for chaining.
*/
public Builder setLastUpdatedTime(long value) {
bitField0_ |= 0x00000100;
lastUpdatedTime_ = value;
onChanged();
return this;
}
/**
* optional int64 last_updated_time = 11;
* @return This builder for chaining.
*/
public Builder clearLastUpdatedTime() {
bitField0_ = (bitField0_ & ~0x00000100);
lastUpdatedTime_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metadata_;
private com.google.protobuf.MapField
internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
private com.google.protobuf.MapField
internalGetMutableMetadata() {
onChanged();;
if (metadata_ == null) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
if (!metadata_.isMutable()) {
metadata_ = metadata_.copy();
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> metadata = 12;
*/
@java.lang.Override
public java.lang.String getMetadataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetadata() {
internalGetMutableMetadata().getMutableMap()
.clear();
return this;
}
/**
* map<string, string> metadata = 12;
*/
public Builder removeMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableMetadata().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMetadata() {
return internalGetMutableMetadata().getMutableMap();
}
/**
* map<string, string> metadata = 12;
*/
public Builder putMetadata(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableMetadata().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, string> metadata = 12;
*/
public Builder putAllMetadata(
java.util.Map values) {
internalGetMutableMetadata().getMutableMap()
.putAll(values);
return this;
}
private long dataSetId_ ;
/**
* optional int64 data_set_id = 13;
* @return Whether the dataSetId field is set.
*/
@java.lang.Override
public boolean hasDataSetId() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
* optional int64 data_set_id = 13;
* @return The dataSetId.
*/
@java.lang.Override
public long getDataSetId() {
return dataSetId_;
}
/**
* optional int64 data_set_id = 13;
* @param value The dataSetId to set.
* @return This builder for chaining.
*/
public Builder setDataSetId(long value) {
bitField0_ |= 0x00000400;
dataSetId_ = value;
onChanged();
return this;
}
/**
* optional int64 data_set_id = 13;
* @return This builder for chaining.
*/
public Builder clearDataSetId() {
bitField0_ = (bitField0_ & ~0x00000400);
dataSetId_ = 0L;
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.TimeseriesMetadata)
}
// @@protoc_insertion_point(class_scope:com.cognite.beam.proto.TimeseriesMetadata)
private static final com.cognite.client.dto.TimeseriesMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.cognite.client.dto.TimeseriesMetadata();
}
public static com.cognite.client.dto.TimeseriesMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TimeseriesMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TimeseriesMetadata(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.TimeseriesMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy