proto.com.cognite.client.dto.AssetLookup 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: asset_lookup.proto
package com.cognite.client.dto;
/**
* Protobuf type {@code com.cognite.beam.proto.AssetLookup}
*/
public final class AssetLookup extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:com.cognite.beam.proto.AssetLookup)
AssetLookupOrBuilder {
private static final long serialVersionUID = 0L;
// Use AssetLookup.newBuilder() to construct.
private AssetLookup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AssetLookup() {
externalId_ = "";
name_ = "";
parentExternalId_ = "";
description_ = "";
labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
source_ = "";
rootName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AssetLookup();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AssetLookup(
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();
name_ = s;
break;
}
case 32: {
bitField0_ |= 0x00000004;
parentId_ = input.readInt64();
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
parentExternalId_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
description_ = s;
break;
}
case 56: {
bitField0_ |= 0x00000020;
rootId_ = input.readInt64();
break;
}
case 64: {
bitField0_ |= 0x00000040;
createdTime_ = input.readInt64();
break;
}
case 72: {
bitField0_ |= 0x00000080;
lastUpdatedTime_ = input.readInt64();
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000100) != 0)) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000100;
}
com.google.protobuf.MapEntry
metadata__ = input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metadata_.getMutableMap().put(
metadata__.getKey(), metadata__.getValue());
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000200) != 0)) {
labels_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000200;
}
labels_.add(s);
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
source_ = s;
break;
}
case 104: {
bitField0_ |= 0x00000200;
dataSetId_ = input.readInt64();
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
rootName_ = s;
break;
}
case 122: {
com.cognite.client.dto.Asset.Aggregates.Builder subBuilder = null;
if (aggregates_ != null) {
subBuilder = aggregates_.toBuilder();
}
aggregates_ = input.readMessage(com.cognite.client.dto.Asset.Aggregates.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(aggregates_);
aggregates_ = subBuilder.buildPartial();
}
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_ & 0x00000200) != 0)) {
labels_ = labels_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
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.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.AssetLookup.class, com.cognite.client.dto.AssetLookup.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_;
/**
* 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;
}
}
/**
* 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 PARENT_ID_FIELD_NUMBER = 4;
private long parentId_;
/**
* optional int64 parent_id = 4;
* @return Whether the parentId field is set.
*/
@java.lang.Override
public boolean hasParentId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int64 parent_id = 4;
* @return The parentId.
*/
@java.lang.Override
public long getParentId() {
return parentId_;
}
public static final int PARENT_EXTERNAL_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object parentExternalId_;
/**
* optional string parent_external_id = 5;
* @return Whether the parentExternalId field is set.
*/
@java.lang.Override
public boolean hasParentExternalId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string parent_external_id = 5;
* @return The parentExternalId.
*/
@java.lang.Override
public java.lang.String getParentExternalId() {
java.lang.Object ref = parentExternalId_;
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();
parentExternalId_ = s;
return s;
}
}
/**
* optional string parent_external_id = 5;
* @return The bytes for parentExternalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getParentExternalIdBytes() {
java.lang.Object ref = parentExternalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentExternalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 6;
private volatile java.lang.Object description_;
/**
* optional string description = 6;
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string description = 6;
* @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 = 6;
* @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 ROOT_ID_FIELD_NUMBER = 7;
private long rootId_;
/**
* optional int64 root_id = 7;
* @return Whether the rootId field is set.
*/
@java.lang.Override
public boolean hasRootId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional int64 root_id = 7;
* @return The rootId.
*/
@java.lang.Override
public long getRootId() {
return rootId_;
}
public static final int CREATED_TIME_FIELD_NUMBER = 8;
private long createdTime_;
/**
* optional int64 created_time = 8;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional int64 created_time = 8;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
public static final int LAST_UPDATED_TIME_FIELD_NUMBER = 9;
private long lastUpdatedTime_;
/**
* optional int64 last_updated_time = 9;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional int64 last_updated_time = 9;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
public static final int METADATA_FIELD_NUMBER = 10;
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.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_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 = 10;
*/
@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 = 10;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 10;
*/
@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 = 10;
*/
@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 LABELS_FIELD_NUMBER = 11;
private com.google.protobuf.LazyStringList labels_;
/**
* repeated string labels = 11;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
return labels_;
}
/**
* repeated string labels = 11;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
* repeated string labels = 11;
* @param index The index of the element to return.
* @return The labels at the given index.
*/
public java.lang.String getLabels(int index) {
return labels_.get(index);
}
/**
* repeated string labels = 11;
* @param index The index of the value to return.
* @return The bytes of the labels at the given index.
*/
public com.google.protobuf.ByteString
getLabelsBytes(int index) {
return labels_.getByteString(index);
}
public static final int SOURCE_FIELD_NUMBER = 12;
private volatile java.lang.Object source_;
/**
* optional string source = 12;
* @return Whether the source field is set.
*/
@java.lang.Override
public boolean hasSource() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional string source = 12;
* @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 = 12;
* @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 = 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_ & 0x00000200) != 0);
}
/**
* optional int64 data_set_id = 13;
* @return The dataSetId.
*/
@java.lang.Override
public long getDataSetId() {
return dataSetId_;
}
public static final int ROOT_NAME_FIELD_NUMBER = 14;
private volatile java.lang.Object rootName_;
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return Whether the rootName field is set.
*/
@java.lang.Override
public boolean hasRootName() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return The rootName.
*/
@java.lang.Override
public java.lang.String getRootName() {
java.lang.Object ref = rootName_;
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();
rootName_ = s;
return s;
}
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return The bytes for rootName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRootNameBytes() {
java.lang.Object ref = rootName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rootName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AGGREGATES_FIELD_NUMBER = 15;
private com.cognite.client.dto.Asset.Aggregates aggregates_;
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
* @return Whether the aggregates field is set.
*/
@java.lang.Override
public boolean hasAggregates() {
return aggregates_ != null;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
* @return The aggregates.
*/
@java.lang.Override
public com.cognite.client.dto.Asset.Aggregates getAggregates() {
return aggregates_ == null ? com.cognite.client.dto.Asset.Aggregates.getDefaultInstance() : aggregates_;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
@java.lang.Override
public com.cognite.client.dto.Asset.AggregatesOrBuilder getAggregatesOrBuilder() {
return getAggregates();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(1, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt64(4, parentId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parentExternalId_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeInt64(7, rootId_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeInt64(8, createdTime_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeInt64(9, lastUpdatedTime_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetadata(),
MetadataDefaultEntryHolder.defaultEntry,
10);
for (int i = 0; i < labels_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, labels_.getRaw(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, source_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeInt64(13, dataSetId_);
}
if (((bitField0_ & 0x00000400) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, rootName_);
}
if (aggregates_ != null) {
output.writeMessage(15, getAggregates());
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, parentId_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parentExternalId_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(7, rootId_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, createdTime_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, 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(10, metadata__);
}
{
int dataSize = 0;
for (int i = 0; i < labels_.size(); i++) {
dataSize += computeStringSizeNoTag(labels_.getRaw(i));
}
size += dataSize;
size += 1 * getLabelsList().size();
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, source_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, dataSetId_);
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, rootName_);
}
if (aggregates_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getAggregates());
}
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.AssetLookup)) {
return super.equals(obj);
}
com.cognite.client.dto.AssetLookup other = (com.cognite.client.dto.AssetLookup) 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 (!getName()
.equals(other.getName())) return false;
if (hasParentId() != other.hasParentId()) return false;
if (hasParentId()) {
if (getParentId()
!= other.getParentId()) return false;
}
if (hasParentExternalId() != other.hasParentExternalId()) return false;
if (hasParentExternalId()) {
if (!getParentExternalId()
.equals(other.getParentExternalId())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (hasRootId() != other.hasRootId()) return false;
if (hasRootId()) {
if (getRootId()
!= other.getRootId()) 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 (!getLabelsList()
.equals(other.getLabelsList())) 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 (hasRootName() != other.hasRootName()) return false;
if (hasRootName()) {
if (!getRootName()
.equals(other.getRootName())) return false;
}
if (hasAggregates() != other.hasAggregates()) return false;
if (hasAggregates()) {
if (!getAggregates()
.equals(other.getAggregates())) 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();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasParentId()) {
hash = (37 * hash) + PARENT_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getParentId());
}
if (hasParentExternalId()) {
hash = (37 * hash) + PARENT_EXTERNAL_ID_FIELD_NUMBER;
hash = (53 * hash) + getParentExternalId().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasRootId()) {
hash = (37 * hash) + ROOT_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRootId());
}
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 (getLabelsCount() > 0) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + getLabelsList().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());
}
if (hasRootName()) {
hash = (37 * hash) + ROOT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getRootName().hashCode();
}
if (hasAggregates()) {
hash = (37 * hash) + AGGREGATES_FIELD_NUMBER;
hash = (53 * hash) + getAggregates().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.cognite.client.dto.AssetLookup parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.AssetLookup 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.AssetLookup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.AssetLookup 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.AssetLookup parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.cognite.client.dto.AssetLookup parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.cognite.client.dto.AssetLookup parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.AssetLookup 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.AssetLookup parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.cognite.client.dto.AssetLookup 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.AssetLookup parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.cognite.client.dto.AssetLookup 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.AssetLookup 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.AssetLookup}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.AssetLookup)
com.cognite.client.dto.AssetLookupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.cognite.client.dto.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 10:
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.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.cognite.client.dto.AssetLookup.class, com.cognite.client.dto.AssetLookup.Builder.class);
}
// Construct using com.cognite.client.dto.AssetLookup.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_ = "";
parentId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000004);
parentExternalId_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
description_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
rootId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000020);
createdTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000040);
lastUpdatedTime_ = 0L;
bitField0_ = (bitField0_ & ~0x00000080);
internalGetMutableMetadata().clear();
labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
source_ = "";
bitField0_ = (bitField0_ & ~0x00000400);
dataSetId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000800);
rootName_ = "";
bitField0_ = (bitField0_ & ~0x00001000);
if (aggregatesBuilder_ == null) {
aggregates_ = null;
} else {
aggregates_ = null;
aggregatesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.cognite.client.dto.AssetLookupOuterClass.internal_static_com_cognite_beam_proto_AssetLookup_descriptor;
}
@java.lang.Override
public com.cognite.client.dto.AssetLookup getDefaultInstanceForType() {
return com.cognite.client.dto.AssetLookup.getDefaultInstance();
}
@java.lang.Override
public com.cognite.client.dto.AssetLookup build() {
com.cognite.client.dto.AssetLookup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.cognite.client.dto.AssetLookup buildPartial() {
com.cognite.client.dto.AssetLookup result = new com.cognite.client.dto.AssetLookup(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_;
result.name_ = name_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.parentId_ = parentId_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000008;
}
result.parentExternalId_ = parentExternalId_;
if (((from_bitField0_ & 0x00000010) != 0)) {
to_bitField0_ |= 0x00000010;
}
result.description_ = description_;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.rootId_ = rootId_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.createdTime_ = createdTime_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.lastUpdatedTime_ = lastUpdatedTime_;
to_bitField0_ |= 0x00000080;
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
if (((bitField0_ & 0x00000200) != 0)) {
labels_ = labels_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000200);
}
result.labels_ = labels_;
if (((from_bitField0_ & 0x00000400) != 0)) {
to_bitField0_ |= 0x00000100;
}
result.source_ = source_;
if (((from_bitField0_ & 0x00000800) != 0)) {
result.dataSetId_ = dataSetId_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
to_bitField0_ |= 0x00000400;
}
result.rootName_ = rootName_;
if (aggregatesBuilder_ == null) {
result.aggregates_ = aggregates_;
} else {
result.aggregates_ = aggregatesBuilder_.build();
}
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.AssetLookup) {
return mergeFrom((com.cognite.client.dto.AssetLookup)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.cognite.client.dto.AssetLookup other) {
if (other == com.cognite.client.dto.AssetLookup.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasExternalId()) {
bitField0_ |= 0x00000002;
externalId_ = other.externalId_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasParentId()) {
setParentId(other.getParentId());
}
if (other.hasParentExternalId()) {
bitField0_ |= 0x00000008;
parentExternalId_ = other.parentExternalId_;
onChanged();
}
if (other.hasDescription()) {
bitField0_ |= 0x00000010;
description_ = other.description_;
onChanged();
}
if (other.hasRootId()) {
setRootId(other.getRootId());
}
if (other.hasCreatedTime()) {
setCreatedTime(other.getCreatedTime());
}
if (other.hasLastUpdatedTime()) {
setLastUpdatedTime(other.getLastUpdatedTime());
}
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
if (other.hasSource()) {
bitField0_ |= 0x00000400;
source_ = other.source_;
onChanged();
}
if (other.hasDataSetId()) {
setDataSetId(other.getDataSetId());
}
if (other.hasRootName()) {
bitField0_ |= 0x00001000;
rootName_ = other.rootName_;
onChanged();
}
if (other.hasAggregates()) {
mergeAggregates(other.getAggregates());
}
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.AssetLookup parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.cognite.client.dto.AssetLookup) 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_ = "";
/**
* 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;
}
}
/**
* 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;
}
}
/**
* 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();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 3;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* 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);
name_ = value;
onChanged();
return this;
}
private long parentId_ ;
/**
* optional int64 parent_id = 4;
* @return Whether the parentId field is set.
*/
@java.lang.Override
public boolean hasParentId() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int64 parent_id = 4;
* @return The parentId.
*/
@java.lang.Override
public long getParentId() {
return parentId_;
}
/**
* optional int64 parent_id = 4;
* @param value The parentId to set.
* @return This builder for chaining.
*/
public Builder setParentId(long value) {
bitField0_ |= 0x00000004;
parentId_ = value;
onChanged();
return this;
}
/**
* optional int64 parent_id = 4;
* @return This builder for chaining.
*/
public Builder clearParentId() {
bitField0_ = (bitField0_ & ~0x00000004);
parentId_ = 0L;
onChanged();
return this;
}
private java.lang.Object parentExternalId_ = "";
/**
* optional string parent_external_id = 5;
* @return Whether the parentExternalId field is set.
*/
public boolean hasParentExternalId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string parent_external_id = 5;
* @return The parentExternalId.
*/
public java.lang.String getParentExternalId() {
java.lang.Object ref = parentExternalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parentExternalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string parent_external_id = 5;
* @return The bytes for parentExternalId.
*/
public com.google.protobuf.ByteString
getParentExternalIdBytes() {
java.lang.Object ref = parentExternalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentExternalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string parent_external_id = 5;
* @param value The parentExternalId to set.
* @return This builder for chaining.
*/
public Builder setParentExternalId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
parentExternalId_ = value;
onChanged();
return this;
}
/**
* optional string parent_external_id = 5;
* @return This builder for chaining.
*/
public Builder clearParentExternalId() {
bitField0_ = (bitField0_ & ~0x00000008);
parentExternalId_ = getDefaultInstance().getParentExternalId();
onChanged();
return this;
}
/**
* optional string parent_external_id = 5;
* @param value The bytes for parentExternalId to set.
* @return This builder for chaining.
*/
public Builder setParentExternalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000008;
parentExternalId_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* optional string description = 6;
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string description = 6;
* @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 = 6;
* @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 = 6;
* @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 = 6;
* @return This builder for chaining.
*/
public Builder clearDescription() {
bitField0_ = (bitField0_ & ~0x00000010);
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
* optional string description = 6;
* @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 long rootId_ ;
/**
* optional int64 root_id = 7;
* @return Whether the rootId field is set.
*/
@java.lang.Override
public boolean hasRootId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional int64 root_id = 7;
* @return The rootId.
*/
@java.lang.Override
public long getRootId() {
return rootId_;
}
/**
* optional int64 root_id = 7;
* @param value The rootId to set.
* @return This builder for chaining.
*/
public Builder setRootId(long value) {
bitField0_ |= 0x00000020;
rootId_ = value;
onChanged();
return this;
}
/**
* optional int64 root_id = 7;
* @return This builder for chaining.
*/
public Builder clearRootId() {
bitField0_ = (bitField0_ & ~0x00000020);
rootId_ = 0L;
onChanged();
return this;
}
private long createdTime_ ;
/**
* optional int64 created_time = 8;
* @return Whether the createdTime field is set.
*/
@java.lang.Override
public boolean hasCreatedTime() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional int64 created_time = 8;
* @return The createdTime.
*/
@java.lang.Override
public long getCreatedTime() {
return createdTime_;
}
/**
* optional int64 created_time = 8;
* @param value The createdTime to set.
* @return This builder for chaining.
*/
public Builder setCreatedTime(long value) {
bitField0_ |= 0x00000040;
createdTime_ = value;
onChanged();
return this;
}
/**
* optional int64 created_time = 8;
* @return This builder for chaining.
*/
public Builder clearCreatedTime() {
bitField0_ = (bitField0_ & ~0x00000040);
createdTime_ = 0L;
onChanged();
return this;
}
private long lastUpdatedTime_ ;
/**
* optional int64 last_updated_time = 9;
* @return Whether the lastUpdatedTime field is set.
*/
@java.lang.Override
public boolean hasLastUpdatedTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional int64 last_updated_time = 9;
* @return The lastUpdatedTime.
*/
@java.lang.Override
public long getLastUpdatedTime() {
return lastUpdatedTime_;
}
/**
* optional int64 last_updated_time = 9;
* @param value The lastUpdatedTime to set.
* @return This builder for chaining.
*/
public Builder setLastUpdatedTime(long value) {
bitField0_ |= 0x00000080;
lastUpdatedTime_ = value;
onChanged();
return this;
}
/**
* optional int64 last_updated_time = 9;
* @return This builder for chaining.
*/
public Builder clearLastUpdatedTime() {
bitField0_ = (bitField0_ & ~0x00000080);
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 = 10;
*/
@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 = 10;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
* map<string, string> metadata = 10;
*/
@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 = 10;
*/
@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 = 10;
*/
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 = 10;
*/
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 = 10;
*/
public Builder putAllMetadata(
java.util.Map values) {
internalGetMutableMetadata().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.LazyStringList labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureLabelsIsMutable() {
if (!((bitField0_ & 0x00000200) != 0)) {
labels_ = new com.google.protobuf.LazyStringArrayList(labels_);
bitField0_ |= 0x00000200;
}
}
/**
* repeated string labels = 11;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
return labels_.getUnmodifiableView();
}
/**
* repeated string labels = 11;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
* repeated string labels = 11;
* @param index The index of the element to return.
* @return The labels at the given index.
*/
public java.lang.String getLabels(int index) {
return labels_.get(index);
}
/**
* repeated string labels = 11;
* @param index The index of the value to return.
* @return The bytes of the labels at the given index.
*/
public com.google.protobuf.ByteString
getLabelsBytes(int index) {
return labels_.getByteString(index);
}
/**
* repeated string labels = 11;
* @param index The index to set the value at.
* @param value The labels to set.
* @return This builder for chaining.
*/
public Builder setLabels(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.set(index, value);
onChanged();
return this;
}
/**
* repeated string labels = 11;
* @param value The labels to add.
* @return This builder for chaining.
*/
public Builder addLabels(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(value);
onChanged();
return this;
}
/**
* repeated string labels = 11;
* @param values The labels to add.
* @return This builder for chaining.
*/
public Builder addAllLabels(
java.lang.Iterable values) {
ensureLabelsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labels_);
onChanged();
return this;
}
/**
* repeated string labels = 11;
* @return This builder for chaining.
*/
public Builder clearLabels() {
labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
* repeated string labels = 11;
* @param value The bytes of the labels to add.
* @return This builder for chaining.
*/
public Builder addLabelsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureLabelsIsMutable();
labels_.add(value);
onChanged();
return this;
}
private java.lang.Object source_ = "";
/**
* optional string source = 12;
* @return Whether the source field is set.
*/
public boolean hasSource() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
* optional string source = 12;
* @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 = 12;
* @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 = 12;
* @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_ |= 0x00000400;
source_ = value;
onChanged();
return this;
}
/**
* optional string source = 12;
* @return This builder for chaining.
*/
public Builder clearSource() {
bitField0_ = (bitField0_ & ~0x00000400);
source_ = getDefaultInstance().getSource();
onChanged();
return this;
}
/**
* optional string source = 12;
* @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_ |= 0x00000400;
source_ = value;
onChanged();
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_ & 0x00000800) != 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_ |= 0x00000800;
dataSetId_ = value;
onChanged();
return this;
}
/**
* optional int64 data_set_id = 13;
* @return This builder for chaining.
*/
public Builder clearDataSetId() {
bitField0_ = (bitField0_ & ~0x00000800);
dataSetId_ = 0L;
onChanged();
return this;
}
private java.lang.Object rootName_ = "";
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return Whether the rootName field is set.
*/
public boolean hasRootName() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return The rootName.
*/
public java.lang.String getRootName() {
java.lang.Object ref = rootName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rootName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return The bytes for rootName.
*/
public com.google.protobuf.ByteString
getRootNameBytes() {
java.lang.Object ref = rootName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rootName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @param value The rootName to set.
* @return This builder for chaining.
*/
public Builder setRootName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00001000;
rootName_ = value;
onChanged();
return this;
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @return This builder for chaining.
*/
public Builder clearRootName() {
bitField0_ = (bitField0_ & ~0x00001000);
rootName_ = getDefaultInstance().getRootName();
onChanged();
return this;
}
/**
*
* The name of the root asset node in the hierarchy.
*
*
* optional string root_name = 14;
* @param value The bytes for rootName to set.
* @return This builder for chaining.
*/
public Builder setRootNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00001000;
rootName_ = value;
onChanged();
return this;
}
private com.cognite.client.dto.Asset.Aggregates aggregates_;
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.client.dto.Asset.Aggregates, com.cognite.client.dto.Asset.Aggregates.Builder, com.cognite.client.dto.Asset.AggregatesOrBuilder> aggregatesBuilder_;
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
* @return Whether the aggregates field is set.
*/
public boolean hasAggregates() {
return aggregatesBuilder_ != null || aggregates_ != null;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
* @return The aggregates.
*/
public com.cognite.client.dto.Asset.Aggregates getAggregates() {
if (aggregatesBuilder_ == null) {
return aggregates_ == null ? com.cognite.client.dto.Asset.Aggregates.getDefaultInstance() : aggregates_;
} else {
return aggregatesBuilder_.getMessage();
}
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public Builder setAggregates(com.cognite.client.dto.Asset.Aggregates value) {
if (aggregatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregates_ = value;
onChanged();
} else {
aggregatesBuilder_.setMessage(value);
}
return this;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public Builder setAggregates(
com.cognite.client.dto.Asset.Aggregates.Builder builderForValue) {
if (aggregatesBuilder_ == null) {
aggregates_ = builderForValue.build();
onChanged();
} else {
aggregatesBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public Builder mergeAggregates(com.cognite.client.dto.Asset.Aggregates value) {
if (aggregatesBuilder_ == null) {
if (aggregates_ != null) {
aggregates_ =
com.cognite.client.dto.Asset.Aggregates.newBuilder(aggregates_).mergeFrom(value).buildPartial();
} else {
aggregates_ = value;
}
onChanged();
} else {
aggregatesBuilder_.mergeFrom(value);
}
return this;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public Builder clearAggregates() {
if (aggregatesBuilder_ == null) {
aggregates_ = null;
onChanged();
} else {
aggregates_ = null;
aggregatesBuilder_ = null;
}
return this;
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public com.cognite.client.dto.Asset.Aggregates.Builder getAggregatesBuilder() {
onChanged();
return getAggregatesFieldBuilder().getBuilder();
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
public com.cognite.client.dto.Asset.AggregatesOrBuilder getAggregatesOrBuilder() {
if (aggregatesBuilder_ != null) {
return aggregatesBuilder_.getMessageOrBuilder();
} else {
return aggregates_ == null ?
com.cognite.client.dto.Asset.Aggregates.getDefaultInstance() : aggregates_;
}
}
/**
* .com.cognite.beam.proto.Asset.Aggregates aggregates = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.cognite.client.dto.Asset.Aggregates, com.cognite.client.dto.Asset.Aggregates.Builder, com.cognite.client.dto.Asset.AggregatesOrBuilder>
getAggregatesFieldBuilder() {
if (aggregatesBuilder_ == null) {
aggregatesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.cognite.client.dto.Asset.Aggregates, com.cognite.client.dto.Asset.Aggregates.Builder, com.cognite.client.dto.Asset.AggregatesOrBuilder>(
getAggregates(),
getParentForChildren(),
isClean());
aggregates_ = null;
}
return aggregatesBuilder_;
}
@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.AssetLookup)
}
// @@protoc_insertion_point(class_scope:com.cognite.beam.proto.AssetLookup)
private static final com.cognite.client.dto.AssetLookup DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.cognite.client.dto.AssetLookup();
}
public static com.cognite.client.dto.AssetLookup getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AssetLookup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AssetLookup(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.AssetLookup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy