org.tensorflow.distruntime.RunGraphResponse Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/worker.proto
package org.tensorflow.distruntime;
/**
* Protobuf type {@code tensorflow.RunGraphResponse}
*/
public final class RunGraphResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.RunGraphResponse)
RunGraphResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use RunGraphResponse.newBuilder() to construct.
private RunGraphResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RunGraphResponse() {
recv_ = java.util.Collections.emptyList();
partitionGraph_ = java.util.Collections.emptyList();
statusCode_ = 0;
statusErrorMessage_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RunGraphResponse(
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 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
recv_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
recv_.add(
input.readMessage(org.tensorflow.framework.NamedTensorProto.parser(), extensionRegistry));
break;
}
case 18: {
org.tensorflow.framework.StepStats.Builder subBuilder = null;
if (stepStats_ != null) {
subBuilder = stepStats_.toBuilder();
}
stepStats_ = input.readMessage(org.tensorflow.framework.StepStats.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(stepStats_);
stepStats_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.tensorflow.framework.CostGraphDef.Builder subBuilder = null;
if (costGraph_ != null) {
subBuilder = costGraph_.toBuilder();
}
costGraph_ = input.readMessage(org.tensorflow.framework.CostGraphDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(costGraph_);
costGraph_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
partitionGraph_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
partitionGraph_.add(
input.readMessage(org.tensorflow.framework.GraphDef.parser(), extensionRegistry));
break;
}
case 40: {
int rawValue = input.readEnum();
statusCode_ = rawValue;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
statusErrorMessage_ = s;
break;
}
default: {
if (!parseUnknownFieldProto3(
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_ & 0x00000001) == 0x00000001)) {
recv_ = java.util.Collections.unmodifiableList(recv_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
partitionGraph_ = java.util.Collections.unmodifiableList(partitionGraph_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RunGraphResponse.class, org.tensorflow.distruntime.RunGraphResponse.Builder.class);
}
private int bitField0_;
public static final int RECV_FIELD_NUMBER = 1;
private java.util.List recv_;
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public java.util.List getRecvList() {
return recv_;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public java.util.List extends org.tensorflow.framework.NamedTensorProtoOrBuilder>
getRecvOrBuilderList() {
return recv_;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public int getRecvCount() {
return recv_.size();
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProto getRecv(int index) {
return recv_.get(index);
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProtoOrBuilder getRecvOrBuilder(
int index) {
return recv_.get(index);
}
public static final int STEP_STATS_FIELD_NUMBER = 2;
private org.tensorflow.framework.StepStats stepStats_;
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public boolean hasStepStats() {
return stepStats_ != null;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public org.tensorflow.framework.StepStats getStepStats() {
return stepStats_ == null ? org.tensorflow.framework.StepStats.getDefaultInstance() : stepStats_;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public org.tensorflow.framework.StepStatsOrBuilder getStepStatsOrBuilder() {
return getStepStats();
}
public static final int COST_GRAPH_FIELD_NUMBER = 3;
private org.tensorflow.framework.CostGraphDef costGraph_;
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public boolean hasCostGraph() {
return costGraph_ != null;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public org.tensorflow.framework.CostGraphDef getCostGraph() {
return costGraph_ == null ? org.tensorflow.framework.CostGraphDef.getDefaultInstance() : costGraph_;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public org.tensorflow.framework.CostGraphDefOrBuilder getCostGraphOrBuilder() {
return getCostGraph();
}
public static final int PARTITION_GRAPH_FIELD_NUMBER = 4;
private java.util.List partitionGraph_;
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public java.util.List getPartitionGraphList() {
return partitionGraph_;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public java.util.List extends org.tensorflow.framework.GraphDefOrBuilder>
getPartitionGraphOrBuilderList() {
return partitionGraph_;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public int getPartitionGraphCount() {
return partitionGraph_.size();
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDef getPartitionGraph(int index) {
return partitionGraph_.get(index);
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDefOrBuilder getPartitionGraphOrBuilder(
int index) {
return partitionGraph_.get(index);
}
public static final int STATUS_CODE_FIELD_NUMBER = 5;
private int statusCode_;
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public int getStatusCodeValue() {
return statusCode_;
}
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public org.tensorflow.framework.Code getStatusCode() {
@SuppressWarnings("deprecation")
org.tensorflow.framework.Code result = org.tensorflow.framework.Code.valueOf(statusCode_);
return result == null ? org.tensorflow.framework.Code.UNRECOGNIZED : result;
}
public static final int STATUS_ERROR_MESSAGE_FIELD_NUMBER = 6;
private volatile java.lang.Object statusErrorMessage_;
/**
* string status_error_message = 6;
*/
public java.lang.String getStatusErrorMessage() {
java.lang.Object ref = statusErrorMessage_;
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();
statusErrorMessage_ = s;
return s;
}
}
/**
* string status_error_message = 6;
*/
public com.google.protobuf.ByteString
getStatusErrorMessageBytes() {
java.lang.Object ref = statusErrorMessage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
statusErrorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 {
for (int i = 0; i < recv_.size(); i++) {
output.writeMessage(1, recv_.get(i));
}
if (stepStats_ != null) {
output.writeMessage(2, getStepStats());
}
if (costGraph_ != null) {
output.writeMessage(3, getCostGraph());
}
for (int i = 0; i < partitionGraph_.size(); i++) {
output.writeMessage(4, partitionGraph_.get(i));
}
if (statusCode_ != org.tensorflow.framework.Code.OK.getNumber()) {
output.writeEnum(5, statusCode_);
}
if (!getStatusErrorMessageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, statusErrorMessage_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < recv_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, recv_.get(i));
}
if (stepStats_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getStepStats());
}
if (costGraph_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCostGraph());
}
for (int i = 0; i < partitionGraph_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, partitionGraph_.get(i));
}
if (statusCode_ != org.tensorflow.framework.Code.OK.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, statusCode_);
}
if (!getStatusErrorMessageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, statusErrorMessage_);
}
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.distruntime.RunGraphResponse)) {
return super.equals(obj);
}
org.tensorflow.distruntime.RunGraphResponse other = (org.tensorflow.distruntime.RunGraphResponse) obj;
boolean result = true;
result = result && getRecvList()
.equals(other.getRecvList());
result = result && (hasStepStats() == other.hasStepStats());
if (hasStepStats()) {
result = result && getStepStats()
.equals(other.getStepStats());
}
result = result && (hasCostGraph() == other.hasCostGraph());
if (hasCostGraph()) {
result = result && getCostGraph()
.equals(other.getCostGraph());
}
result = result && getPartitionGraphList()
.equals(other.getPartitionGraphList());
result = result && statusCode_ == other.statusCode_;
result = result && getStatusErrorMessage()
.equals(other.getStatusErrorMessage());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getRecvCount() > 0) {
hash = (37 * hash) + RECV_FIELD_NUMBER;
hash = (53 * hash) + getRecvList().hashCode();
}
if (hasStepStats()) {
hash = (37 * hash) + STEP_STATS_FIELD_NUMBER;
hash = (53 * hash) + getStepStats().hashCode();
}
if (hasCostGraph()) {
hash = (37 * hash) + COST_GRAPH_FIELD_NUMBER;
hash = (53 * hash) + getCostGraph().hashCode();
}
if (getPartitionGraphCount() > 0) {
hash = (37 * hash) + PARTITION_GRAPH_FIELD_NUMBER;
hash = (53 * hash) + getPartitionGraphList().hashCode();
}
hash = (37 * hash) + STATUS_CODE_FIELD_NUMBER;
hash = (53 * hash) + statusCode_;
hash = (37 * hash) + STATUS_ERROR_MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getStatusErrorMessage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.distruntime.RunGraphResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphResponse 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 org.tensorflow.distruntime.RunGraphResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphResponse 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 org.tensorflow.distruntime.RunGraphResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphResponse 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(org.tensorflow.distruntime.RunGraphResponse 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 tensorflow.RunGraphResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.RunGraphResponse)
org.tensorflow.distruntime.RunGraphResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RunGraphResponse.class, org.tensorflow.distruntime.RunGraphResponse.Builder.class);
}
// Construct using org.tensorflow.distruntime.RunGraphResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRecvFieldBuilder();
getPartitionGraphFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (recvBuilder_ == null) {
recv_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
recvBuilder_.clear();
}
if (stepStatsBuilder_ == null) {
stepStats_ = null;
} else {
stepStats_ = null;
stepStatsBuilder_ = null;
}
if (costGraphBuilder_ == null) {
costGraph_ = null;
} else {
costGraph_ = null;
costGraphBuilder_ = null;
}
if (partitionGraphBuilder_ == null) {
partitionGraph_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
partitionGraphBuilder_.clear();
}
statusCode_ = 0;
statusErrorMessage_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphResponse_descriptor;
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphResponse getDefaultInstanceForType() {
return org.tensorflow.distruntime.RunGraphResponse.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphResponse build() {
org.tensorflow.distruntime.RunGraphResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphResponse buildPartial() {
org.tensorflow.distruntime.RunGraphResponse result = new org.tensorflow.distruntime.RunGraphResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (recvBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
recv_ = java.util.Collections.unmodifiableList(recv_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.recv_ = recv_;
} else {
result.recv_ = recvBuilder_.build();
}
if (stepStatsBuilder_ == null) {
result.stepStats_ = stepStats_;
} else {
result.stepStats_ = stepStatsBuilder_.build();
}
if (costGraphBuilder_ == null) {
result.costGraph_ = costGraph_;
} else {
result.costGraph_ = costGraphBuilder_.build();
}
if (partitionGraphBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
partitionGraph_ = java.util.Collections.unmodifiableList(partitionGraph_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.partitionGraph_ = partitionGraph_;
} else {
result.partitionGraph_ = partitionGraphBuilder_.build();
}
result.statusCode_ = statusCode_;
result.statusErrorMessage_ = statusErrorMessage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.distruntime.RunGraphResponse) {
return mergeFrom((org.tensorflow.distruntime.RunGraphResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.distruntime.RunGraphResponse other) {
if (other == org.tensorflow.distruntime.RunGraphResponse.getDefaultInstance()) return this;
if (recvBuilder_ == null) {
if (!other.recv_.isEmpty()) {
if (recv_.isEmpty()) {
recv_ = other.recv_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRecvIsMutable();
recv_.addAll(other.recv_);
}
onChanged();
}
} else {
if (!other.recv_.isEmpty()) {
if (recvBuilder_.isEmpty()) {
recvBuilder_.dispose();
recvBuilder_ = null;
recv_ = other.recv_;
bitField0_ = (bitField0_ & ~0x00000001);
recvBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRecvFieldBuilder() : null;
} else {
recvBuilder_.addAllMessages(other.recv_);
}
}
}
if (other.hasStepStats()) {
mergeStepStats(other.getStepStats());
}
if (other.hasCostGraph()) {
mergeCostGraph(other.getCostGraph());
}
if (partitionGraphBuilder_ == null) {
if (!other.partitionGraph_.isEmpty()) {
if (partitionGraph_.isEmpty()) {
partitionGraph_ = other.partitionGraph_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensurePartitionGraphIsMutable();
partitionGraph_.addAll(other.partitionGraph_);
}
onChanged();
}
} else {
if (!other.partitionGraph_.isEmpty()) {
if (partitionGraphBuilder_.isEmpty()) {
partitionGraphBuilder_.dispose();
partitionGraphBuilder_ = null;
partitionGraph_ = other.partitionGraph_;
bitField0_ = (bitField0_ & ~0x00000008);
partitionGraphBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPartitionGraphFieldBuilder() : null;
} else {
partitionGraphBuilder_.addAllMessages(other.partitionGraph_);
}
}
}
if (other.statusCode_ != 0) {
setStatusCodeValue(other.getStatusCodeValue());
}
if (!other.getStatusErrorMessage().isEmpty()) {
statusErrorMessage_ = other.statusErrorMessage_;
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 {
org.tensorflow.distruntime.RunGraphResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.distruntime.RunGraphResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List recv_ =
java.util.Collections.emptyList();
private void ensureRecvIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
recv_ = new java.util.ArrayList(recv_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder> recvBuilder_;
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public java.util.List getRecvList() {
if (recvBuilder_ == null) {
return java.util.Collections.unmodifiableList(recv_);
} else {
return recvBuilder_.getMessageList();
}
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public int getRecvCount() {
if (recvBuilder_ == null) {
return recv_.size();
} else {
return recvBuilder_.getCount();
}
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProto getRecv(int index) {
if (recvBuilder_ == null) {
return recv_.get(index);
} else {
return recvBuilder_.getMessage(index);
}
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder setRecv(
int index, org.tensorflow.framework.NamedTensorProto value) {
if (recvBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRecvIsMutable();
recv_.set(index, value);
onChanged();
} else {
recvBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder setRecv(
int index, org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (recvBuilder_ == null) {
ensureRecvIsMutable();
recv_.set(index, builderForValue.build());
onChanged();
} else {
recvBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder addRecv(org.tensorflow.framework.NamedTensorProto value) {
if (recvBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRecvIsMutable();
recv_.add(value);
onChanged();
} else {
recvBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder addRecv(
int index, org.tensorflow.framework.NamedTensorProto value) {
if (recvBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRecvIsMutable();
recv_.add(index, value);
onChanged();
} else {
recvBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder addRecv(
org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (recvBuilder_ == null) {
ensureRecvIsMutable();
recv_.add(builderForValue.build());
onChanged();
} else {
recvBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder addRecv(
int index, org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (recvBuilder_ == null) {
ensureRecvIsMutable();
recv_.add(index, builderForValue.build());
onChanged();
} else {
recvBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder addAllRecv(
java.lang.Iterable extends org.tensorflow.framework.NamedTensorProto> values) {
if (recvBuilder_ == null) {
ensureRecvIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, recv_);
onChanged();
} else {
recvBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder clearRecv() {
if (recvBuilder_ == null) {
recv_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
recvBuilder_.clear();
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public Builder removeRecv(int index) {
if (recvBuilder_ == null) {
ensureRecvIsMutable();
recv_.remove(index);
onChanged();
} else {
recvBuilder_.remove(index);
}
return this;
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProto.Builder getRecvBuilder(
int index) {
return getRecvFieldBuilder().getBuilder(index);
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProtoOrBuilder getRecvOrBuilder(
int index) {
if (recvBuilder_ == null) {
return recv_.get(index); } else {
return recvBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public java.util.List extends org.tensorflow.framework.NamedTensorProtoOrBuilder>
getRecvOrBuilderList() {
if (recvBuilder_ != null) {
return recvBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(recv_);
}
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProto.Builder addRecvBuilder() {
return getRecvFieldBuilder().addBuilder(
org.tensorflow.framework.NamedTensorProto.getDefaultInstance());
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public org.tensorflow.framework.NamedTensorProto.Builder addRecvBuilder(
int index) {
return getRecvFieldBuilder().addBuilder(
index, org.tensorflow.framework.NamedTensorProto.getDefaultInstance());
}
/**
*
* A list of tensors corresponding to those requested by
* `RunGraphRequest.recv_key`.
*
*
* repeated .tensorflow.NamedTensorProto recv = 1;
*/
public java.util.List
getRecvBuilderList() {
return getRecvFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder>
getRecvFieldBuilder() {
if (recvBuilder_ == null) {
recvBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder>(
recv_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
recv_ = null;
}
return recvBuilder_;
}
private org.tensorflow.framework.StepStats stepStats_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.StepStats, org.tensorflow.framework.StepStats.Builder, org.tensorflow.framework.StepStatsOrBuilder> stepStatsBuilder_;
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public boolean hasStepStats() {
return stepStatsBuilder_ != null || stepStats_ != null;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public org.tensorflow.framework.StepStats getStepStats() {
if (stepStatsBuilder_ == null) {
return stepStats_ == null ? org.tensorflow.framework.StepStats.getDefaultInstance() : stepStats_;
} else {
return stepStatsBuilder_.getMessage();
}
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public Builder setStepStats(org.tensorflow.framework.StepStats value) {
if (stepStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
stepStats_ = value;
onChanged();
} else {
stepStatsBuilder_.setMessage(value);
}
return this;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public Builder setStepStats(
org.tensorflow.framework.StepStats.Builder builderForValue) {
if (stepStatsBuilder_ == null) {
stepStats_ = builderForValue.build();
onChanged();
} else {
stepStatsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public Builder mergeStepStats(org.tensorflow.framework.StepStats value) {
if (stepStatsBuilder_ == null) {
if (stepStats_ != null) {
stepStats_ =
org.tensorflow.framework.StepStats.newBuilder(stepStats_).mergeFrom(value).buildPartial();
} else {
stepStats_ = value;
}
onChanged();
} else {
stepStatsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public Builder clearStepStats() {
if (stepStatsBuilder_ == null) {
stepStats_ = null;
onChanged();
} else {
stepStats_ = null;
stepStatsBuilder_ = null;
}
return this;
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public org.tensorflow.framework.StepStats.Builder getStepStatsBuilder() {
onChanged();
return getStepStatsFieldBuilder().getBuilder();
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
public org.tensorflow.framework.StepStatsOrBuilder getStepStatsOrBuilder() {
if (stepStatsBuilder_ != null) {
return stepStatsBuilder_.getMessageOrBuilder();
} else {
return stepStats_ == null ?
org.tensorflow.framework.StepStats.getDefaultInstance() : stepStats_;
}
}
/**
*
* If the request asked for execution stats, the cost graph, or the partition
* graphs, these are returned here.
* TODO(suharshs): Package these in a RunMetadata instead.
*
*
* .tensorflow.StepStats step_stats = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.StepStats, org.tensorflow.framework.StepStats.Builder, org.tensorflow.framework.StepStatsOrBuilder>
getStepStatsFieldBuilder() {
if (stepStatsBuilder_ == null) {
stepStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.StepStats, org.tensorflow.framework.StepStats.Builder, org.tensorflow.framework.StepStatsOrBuilder>(
getStepStats(),
getParentForChildren(),
isClean());
stepStats_ = null;
}
return stepStatsBuilder_;
}
private org.tensorflow.framework.CostGraphDef costGraph_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.CostGraphDef, org.tensorflow.framework.CostGraphDef.Builder, org.tensorflow.framework.CostGraphDefOrBuilder> costGraphBuilder_;
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public boolean hasCostGraph() {
return costGraphBuilder_ != null || costGraph_ != null;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public org.tensorflow.framework.CostGraphDef getCostGraph() {
if (costGraphBuilder_ == null) {
return costGraph_ == null ? org.tensorflow.framework.CostGraphDef.getDefaultInstance() : costGraph_;
} else {
return costGraphBuilder_.getMessage();
}
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public Builder setCostGraph(org.tensorflow.framework.CostGraphDef value) {
if (costGraphBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
costGraph_ = value;
onChanged();
} else {
costGraphBuilder_.setMessage(value);
}
return this;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public Builder setCostGraph(
org.tensorflow.framework.CostGraphDef.Builder builderForValue) {
if (costGraphBuilder_ == null) {
costGraph_ = builderForValue.build();
onChanged();
} else {
costGraphBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public Builder mergeCostGraph(org.tensorflow.framework.CostGraphDef value) {
if (costGraphBuilder_ == null) {
if (costGraph_ != null) {
costGraph_ =
org.tensorflow.framework.CostGraphDef.newBuilder(costGraph_).mergeFrom(value).buildPartial();
} else {
costGraph_ = value;
}
onChanged();
} else {
costGraphBuilder_.mergeFrom(value);
}
return this;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public Builder clearCostGraph() {
if (costGraphBuilder_ == null) {
costGraph_ = null;
onChanged();
} else {
costGraph_ = null;
costGraphBuilder_ = null;
}
return this;
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public org.tensorflow.framework.CostGraphDef.Builder getCostGraphBuilder() {
onChanged();
return getCostGraphFieldBuilder().getBuilder();
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
public org.tensorflow.framework.CostGraphDefOrBuilder getCostGraphOrBuilder() {
if (costGraphBuilder_ != null) {
return costGraphBuilder_.getMessageOrBuilder();
} else {
return costGraph_ == null ?
org.tensorflow.framework.CostGraphDef.getDefaultInstance() : costGraph_;
}
}
/**
* .tensorflow.CostGraphDef cost_graph = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.CostGraphDef, org.tensorflow.framework.CostGraphDef.Builder, org.tensorflow.framework.CostGraphDefOrBuilder>
getCostGraphFieldBuilder() {
if (costGraphBuilder_ == null) {
costGraphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.CostGraphDef, org.tensorflow.framework.CostGraphDef.Builder, org.tensorflow.framework.CostGraphDefOrBuilder>(
getCostGraph(),
getParentForChildren(),
isClean());
costGraph_ = null;
}
return costGraphBuilder_;
}
private java.util.List partitionGraph_ =
java.util.Collections.emptyList();
private void ensurePartitionGraphIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
partitionGraph_ = new java.util.ArrayList(partitionGraph_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder> partitionGraphBuilder_;
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public java.util.List getPartitionGraphList() {
if (partitionGraphBuilder_ == null) {
return java.util.Collections.unmodifiableList(partitionGraph_);
} else {
return partitionGraphBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public int getPartitionGraphCount() {
if (partitionGraphBuilder_ == null) {
return partitionGraph_.size();
} else {
return partitionGraphBuilder_.getCount();
}
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDef getPartitionGraph(int index) {
if (partitionGraphBuilder_ == null) {
return partitionGraph_.get(index);
} else {
return partitionGraphBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder setPartitionGraph(
int index, org.tensorflow.framework.GraphDef value) {
if (partitionGraphBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionGraphIsMutable();
partitionGraph_.set(index, value);
onChanged();
} else {
partitionGraphBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder setPartitionGraph(
int index, org.tensorflow.framework.GraphDef.Builder builderForValue) {
if (partitionGraphBuilder_ == null) {
ensurePartitionGraphIsMutable();
partitionGraph_.set(index, builderForValue.build());
onChanged();
} else {
partitionGraphBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder addPartitionGraph(org.tensorflow.framework.GraphDef value) {
if (partitionGraphBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionGraphIsMutable();
partitionGraph_.add(value);
onChanged();
} else {
partitionGraphBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder addPartitionGraph(
int index, org.tensorflow.framework.GraphDef value) {
if (partitionGraphBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartitionGraphIsMutable();
partitionGraph_.add(index, value);
onChanged();
} else {
partitionGraphBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder addPartitionGraph(
org.tensorflow.framework.GraphDef.Builder builderForValue) {
if (partitionGraphBuilder_ == null) {
ensurePartitionGraphIsMutable();
partitionGraph_.add(builderForValue.build());
onChanged();
} else {
partitionGraphBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder addPartitionGraph(
int index, org.tensorflow.framework.GraphDef.Builder builderForValue) {
if (partitionGraphBuilder_ == null) {
ensurePartitionGraphIsMutable();
partitionGraph_.add(index, builderForValue.build());
onChanged();
} else {
partitionGraphBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder addAllPartitionGraph(
java.lang.Iterable extends org.tensorflow.framework.GraphDef> values) {
if (partitionGraphBuilder_ == null) {
ensurePartitionGraphIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, partitionGraph_);
onChanged();
} else {
partitionGraphBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder clearPartitionGraph() {
if (partitionGraphBuilder_ == null) {
partitionGraph_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
partitionGraphBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public Builder removePartitionGraph(int index) {
if (partitionGraphBuilder_ == null) {
ensurePartitionGraphIsMutable();
partitionGraph_.remove(index);
onChanged();
} else {
partitionGraphBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDef.Builder getPartitionGraphBuilder(
int index) {
return getPartitionGraphFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDefOrBuilder getPartitionGraphOrBuilder(
int index) {
if (partitionGraphBuilder_ == null) {
return partitionGraph_.get(index); } else {
return partitionGraphBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public java.util.List extends org.tensorflow.framework.GraphDefOrBuilder>
getPartitionGraphOrBuilderList() {
if (partitionGraphBuilder_ != null) {
return partitionGraphBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(partitionGraph_);
}
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDef.Builder addPartitionGraphBuilder() {
return getPartitionGraphFieldBuilder().addBuilder(
org.tensorflow.framework.GraphDef.getDefaultInstance());
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public org.tensorflow.framework.GraphDef.Builder addPartitionGraphBuilder(
int index) {
return getPartitionGraphFieldBuilder().addBuilder(
index, org.tensorflow.framework.GraphDef.getDefaultInstance());
}
/**
* repeated .tensorflow.GraphDef partition_graph = 4;
*/
public java.util.List
getPartitionGraphBuilderList() {
return getPartitionGraphFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder>
getPartitionGraphFieldBuilder() {
if (partitionGraphBuilder_ == null) {
partitionGraphBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder>(
partitionGraph_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
partitionGraph_ = null;
}
return partitionGraphBuilder_;
}
private int statusCode_ = 0;
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public int getStatusCodeValue() {
return statusCode_;
}
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public Builder setStatusCodeValue(int value) {
statusCode_ = value;
onChanged();
return this;
}
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public org.tensorflow.framework.Code getStatusCode() {
@SuppressWarnings("deprecation")
org.tensorflow.framework.Code result = org.tensorflow.framework.Code.valueOf(statusCode_);
return result == null ? org.tensorflow.framework.Code.UNRECOGNIZED : result;
}
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public Builder setStatusCode(org.tensorflow.framework.Code value) {
if (value == null) {
throw new NullPointerException();
}
statusCode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* If store_errors_in_response_body is true in the request, then
* optionally the server may return an OK status for the RPC and
* fill the true status into the fields below, to allow for messages
* that are too long to fit in metadata.
*
*
* .tensorflow.error.Code status_code = 5;
*/
public Builder clearStatusCode() {
statusCode_ = 0;
onChanged();
return this;
}
private java.lang.Object statusErrorMessage_ = "";
/**
* string status_error_message = 6;
*/
public java.lang.String getStatusErrorMessage() {
java.lang.Object ref = statusErrorMessage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
statusErrorMessage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string status_error_message = 6;
*/
public com.google.protobuf.ByteString
getStatusErrorMessageBytes() {
java.lang.Object ref = statusErrorMessage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
statusErrorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string status_error_message = 6;
*/
public Builder setStatusErrorMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
statusErrorMessage_ = value;
onChanged();
return this;
}
/**
* string status_error_message = 6;
*/
public Builder clearStatusErrorMessage() {
statusErrorMessage_ = getDefaultInstance().getStatusErrorMessage();
onChanged();
return this;
}
/**
* string status_error_message = 6;
*/
public Builder setStatusErrorMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
statusErrorMessage_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.RunGraphResponse)
}
// @@protoc_insertion_point(class_scope:tensorflow.RunGraphResponse)
private static final org.tensorflow.distruntime.RunGraphResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.distruntime.RunGraphResponse();
}
public static org.tensorflow.distruntime.RunGraphResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RunGraphResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RunGraphResponse(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 org.tensorflow.distruntime.RunGraphResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}