org.tensorflow.distruntime.RunGraphRequest 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.RunGraphRequest}
*/
public final class RunGraphRequest extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.RunGraphRequest)
RunGraphRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RunGraphRequest.newBuilder() to construct.
private RunGraphRequest(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private RunGraphRequest() {
sessionHandle_ = "";
graphHandle_ = "";
send_ = java.util.Collections.emptyList();
recvKey_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RunGraphRequest();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RunGraphRequest(
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();
graphHandle_ = s;
break;
}
case 16: {
stepId_ = input.readInt64();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
send_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
send_.add(
input.readMessage(org.tensorflow.framework.NamedTensorProto.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
recvKey_ = new org.nd4j.shade.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
recvKey_.add(s);
break;
}
case 42: {
org.tensorflow.distruntime.ExecutorOpts.Builder subBuilder = null;
if (execOpts_ != null) {
subBuilder = execOpts_.toBuilder();
}
execOpts_ = input.readMessage(org.tensorflow.distruntime.ExecutorOpts.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(execOpts_);
execOpts_ = subBuilder.buildPartial();
}
break;
}
case 48: {
isPartial_ = input.readBool();
break;
}
case 56: {
isLastPartialRun_ = input.readBool();
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
sessionHandle_ = s;
break;
}
case 72: {
storeErrorsInResponseBody_ = input.readBool();
break;
}
case 80: {
createWorkerSessionCalled_ = input.readBool();
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)) {
send_ = java.util.Collections.unmodifiableList(send_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
recvKey_ = recvKey_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphRequest_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RunGraphRequest.class, org.tensorflow.distruntime.RunGraphRequest.Builder.class);
}
public static final int SESSION_HANDLE_FIELD_NUMBER = 8;
private volatile java.lang.Object sessionHandle_;
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @return The sessionHandle.
*/
@java.lang.Override
public java.lang.String getSessionHandle() {
java.lang.Object ref = sessionHandle_;
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();
sessionHandle_ = s;
return s;
}
}
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @return The bytes for sessionHandle.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getSessionHandleBytes() {
java.lang.Object ref = sessionHandle_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sessionHandle_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int CREATE_WORKER_SESSION_CALLED_FIELD_NUMBER = 10;
private boolean createWorkerSessionCalled_;
/**
*
* Set to true if `CreateWorkerSession` was called for `session_handle`.
*
*
* bool create_worker_session_called = 10;
* @return The createWorkerSessionCalled.
*/
@java.lang.Override
public boolean getCreateWorkerSessionCalled() {
return createWorkerSessionCalled_;
}
public static final int GRAPH_HANDLE_FIELD_NUMBER = 1;
private volatile java.lang.Object graphHandle_;
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @return The graphHandle.
*/
@java.lang.Override
public java.lang.String getGraphHandle() {
java.lang.Object ref = graphHandle_;
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();
graphHandle_ = s;
return s;
}
}
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @return The bytes for graphHandle.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getGraphHandleBytes() {
java.lang.Object ref = graphHandle_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
graphHandle_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int STEP_ID_FIELD_NUMBER = 2;
private long stepId_;
/**
*
* A unique ID to distinguish different runs of the same graph.
* The master generates a global unique `step_id` to distinguish
* different runs of the graph computation. Subgraphs communicate
* (e.g., send/recv ops) with each other using `step_id` to
* distinguish tensors generated by different runs.
*
*
* int64 step_id = 2;
* @return The stepId.
*/
@java.lang.Override
public long getStepId() {
return stepId_;
}
public static final int EXEC_OPTS_FIELD_NUMBER = 5;
private org.tensorflow.distruntime.ExecutorOpts execOpts_;
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
* @return Whether the execOpts field is set.
*/
@java.lang.Override
public boolean hasExecOpts() {
return execOpts_ != null;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
* @return The execOpts.
*/
@java.lang.Override
public org.tensorflow.distruntime.ExecutorOpts getExecOpts() {
return execOpts_ == null ? org.tensorflow.distruntime.ExecutorOpts.getDefaultInstance() : execOpts_;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
@java.lang.Override
public org.tensorflow.distruntime.ExecutorOptsOrBuilder getExecOptsOrBuilder() {
return getExecOpts();
}
public static final int SEND_FIELD_NUMBER = 3;
private java.util.List send_;
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
@java.lang.Override
public java.util.List getSendList() {
return send_;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
@java.lang.Override
public java.util.List
getSendOrBuilderList() {
return send_;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
@java.lang.Override
public int getSendCount() {
return send_.size();
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
@java.lang.Override
public org.tensorflow.framework.NamedTensorProto getSend(int index) {
return send_.get(index);
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
@java.lang.Override
public org.tensorflow.framework.NamedTensorProtoOrBuilder getSendOrBuilder(
int index) {
return send_.get(index);
}
public static final int RECV_KEY_FIELD_NUMBER = 4;
private org.nd4j.shade.protobuf.LazyStringList recvKey_;
/**
* repeated string recv_key = 4;
* @return A list containing the recvKey.
*/
public org.nd4j.shade.protobuf.ProtocolStringList
getRecvKeyList() {
return recvKey_;
}
/**
* repeated string recv_key = 4;
* @return The count of recvKey.
*/
public int getRecvKeyCount() {
return recvKey_.size();
}
/**
* repeated string recv_key = 4;
* @param index The index of the element to return.
* @return The recvKey at the given index.
*/
public java.lang.String getRecvKey(int index) {
return recvKey_.get(index);
}
/**
* repeated string recv_key = 4;
* @param index The index of the value to return.
* @return The bytes of the recvKey at the given index.
*/
public org.nd4j.shade.protobuf.ByteString
getRecvKeyBytes(int index) {
return recvKey_.getByteString(index);
}
public static final int IS_PARTIAL_FIELD_NUMBER = 6;
private boolean isPartial_;
/**
*
* True if the RunGraphRequest is a partial run request.
*
*
* bool is_partial = 6;
* @return The isPartial.
*/
@java.lang.Override
public boolean getIsPartial() {
return isPartial_;
}
public static final int IS_LAST_PARTIAL_RUN_FIELD_NUMBER = 7;
private boolean isLastPartialRun_;
/**
*
* True if this is the last partial run request in a sequence of requests.
*
*
* bool is_last_partial_run = 7;
* @return The isLastPartialRun.
*/
@java.lang.Override
public boolean getIsLastPartialRun() {
return isLastPartialRun_;
}
public static final int STORE_ERRORS_IN_RESPONSE_BODY_FIELD_NUMBER = 9;
private boolean storeErrorsInResponseBody_;
/**
*
* If true then some errors, e.g., execution errors that have long
* error messages, may return an OK RunGraphResponse with the actual
* error saved in the status_code/status_error_message fields of the
* response body. This is a workaround since the RPC subsystem may
* truncate long metadata messages.
*
*
* bool store_errors_in_response_body = 9;
* @return The storeErrorsInResponseBody.
*/
@java.lang.Override
public boolean getStoreErrorsInResponseBody() {
return storeErrorsInResponseBody_;
}
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(graphHandle_)) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, graphHandle_);
}
if (stepId_ != 0L) {
output.writeInt64(2, stepId_);
}
for (int i = 0; i < send_.size(); i++) {
output.writeMessage(3, send_.get(i));
}
for (int i = 0; i < recvKey_.size(); i++) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 4, recvKey_.getRaw(i));
}
if (execOpts_ != null) {
output.writeMessage(5, getExecOpts());
}
if (isPartial_ != false) {
output.writeBool(6, isPartial_);
}
if (isLastPartialRun_ != false) {
output.writeBool(7, isLastPartialRun_);
}
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(sessionHandle_)) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 8, sessionHandle_);
}
if (storeErrorsInResponseBody_ != false) {
output.writeBool(9, storeErrorsInResponseBody_);
}
if (createWorkerSessionCalled_ != false) {
output.writeBool(10, createWorkerSessionCalled_);
}
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(graphHandle_)) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, graphHandle_);
}
if (stepId_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(2, stepId_);
}
for (int i = 0; i < send_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(3, send_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < recvKey_.size(); i++) {
dataSize += computeStringSizeNoTag(recvKey_.getRaw(i));
}
size += dataSize;
size += 1 * getRecvKeyList().size();
}
if (execOpts_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(5, getExecOpts());
}
if (isPartial_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(6, isPartial_);
}
if (isLastPartialRun_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(7, isLastPartialRun_);
}
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(sessionHandle_)) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(8, sessionHandle_);
}
if (storeErrorsInResponseBody_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(9, storeErrorsInResponseBody_);
}
if (createWorkerSessionCalled_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(10, createWorkerSessionCalled_);
}
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.RunGraphRequest)) {
return super.equals(obj);
}
org.tensorflow.distruntime.RunGraphRequest other = (org.tensorflow.distruntime.RunGraphRequest) obj;
if (!getSessionHandle()
.equals(other.getSessionHandle())) return false;
if (getCreateWorkerSessionCalled()
!= other.getCreateWorkerSessionCalled()) return false;
if (!getGraphHandle()
.equals(other.getGraphHandle())) return false;
if (getStepId()
!= other.getStepId()) return false;
if (hasExecOpts() != other.hasExecOpts()) return false;
if (hasExecOpts()) {
if (!getExecOpts()
.equals(other.getExecOpts())) return false;
}
if (!getSendList()
.equals(other.getSendList())) return false;
if (!getRecvKeyList()
.equals(other.getRecvKeyList())) return false;
if (getIsPartial()
!= other.getIsPartial()) return false;
if (getIsLastPartialRun()
!= other.getIsLastPartialRun()) return false;
if (getStoreErrorsInResponseBody()
!= other.getStoreErrorsInResponseBody()) 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) + SESSION_HANDLE_FIELD_NUMBER;
hash = (53 * hash) + getSessionHandle().hashCode();
hash = (37 * hash) + CREATE_WORKER_SESSION_CALLED_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getCreateWorkerSessionCalled());
hash = (37 * hash) + GRAPH_HANDLE_FIELD_NUMBER;
hash = (53 * hash) + getGraphHandle().hashCode();
hash = (37 * hash) + STEP_ID_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getStepId());
if (hasExecOpts()) {
hash = (37 * hash) + EXEC_OPTS_FIELD_NUMBER;
hash = (53 * hash) + getExecOpts().hashCode();
}
if (getSendCount() > 0) {
hash = (37 * hash) + SEND_FIELD_NUMBER;
hash = (53 * hash) + getSendList().hashCode();
}
if (getRecvKeyCount() > 0) {
hash = (37 * hash) + RECV_KEY_FIELD_NUMBER;
hash = (53 * hash) + getRecvKeyList().hashCode();
}
hash = (37 * hash) + IS_PARTIAL_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getIsPartial());
hash = (37 * hash) + IS_LAST_PARTIAL_RUN_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getIsLastPartialRun());
hash = (37 * hash) + STORE_ERRORS_IN_RESPONSE_BODY_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getStoreErrorsInResponseBody());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.distruntime.RunGraphRequest parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphRequest 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.distruntime.RunGraphRequest parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphRequest 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.distruntime.RunGraphRequest parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RunGraphRequest parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.distruntime.RunGraphRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphRequest 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.distruntime.RunGraphRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphRequest 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.distruntime.RunGraphRequest parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RunGraphRequest 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.distruntime.RunGraphRequest 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.RunGraphRequest}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.RunGraphRequest)
org.tensorflow.distruntime.RunGraphRequestOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphRequest_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RunGraphRequest.class, org.tensorflow.distruntime.RunGraphRequest.Builder.class);
}
// Construct using org.tensorflow.distruntime.RunGraphRequest.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) {
getSendFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sessionHandle_ = "";
createWorkerSessionCalled_ = false;
graphHandle_ = "";
stepId_ = 0L;
if (execOptsBuilder_ == null) {
execOpts_ = null;
} else {
execOpts_ = null;
execOptsBuilder_ = null;
}
if (sendBuilder_ == null) {
send_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
sendBuilder_.clear();
}
recvKey_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
isPartial_ = false;
isLastPartialRun_ = false;
storeErrorsInResponseBody_ = false;
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RunGraphRequest_descriptor;
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphRequest getDefaultInstanceForType() {
return org.tensorflow.distruntime.RunGraphRequest.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphRequest build() {
org.tensorflow.distruntime.RunGraphRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.distruntime.RunGraphRequest buildPartial() {
org.tensorflow.distruntime.RunGraphRequest result = new org.tensorflow.distruntime.RunGraphRequest(this);
int from_bitField0_ = bitField0_;
result.sessionHandle_ = sessionHandle_;
result.createWorkerSessionCalled_ = createWorkerSessionCalled_;
result.graphHandle_ = graphHandle_;
result.stepId_ = stepId_;
if (execOptsBuilder_ == null) {
result.execOpts_ = execOpts_;
} else {
result.execOpts_ = execOptsBuilder_.build();
}
if (sendBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
send_ = java.util.Collections.unmodifiableList(send_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.send_ = send_;
} else {
result.send_ = sendBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
recvKey_ = recvKey_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.recvKey_ = recvKey_;
result.isPartial_ = isPartial_;
result.isLastPartialRun_ = isLastPartialRun_;
result.storeErrorsInResponseBody_ = storeErrorsInResponseBody_;
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.distruntime.RunGraphRequest) {
return mergeFrom((org.tensorflow.distruntime.RunGraphRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.distruntime.RunGraphRequest other) {
if (other == org.tensorflow.distruntime.RunGraphRequest.getDefaultInstance()) return this;
if (!other.getSessionHandle().isEmpty()) {
sessionHandle_ = other.sessionHandle_;
onChanged();
}
if (other.getCreateWorkerSessionCalled() != false) {
setCreateWorkerSessionCalled(other.getCreateWorkerSessionCalled());
}
if (!other.getGraphHandle().isEmpty()) {
graphHandle_ = other.graphHandle_;
onChanged();
}
if (other.getStepId() != 0L) {
setStepId(other.getStepId());
}
if (other.hasExecOpts()) {
mergeExecOpts(other.getExecOpts());
}
if (sendBuilder_ == null) {
if (!other.send_.isEmpty()) {
if (send_.isEmpty()) {
send_ = other.send_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSendIsMutable();
send_.addAll(other.send_);
}
onChanged();
}
} else {
if (!other.send_.isEmpty()) {
if (sendBuilder_.isEmpty()) {
sendBuilder_.dispose();
sendBuilder_ = null;
send_ = other.send_;
bitField0_ = (bitField0_ & ~0x00000001);
sendBuilder_ =
org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSendFieldBuilder() : null;
} else {
sendBuilder_.addAllMessages(other.send_);
}
}
}
if (!other.recvKey_.isEmpty()) {
if (recvKey_.isEmpty()) {
recvKey_ = other.recvKey_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRecvKeyIsMutable();
recvKey_.addAll(other.recvKey_);
}
onChanged();
}
if (other.getIsPartial() != false) {
setIsPartial(other.getIsPartial());
}
if (other.getIsLastPartialRun() != false) {
setIsLastPartialRun(other.getIsLastPartialRun());
}
if (other.getStoreErrorsInResponseBody() != false) {
setStoreErrorsInResponseBody(other.getStoreErrorsInResponseBody());
}
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.distruntime.RunGraphRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.distruntime.RunGraphRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object sessionHandle_ = "";
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @return The sessionHandle.
*/
public java.lang.String getSessionHandle() {
java.lang.Object ref = sessionHandle_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sessionHandle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @return The bytes for sessionHandle.
*/
public org.nd4j.shade.protobuf.ByteString
getSessionHandleBytes() {
java.lang.Object ref = sessionHandle_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sessionHandle_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @param value The sessionHandle to set.
* @return This builder for chaining.
*/
public Builder setSessionHandle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sessionHandle_ = value;
onChanged();
return this;
}
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @return This builder for chaining.
*/
public Builder clearSessionHandle() {
sessionHandle_ = getDefaultInstance().getSessionHandle();
onChanged();
return this;
}
/**
*
* session_handle is the master-generated unique id for this session.
* If session_handle is non-empty, it must be the same as used when
* registering the graph. If it is empty, a single global namespace is used to
* search for the graph_handle.
*
*
* string session_handle = 8;
* @param value The bytes for sessionHandle to set.
* @return This builder for chaining.
*/
public Builder setSessionHandleBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sessionHandle_ = value;
onChanged();
return this;
}
private boolean createWorkerSessionCalled_ ;
/**
*
* Set to true if `CreateWorkerSession` was called for `session_handle`.
*
*
* bool create_worker_session_called = 10;
* @return The createWorkerSessionCalled.
*/
@java.lang.Override
public boolean getCreateWorkerSessionCalled() {
return createWorkerSessionCalled_;
}
/**
*
* Set to true if `CreateWorkerSession` was called for `session_handle`.
*
*
* bool create_worker_session_called = 10;
* @param value The createWorkerSessionCalled to set.
* @return This builder for chaining.
*/
public Builder setCreateWorkerSessionCalled(boolean value) {
createWorkerSessionCalled_ = value;
onChanged();
return this;
}
/**
*
* Set to true if `CreateWorkerSession` was called for `session_handle`.
*
*
* bool create_worker_session_called = 10;
* @return This builder for chaining.
*/
public Builder clearCreateWorkerSessionCalled() {
createWorkerSessionCalled_ = false;
onChanged();
return this;
}
private java.lang.Object graphHandle_ = "";
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @return The graphHandle.
*/
public java.lang.String getGraphHandle() {
java.lang.Object ref = graphHandle_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
graphHandle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @return The bytes for graphHandle.
*/
public org.nd4j.shade.protobuf.ByteString
getGraphHandleBytes() {
java.lang.Object ref = graphHandle_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
graphHandle_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @param value The graphHandle to set.
* @return This builder for chaining.
*/
public Builder setGraphHandle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
graphHandle_ = value;
onChanged();
return this;
}
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @return This builder for chaining.
*/
public Builder clearGraphHandle() {
graphHandle_ = getDefaultInstance().getGraphHandle();
onChanged();
return this;
}
/**
*
* REQUIRED: graph_handle must be returned by a RegisterGraph call
* to the same WorkerService.
*
*
* string graph_handle = 1;
* @param value The bytes for graphHandle to set.
* @return This builder for chaining.
*/
public Builder setGraphHandleBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
graphHandle_ = value;
onChanged();
return this;
}
private long stepId_ ;
/**
*
* A unique ID to distinguish different runs of the same graph.
* The master generates a global unique `step_id` to distinguish
* different runs of the graph computation. Subgraphs communicate
* (e.g., send/recv ops) with each other using `step_id` to
* distinguish tensors generated by different runs.
*
*
* int64 step_id = 2;
* @return The stepId.
*/
@java.lang.Override
public long getStepId() {
return stepId_;
}
/**
*
* A unique ID to distinguish different runs of the same graph.
* The master generates a global unique `step_id` to distinguish
* different runs of the graph computation. Subgraphs communicate
* (e.g., send/recv ops) with each other using `step_id` to
* distinguish tensors generated by different runs.
*
*
* int64 step_id = 2;
* @param value The stepId to set.
* @return This builder for chaining.
*/
public Builder setStepId(long value) {
stepId_ = value;
onChanged();
return this;
}
/**
*
* A unique ID to distinguish different runs of the same graph.
* The master generates a global unique `step_id` to distinguish
* different runs of the graph computation. Subgraphs communicate
* (e.g., send/recv ops) with each other using `step_id` to
* distinguish tensors generated by different runs.
*
*
* int64 step_id = 2;
* @return This builder for chaining.
*/
public Builder clearStepId() {
stepId_ = 0L;
onChanged();
return this;
}
private org.tensorflow.distruntime.ExecutorOpts execOpts_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.distruntime.ExecutorOpts, org.tensorflow.distruntime.ExecutorOpts.Builder, org.tensorflow.distruntime.ExecutorOptsOrBuilder> execOptsBuilder_;
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
* @return Whether the execOpts field is set.
*/
public boolean hasExecOpts() {
return execOptsBuilder_ != null || execOpts_ != null;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
* @return The execOpts.
*/
public org.tensorflow.distruntime.ExecutorOpts getExecOpts() {
if (execOptsBuilder_ == null) {
return execOpts_ == null ? org.tensorflow.distruntime.ExecutorOpts.getDefaultInstance() : execOpts_;
} else {
return execOptsBuilder_.getMessage();
}
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public Builder setExecOpts(org.tensorflow.distruntime.ExecutorOpts value) {
if (execOptsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
execOpts_ = value;
onChanged();
} else {
execOptsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public Builder setExecOpts(
org.tensorflow.distruntime.ExecutorOpts.Builder builderForValue) {
if (execOptsBuilder_ == null) {
execOpts_ = builderForValue.build();
onChanged();
} else {
execOptsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public Builder mergeExecOpts(org.tensorflow.distruntime.ExecutorOpts value) {
if (execOptsBuilder_ == null) {
if (execOpts_ != null) {
execOpts_ =
org.tensorflow.distruntime.ExecutorOpts.newBuilder(execOpts_).mergeFrom(value).buildPartial();
} else {
execOpts_ = value;
}
onChanged();
} else {
execOptsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public Builder clearExecOpts() {
if (execOptsBuilder_ == null) {
execOpts_ = null;
onChanged();
} else {
execOpts_ = null;
execOptsBuilder_ = null;
}
return this;
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public org.tensorflow.distruntime.ExecutorOpts.Builder getExecOptsBuilder() {
onChanged();
return getExecOptsFieldBuilder().getBuilder();
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
public org.tensorflow.distruntime.ExecutorOptsOrBuilder getExecOptsOrBuilder() {
if (execOptsBuilder_ != null) {
return execOptsBuilder_.getMessageOrBuilder();
} else {
return execOpts_ == null ?
org.tensorflow.distruntime.ExecutorOpts.getDefaultInstance() : execOpts_;
}
}
/**
*
* Options for this step.
*
*
* .tensorflow.ExecutorOpts exec_opts = 5;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.distruntime.ExecutorOpts, org.tensorflow.distruntime.ExecutorOpts.Builder, org.tensorflow.distruntime.ExecutorOptsOrBuilder>
getExecOptsFieldBuilder() {
if (execOptsBuilder_ == null) {
execOptsBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.distruntime.ExecutorOpts, org.tensorflow.distruntime.ExecutorOpts.Builder, org.tensorflow.distruntime.ExecutorOptsOrBuilder>(
getExecOpts(),
getParentForChildren(),
isClean());
execOpts_ = null;
}
return execOptsBuilder_;
}
private java.util.List send_ =
java.util.Collections.emptyList();
private void ensureSendIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
send_ = new java.util.ArrayList(send_);
bitField0_ |= 0x00000001;
}
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder> sendBuilder_;
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public java.util.List getSendList() {
if (sendBuilder_ == null) {
return java.util.Collections.unmodifiableList(send_);
} else {
return sendBuilder_.getMessageList();
}
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public int getSendCount() {
if (sendBuilder_ == null) {
return send_.size();
} else {
return sendBuilder_.getCount();
}
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public org.tensorflow.framework.NamedTensorProto getSend(int index) {
if (sendBuilder_ == null) {
return send_.get(index);
} else {
return sendBuilder_.getMessage(index);
}
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder setSend(
int index, org.tensorflow.framework.NamedTensorProto value) {
if (sendBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSendIsMutable();
send_.set(index, value);
onChanged();
} else {
sendBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder setSend(
int index, org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (sendBuilder_ == null) {
ensureSendIsMutable();
send_.set(index, builderForValue.build());
onChanged();
} else {
sendBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder addSend(org.tensorflow.framework.NamedTensorProto value) {
if (sendBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSendIsMutable();
send_.add(value);
onChanged();
} else {
sendBuilder_.addMessage(value);
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder addSend(
int index, org.tensorflow.framework.NamedTensorProto value) {
if (sendBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSendIsMutable();
send_.add(index, value);
onChanged();
} else {
sendBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder addSend(
org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (sendBuilder_ == null) {
ensureSendIsMutable();
send_.add(builderForValue.build());
onChanged();
} else {
sendBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder addSend(
int index, org.tensorflow.framework.NamedTensorProto.Builder builderForValue) {
if (sendBuilder_ == null) {
ensureSendIsMutable();
send_.add(index, builderForValue.build());
onChanged();
} else {
sendBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder addAllSend(
java.lang.Iterable values) {
if (sendBuilder_ == null) {
ensureSendIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, send_);
onChanged();
} else {
sendBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder clearSend() {
if (sendBuilder_ == null) {
send_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
sendBuilder_.clear();
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public Builder removeSend(int index) {
if (sendBuilder_ == null) {
ensureSendIsMutable();
send_.remove(index);
onChanged();
} else {
sendBuilder_.remove(index);
}
return this;
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public org.tensorflow.framework.NamedTensorProto.Builder getSendBuilder(
int index) {
return getSendFieldBuilder().getBuilder(index);
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public org.tensorflow.framework.NamedTensorProtoOrBuilder getSendOrBuilder(
int index) {
if (sendBuilder_ == null) {
return send_.get(index); } else {
return sendBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public java.util.List
getSendOrBuilderList() {
if (sendBuilder_ != null) {
return sendBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(send_);
}
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public org.tensorflow.framework.NamedTensorProto.Builder addSendBuilder() {
return getSendFieldBuilder().addBuilder(
org.tensorflow.framework.NamedTensorProto.getDefaultInstance());
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public org.tensorflow.framework.NamedTensorProto.Builder addSendBuilder(
int index) {
return getSendFieldBuilder().addBuilder(
index, org.tensorflow.framework.NamedTensorProto.getDefaultInstance());
}
/**
*
* Runs the graph.
* Sends the tensors in "send" into the graph before the run and
* fetches the keys into `RunGraphResponse.recv` after the run.
*
*
* repeated .tensorflow.NamedTensorProto send = 3;
*/
public java.util.List
getSendBuilderList() {
return getSendFieldBuilder().getBuilderList();
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder>
getSendFieldBuilder() {
if (sendBuilder_ == null) {
sendBuilder_ = new org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NamedTensorProto, org.tensorflow.framework.NamedTensorProto.Builder, org.tensorflow.framework.NamedTensorProtoOrBuilder>(
send_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
send_ = null;
}
return sendBuilder_;
}
private org.nd4j.shade.protobuf.LazyStringList recvKey_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
private void ensureRecvKeyIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
recvKey_ = new org.nd4j.shade.protobuf.LazyStringArrayList(recvKey_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string recv_key = 4;
* @return A list containing the recvKey.
*/
public org.nd4j.shade.protobuf.ProtocolStringList
getRecvKeyList() {
return recvKey_.getUnmodifiableView();
}
/**
* repeated string recv_key = 4;
* @return The count of recvKey.
*/
public int getRecvKeyCount() {
return recvKey_.size();
}
/**
* repeated string recv_key = 4;
* @param index The index of the element to return.
* @return The recvKey at the given index.
*/
public java.lang.String getRecvKey(int index) {
return recvKey_.get(index);
}
/**
* repeated string recv_key = 4;
* @param index The index of the value to return.
* @return The bytes of the recvKey at the given index.
*/
public org.nd4j.shade.protobuf.ByteString
getRecvKeyBytes(int index) {
return recvKey_.getByteString(index);
}
/**
* repeated string recv_key = 4;
* @param index The index to set the value at.
* @param value The recvKey to set.
* @return This builder for chaining.
*/
public Builder setRecvKey(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRecvKeyIsMutable();
recvKey_.set(index, value);
onChanged();
return this;
}
/**
* repeated string recv_key = 4;
* @param value The recvKey to add.
* @return This builder for chaining.
*/
public Builder addRecvKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRecvKeyIsMutable();
recvKey_.add(value);
onChanged();
return this;
}
/**
* repeated string recv_key = 4;
* @param values The recvKey to add.
* @return This builder for chaining.
*/
public Builder addAllRecvKey(
java.lang.Iterable values) {
ensureRecvKeyIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, recvKey_);
onChanged();
return this;
}
/**
* repeated string recv_key = 4;
* @return This builder for chaining.
*/
public Builder clearRecvKey() {
recvKey_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string recv_key = 4;
* @param value The bytes of the recvKey to add.
* @return This builder for chaining.
*/
public Builder addRecvKeyBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRecvKeyIsMutable();
recvKey_.add(value);
onChanged();
return this;
}
private boolean isPartial_ ;
/**
*
* True if the RunGraphRequest is a partial run request.
*
*
* bool is_partial = 6;
* @return The isPartial.
*/
@java.lang.Override
public boolean getIsPartial() {
return isPartial_;
}
/**
*
* True if the RunGraphRequest is a partial run request.
*
*
* bool is_partial = 6;
* @param value The isPartial to set.
* @return This builder for chaining.
*/
public Builder setIsPartial(boolean value) {
isPartial_ = value;
onChanged();
return this;
}
/**
*
* True if the RunGraphRequest is a partial run request.
*
*
* bool is_partial = 6;
* @return This builder for chaining.
*/
public Builder clearIsPartial() {
isPartial_ = false;
onChanged();
return this;
}
private boolean isLastPartialRun_ ;
/**
*
* True if this is the last partial run request in a sequence of requests.
*
*
* bool is_last_partial_run = 7;
* @return The isLastPartialRun.
*/
@java.lang.Override
public boolean getIsLastPartialRun() {
return isLastPartialRun_;
}
/**
*
* True if this is the last partial run request in a sequence of requests.
*
*
* bool is_last_partial_run = 7;
* @param value The isLastPartialRun to set.
* @return This builder for chaining.
*/
public Builder setIsLastPartialRun(boolean value) {
isLastPartialRun_ = value;
onChanged();
return this;
}
/**
*
* True if this is the last partial run request in a sequence of requests.
*
*
* bool is_last_partial_run = 7;
* @return This builder for chaining.
*/
public Builder clearIsLastPartialRun() {
isLastPartialRun_ = false;
onChanged();
return this;
}
private boolean storeErrorsInResponseBody_ ;
/**
*
* If true then some errors, e.g., execution errors that have long
* error messages, may return an OK RunGraphResponse with the actual
* error saved in the status_code/status_error_message fields of the
* response body. This is a workaround since the RPC subsystem may
* truncate long metadata messages.
*
*
* bool store_errors_in_response_body = 9;
* @return The storeErrorsInResponseBody.
*/
@java.lang.Override
public boolean getStoreErrorsInResponseBody() {
return storeErrorsInResponseBody_;
}
/**
*
* If true then some errors, e.g., execution errors that have long
* error messages, may return an OK RunGraphResponse with the actual
* error saved in the status_code/status_error_message fields of the
* response body. This is a workaround since the RPC subsystem may
* truncate long metadata messages.
*
*
* bool store_errors_in_response_body = 9;
* @param value The storeErrorsInResponseBody to set.
* @return This builder for chaining.
*/
public Builder setStoreErrorsInResponseBody(boolean value) {
storeErrorsInResponseBody_ = value;
onChanged();
return this;
}
/**
*
* If true then some errors, e.g., execution errors that have long
* error messages, may return an OK RunGraphResponse with the actual
* error saved in the status_code/status_error_message fields of the
* response body. This is a workaround since the RPC subsystem may
* truncate long metadata messages.
*
*
* bool store_errors_in_response_body = 9;
* @return This builder for chaining.
*/
public Builder clearStoreErrorsInResponseBody() {
storeErrorsInResponseBody_ = false;
onChanged();
return this;
}
@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.RunGraphRequest)
}
// @@protoc_insertion_point(class_scope:tensorflow.RunGraphRequest)
private static final org.tensorflow.distruntime.RunGraphRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.distruntime.RunGraphRequest();
}
public static org.tensorflow.distruntime.RunGraphRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public RunGraphRequest parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new RunGraphRequest(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.distruntime.RunGraphRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}