proto.com.cognite.client.dto.Event 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: event.proto
package com.cognite.client.dto;
/**
* Protobuf type {@code com.cognite.beam.proto.Event}
*/
public final class Event extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.cognite.beam.proto.Event)
EventOrBuilder {
private static final long serialVersionUID = 0L;
// Use Event.newBuilder() to construct.
private Event(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Event() {
externalId_ = "";
description_ = "";
type_ = "";
subtype_ = "";
assetIds_ = emptyLongList();
source_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Event();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Event(
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 24: {
bitField0_ |= 0x00000004;
startTime_ = input.readInt64();
break;
}
case 32: {
bitField0_ |= 0x00000008;
endTime_ = input.readInt64();
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
description_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
type_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
subtype_ = s;
break;
}
case 64: {
if (!((mutable_bitField0_ & 0x00000080) != 0)) {
assetIds_ = newLongList();
mutable_bitField0_ |= 0x00000080;
}
assetIds_.addLong(input.readInt64());
break;
}
case 66: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000080) != 0) && input.getBytesUntilLimit() > 0) {
assetIds_ = newLongList();
mutable_bitField0_ |= 0x00000080;
}
while (input.getBytesUntilLimit() > 0) {
assetIds_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 72: {
bitField0_ |= 0x00000080;
createdTime_ = input.readInt64();
break;
}
case 80: {
bitField0_ |= 0x00000100;
lastUpdatedTime_ = input.readInt64();
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000400) != 0)) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000400;
}
com.google.protobuf.MapEntry
metadata__ = input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metadata_.getMutableMap().put(
metadata__.getKey(), metadata__.getValue());
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
source_ = s;
break;
}
case 112: {
bitField0_ |= 0x00000400;
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_ & 0x00000080) != 0)) {
assetIds_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.EventOuterClass.internal_static_com_cognite_beam_proto_Event_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 11:
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.EventOuterClass.internal_static_com_cognite_beam_proto_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.Event.class, com.cognite.client.dto.Event.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 START_TIME_FIELD_NUMBER = 3;
private long startTime_;
/**
* optional int64 start_time = 3;
* @return Whether the startTime field is set.
*/
@java.lang.Override
public boolean hasStartTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int64 start_time = 3;
* @return The startTime.
*/
@java.lang.Override
public long getStartTime() {
return startTime_;
}
public static final int END_TIME_FIELD_NUMBER = 4;
private long endTime_;
/**
* optional int64 end_time = 4;
* @return Whether the endTime field is set.
*/
@java.lang.Override
public boolean hasEndTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional int64 end_time = 4;
* @return The endTime.
*/
@java.lang.Override
public long getEndTime() {
return endTime_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 5;
private volatile java.lang.Object description_;
/**
* optional string description = 5;
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string description = 5;
* @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 = 5;
* @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 TYPE_FIELD_NUMBER = 6;
private volatile java.lang.Object type_;
/**
* optional string type = 6;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional string type = 6;
* @return The type.
*/
@java.lang.Override
public java.lang.String getType() {
java.lang.Object ref = type_;
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();
type_ = s;
return s;
}
}
/**
* optional string type = 6;
* @return The bytes for type.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBTYPE_FIELD_NUMBER = 7;
private volatile java.lang.Object subtype_;
/**
* optional string subtype = 7;
* @return Whether the subtype field is set.
*/
@java.lang.Override
public boolean hasSubtype() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional string subtype = 7;
* @return The subtype.
*/
@java.lang.Override
public java.lang.String getSubtype() {
java.lang.Object ref = subtype_;
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();
subtype_ = s;
return s;
}
}
/**
* optional string subtype = 7;
* @return The bytes for subtype.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSubtypeBytes() {
java.lang.Object ref = subtype_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtype_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ASSET_IDS_FIELD_NUMBER = 8;
private com.google.protobuf.Internal.LongList assetIds_;
/**
* repeated int64 asset_ids = 8;
* @return A list containing the assetIds.
*/
@java.lang.Override
public java.util.List
getAssetIdsList() {
return assetIds_;
}
/**
* repeated int64 asset_ids = 8;
* @return The count of assetIds.
*/
public int getAssetIdsCount() {
return assetIds_.size();
}
/**
* repeated int64 asset_ids = 8;
* @param index The index of the element to return.
* @return The assetIds at the given index.
*/
public long getAssetIds(int index) {
return assetIds_.getLong(index);
}
private int assetIdsMemoizedSerializedSize = -1;
public static final int CREATED_TIME_FIELD_NUMBER = 9;
private long createdTime_;
/**
* optional int64 created_time = 9;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional int64 created_time = 9;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
public static final int LAST_UPDATED_TIME_FIELD_NUMBER = 10;
private long lastUpdatedTime_;
/**
* optional int64 last_updated_time = 10;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional int64 last_updated_time = 10;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
public static final int METADATA_FIELD_NUMBER = 11;
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.EventOuterClass.internal_static_com_cognite_beam_proto_Event_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 = 11;
*/
@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 = 11;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 11;
*/
@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 = 11;
*/
@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 SOURCE_FIELD_NUMBER = 13;
private volatile java.lang.Object source_;
/**
* optional string source = 13;
* @return Whether the source field is set.
*/
@java.lang.Override
public boolean hasSource() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
* optional string source = 13;
* @return The source.
*/
@java.lang.Override
public java.lang.String getSource() {
java.lang.Object ref = source_;
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();
source_ = s;
return s;
}
}
/**
* optional string source = 13;
* @return The bytes for source.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATA_SET_ID_FIELD_NUMBER = 14;
private long dataSetId_;
/**
* optional int64 data_set_id = 14;
* @return Whether the dataSetId field is set.
*/
@java.lang.Override
public boolean hasDataSetId() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
* optional int64 data_set_id = 14;
* @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)) {
output.writeInt64(3, startTime_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeInt64(4, endTime_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, type_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, subtype_);
}
if (getAssetIdsList().size() > 0) {
output.writeUInt32NoTag(66);
output.writeUInt32NoTag(assetIdsMemoizedSerializedSize);
}
for (int i = 0; i < assetIds_.size(); i++) {
output.writeInt64NoTag(assetIds_.getLong(i));
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeInt64(9, createdTime_);
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeInt64(10, lastUpdatedTime_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetadata(),
MetadataDefaultEntryHolder.defaultEntry,
11);
if (((bitField0_ & 0x00000200) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_);
}
if (((bitField0_ & 0x00000400) != 0)) {
output.writeInt64(14, 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.CodedOutputStream
.computeInt64Size(3, startTime_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, endTime_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, type_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, subtype_);
}
{
int dataSize = 0;
for (int i = 0; i < assetIds_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(assetIds_.getLong(i));
}
size += dataSize;
if (!getAssetIdsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
assetIdsMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, createdTime_);
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, 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(11, metadata__);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_);
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(14, 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.Event)) {
return super.equals(obj);
}
com.cognite.client.dto.Event other = (com.cognite.client.dto.Event) 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 (hasStartTime() != other.hasStartTime()) return false;
if (hasStartTime()) {
if (getStartTime()
!= other.getStartTime()) return false;
}
if (hasEndTime() != other.hasEndTime()) return false;
if (hasEndTime()) {
if (getEndTime()
!= other.getEndTime()) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (!getType()
.equals(other.getType())) return false;
}
if (hasSubtype() != other.hasSubtype()) return false;
if (hasSubtype()) {
if (!getSubtype()
.equals(other.getSubtype())) return false;
}
if (!getAssetIdsList()
.equals(other.getAssetIdsList())) 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 (hasSource() != other.hasSource()) return false;
if (hasSource()) {
if (!getSource()
.equals(other.getSource())) 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 (hasStartTime()) {
hash = (37 * hash) + START_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartTime());
}
if (hasEndTime()) {
hash = (37 * hash) + END_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEndTime());
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (hasSubtype()) {
hash = (37 * hash) + SUBTYPE_FIELD_NUMBER;
hash = (53 * hash) + getSubtype().hashCode();
}
if (getAssetIdsCount() > 0) {
hash = (37 * hash) + ASSET_IDS_FIELD_NUMBER;
hash = (53 * hash) + getAssetIdsList().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 (hasSource()) {
hash = (37 * hash) + SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getSource().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.Event parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.Event 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.Event parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.Event 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.Event parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.Event parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.Event parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.Event 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.Event parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.cognite.client.dto.Event 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.Event parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.Event 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.Event 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.beam.proto.Event}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.Event)
com.cognite.client.dto.EventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.EventOuterClass.internal_static_com_cognite_beam_proto_Event_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 11:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 11:
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.EventOuterClass.internal_static_com_cognite_beam_proto_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.Event.class, com.cognite.client.dto.Event.Builder.class);
}
// Construct using com.cognite.client.dto.Event.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);
startTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000004);
endTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000008);
description_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
type_ = "";
bitField0_ = (bitField0_ & ~0x00000020);
subtype_ = "";
bitField0_ = (bitField0_ & ~0x00000040);
assetIds_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000080);
createdTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000100);
lastUpdatedTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000200);
internalGetMutableMetadata().clear();
source_ = "";
bitField0_ = (bitField0_ & ~0x00000800);
dataSetId_ = 0L;
bitField0_ = (bitField0_ & ~0x00001000);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.cognite.client.dto.EventOuterClass.internal_static_com_cognite_beam_proto_Event_descriptor;
}
@java.lang.Override
public com.cognite.client.dto.Event getDefaultInstanceForType() {
return com.cognite.client.dto.Event.getDefaultInstance();
}
@java.lang.Override
public com.cognite.client.dto.Event build() {
com.cognite.client.dto.Event result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.cognite.client.dto.Event buildPartial() {
com.cognite.client.dto.Event result = new com.cognite.client.dto.Event(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)) {
result.startTime_ = startTime_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.endTime_ = endTime_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
to_bitField0_ |= 0x00000010;
}
result.description_ = description_;
if (((from_bitField0_ & 0x00000020) != 0)) {
to_bitField0_ |= 0x00000020;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000040) != 0)) {
to_bitField0_ |= 0x00000040;
}
result.subtype_ = subtype_;
if (((bitField0_ & 0x00000080) != 0)) {
assetIds_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000080);
}
result.assetIds_ = assetIds_;
if (((from_bitField0_ & 0x00000100) != 0)) {
result.createdTime_ = createdTime_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.lastUpdatedTime_ = lastUpdatedTime_;
to_bitField0_ |= 0x00000100;
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
if (((from_bitField0_ & 0x00000800) != 0)) {
to_bitField0_ |= 0x00000200;
}
result.source_ = source_;
if (((from_bitField0_ & 0x00001000) != 0)) {
result.dataSetId_ = dataSetId_;
to_bitField0_ |= 0x00000400;
}
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.Event) {
return mergeFrom((com.cognite.client.dto.Event)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.cognite.client.dto.Event other) {
if (other == com.cognite.client.dto.Event.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasExternalId()) {
bitField0_ |= 0x00000002;
externalId_ = other.externalId_;
onChanged();
}
if (other.hasStartTime()) {
setStartTime(other.getStartTime());
}
if (other.hasEndTime()) {
setEndTime(other.getEndTime());
}
if (other.hasDescription()) {
bitField0_ |= 0x00000010;
description_ = other.description_;
onChanged();
}
if (other.hasType()) {
bitField0_ |= 0x00000020;
type_ = other.type_;
onChanged();
}
if (other.hasSubtype()) {
bitField0_ |= 0x00000040;
subtype_ = other.subtype_;
onChanged();
}
if (!other.assetIds_.isEmpty()) {
if (assetIds_.isEmpty()) {
assetIds_ = other.assetIds_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureAssetIdsIsMutable();
assetIds_.addAll(other.assetIds_);
}
onChanged();
}
if (other.hasCreatedTime()) {
setCreatedTime(other.getCreatedTime());
}
if (other.hasLastUpdatedTime()) {
setLastUpdatedTime(other.getLastUpdatedTime());
}
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
if (other.hasSource()) {
bitField0_ |= 0x00000800;
source_ = other.source_;
onChanged();
}
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.Event parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.cognite.client.dto.Event) 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 long startTime_ ;
/**
* optional int64 start_time = 3;
* @return Whether the startTime field is set.
*/
@java.lang.Override
public boolean hasStartTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int64 start_time = 3;
* @return The startTime.
*/
@java.lang.Override
public long getStartTime() {
return startTime_;
}
/**
* optional int64 start_time = 3;
* @param value The startTime to set.
* @return This builder for chaining.
*/
public Builder setStartTime(long value) {
bitField0_ |= 0x00000004;
startTime_ = value;
onChanged();
return this;
}
/**
* optional int64 start_time = 3;
* @return This builder for chaining.
*/
public Builder clearStartTime() {
bitField0_ = (bitField0_ & ~0x00000004);
startTime_ = 0L;
onChanged();
return this;
}
private long endTime_ ;
/**
* optional int64 end_time = 4;
* @return Whether the endTime field is set.
*/
@java.lang.Override
public boolean hasEndTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional int64 end_time = 4;
* @return The endTime.
*/
@java.lang.Override
public long getEndTime() {
return endTime_;
}
/**
* optional int64 end_time = 4;
* @param value The endTime to set.
* @return This builder for chaining.
*/
public Builder setEndTime(long value) {
bitField0_ |= 0x00000008;
endTime_ = value;
onChanged();
return this;
}
/**
* optional int64 end_time = 4;
* @return This builder for chaining.
*/
public Builder clearEndTime() {
bitField0_ = (bitField0_ & ~0x00000008);
endTime_ = 0L;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* optional string description = 5;
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string description = 5;
* @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 = 5;
* @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 = 5;
* @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_ |= 0x00000010;
description_ = value;
onChanged();
return this;
}
/**
* optional string description = 5;
* @return This builder for chaining.
*/
public Builder clearDescription() {
bitField0_ = (bitField0_ & ~0x00000010);
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
* optional string description = 5;
* @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_ |= 0x00000010;
description_ = value;
onChanged();
return this;
}
private java.lang.Object type_ = "";
/**
* optional string type = 6;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional string type = 6;
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string type = 6;
* @return The bytes for type.
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string type = 6;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
type_ = value;
onChanged();
return this;
}
/**
* optional string type = 6;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000020);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
* optional string type = 6;
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000020;
type_ = value;
onChanged();
return this;
}
private java.lang.Object subtype_ = "";
/**
* optional string subtype = 7;
* @return Whether the subtype field is set.
*/
public boolean hasSubtype() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional string subtype = 7;
* @return The subtype.
*/
public java.lang.String getSubtype() {
java.lang.Object ref = subtype_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subtype_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string subtype = 7;
* @return The bytes for subtype.
*/
public com.google.protobuf.ByteString
getSubtypeBytes() {
java.lang.Object ref = subtype_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtype_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string subtype = 7;
* @param value The subtype to set.
* @return This builder for chaining.
*/
public Builder setSubtype(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
subtype_ = value;
onChanged();
return this;
}
/**
* optional string subtype = 7;
* @return This builder for chaining.
*/
public Builder clearSubtype() {
bitField0_ = (bitField0_ & ~0x00000040);
subtype_ = getDefaultInstance().getSubtype();
onChanged();
return this;
}
/**
* optional string subtype = 7;
* @param value The bytes for subtype to set.
* @return This builder for chaining.
*/
public Builder setSubtypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000040;
subtype_ = value;
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList assetIds_ = emptyLongList();
private void ensureAssetIdsIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
assetIds_ = mutableCopy(assetIds_);
bitField0_ |= 0x00000080;
}
}
/**
* repeated int64 asset_ids = 8;
* @return A list containing the assetIds.
*/
public java.util.List
getAssetIdsList() {
return ((bitField0_ & 0x00000080) != 0) ?
java.util.Collections.unmodifiableList(assetIds_) : assetIds_;
}
/**
* repeated int64 asset_ids = 8;
* @return The count of assetIds.
*/
public int getAssetIdsCount() {
return assetIds_.size();
}
/**
* repeated int64 asset_ids = 8;
* @param index The index of the element to return.
* @return The assetIds at the given index.
*/
public long getAssetIds(int index) {
return assetIds_.getLong(index);
}
/**
* repeated int64 asset_ids = 8;
* @param index The index to set the value at.
* @param value The assetIds to set.
* @return This builder for chaining.
*/
public Builder setAssetIds(
int index, long value) {
ensureAssetIdsIsMutable();
assetIds_.setLong(index, value);
onChanged();
return this;
}
/**
* repeated int64 asset_ids = 8;
* @param value The assetIds to add.
* @return This builder for chaining.
*/
public Builder addAssetIds(long value) {
ensureAssetIdsIsMutable();
assetIds_.addLong(value);
onChanged();
return this;
}
/**
* repeated int64 asset_ids = 8;
* @param values The assetIds to add.
* @return This builder for chaining.
*/
public Builder addAllAssetIds(
java.lang.Iterable extends java.lang.Long> values) {
ensureAssetIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, assetIds_);
onChanged();
return this;
}
/**
* repeated int64 asset_ids = 8;
* @return This builder for chaining.
*/
public Builder clearAssetIds() {
assetIds_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
private long createdTime_ ;
/**
* optional int64 created_time = 9;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional int64 created_time = 9;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
/**
* optional int64 created_time = 9;
* @param value The createdTime to set.
* @return This builder for chaining.
*/
public Builder setCreatedTime(long value) {
bitField0_ |= 0x00000100;
createdTime_ = value;
onChanged();
return this;
}
/**
* optional int64 created_time = 9;
* @return This builder for chaining.
*/
public Builder clearCreatedTime() {
bitField0_ = (bitField0_ & ~0x00000100);
createdTime_ = 0L;
onChanged();
return this;
}
private long lastUpdatedTime_ ;
/**
* optional int64 last_updated_time = 10;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
* optional int64 last_updated_time = 10;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
/**
* optional int64 last_updated_time = 10;
* @param value The lastUpdatedTime to set.
* @return This builder for chaining.
*/
public Builder setLastUpdatedTime(long value) {
bitField0_ |= 0x00000200;
lastUpdatedTime_ = value;
onChanged();
return this;
}
/**
* optional int64 last_updated_time = 10;
* @return This builder for chaining.
*/
public Builder clearLastUpdatedTime() {
bitField0_ = (bitField0_ & ~0x00000200);
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 = 11;
*/
@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 = 11;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 11;
*/
@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 = 11;
*/
@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 = 11;
*/
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 = 11;
*/
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 = 11;
*/
public Builder putAllMetadata(
java.util.Map values) {
internalGetMutableMetadata().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object source_ = "";
/**
* optional string source = 13;
* @return Whether the source field is set.
*/
public boolean hasSource() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
* optional string source = 13;
* @return The source.
*/
public java.lang.String getSource() {
java.lang.Object ref = source_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
source_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string source = 13;
* @return The bytes for source.
*/
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string source = 13;
* @param value The source to set.
* @return This builder for chaining.
*/
public Builder setSource(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000800;
source_ = value;
onChanged();
return this;
}
/**
* optional string source = 13;
* @return This builder for chaining.
*/
public Builder clearSource() {
bitField0_ = (bitField0_ & ~0x00000800);
source_ = getDefaultInstance().getSource();
onChanged();
return this;
}
/**
* optional string source = 13;
* @param value The bytes for source to set.
* @return This builder for chaining.
*/
public Builder setSourceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000800;
source_ = value;
onChanged();
return this;
}
private long dataSetId_ ;
/**
* optional int64 data_set_id = 14;
* @return Whether the dataSetId field is set.
*/
@java.lang.Override
public boolean hasDataSetId() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
* optional int64 data_set_id = 14;
* @return The dataSetId.
*/
@java.lang.Override
public long getDataSetId() {
return dataSetId_;
}
/**
* optional int64 data_set_id = 14;
* @param value The dataSetId to set.
* @return This builder for chaining.
*/
public Builder setDataSetId(long value) {
bitField0_ |= 0x00001000;
dataSetId_ = value;
onChanged();
return this;
}
/**
* optional int64 data_set_id = 14;
* @return This builder for chaining.
*/
public Builder clearDataSetId() {
bitField0_ = (bitField0_ & ~0x00001000);
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.Event)
}
// @@protoc_insertion_point(class_scope:com.cognite.beam.proto.Event)
private static final com.cognite.client.dto.Event DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.cognite.client.dto.Event();
}
public static com.cognite.client.dto.Event getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Event parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Event(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.Event getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy