All Downloads are FREE. Search and download functionalities are using the official Maven repository.

proto.com.cognite.client.dto.Asset Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: asset.proto

package com.cognite.client.dto;

/**
 * Protobuf type {@code com.cognite.beam.proto.Asset}
 */
public final class Asset extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.cognite.beam.proto.Asset)
    AssetOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Asset.newBuilder() to construct.
  private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Asset() {
    externalId_ = "";
    name_ = "";
    parentExternalId_ = "";
    description_ = "";
    labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    source_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Asset();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Asset(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {
            bitField0_ |= 0x00000001;
            id_ = input.readInt64();
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000002;
            externalId_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000004;
            name_ = s;
            break;
          }
          case 32: {
            bitField0_ |= 0x00000008;
            parentId_ = input.readInt64();
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000010;
            parentExternalId_ = s;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000020;
            description_ = s;
            break;
          }
          case 56: {
            bitField0_ |= 0x00000040;
            rootId_ = input.readInt64();
            break;
          }
          case 64: {
            bitField0_ |= 0x00000080;
            createdTime_ = input.readInt64();
            break;
          }
          case 72: {
            bitField0_ |= 0x00000100;
            lastUpdatedTime_ = input.readInt64();
            break;
          }
          case 82: {
            if (!((mutable_bitField0_ & 0x00000200) != 0)) {
              metadata_ = com.google.protobuf.MapField.newMapField(
                  MetadataDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000200;
            }
            com.google.protobuf.MapEntry
            metadata__ = input.readMessage(
                MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            metadata_.getMutableMap().put(
                metadata__.getKey(), metadata__.getValue());
            break;
          }
          case 90: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000400) != 0)) {
              labels_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000400;
            }
            labels_.add(s);
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000200;
            source_ = s;
            break;
          }
          case 104: {
            bitField0_ |= 0x00000400;
            dataSetId_ = input.readInt64();
            break;
          }
          case 114: {
            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_ & 0x00000400) != 0)) {
        labels_ = labels_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_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.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.cognite.client.dto.Asset.class, com.cognite.client.dto.Asset.Builder.class);
  }

  public interface AggregatesOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.cognite.beam.proto.Asset.Aggregates)
      com.google.protobuf.MessageOrBuilder {

    /**
     * optional int32 child_count = 1;
     * @return Whether the childCount field is set.
     */
    boolean hasChildCount();
    /**
     * optional int32 child_count = 1;
     * @return The childCount.
     */
    int getChildCount();

    /**
     * optional int32 depth = 2;
     * @return Whether the depth field is set.
     */
    boolean hasDepth();
    /**
     * optional int32 depth = 2;
     * @return The depth.
     */
    int getDepth();

    /**
     * repeated int64 path = 3;
     * @return A list containing the path.
     */
    java.util.List getPathList();
    /**
     * repeated int64 path = 3;
     * @return The count of path.
     */
    int getPathCount();
    /**
     * repeated int64 path = 3;
     * @param index The index of the element to return.
     * @return The path at the given index.
     */
    long getPath(int index);
  }
  /**
   * Protobuf type {@code com.cognite.beam.proto.Asset.Aggregates}
   */
  public static final class Aggregates extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.cognite.beam.proto.Asset.Aggregates)
      AggregatesOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Aggregates.newBuilder() to construct.
    private Aggregates(com.google.protobuf.GeneratedMessageV3.Builder builder) {
      super(builder);
    }
    private Aggregates() {
      path_ = emptyLongList();
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new Aggregates();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Aggregates(
        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;
              childCount_ = input.readInt32();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              depth_ = input.readInt32();
              break;
            }
            case 24: {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                path_ = newLongList();
                mutable_bitField0_ |= 0x00000004;
              }
              path_.addLong(input.readInt64());
              break;
            }
            case 26: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
                path_ = newLongList();
                mutable_bitField0_ |= 0x00000004;
              }
              while (input.getBytesUntilLimit() > 0) {
                path_.addLong(input.readInt64());
              }
              input.popLimit(limit);
              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_ & 0x00000004) != 0)) {
          path_.makeImmutable(); // C
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_Aggregates_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_Aggregates_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.cognite.client.dto.Asset.Aggregates.class, com.cognite.client.dto.Asset.Aggregates.Builder.class);
    }

    private int bitField0_;
    public static final int CHILD_COUNT_FIELD_NUMBER = 1;
    private int childCount_;
    /**
     * optional int32 child_count = 1;
     * @return Whether the childCount field is set.
     */
    @java.lang.Override
    public boolean hasChildCount() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * optional int32 child_count = 1;
     * @return The childCount.
     */
    @java.lang.Override
    public int getChildCount() {
      return childCount_;
    }

    public static final int DEPTH_FIELD_NUMBER = 2;
    private int depth_;
    /**
     * optional int32 depth = 2;
     * @return Whether the depth field is set.
     */
    @java.lang.Override
    public boolean hasDepth() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * optional int32 depth = 2;
     * @return The depth.
     */
    @java.lang.Override
    public int getDepth() {
      return depth_;
    }

    public static final int PATH_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.LongList path_;
    /**
     * repeated int64 path = 3;
     * @return A list containing the path.
     */
    @java.lang.Override
    public java.util.List
        getPathList() {
      return path_;
    }
    /**
     * repeated int64 path = 3;
     * @return The count of path.
     */
    public int getPathCount() {
      return path_.size();
    }
    /**
     * repeated int64 path = 3;
     * @param index The index of the element to return.
     * @return The path at the given index.
     */
    public long getPath(int index) {
      return path_.getLong(index);
    }
    private int pathMemoizedSerializedSize = -1;

    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.writeInt32(1, childCount_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeInt32(2, depth_);
      }
      if (getPathList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(pathMemoizedSerializedSize);
      }
      for (int i = 0; i < path_.size(); i++) {
        output.writeInt64NoTag(path_.getLong(i));
      }
      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
          .computeInt32Size(1, childCount_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, depth_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < path_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt64SizeNoTag(path_.getLong(i));
        }
        size += dataSize;
        if (!getPathList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        pathMemoizedSerializedSize = dataSize;
      }
      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.Asset.Aggregates)) {
        return super.equals(obj);
      }
      com.cognite.client.dto.Asset.Aggregates other = (com.cognite.client.dto.Asset.Aggregates) obj;

      if (hasChildCount() != other.hasChildCount()) return false;
      if (hasChildCount()) {
        if (getChildCount()
            != other.getChildCount()) return false;
      }
      if (hasDepth() != other.hasDepth()) return false;
      if (hasDepth()) {
        if (getDepth()
            != other.getDepth()) return false;
      }
      if (!getPathList()
          .equals(other.getPathList())) 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 (hasChildCount()) {
        hash = (37 * hash) + CHILD_COUNT_FIELD_NUMBER;
        hash = (53 * hash) + getChildCount();
      }
      if (hasDepth()) {
        hash = (37 * hash) + DEPTH_FIELD_NUMBER;
        hash = (53 * hash) + getDepth();
      }
      if (getPathCount() > 0) {
        hash = (37 * hash) + PATH_FIELD_NUMBER;
        hash = (53 * hash) + getPathList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.cognite.client.dto.Asset.Aggregates parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.cognite.client.dto.Asset.Aggregates 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.Asset.Aggregates parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.cognite.client.dto.Asset.Aggregates 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.Asset.Aggregates parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.cognite.client.dto.Asset.Aggregates parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.cognite.client.dto.Asset.Aggregates parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.cognite.client.dto.Asset.Aggregates 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.Asset.Aggregates parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.cognite.client.dto.Asset.Aggregates 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.Asset.Aggregates parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.cognite.client.dto.Asset.Aggregates 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.Asset.Aggregates 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.Asset.Aggregates}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder implements
        // @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.Asset.Aggregates)
        com.cognite.client.dto.Asset.AggregatesOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_Aggregates_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_Aggregates_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.cognite.client.dto.Asset.Aggregates.class, com.cognite.client.dto.Asset.Aggregates.Builder.class);
      }

      // Construct using com.cognite.client.dto.Asset.Aggregates.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();
        childCount_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        depth_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        path_ = emptyLongList();
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_Aggregates_descriptor;
      }

      @java.lang.Override
      public com.cognite.client.dto.Asset.Aggregates getDefaultInstanceForType() {
        return com.cognite.client.dto.Asset.Aggregates.getDefaultInstance();
      }

      @java.lang.Override
      public com.cognite.client.dto.Asset.Aggregates build() {
        com.cognite.client.dto.Asset.Aggregates result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.cognite.client.dto.Asset.Aggregates buildPartial() {
        com.cognite.client.dto.Asset.Aggregates result = new com.cognite.client.dto.Asset.Aggregates(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.childCount_ = childCount_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.depth_ = depth_;
          to_bitField0_ |= 0x00000002;
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          path_.makeImmutable();
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.path_ = path_;
        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.Asset.Aggregates) {
          return mergeFrom((com.cognite.client.dto.Asset.Aggregates)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.cognite.client.dto.Asset.Aggregates other) {
        if (other == com.cognite.client.dto.Asset.Aggregates.getDefaultInstance()) return this;
        if (other.hasChildCount()) {
          setChildCount(other.getChildCount());
        }
        if (other.hasDepth()) {
          setDepth(other.getDepth());
        }
        if (!other.path_.isEmpty()) {
          if (path_.isEmpty()) {
            path_ = other.path_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensurePathIsMutable();
            path_.addAll(other.path_);
          }
          onChanged();
        }
        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.Asset.Aggregates parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.cognite.client.dto.Asset.Aggregates) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int childCount_ ;
      /**
       * optional int32 child_count = 1;
       * @return Whether the childCount field is set.
       */
      @java.lang.Override
      public boolean hasChildCount() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * optional int32 child_count = 1;
       * @return The childCount.
       */
      @java.lang.Override
      public int getChildCount() {
        return childCount_;
      }
      /**
       * optional int32 child_count = 1;
       * @param value The childCount to set.
       * @return This builder for chaining.
       */
      public Builder setChildCount(int value) {
        bitField0_ |= 0x00000001;
        childCount_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int32 child_count = 1;
       * @return This builder for chaining.
       */
      public Builder clearChildCount() {
        bitField0_ = (bitField0_ & ~0x00000001);
        childCount_ = 0;
        onChanged();
        return this;
      }

      private int depth_ ;
      /**
       * optional int32 depth = 2;
       * @return Whether the depth field is set.
       */
      @java.lang.Override
      public boolean hasDepth() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * optional int32 depth = 2;
       * @return The depth.
       */
      @java.lang.Override
      public int getDepth() {
        return depth_;
      }
      /**
       * optional int32 depth = 2;
       * @param value The depth to set.
       * @return This builder for chaining.
       */
      public Builder setDepth(int value) {
        bitField0_ |= 0x00000002;
        depth_ = value;
        onChanged();
        return this;
      }
      /**
       * optional int32 depth = 2;
       * @return This builder for chaining.
       */
      public Builder clearDepth() {
        bitField0_ = (bitField0_ & ~0x00000002);
        depth_ = 0;
        onChanged();
        return this;
      }

      private com.google.protobuf.Internal.LongList path_ = emptyLongList();
      private void ensurePathIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          path_ = mutableCopy(path_);
          bitField0_ |= 0x00000004;
         }
      }
      /**
       * repeated int64 path = 3;
       * @return A list containing the path.
       */
      public java.util.List
          getPathList() {
        return ((bitField0_ & 0x00000004) != 0) ?
                 java.util.Collections.unmodifiableList(path_) : path_;
      }
      /**
       * repeated int64 path = 3;
       * @return The count of path.
       */
      public int getPathCount() {
        return path_.size();
      }
      /**
       * repeated int64 path = 3;
       * @param index The index of the element to return.
       * @return The path at the given index.
       */
      public long getPath(int index) {
        return path_.getLong(index);
      }
      /**
       * repeated int64 path = 3;
       * @param index The index to set the value at.
       * @param value The path to set.
       * @return This builder for chaining.
       */
      public Builder setPath(
          int index, long value) {
        ensurePathIsMutable();
        path_.setLong(index, value);
        onChanged();
        return this;
      }
      /**
       * repeated int64 path = 3;
       * @param value The path to add.
       * @return This builder for chaining.
       */
      public Builder addPath(long value) {
        ensurePathIsMutable();
        path_.addLong(value);
        onChanged();
        return this;
      }
      /**
       * repeated int64 path = 3;
       * @param values The path to add.
       * @return This builder for chaining.
       */
      public Builder addAllPath(
          java.lang.Iterable values) {
        ensurePathIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, path_);
        onChanged();
        return this;
      }
      /**
       * repeated int64 path = 3;
       * @return This builder for chaining.
       */
      public Builder clearPath() {
        path_ = emptyLongList();
        bitField0_ = (bitField0_ & ~0x00000004);
        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.Asset.Aggregates)
    }

    // @@protoc_insertion_point(class_scope:com.cognite.beam.proto.Asset.Aggregates)
    private static final com.cognite.client.dto.Asset.Aggregates DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.cognite.client.dto.Asset.Aggregates();
    }

    public static com.cognite.client.dto.Asset.Aggregates getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public Aggregates parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Aggregates(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.Asset.Aggregates getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  public static final int ID_FIELD_NUMBER = 1;
  private long id_;
  /**
   * optional int64 id = 1;
   * @return Whether the id field is set.
   */
  @java.lang.Override
  public boolean hasId() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * optional int64 id = 1;
   * @return The id.
   */
  @java.lang.Override
  public long getId() {
    return id_;
  }

  public static final int EXTERNAL_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object externalId_;
  /**
   * optional string external_id = 2;
   * @return Whether the externalId field is set.
   */
  @java.lang.Override
  public boolean hasExternalId() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * optional string external_id = 2;
   * @return The externalId.
   */
  @java.lang.Override
  public java.lang.String getExternalId() {
    java.lang.Object ref = externalId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      externalId_ = s;
      return s;
    }
  }
  /**
   * optional string external_id = 2;
   * @return The bytes for externalId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getExternalIdBytes() {
    java.lang.Object ref = externalId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      externalId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object name_;
  /**
   * optional string name = 3;
   * @return Whether the name field is set.
   */
  @java.lang.Override
  public boolean hasName() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * optional string name = 3;
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * optional string name = 3;
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int 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_ & 0x00000008) != 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_ & 0x00000010) != 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_ & 0x00000020) != 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_ & 0x00000040) != 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_ & 0x00000080) != 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_ & 0x00000100) != 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.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_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_ & 0x00000200) != 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_ & 0x00000400) != 0);
  }
  /**
   * optional int64 data_set_id = 13;
   * @return The dataSetId.
   */
  @java.lang.Override
  public long getDataSetId() {
    return dataSetId_;
  }

  public static final int AGGREGATES_FIELD_NUMBER = 14;
  private com.cognite.client.dto.Asset.Aggregates aggregates_;
  /**
   * .com.cognite.beam.proto.Asset.Aggregates aggregates = 14;
   * @return Whether the aggregates field is set.
   */
  @java.lang.Override
  public boolean hasAggregates() {
    return aggregates_ != null;
  }
  /**
   * .com.cognite.beam.proto.Asset.Aggregates aggregates = 14;
   * @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 = 14;
   */
  @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 (((bitField0_ & 0x00000004) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeInt64(4, parentId_);
    }
    if (((bitField0_ & 0x00000010) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parentExternalId_);
    }
    if (((bitField0_ & 0x00000020) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
    }
    if (((bitField0_ & 0x00000040) != 0)) {
      output.writeInt64(7, rootId_);
    }
    if (((bitField0_ & 0x00000080) != 0)) {
      output.writeInt64(8, createdTime_);
    }
    if (((bitField0_ & 0x00000100) != 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_ & 0x00000200) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, source_);
    }
    if (((bitField0_ & 0x00000400) != 0)) {
      output.writeInt64(13, dataSetId_);
    }
    if (aggregates_ != null) {
      output.writeMessage(14, 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 (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(4, parentId_);
    }
    if (((bitField0_ & 0x00000010) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parentExternalId_);
    }
    if (((bitField0_ & 0x00000020) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
    }
    if (((bitField0_ & 0x00000040) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(7, rootId_);
    }
    if (((bitField0_ & 0x00000080) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(8, createdTime_);
    }
    if (((bitField0_ & 0x00000100) != 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_ & 0x00000200) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, source_);
    }
    if (((bitField0_ & 0x00000400) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(13, dataSetId_);
    }
    if (aggregates_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(14, 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.Asset)) {
      return super.equals(obj);
    }
    com.cognite.client.dto.Asset other = (com.cognite.client.dto.Asset) obj;

    if (hasId() != other.hasId()) return false;
    if (hasId()) {
      if (getId()
          != other.getId()) return false;
    }
    if (hasExternalId() != other.hasExternalId()) return false;
    if (hasExternalId()) {
      if (!getExternalId()
          .equals(other.getExternalId())) return false;
    }
    if (hasName() != other.hasName()) return false;
    if (hasName()) {
      if (!getName()
          .equals(other.getName())) return false;
    }
    if (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 (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();
    }
    if (hasName()) {
      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 (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.Asset parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.cognite.client.dto.Asset 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.Asset parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.cognite.client.dto.Asset 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.Asset parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.cognite.client.dto.Asset parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.cognite.client.dto.Asset parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.cognite.client.dto.Asset 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.Asset parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.cognite.client.dto.Asset 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.Asset parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.cognite.client.dto.Asset 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.Asset 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.Asset}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:com.cognite.beam.proto.Asset)
      com.cognite.client.dto.AssetOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.cognite.client.dto.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_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.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.cognite.client.dto.Asset.class, com.cognite.client.dto.Asset.Builder.class);
    }

    // Construct using com.cognite.client.dto.Asset.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      id_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000001);
      externalId_ = "";
      bitField0_ = (bitField0_ & ~0x00000002);
      name_ = "";
      bitField0_ = (bitField0_ & ~0x00000004);
      parentId_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000008);
      parentExternalId_ = "";
      bitField0_ = (bitField0_ & ~0x00000010);
      description_ = "";
      bitField0_ = (bitField0_ & ~0x00000020);
      rootId_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000040);
      createdTime_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000080);
      lastUpdatedTime_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000100);
      internalGetMutableMetadata().clear();
      labels_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000400);
      source_ = "";
      bitField0_ = (bitField0_ & ~0x00000800);
      dataSetId_ = 0L;
      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.AssetOuterClass.internal_static_com_cognite_beam_proto_Asset_descriptor;
    }

    @java.lang.Override
    public com.cognite.client.dto.Asset getDefaultInstanceForType() {
      return com.cognite.client.dto.Asset.getDefaultInstance();
    }

    @java.lang.Override
    public com.cognite.client.dto.Asset build() {
      com.cognite.client.dto.Asset result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.cognite.client.dto.Asset buildPartial() {
      com.cognite.client.dto.Asset result = new com.cognite.client.dto.Asset(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.id_ = id_;
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        to_bitField0_ |= 0x00000002;
      }
      result.externalId_ = externalId_;
      if (((from_bitField0_ & 0x00000004) != 0)) {
        to_bitField0_ |= 0x00000004;
      }
      result.name_ = name_;
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.parentId_ = parentId_;
        to_bitField0_ |= 0x00000008;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        to_bitField0_ |= 0x00000010;
      }
      result.parentExternalId_ = parentExternalId_;
      if (((from_bitField0_ & 0x00000020) != 0)) {
        to_bitField0_ |= 0x00000020;
      }
      result.description_ = description_;
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.rootId_ = rootId_;
        to_bitField0_ |= 0x00000040;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.createdTime_ = createdTime_;
        to_bitField0_ |= 0x00000080;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.lastUpdatedTime_ = lastUpdatedTime_;
        to_bitField0_ |= 0x00000100;
      }
      result.metadata_ = internalGetMetadata();
      result.metadata_.makeImmutable();
      if (((bitField0_ & 0x00000400) != 0)) {
        labels_ = labels_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000400);
      }
      result.labels_ = labels_;
      if (((from_bitField0_ & 0x00000800) != 0)) {
        to_bitField0_ |= 0x00000200;
      }
      result.source_ = source_;
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.dataSetId_ = dataSetId_;
        to_bitField0_ |= 0x00000400;
      }
      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.Asset) {
        return mergeFrom((com.cognite.client.dto.Asset)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.cognite.client.dto.Asset other) {
      if (other == com.cognite.client.dto.Asset.getDefaultInstance()) return this;
      if (other.hasId()) {
        setId(other.getId());
      }
      if (other.hasExternalId()) {
        bitField0_ |= 0x00000002;
        externalId_ = other.externalId_;
        onChanged();
      }
      if (other.hasName()) {
        bitField0_ |= 0x00000004;
        name_ = other.name_;
        onChanged();
      }
      if (other.hasParentId()) {
        setParentId(other.getParentId());
      }
      if (other.hasParentExternalId()) {
        bitField0_ |= 0x00000010;
        parentExternalId_ = other.parentExternalId_;
        onChanged();
      }
      if (other.hasDescription()) {
        bitField0_ |= 0x00000020;
        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_ & ~0x00000400);
        } else {
          ensureLabelsIsMutable();
          labels_.addAll(other.labels_);
        }
        onChanged();
      }
      if (other.hasSource()) {
        bitField0_ |= 0x00000800;
        source_ = other.source_;
        onChanged();
      }
      if (other.hasDataSetId()) {
        setDataSetId(other.getDataSetId());
      }
      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.Asset parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.cognite.client.dto.Asset) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private long id_ ;
    /**
     * optional int64 id = 1;
     * @return Whether the id field is set.
     */
    @java.lang.Override
    public boolean hasId() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * optional int64 id = 1;
     * @return The id.
     */
    @java.lang.Override
    public long getId() {
      return id_;
    }
    /**
     * optional int64 id = 1;
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(long value) {
      bitField0_ |= 0x00000001;
      id_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 id = 1;
     * @return This builder for chaining.
     */
    public Builder clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object externalId_ = "";
    /**
     * optional string external_id = 2;
     * @return Whether the externalId field is set.
     */
    public boolean hasExternalId() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * optional string external_id = 2;
     * @return The externalId.
     */
    public java.lang.String getExternalId() {
      java.lang.Object ref = externalId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        externalId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string external_id = 2;
     * @return The bytes for externalId.
     */
    public com.google.protobuf.ByteString
        getExternalIdBytes() {
      java.lang.Object ref = externalId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        externalId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string external_id = 2;
     * @param value The externalId to set.
     * @return This builder for chaining.
     */
    public Builder setExternalId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
      externalId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string external_id = 2;
     * @return This builder for chaining.
     */
    public Builder clearExternalId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      externalId_ = getDefaultInstance().getExternalId();
      onChanged();
      return this;
    }
    /**
     * optional string external_id = 2;
     * @param value The bytes for externalId to set.
     * @return This builder for chaining.
     */
    public Builder setExternalIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000002;
      externalId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * optional string name = 3;
     * @return Whether the name field is set.
     */
    public boolean hasName() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * optional string name = 3;
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string name = 3;
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string name = 3;
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string name = 3;
     * @return This builder for chaining.
     */
    public Builder clearName() {
      bitField0_ = (bitField0_ & ~0x00000004);
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * optional string name = 3;
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000004;
      name_ = value;
      onChanged();
      return this;
    }

    private long parentId_ ;
    /**
     * optional int64 parent_id = 4;
     * @return Whether the parentId field is set.
     */
    @java.lang.Override
    public boolean hasParentId() {
      return ((bitField0_ & 0x00000008) != 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_ |= 0x00000008;
      parentId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 parent_id = 4;
     * @return This builder for chaining.
     */
    public Builder clearParentId() {
      bitField0_ = (bitField0_ & ~0x00000008);
      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_ & 0x00000010) != 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_ |= 0x00000010;
      parentExternalId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string parent_external_id = 5;
     * @return This builder for chaining.
     */
    public Builder clearParentExternalId() {
      bitField0_ = (bitField0_ & ~0x00000010);
      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_ |= 0x00000010;
      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_ & 0x00000020) != 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_ |= 0x00000020;
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string description = 6;
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      bitField0_ = (bitField0_ & ~0x00000020);
      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_ |= 0x00000020;
      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_ & 0x00000040) != 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_ |= 0x00000040;
      rootId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 root_id = 7;
     * @return This builder for chaining.
     */
    public Builder clearRootId() {
      bitField0_ = (bitField0_ & ~0x00000040);
      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_ & 0x00000080) != 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_ |= 0x00000080;
      createdTime_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 created_time = 8;
     * @return This builder for chaining.
     */
    public Builder clearCreatedTime() {
      bitField0_ = (bitField0_ & ~0x00000080);
      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_ & 0x00000100) != 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_ |= 0x00000100;
      lastUpdatedTime_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 last_updated_time = 9;
     * @return This builder for chaining.
     */
    public Builder clearLastUpdatedTime() {
      bitField0_ = (bitField0_ & ~0x00000100);
      lastUpdatedTime_ = 0L;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> metadata_;
    private com.google.protobuf.MapField
    internalGetMetadata() {
      if (metadata_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            MetadataDefaultEntryHolder.defaultEntry);
      }
      return metadata_;
    }
    private com.google.protobuf.MapField
    internalGetMutableMetadata() {
      onChanged();;
      if (metadata_ == null) {
        metadata_ = com.google.protobuf.MapField.newMapField(
            MetadataDefaultEntryHolder.defaultEntry);
      }
      if (!metadata_.isMutable()) {
        metadata_ = metadata_.copy();
      }
      return metadata_;
    }

    public int getMetadataCount() {
      return internalGetMetadata().getMap().size();
    }
    /**
     * map<string, string> metadata = 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_ & 0x00000400) != 0)) {
        labels_ = new com.google.protobuf.LazyStringArrayList(labels_);
        bitField0_ |= 0x00000400;
       }
    }
    /**
     * 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_ & ~0x00000400);
      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_ & 0x00000800) != 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_ |= 0x00000800;
      source_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string source = 12;
     * @return This builder for chaining.
     */
    public Builder clearSource() {
      bitField0_ = (bitField0_ & ~0x00000800);
      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_ |= 0x00000800;
      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_ & 0x00001000) != 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_ |= 0x00001000;
      dataSetId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 data_set_id = 13;
     * @return This builder for chaining.
     */
    public Builder clearDataSetId() {
      bitField0_ = (bitField0_ & ~0x00001000);
      dataSetId_ = 0L;
      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 = 14;
     * @return Whether the aggregates field is set.
     */
    public boolean hasAggregates() {
      return aggregatesBuilder_ != null || aggregates_ != null;
    }
    /**
     * .com.cognite.beam.proto.Asset.Aggregates aggregates = 14;
     * @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 = 14;
     */
    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 = 14;
     */
    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 = 14;
     */
    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 = 14;
     */
    public Builder clearAggregates() {
      if (aggregatesBuilder_ == null) {
        aggregates_ = null;
        onChanged();
      } else {
        aggregates_ = null;
        aggregatesBuilder_ = null;
      }

      return this;
    }
    /**
     * .com.cognite.beam.proto.Asset.Aggregates aggregates = 14;
     */
    public com.cognite.client.dto.Asset.Aggregates.Builder getAggregatesBuilder() {
      
      onChanged();
      return getAggregatesFieldBuilder().getBuilder();
    }
    /**
     * .com.cognite.beam.proto.Asset.Aggregates aggregates = 14;
     */
    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 = 14;
     */
    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.Asset)
  }

  // @@protoc_insertion_point(class_scope:com.cognite.beam.proto.Asset)
  private static final com.cognite.client.dto.Asset DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.cognite.client.dto.Asset();
  }

  public static com.cognite.client.dto.Asset getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Asset parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new Asset(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.Asset getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy