org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest}
*/
public final class RegisterGraphRequest extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.RegisterGraphRequest)
RegisterGraphRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RegisterGraphRequest.newBuilder() to construct.
private RegisterGraphRequest(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private RegisterGraphRequest() {
sessionHandle_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RegisterGraphRequest();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RegisterGraphRequest(
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();
}
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();
sessionHandle_ = s;
break;
}
case 18: {
org.tensorflow.framework.GraphDef.Builder subBuilder = null;
if (graphDef_ != null) {
subBuilder = graphDef_.toBuilder();
}
graphDef_ = input.readMessage(org.tensorflow.framework.GraphDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(graphDef_);
graphDef_ = subBuilder.buildPartial();
}
break;
}
case 24: {
hasControlFlow_ = input.readBool();
break;
}
case 34: {
org.tensorflow.framework.GraphOptions.Builder subBuilder = null;
if (graphOptions_ != null) {
subBuilder = graphOptions_.toBuilder();
}
graphOptions_ = input.readMessage(org.tensorflow.framework.GraphOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(graphOptions_);
graphOptions_ = subBuilder.buildPartial();
}
break;
}
case 42: {
org.tensorflow.framework.DebugOptions.Builder subBuilder = null;
if (debugOptions_ != null) {
subBuilder = debugOptions_.toBuilder();
}
debugOptions_ = input.readMessage(org.tensorflow.framework.DebugOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(debugOptions_);
debugOptions_ = subBuilder.buildPartial();
}
break;
}
case 48: {
createWorkerSessionCalled_ = input.readBool();
break;
}
case 56: {
collectiveGraphKey_ = input.readInt64();
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RegisterGraphRequest_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RegisterGraphRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RegisterGraphRequest.class, org.tensorflow.distruntime.RegisterGraphRequest.Builder.class);
}
public static final int SESSION_HANDLE_FIELD_NUMBER = 1;
private volatile java.lang.Object sessionHandle_;
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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;
}
}
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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 = 6;
private boolean createWorkerSessionCalled_;
/**
*
* Set to true if `CreateWorkerSession` was called for `session_handle`.
*
*
* bool create_worker_session_called = 6;
* @return The createWorkerSessionCalled.
*/
@java.lang.Override
public boolean getCreateWorkerSessionCalled() {
return createWorkerSessionCalled_;
}
public static final int GRAPH_DEF_FIELD_NUMBER = 2;
private org.tensorflow.framework.GraphDef graphDef_;
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
* @return Whether the graphDef field is set.
*/
@java.lang.Override
public boolean hasGraphDef() {
return graphDef_ != null;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
* @return The graphDef.
*/
@java.lang.Override
public org.tensorflow.framework.GraphDef getGraphDef() {
return graphDef_ == null ? org.tensorflow.framework.GraphDef.getDefaultInstance() : graphDef_;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
@java.lang.Override
public org.tensorflow.framework.GraphDefOrBuilder getGraphDefOrBuilder() {
return getGraphDef();
}
public static final int HAS_CONTROL_FLOW_FIELD_NUMBER = 3;
private boolean hasControlFlow_;
/**
*
* True iff the graph (before partitioning) contains control flow nodes.
* As of 01/11/2015, this is no longer set by clients.
*
*
* bool has_control_flow = 3 [deprecated = true];
* @deprecated tensorflow.RegisterGraphRequest.has_control_flow is deprecated.
* See tensorflow/core/protobuf/worker.proto;l=117
* @return The hasControlFlow.
*/
@java.lang.Override
@java.lang.Deprecated public boolean getHasControlFlow() {
return hasControlFlow_;
}
public static final int GRAPH_OPTIONS_FIELD_NUMBER = 4;
private org.tensorflow.framework.GraphOptions graphOptions_;
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
* @return Whether the graphOptions field is set.
*/
@java.lang.Override
public boolean hasGraphOptions() {
return graphOptions_ != null;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
* @return The graphOptions.
*/
@java.lang.Override
public org.tensorflow.framework.GraphOptions getGraphOptions() {
return graphOptions_ == null ? org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
@java.lang.Override
public org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
return getGraphOptions();
}
public static final int DEBUG_OPTIONS_FIELD_NUMBER = 5;
private org.tensorflow.framework.DebugOptions debugOptions_;
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
* @return Whether the debugOptions field is set.
*/
@java.lang.Override
public boolean hasDebugOptions() {
return debugOptions_ != null;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
* @return The debugOptions.
*/
@java.lang.Override
public org.tensorflow.framework.DebugOptions getDebugOptions() {
return debugOptions_ == null ? org.tensorflow.framework.DebugOptions.getDefaultInstance() : debugOptions_;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
@java.lang.Override
public org.tensorflow.framework.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
return getDebugOptions();
}
public static final int COLLECTIVE_GRAPH_KEY_FIELD_NUMBER = 7;
private long collectiveGraphKey_;
/**
*
* If graph_def contains any collective ops this must be a positive
* integer used to coordinate execution with other graphs. All
* graphs in a distributed execution with the same
* collective_graph_key will coordinate to use the same step_id
* concurrently so that BufRendezvous entries will make the correct
* values accessible.
*
*
* int64 collective_graph_key = 7;
* @return The collectiveGraphKey.
*/
@java.lang.Override
public long getCollectiveGraphKey() {
return collectiveGraphKey_;
}
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(sessionHandle_)) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, sessionHandle_);
}
if (graphDef_ != null) {
output.writeMessage(2, getGraphDef());
}
if (hasControlFlow_ != false) {
output.writeBool(3, hasControlFlow_);
}
if (graphOptions_ != null) {
output.writeMessage(4, getGraphOptions());
}
if (debugOptions_ != null) {
output.writeMessage(5, getDebugOptions());
}
if (createWorkerSessionCalled_ != false) {
output.writeBool(6, createWorkerSessionCalled_);
}
if (collectiveGraphKey_ != 0L) {
output.writeInt64(7, collectiveGraphKey_);
}
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(sessionHandle_)) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, sessionHandle_);
}
if (graphDef_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(2, getGraphDef());
}
if (hasControlFlow_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(3, hasControlFlow_);
}
if (graphOptions_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(4, getGraphOptions());
}
if (debugOptions_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(5, getDebugOptions());
}
if (createWorkerSessionCalled_ != false) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(6, createWorkerSessionCalled_);
}
if (collectiveGraphKey_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(7, collectiveGraphKey_);
}
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.RegisterGraphRequest)) {
return super.equals(obj);
}
org.tensorflow.distruntime.RegisterGraphRequest other = (org.tensorflow.distruntime.RegisterGraphRequest) obj;
if (!getSessionHandle()
.equals(other.getSessionHandle())) return false;
if (getCreateWorkerSessionCalled()
!= other.getCreateWorkerSessionCalled()) return false;
if (hasGraphDef() != other.hasGraphDef()) return false;
if (hasGraphDef()) {
if (!getGraphDef()
.equals(other.getGraphDef())) return false;
}
if (getHasControlFlow()
!= other.getHasControlFlow()) return false;
if (hasGraphOptions() != other.hasGraphOptions()) return false;
if (hasGraphOptions()) {
if (!getGraphOptions()
.equals(other.getGraphOptions())) return false;
}
if (hasDebugOptions() != other.hasDebugOptions()) return false;
if (hasDebugOptions()) {
if (!getDebugOptions()
.equals(other.getDebugOptions())) return false;
}
if (getCollectiveGraphKey()
!= other.getCollectiveGraphKey()) 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());
if (hasGraphDef()) {
hash = (37 * hash) + GRAPH_DEF_FIELD_NUMBER;
hash = (53 * hash) + getGraphDef().hashCode();
}
hash = (37 * hash) + HAS_CONTROL_FLOW_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashBoolean(
getHasControlFlow());
if (hasGraphOptions()) {
hash = (37 * hash) + GRAPH_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getGraphOptions().hashCode();
}
if (hasDebugOptions()) {
hash = (37 * hash) + DEBUG_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getDebugOptions().hashCode();
}
hash = (37 * hash) + COLLECTIVE_GRAPH_KEY_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getCollectiveGraphKey());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.distruntime.RegisterGraphRequest parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.distruntime.RegisterGraphRequest 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.RegisterGraphRequest 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.RegisterGraphRequest 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.RegisterGraphRequest 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.RegisterGraphRequest}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.RegisterGraphRequest)
org.tensorflow.distruntime.RegisterGraphRequestOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RegisterGraphRequest_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RegisterGraphRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.distruntime.RegisterGraphRequest.class, org.tensorflow.distruntime.RegisterGraphRequest.Builder.class);
}
// Construct using org.tensorflow.distruntime.RegisterGraphRequest.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sessionHandle_ = "";
createWorkerSessionCalled_ = false;
if (graphDefBuilder_ == null) {
graphDef_ = null;
} else {
graphDef_ = null;
graphDefBuilder_ = null;
}
hasControlFlow_ = false;
if (graphOptionsBuilder_ == null) {
graphOptions_ = null;
} else {
graphOptions_ = null;
graphOptionsBuilder_ = null;
}
if (debugOptionsBuilder_ == null) {
debugOptions_ = null;
} else {
debugOptions_ = null;
debugOptionsBuilder_ = null;
}
collectiveGraphKey_ = 0L;
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.distruntime.WorkerProtos.internal_static_tensorflow_RegisterGraphRequest_descriptor;
}
@java.lang.Override
public org.tensorflow.distruntime.RegisterGraphRequest getDefaultInstanceForType() {
return org.tensorflow.distruntime.RegisterGraphRequest.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.distruntime.RegisterGraphRequest build() {
org.tensorflow.distruntime.RegisterGraphRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.distruntime.RegisterGraphRequest buildPartial() {
org.tensorflow.distruntime.RegisterGraphRequest result = new org.tensorflow.distruntime.RegisterGraphRequest(this);
result.sessionHandle_ = sessionHandle_;
result.createWorkerSessionCalled_ = createWorkerSessionCalled_;
if (graphDefBuilder_ == null) {
result.graphDef_ = graphDef_;
} else {
result.graphDef_ = graphDefBuilder_.build();
}
result.hasControlFlow_ = hasControlFlow_;
if (graphOptionsBuilder_ == null) {
result.graphOptions_ = graphOptions_;
} else {
result.graphOptions_ = graphOptionsBuilder_.build();
}
if (debugOptionsBuilder_ == null) {
result.debugOptions_ = debugOptions_;
} else {
result.debugOptions_ = debugOptionsBuilder_.build();
}
result.collectiveGraphKey_ = collectiveGraphKey_;
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.RegisterGraphRequest) {
return mergeFrom((org.tensorflow.distruntime.RegisterGraphRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.distruntime.RegisterGraphRequest other) {
if (other == org.tensorflow.distruntime.RegisterGraphRequest.getDefaultInstance()) return this;
if (!other.getSessionHandle().isEmpty()) {
sessionHandle_ = other.sessionHandle_;
onChanged();
}
if (other.getCreateWorkerSessionCalled() != false) {
setCreateWorkerSessionCalled(other.getCreateWorkerSessionCalled());
}
if (other.hasGraphDef()) {
mergeGraphDef(other.getGraphDef());
}
if (other.getHasControlFlow() != false) {
setHasControlFlow(other.getHasControlFlow());
}
if (other.hasGraphOptions()) {
mergeGraphOptions(other.getGraphOptions());
}
if (other.hasDebugOptions()) {
mergeDebugOptions(other.getDebugOptions());
}
if (other.getCollectiveGraphKey() != 0L) {
setCollectiveGraphKey(other.getCollectiveGraphKey());
}
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.RegisterGraphRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.distruntime.RegisterGraphRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object sessionHandle_ = "";
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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;
}
}
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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;
}
}
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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;
}
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @return This builder for chaining.
*/
public Builder clearSessionHandle() {
sessionHandle_ = getDefaultInstance().getSessionHandle();
onChanged();
return this;
}
/**
*
* Subgraphs are scoped within one session.
*
*
* string session_handle = 1;
* @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 = 6;
* @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 = 6;
* @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 = 6;
* @return This builder for chaining.
*/
public Builder clearCreateWorkerSessionCalled() {
createWorkerSessionCalled_ = false;
onChanged();
return this;
}
private org.tensorflow.framework.GraphDef graphDef_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder> graphDefBuilder_;
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
* @return Whether the graphDef field is set.
*/
public boolean hasGraphDef() {
return graphDefBuilder_ != null || graphDef_ != null;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
* @return The graphDef.
*/
public org.tensorflow.framework.GraphDef getGraphDef() {
if (graphDefBuilder_ == null) {
return graphDef_ == null ? org.tensorflow.framework.GraphDef.getDefaultInstance() : graphDef_;
} else {
return graphDefBuilder_.getMessage();
}
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public Builder setGraphDef(org.tensorflow.framework.GraphDef value) {
if (graphDefBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
graphDef_ = value;
onChanged();
} else {
graphDefBuilder_.setMessage(value);
}
return this;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public Builder setGraphDef(
org.tensorflow.framework.GraphDef.Builder builderForValue) {
if (graphDefBuilder_ == null) {
graphDef_ = builderForValue.build();
onChanged();
} else {
graphDefBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public Builder mergeGraphDef(org.tensorflow.framework.GraphDef value) {
if (graphDefBuilder_ == null) {
if (graphDef_ != null) {
graphDef_ =
org.tensorflow.framework.GraphDef.newBuilder(graphDef_).mergeFrom(value).buildPartial();
} else {
graphDef_ = value;
}
onChanged();
} else {
graphDefBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public Builder clearGraphDef() {
if (graphDefBuilder_ == null) {
graphDef_ = null;
onChanged();
} else {
graphDef_ = null;
graphDefBuilder_ = null;
}
return this;
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public org.tensorflow.framework.GraphDef.Builder getGraphDefBuilder() {
onChanged();
return getGraphDefFieldBuilder().getBuilder();
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
public org.tensorflow.framework.GraphDefOrBuilder getGraphDefOrBuilder() {
if (graphDefBuilder_ != null) {
return graphDefBuilder_.getMessageOrBuilder();
} else {
return graphDef_ == null ?
org.tensorflow.framework.GraphDef.getDefaultInstance() : graphDef_;
}
}
/**
*
* "graph_def" has the subgraph of nodes for this worker, with each node
* having its device_name filled in.
*
*
* .tensorflow.GraphDef graph_def = 2;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder>
getGraphDefFieldBuilder() {
if (graphDefBuilder_ == null) {
graphDefBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphDef, org.tensorflow.framework.GraphDef.Builder, org.tensorflow.framework.GraphDefOrBuilder>(
getGraphDef(),
getParentForChildren(),
isClean());
graphDef_ = null;
}
return graphDefBuilder_;
}
private boolean hasControlFlow_ ;
/**
*
* True iff the graph (before partitioning) contains control flow nodes.
* As of 01/11/2015, this is no longer set by clients.
*
*
* bool has_control_flow = 3 [deprecated = true];
* @deprecated tensorflow.RegisterGraphRequest.has_control_flow is deprecated.
* See tensorflow/core/protobuf/worker.proto;l=117
* @return The hasControlFlow.
*/
@java.lang.Override
@java.lang.Deprecated public boolean getHasControlFlow() {
return hasControlFlow_;
}
/**
*
* True iff the graph (before partitioning) contains control flow nodes.
* As of 01/11/2015, this is no longer set by clients.
*
*
* bool has_control_flow = 3 [deprecated = true];
* @deprecated tensorflow.RegisterGraphRequest.has_control_flow is deprecated.
* See tensorflow/core/protobuf/worker.proto;l=117
* @param value The hasControlFlow to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setHasControlFlow(boolean value) {
hasControlFlow_ = value;
onChanged();
return this;
}
/**
*
* True iff the graph (before partitioning) contains control flow nodes.
* As of 01/11/2015, this is no longer set by clients.
*
*
* bool has_control_flow = 3 [deprecated = true];
* @deprecated tensorflow.RegisterGraphRequest.has_control_flow is deprecated.
* See tensorflow/core/protobuf/worker.proto;l=117
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearHasControlFlow() {
hasControlFlow_ = false;
onChanged();
return this;
}
private org.tensorflow.framework.GraphOptions graphOptions_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder> graphOptionsBuilder_;
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
* @return Whether the graphOptions field is set.
*/
public boolean hasGraphOptions() {
return graphOptionsBuilder_ != null || graphOptions_ != null;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
* @return The graphOptions.
*/
public org.tensorflow.framework.GraphOptions getGraphOptions() {
if (graphOptionsBuilder_ == null) {
return graphOptions_ == null ? org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_;
} else {
return graphOptionsBuilder_.getMessage();
}
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public Builder setGraphOptions(org.tensorflow.framework.GraphOptions value) {
if (graphOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
graphOptions_ = value;
onChanged();
} else {
graphOptionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public Builder setGraphOptions(
org.tensorflow.framework.GraphOptions.Builder builderForValue) {
if (graphOptionsBuilder_ == null) {
graphOptions_ = builderForValue.build();
onChanged();
} else {
graphOptionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public Builder mergeGraphOptions(org.tensorflow.framework.GraphOptions value) {
if (graphOptionsBuilder_ == null) {
if (graphOptions_ != null) {
graphOptions_ =
org.tensorflow.framework.GraphOptions.newBuilder(graphOptions_).mergeFrom(value).buildPartial();
} else {
graphOptions_ = value;
}
onChanged();
} else {
graphOptionsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public Builder clearGraphOptions() {
if (graphOptionsBuilder_ == null) {
graphOptions_ = null;
onChanged();
} else {
graphOptions_ = null;
graphOptionsBuilder_ = null;
}
return this;
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public org.tensorflow.framework.GraphOptions.Builder getGraphOptionsBuilder() {
onChanged();
return getGraphOptionsFieldBuilder().getBuilder();
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
public org.tensorflow.framework.GraphOptionsOrBuilder getGraphOptionsOrBuilder() {
if (graphOptionsBuilder_ != null) {
return graphOptionsBuilder_.getMessageOrBuilder();
} else {
return graphOptions_ == null ?
org.tensorflow.framework.GraphOptions.getDefaultInstance() : graphOptions_;
}
}
/**
*
* Configuration options for the session in which this graph was created.
*
*
* .tensorflow.GraphOptions graph_options = 4;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder>
getGraphOptionsFieldBuilder() {
if (graphOptionsBuilder_ == null) {
graphOptionsBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.GraphOptions, org.tensorflow.framework.GraphOptions.Builder, org.tensorflow.framework.GraphOptionsOrBuilder>(
getGraphOptions(),
getParentForChildren(),
isClean());
graphOptions_ = null;
}
return graphOptionsBuilder_;
}
private org.tensorflow.framework.DebugOptions debugOptions_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.DebugOptions, org.tensorflow.framework.DebugOptions.Builder, org.tensorflow.framework.DebugOptionsOrBuilder> debugOptionsBuilder_;
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
* @return Whether the debugOptions field is set.
*/
public boolean hasDebugOptions() {
return debugOptionsBuilder_ != null || debugOptions_ != null;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
* @return The debugOptions.
*/
public org.tensorflow.framework.DebugOptions getDebugOptions() {
if (debugOptionsBuilder_ == null) {
return debugOptions_ == null ? org.tensorflow.framework.DebugOptions.getDefaultInstance() : debugOptions_;
} else {
return debugOptionsBuilder_.getMessage();
}
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public Builder setDebugOptions(org.tensorflow.framework.DebugOptions value) {
if (debugOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
debugOptions_ = value;
onChanged();
} else {
debugOptionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public Builder setDebugOptions(
org.tensorflow.framework.DebugOptions.Builder builderForValue) {
if (debugOptionsBuilder_ == null) {
debugOptions_ = builderForValue.build();
onChanged();
} else {
debugOptionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public Builder mergeDebugOptions(org.tensorflow.framework.DebugOptions value) {
if (debugOptionsBuilder_ == null) {
if (debugOptions_ != null) {
debugOptions_ =
org.tensorflow.framework.DebugOptions.newBuilder(debugOptions_).mergeFrom(value).buildPartial();
} else {
debugOptions_ = value;
}
onChanged();
} else {
debugOptionsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public Builder clearDebugOptions() {
if (debugOptionsBuilder_ == null) {
debugOptions_ = null;
onChanged();
} else {
debugOptions_ = null;
debugOptionsBuilder_ = null;
}
return this;
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public org.tensorflow.framework.DebugOptions.Builder getDebugOptionsBuilder() {
onChanged();
return getDebugOptionsFieldBuilder().getBuilder();
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
public org.tensorflow.framework.DebugOptionsOrBuilder getDebugOptionsOrBuilder() {
if (debugOptionsBuilder_ != null) {
return debugOptionsBuilder_.getMessageOrBuilder();
} else {
return debugOptions_ == null ?
org.tensorflow.framework.DebugOptions.getDefaultInstance() : debugOptions_;
}
}
/**
*
* Field(s) used by TensorFlow Debugger (tfdbg).
*
*
* .tensorflow.DebugOptions debug_options = 5;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.DebugOptions, org.tensorflow.framework.DebugOptions.Builder, org.tensorflow.framework.DebugOptionsOrBuilder>
getDebugOptionsFieldBuilder() {
if (debugOptionsBuilder_ == null) {
debugOptionsBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.DebugOptions, org.tensorflow.framework.DebugOptions.Builder, org.tensorflow.framework.DebugOptionsOrBuilder>(
getDebugOptions(),
getParentForChildren(),
isClean());
debugOptions_ = null;
}
return debugOptionsBuilder_;
}
private long collectiveGraphKey_ ;
/**
*
* If graph_def contains any collective ops this must be a positive
* integer used to coordinate execution with other graphs. All
* graphs in a distributed execution with the same
* collective_graph_key will coordinate to use the same step_id
* concurrently so that BufRendezvous entries will make the correct
* values accessible.
*
*
* int64 collective_graph_key = 7;
* @return The collectiveGraphKey.
*/
@java.lang.Override
public long getCollectiveGraphKey() {
return collectiveGraphKey_;
}
/**
*
* If graph_def contains any collective ops this must be a positive
* integer used to coordinate execution with other graphs. All
* graphs in a distributed execution with the same
* collective_graph_key will coordinate to use the same step_id
* concurrently so that BufRendezvous entries will make the correct
* values accessible.
*
*
* int64 collective_graph_key = 7;
* @param value The collectiveGraphKey to set.
* @return This builder for chaining.
*/
public Builder setCollectiveGraphKey(long value) {
collectiveGraphKey_ = value;
onChanged();
return this;
}
/**
*
* If graph_def contains any collective ops this must be a positive
* integer used to coordinate execution with other graphs. All
* graphs in a distributed execution with the same
* collective_graph_key will coordinate to use the same step_id
* concurrently so that BufRendezvous entries will make the correct
* values accessible.
*
*
* int64 collective_graph_key = 7;
* @return This builder for chaining.
*/
public Builder clearCollectiveGraphKey() {
collectiveGraphKey_ = 0L;
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.RegisterGraphRequest)
}
// @@protoc_insertion_point(class_scope:tensorflow.RegisterGraphRequest)
private static final org.tensorflow.distruntime.RegisterGraphRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.distruntime.RegisterGraphRequest();
}
public static org.tensorflow.distruntime.RegisterGraphRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public RegisterGraphRequest parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new RegisterGraphRequest(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.RegisterGraphRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}