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

org.tensorflow.framework.DeviceStepStats Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/step_stats.proto

package org.tensorflow.framework;

/**
 * Protobuf type {@code tensorflow.DeviceStepStats}
 */
public final class DeviceStepStats extends
    org.nd4j.shade.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.DeviceStepStats)
    DeviceStepStatsOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DeviceStepStats.newBuilder() to construct.
  private DeviceStepStats(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private DeviceStepStats() {
    device_ = "";
    nodeStats_ = java.util.Collections.emptyList();
  }

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

  @java.lang.Override
  public final org.nd4j.shade.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DeviceStepStats(
      org.nd4j.shade.protobuf.CodedInputStream input,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
        org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            device_ = s;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              nodeStats_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            nodeStats_.add(
                input.readMessage(org.tensorflow.framework.NodeExecStats.parser(), extensionRegistry));
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (org.nd4j.shade.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor;
  }

  @java.lang.Override
  protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.framework.DeviceStepStats.class, org.tensorflow.framework.DeviceStepStats.Builder.class);
  }

  public static final int DEVICE_FIELD_NUMBER = 1;
  private volatile java.lang.Object device_;
  /**
   * string device = 1;
   * @return The device.
   */
  @java.lang.Override
  public java.lang.String getDevice() {
    java.lang.Object ref = device_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      org.nd4j.shade.protobuf.ByteString bs = 
          (org.nd4j.shade.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      device_ = s;
      return s;
    }
  }
  /**
   * string device = 1;
   * @return The bytes for device.
   */
  @java.lang.Override
  public org.nd4j.shade.protobuf.ByteString
      getDeviceBytes() {
    java.lang.Object ref = device_;
    if (ref instanceof java.lang.String) {
      org.nd4j.shade.protobuf.ByteString b = 
          org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      device_ = b;
      return b;
    } else {
      return (org.nd4j.shade.protobuf.ByteString) ref;
    }
  }

  public static final int NODE_STATS_FIELD_NUMBER = 2;
  private java.util.List nodeStats_;
  /**
   * repeated .tensorflow.NodeExecStats node_stats = 2;
   */
  @java.lang.Override
  public java.util.List getNodeStatsList() {
    return nodeStats_;
  }
  /**
   * repeated .tensorflow.NodeExecStats node_stats = 2;
   */
  @java.lang.Override
  public java.util.List 
      getNodeStatsOrBuilderList() {
    return nodeStats_;
  }
  /**
   * repeated .tensorflow.NodeExecStats node_stats = 2;
   */
  @java.lang.Override
  public int getNodeStatsCount() {
    return nodeStats_.size();
  }
  /**
   * repeated .tensorflow.NodeExecStats node_stats = 2;
   */
  @java.lang.Override
  public org.tensorflow.framework.NodeExecStats getNodeStats(int index) {
    return nodeStats_.get(index);
  }
  /**
   * repeated .tensorflow.NodeExecStats node_stats = 2;
   */
  @java.lang.Override
  public org.tensorflow.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder(
      int index) {
    return nodeStats_.get(index);
  }

  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(org.nd4j.shade.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
      org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, device_);
    }
    for (int i = 0; i < nodeStats_.size(); i++) {
      output.writeMessage(2, nodeStats_.get(i));
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(device_)) {
      size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, device_);
    }
    for (int i = 0; i < nodeStats_.size(); i++) {
      size += org.nd4j.shade.protobuf.CodedOutputStream
        .computeMessageSize(2, nodeStats_.get(i));
    }
    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 org.tensorflow.framework.DeviceStepStats)) {
      return super.equals(obj);
    }
    org.tensorflow.framework.DeviceStepStats other = (org.tensorflow.framework.DeviceStepStats) obj;

    if (!getDevice()
        .equals(other.getDevice())) return false;
    if (!getNodeStatsList()
        .equals(other.getNodeStatsList())) 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();
    hash = (37 * hash) + DEVICE_FIELD_NUMBER;
    hash = (53 * hash) + getDevice().hashCode();
    if (getNodeStatsCount() > 0) {
      hash = (37 * hash) + NODE_STATS_FIELD_NUMBER;
      hash = (53 * hash) + getNodeStatsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      java.nio.ByteBuffer data)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      java.nio.ByteBuffer data,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      org.nd4j.shade.protobuf.ByteString data)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      org.nd4j.shade.protobuf.ByteString data,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(byte[] data)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      byte[] data,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return org.nd4j.shade.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      java.io.InputStream input,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return org.nd4j.shade.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tensorflow.framework.DeviceStepStats parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return org.nd4j.shade.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.framework.DeviceStepStats parseDelimitedFrom(
      java.io.InputStream input,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return org.nd4j.shade.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      org.nd4j.shade.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return org.nd4j.shade.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.framework.DeviceStepStats parseFrom(
      org.nd4j.shade.protobuf.CodedInputStream input,
      org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return org.nd4j.shade.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(org.tensorflow.framework.DeviceStepStats 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(
      org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code tensorflow.DeviceStepStats}
   */
  public static final class Builder extends
      org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:tensorflow.DeviceStepStats)
      org.tensorflow.framework.DeviceStepStatsOrBuilder {
    public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor;
    }

    @java.lang.Override
    protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.framework.DeviceStepStats.class, org.tensorflow.framework.DeviceStepStats.Builder.class);
    }

    // Construct using org.tensorflow.framework.DeviceStepStats.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (org.nd4j.shade.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getNodeStatsFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      device_ = "";

      if (nodeStatsBuilder_ == null) {
        nodeStats_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        nodeStatsBuilder_.clear();
      }
      return this;
    }

    @java.lang.Override
    public org.nd4j.shade.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_DeviceStepStats_descriptor;
    }

    @java.lang.Override
    public org.tensorflow.framework.DeviceStepStats getDefaultInstanceForType() {
      return org.tensorflow.framework.DeviceStepStats.getDefaultInstance();
    }

    @java.lang.Override
    public org.tensorflow.framework.DeviceStepStats build() {
      org.tensorflow.framework.DeviceStepStats result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tensorflow.framework.DeviceStepStats buildPartial() {
      org.tensorflow.framework.DeviceStepStats result = new org.tensorflow.framework.DeviceStepStats(this);
      int from_bitField0_ = bitField0_;
      result.device_ = device_;
      if (nodeStatsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          nodeStats_ = java.util.Collections.unmodifiableList(nodeStats_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.nodeStats_ = nodeStats_;
      } else {
        result.nodeStats_ = nodeStatsBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
      if (other instanceof org.tensorflow.framework.DeviceStepStats) {
        return mergeFrom((org.tensorflow.framework.DeviceStepStats)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.framework.DeviceStepStats other) {
      if (other == org.tensorflow.framework.DeviceStepStats.getDefaultInstance()) return this;
      if (!other.getDevice().isEmpty()) {
        device_ = other.device_;
        onChanged();
      }
      if (nodeStatsBuilder_ == null) {
        if (!other.nodeStats_.isEmpty()) {
          if (nodeStats_.isEmpty()) {
            nodeStats_ = other.nodeStats_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureNodeStatsIsMutable();
            nodeStats_.addAll(other.nodeStats_);
          }
          onChanged();
        }
      } else {
        if (!other.nodeStats_.isEmpty()) {
          if (nodeStatsBuilder_.isEmpty()) {
            nodeStatsBuilder_.dispose();
            nodeStatsBuilder_ = null;
            nodeStats_ = other.nodeStats_;
            bitField0_ = (bitField0_ & ~0x00000001);
            nodeStatsBuilder_ = 
              org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getNodeStatsFieldBuilder() : null;
          } else {
            nodeStatsBuilder_.addAllMessages(other.nodeStats_);
          }
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        org.nd4j.shade.protobuf.CodedInputStream input,
        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.tensorflow.framework.DeviceStepStats parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.framework.DeviceStepStats) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object device_ = "";
    /**
     * string device = 1;
     * @return The device.
     */
    public java.lang.String getDevice() {
      java.lang.Object ref = device_;
      if (!(ref instanceof java.lang.String)) {
        org.nd4j.shade.protobuf.ByteString bs =
            (org.nd4j.shade.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        device_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string device = 1;
     * @return The bytes for device.
     */
    public org.nd4j.shade.protobuf.ByteString
        getDeviceBytes() {
      java.lang.Object ref = device_;
      if (ref instanceof String) {
        org.nd4j.shade.protobuf.ByteString b = 
            org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        device_ = b;
        return b;
      } else {
        return (org.nd4j.shade.protobuf.ByteString) ref;
      }
    }
    /**
     * string device = 1;
     * @param value The device to set.
     * @return This builder for chaining.
     */
    public Builder setDevice(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      device_ = value;
      onChanged();
      return this;
    }
    /**
     * string device = 1;
     * @return This builder for chaining.
     */
    public Builder clearDevice() {
      
      device_ = getDefaultInstance().getDevice();
      onChanged();
      return this;
    }
    /**
     * string device = 1;
     * @param value The bytes for device to set.
     * @return This builder for chaining.
     */
    public Builder setDeviceBytes(
        org.nd4j.shade.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      device_ = value;
      onChanged();
      return this;
    }

    private java.util.List nodeStats_ =
      java.util.Collections.emptyList();
    private void ensureNodeStatsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        nodeStats_ = new java.util.ArrayList(nodeStats_);
        bitField0_ |= 0x00000001;
       }
    }

    private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder> nodeStatsBuilder_;

    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public java.util.List getNodeStatsList() {
      if (nodeStatsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(nodeStats_);
      } else {
        return nodeStatsBuilder_.getMessageList();
      }
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public int getNodeStatsCount() {
      if (nodeStatsBuilder_ == null) {
        return nodeStats_.size();
      } else {
        return nodeStatsBuilder_.getCount();
      }
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public org.tensorflow.framework.NodeExecStats getNodeStats(int index) {
      if (nodeStatsBuilder_ == null) {
        return nodeStats_.get(index);
      } else {
        return nodeStatsBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder setNodeStats(
        int index, org.tensorflow.framework.NodeExecStats value) {
      if (nodeStatsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeStatsIsMutable();
        nodeStats_.set(index, value);
        onChanged();
      } else {
        nodeStatsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder setNodeStats(
        int index, org.tensorflow.framework.NodeExecStats.Builder builderForValue) {
      if (nodeStatsBuilder_ == null) {
        ensureNodeStatsIsMutable();
        nodeStats_.set(index, builderForValue.build());
        onChanged();
      } else {
        nodeStatsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder addNodeStats(org.tensorflow.framework.NodeExecStats value) {
      if (nodeStatsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeStatsIsMutable();
        nodeStats_.add(value);
        onChanged();
      } else {
        nodeStatsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder addNodeStats(
        int index, org.tensorflow.framework.NodeExecStats value) {
      if (nodeStatsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodeStatsIsMutable();
        nodeStats_.add(index, value);
        onChanged();
      } else {
        nodeStatsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder addNodeStats(
        org.tensorflow.framework.NodeExecStats.Builder builderForValue) {
      if (nodeStatsBuilder_ == null) {
        ensureNodeStatsIsMutable();
        nodeStats_.add(builderForValue.build());
        onChanged();
      } else {
        nodeStatsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder addNodeStats(
        int index, org.tensorflow.framework.NodeExecStats.Builder builderForValue) {
      if (nodeStatsBuilder_ == null) {
        ensureNodeStatsIsMutable();
        nodeStats_.add(index, builderForValue.build());
        onChanged();
      } else {
        nodeStatsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder addAllNodeStats(
        java.lang.Iterable values) {
      if (nodeStatsBuilder_ == null) {
        ensureNodeStatsIsMutable();
        org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
            values, nodeStats_);
        onChanged();
      } else {
        nodeStatsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder clearNodeStats() {
      if (nodeStatsBuilder_ == null) {
        nodeStats_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        nodeStatsBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public Builder removeNodeStats(int index) {
      if (nodeStatsBuilder_ == null) {
        ensureNodeStatsIsMutable();
        nodeStats_.remove(index);
        onChanged();
      } else {
        nodeStatsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public org.tensorflow.framework.NodeExecStats.Builder getNodeStatsBuilder(
        int index) {
      return getNodeStatsFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public org.tensorflow.framework.NodeExecStatsOrBuilder getNodeStatsOrBuilder(
        int index) {
      if (nodeStatsBuilder_ == null) {
        return nodeStats_.get(index);  } else {
        return nodeStatsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public java.util.List 
         getNodeStatsOrBuilderList() {
      if (nodeStatsBuilder_ != null) {
        return nodeStatsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(nodeStats_);
      }
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public org.tensorflow.framework.NodeExecStats.Builder addNodeStatsBuilder() {
      return getNodeStatsFieldBuilder().addBuilder(
          org.tensorflow.framework.NodeExecStats.getDefaultInstance());
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public org.tensorflow.framework.NodeExecStats.Builder addNodeStatsBuilder(
        int index) {
      return getNodeStatsFieldBuilder().addBuilder(
          index, org.tensorflow.framework.NodeExecStats.getDefaultInstance());
    }
    /**
     * repeated .tensorflow.NodeExecStats node_stats = 2;
     */
    public java.util.List 
         getNodeStatsBuilderList() {
      return getNodeStatsFieldBuilder().getBuilderList();
    }
    private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder> 
        getNodeStatsFieldBuilder() {
      if (nodeStatsBuilder_ == null) {
        nodeStatsBuilder_ = new org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.framework.NodeExecStats, org.tensorflow.framework.NodeExecStats.Builder, org.tensorflow.framework.NodeExecStatsOrBuilder>(
                nodeStats_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        nodeStats_ = null;
      }
      return nodeStatsBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:tensorflow.DeviceStepStats)
  }

  // @@protoc_insertion_point(class_scope:tensorflow.DeviceStepStats)
  private static final org.tensorflow.framework.DeviceStepStats DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tensorflow.framework.DeviceStepStats();
  }

  public static org.tensorflow.framework.DeviceStepStats getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final org.nd4j.shade.protobuf.Parser
      PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
    @java.lang.Override
    public DeviceStepStats parsePartialFrom(
        org.nd4j.shade.protobuf.CodedInputStream input,
        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
        throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
      return new DeviceStepStats(input, extensionRegistry);
    }
  };

  public static org.nd4j.shade.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public org.nd4j.shade.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public org.tensorflow.framework.DeviceStepStats getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy