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

org.tensorflow.distruntime.ServerDef Maven / Gradle / Ivy

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

package org.tensorflow.distruntime;

/**
 * 
 * Defines the configuration of a single TensorFlow server.
 * 
* * Protobuf type {@code tensorflow.ServerDef} */ public final class ServerDef extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.ServerDef) ServerDefOrBuilder { private static final long serialVersionUID = 0L; // Use ServerDef.newBuilder() to construct. private ServerDef(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ServerDef() { jobName_ = ""; protocol_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ServerDef(); } @java.lang.Override public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ServerDef( 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: { org.tensorflow.distruntime.ClusterDef.Builder subBuilder = null; if (cluster_ != null) { subBuilder = cluster_.toBuilder(); } cluster_ = input.readMessage(org.tensorflow.distruntime.ClusterDef.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(cluster_); cluster_ = subBuilder.buildPartial(); } break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); jobName_ = s; break; } case 24: { taskIndex_ = input.readInt32(); break; } case 34: { org.tensorflow.framework.ConfigProto.Builder subBuilder = null; if (defaultSessionConfig_ != null) { subBuilder = defaultSessionConfig_.toBuilder(); } defaultSessionConfig_ = input.readMessage(org.tensorflow.framework.ConfigProto.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(defaultSessionConfig_); defaultSessionConfig_ = subBuilder.buildPartial(); } break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); protocol_ = s; 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.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; } @java.lang.Override protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.distruntime.ServerDef.class, org.tensorflow.distruntime.ServerDef.Builder.class); } public static final int CLUSTER_FIELD_NUMBER = 1; private org.tensorflow.distruntime.ClusterDef cluster_; /** *
   * The cluster of which this server is a member.
   * 
* * .tensorflow.ClusterDef cluster = 1; * @return Whether the cluster field is set. */ @java.lang.Override public boolean hasCluster() { return cluster_ != null; } /** *
   * The cluster of which this server is a member.
   * 
* * .tensorflow.ClusterDef cluster = 1; * @return The cluster. */ @java.lang.Override public org.tensorflow.distruntime.ClusterDef getCluster() { return cluster_ == null ? org.tensorflow.distruntime.ClusterDef.getDefaultInstance() : cluster_; } /** *
   * The cluster of which this server is a member.
   * 
* * .tensorflow.ClusterDef cluster = 1; */ @java.lang.Override public org.tensorflow.distruntime.ClusterDefOrBuilder getClusterOrBuilder() { return getCluster(); } public static final int JOB_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object jobName_; /** *
   * The name of the job of which this server is a member.
   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
   * that matches this name.
   * 
* * string job_name = 2; * @return The jobName. */ @java.lang.Override public java.lang.String getJobName() { java.lang.Object ref = jobName_; 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(); jobName_ = s; return s; } } /** *
   * The name of the job of which this server is a member.
   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
   * that matches this name.
   * 
* * string job_name = 2; * @return The bytes for jobName. */ @java.lang.Override public org.nd4j.shade.protobuf.ByteString getJobNameBytes() { java.lang.Object ref = jobName_; if (ref instanceof java.lang.String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); jobName_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } public static final int TASK_INDEX_FIELD_NUMBER = 3; private int taskIndex_; /** *
   * The task index of this server in its job.
   * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
   * and a mapping in its `tasks` field for this index.
   * 
* * int32 task_index = 3; * @return The taskIndex. */ @java.lang.Override public int getTaskIndex() { return taskIndex_; } public static final int DEFAULT_SESSION_CONFIG_FIELD_NUMBER = 4; private org.tensorflow.framework.ConfigProto defaultSessionConfig_; /** *
   * The default configuration for sessions that run on this server.
   * 
* * .tensorflow.ConfigProto default_session_config = 4; * @return Whether the defaultSessionConfig field is set. */ @java.lang.Override public boolean hasDefaultSessionConfig() { return defaultSessionConfig_ != null; } /** *
   * The default configuration for sessions that run on this server.
   * 
* * .tensorflow.ConfigProto default_session_config = 4; * @return The defaultSessionConfig. */ @java.lang.Override public org.tensorflow.framework.ConfigProto getDefaultSessionConfig() { return defaultSessionConfig_ == null ? org.tensorflow.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; } /** *
   * The default configuration for sessions that run on this server.
   * 
* * .tensorflow.ConfigProto default_session_config = 4; */ @java.lang.Override public org.tensorflow.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() { return getDefaultSessionConfig(); } public static final int PROTOCOL_FIELD_NUMBER = 5; private volatile java.lang.Object protocol_; /** *
   * The protocol to be used by this server.
   * Acceptable values include: "grpc".
   * 
* * string protocol = 5; * @return The protocol. */ @java.lang.Override public java.lang.String getProtocol() { java.lang.Object ref = protocol_; 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(); protocol_ = s; return s; } } /** *
   * The protocol to be used by this server.
   * Acceptable values include: "grpc".
   * 
* * string protocol = 5; * @return The bytes for protocol. */ @java.lang.Override public org.nd4j.shade.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof java.lang.String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) throws java.io.IOException { if (cluster_ != null) { output.writeMessage(1, getCluster()); } if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, jobName_); } if (taskIndex_ != 0) { output.writeInt32(3, taskIndex_); } if (defaultSessionConfig_ != null) { output.writeMessage(4, getDefaultSessionConfig()); } if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (cluster_ != null) { size += org.nd4j.shade.protobuf.CodedOutputStream .computeMessageSize(1, getCluster()); } if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, jobName_); } if (taskIndex_ != 0) { size += org.nd4j.shade.protobuf.CodedOutputStream .computeInt32Size(3, taskIndex_); } if (defaultSessionConfig_ != null) { size += org.nd4j.shade.protobuf.CodedOutputStream .computeMessageSize(4, getDefaultSessionConfig()); } if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_); } 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.ServerDef)) { return super.equals(obj); } org.tensorflow.distruntime.ServerDef other = (org.tensorflow.distruntime.ServerDef) obj; if (hasCluster() != other.hasCluster()) return false; if (hasCluster()) { if (!getCluster() .equals(other.getCluster())) return false; } if (!getJobName() .equals(other.getJobName())) return false; if (getTaskIndex() != other.getTaskIndex()) return false; if (hasDefaultSessionConfig() != other.hasDefaultSessionConfig()) return false; if (hasDefaultSessionConfig()) { if (!getDefaultSessionConfig() .equals(other.getDefaultSessionConfig())) return false; } if (!getProtocol() .equals(other.getProtocol())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasCluster()) { hash = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); } hash = (37 * hash) + JOB_NAME_FIELD_NUMBER; hash = (53 * hash) + getJobName().hashCode(); hash = (37 * hash) + TASK_INDEX_FIELD_NUMBER; hash = (53 * hash) + getTaskIndex(); if (hasDefaultSessionConfig()) { hash = (37 * hash) + DEFAULT_SESSION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getDefaultSessionConfig().hashCode(); } hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; hash = (53 * hash) + getProtocol().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.distruntime.ServerDef parseFrom( java.nio.ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.distruntime.ServerDef 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.ServerDef parseFrom( org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.distruntime.ServerDef 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.ServerDef parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.distruntime.ServerDef 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.ServerDef parseFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.distruntime.ServerDef 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.ServerDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.distruntime.ServerDef 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.ServerDef 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.ServerDef 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.ServerDef 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; } /** *
   * Defines the configuration of a single TensorFlow server.
   * 
* * Protobuf type {@code tensorflow.ServerDef} */ public static final class Builder extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.ServerDef) org.tensorflow.distruntime.ServerDefOrBuilder { public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; } @java.lang.Override protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.distruntime.ServerDef.class, org.tensorflow.distruntime.ServerDef.Builder.class); } // Construct using org.tensorflow.distruntime.ServerDef.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(); if (clusterBuilder_ == null) { cluster_ = null; } else { cluster_ = null; clusterBuilder_ = null; } jobName_ = ""; taskIndex_ = 0; if (defaultSessionConfigBuilder_ == null) { defaultSessionConfig_ = null; } else { defaultSessionConfig_ = null; defaultSessionConfigBuilder_ = null; } protocol_ = ""; return this; } @java.lang.Override public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor; } @java.lang.Override public org.tensorflow.distruntime.ServerDef getDefaultInstanceForType() { return org.tensorflow.distruntime.ServerDef.getDefaultInstance(); } @java.lang.Override public org.tensorflow.distruntime.ServerDef build() { org.tensorflow.distruntime.ServerDef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.distruntime.ServerDef buildPartial() { org.tensorflow.distruntime.ServerDef result = new org.tensorflow.distruntime.ServerDef(this); if (clusterBuilder_ == null) { result.cluster_ = cluster_; } else { result.cluster_ = clusterBuilder_.build(); } result.jobName_ = jobName_; result.taskIndex_ = taskIndex_; if (defaultSessionConfigBuilder_ == null) { result.defaultSessionConfig_ = defaultSessionConfig_; } else { result.defaultSessionConfig_ = defaultSessionConfigBuilder_.build(); } result.protocol_ = protocol_; 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.ServerDef) { return mergeFrom((org.tensorflow.distruntime.ServerDef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.distruntime.ServerDef other) { if (other == org.tensorflow.distruntime.ServerDef.getDefaultInstance()) return this; if (other.hasCluster()) { mergeCluster(other.getCluster()); } if (!other.getJobName().isEmpty()) { jobName_ = other.jobName_; onChanged(); } if (other.getTaskIndex() != 0) { setTaskIndex(other.getTaskIndex()); } if (other.hasDefaultSessionConfig()) { mergeDefaultSessionConfig(other.getDefaultSessionConfig()); } if (!other.getProtocol().isEmpty()) { protocol_ = other.protocol_; onChanged(); } 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.ServerDef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.distruntime.ServerDef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private org.tensorflow.distruntime.ClusterDef cluster_; private org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.distruntime.ClusterDef, org.tensorflow.distruntime.ClusterDef.Builder, org.tensorflow.distruntime.ClusterDefOrBuilder> clusterBuilder_; /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; * @return Whether the cluster field is set. */ public boolean hasCluster() { return clusterBuilder_ != null || cluster_ != null; } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; * @return The cluster. */ public org.tensorflow.distruntime.ClusterDef getCluster() { if (clusterBuilder_ == null) { return cluster_ == null ? org.tensorflow.distruntime.ClusterDef.getDefaultInstance() : cluster_; } else { return clusterBuilder_.getMessage(); } } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public Builder setCluster(org.tensorflow.distruntime.ClusterDef value) { if (clusterBuilder_ == null) { if (value == null) { throw new NullPointerException(); } cluster_ = value; onChanged(); } else { clusterBuilder_.setMessage(value); } return this; } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public Builder setCluster( org.tensorflow.distruntime.ClusterDef.Builder builderForValue) { if (clusterBuilder_ == null) { cluster_ = builderForValue.build(); onChanged(); } else { clusterBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public Builder mergeCluster(org.tensorflow.distruntime.ClusterDef value) { if (clusterBuilder_ == null) { if (cluster_ != null) { cluster_ = org.tensorflow.distruntime.ClusterDef.newBuilder(cluster_).mergeFrom(value).buildPartial(); } else { cluster_ = value; } onChanged(); } else { clusterBuilder_.mergeFrom(value); } return this; } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public Builder clearCluster() { if (clusterBuilder_ == null) { cluster_ = null; onChanged(); } else { cluster_ = null; clusterBuilder_ = null; } return this; } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public org.tensorflow.distruntime.ClusterDef.Builder getClusterBuilder() { onChanged(); return getClusterFieldBuilder().getBuilder(); } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ public org.tensorflow.distruntime.ClusterDefOrBuilder getClusterOrBuilder() { if (clusterBuilder_ != null) { return clusterBuilder_.getMessageOrBuilder(); } else { return cluster_ == null ? org.tensorflow.distruntime.ClusterDef.getDefaultInstance() : cluster_; } } /** *
     * The cluster of which this server is a member.
     * 
* * .tensorflow.ClusterDef cluster = 1; */ private org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.distruntime.ClusterDef, org.tensorflow.distruntime.ClusterDef.Builder, org.tensorflow.distruntime.ClusterDefOrBuilder> getClusterFieldBuilder() { if (clusterBuilder_ == null) { clusterBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.distruntime.ClusterDef, org.tensorflow.distruntime.ClusterDef.Builder, org.tensorflow.distruntime.ClusterDefOrBuilder>( getCluster(), getParentForChildren(), isClean()); cluster_ = null; } return clusterBuilder_; } private java.lang.Object jobName_ = ""; /** *
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * 
* * string job_name = 2; * @return The jobName. */ public java.lang.String getJobName() { java.lang.Object ref = jobName_; if (!(ref instanceof java.lang.String)) { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); jobName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * 
* * string job_name = 2; * @return The bytes for jobName. */ public org.nd4j.shade.protobuf.ByteString getJobNameBytes() { java.lang.Object ref = jobName_; if (ref instanceof String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); jobName_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } /** *
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * 
* * string job_name = 2; * @param value The jobName to set. * @return This builder for chaining. */ public Builder setJobName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } jobName_ = value; onChanged(); return this; } /** *
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * 
* * string job_name = 2; * @return This builder for chaining. */ public Builder clearJobName() { jobName_ = getDefaultInstance().getJobName(); onChanged(); return this; } /** *
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * 
* * string job_name = 2; * @param value The bytes for jobName to set. * @return This builder for chaining. */ public Builder setJobNameBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); jobName_ = value; onChanged(); return this; } private int taskIndex_ ; /** *
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * 
* * int32 task_index = 3; * @return The taskIndex. */ @java.lang.Override public int getTaskIndex() { return taskIndex_; } /** *
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * 
* * int32 task_index = 3; * @param value The taskIndex to set. * @return This builder for chaining. */ public Builder setTaskIndex(int value) { taskIndex_ = value; onChanged(); return this; } /** *
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * 
* * int32 task_index = 3; * @return This builder for chaining. */ public Builder clearTaskIndex() { taskIndex_ = 0; onChanged(); return this; } private org.tensorflow.framework.ConfigProto defaultSessionConfig_; private org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.ConfigProto, org.tensorflow.framework.ConfigProto.Builder, org.tensorflow.framework.ConfigProtoOrBuilder> defaultSessionConfigBuilder_; /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; * @return Whether the defaultSessionConfig field is set. */ public boolean hasDefaultSessionConfig() { return defaultSessionConfigBuilder_ != null || defaultSessionConfig_ != null; } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; * @return The defaultSessionConfig. */ public org.tensorflow.framework.ConfigProto getDefaultSessionConfig() { if (defaultSessionConfigBuilder_ == null) { return defaultSessionConfig_ == null ? org.tensorflow.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; } else { return defaultSessionConfigBuilder_.getMessage(); } } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public Builder setDefaultSessionConfig(org.tensorflow.framework.ConfigProto value) { if (defaultSessionConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } defaultSessionConfig_ = value; onChanged(); } else { defaultSessionConfigBuilder_.setMessage(value); } return this; } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public Builder setDefaultSessionConfig( org.tensorflow.framework.ConfigProto.Builder builderForValue) { if (defaultSessionConfigBuilder_ == null) { defaultSessionConfig_ = builderForValue.build(); onChanged(); } else { defaultSessionConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public Builder mergeDefaultSessionConfig(org.tensorflow.framework.ConfigProto value) { if (defaultSessionConfigBuilder_ == null) { if (defaultSessionConfig_ != null) { defaultSessionConfig_ = org.tensorflow.framework.ConfigProto.newBuilder(defaultSessionConfig_).mergeFrom(value).buildPartial(); } else { defaultSessionConfig_ = value; } onChanged(); } else { defaultSessionConfigBuilder_.mergeFrom(value); } return this; } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public Builder clearDefaultSessionConfig() { if (defaultSessionConfigBuilder_ == null) { defaultSessionConfig_ = null; onChanged(); } else { defaultSessionConfig_ = null; defaultSessionConfigBuilder_ = null; } return this; } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public org.tensorflow.framework.ConfigProto.Builder getDefaultSessionConfigBuilder() { onChanged(); return getDefaultSessionConfigFieldBuilder().getBuilder(); } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ public org.tensorflow.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() { if (defaultSessionConfigBuilder_ != null) { return defaultSessionConfigBuilder_.getMessageOrBuilder(); } else { return defaultSessionConfig_ == null ? org.tensorflow.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_; } } /** *
     * The default configuration for sessions that run on this server.
     * 
* * .tensorflow.ConfigProto default_session_config = 4; */ private org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.ConfigProto, org.tensorflow.framework.ConfigProto.Builder, org.tensorflow.framework.ConfigProtoOrBuilder> getDefaultSessionConfigFieldBuilder() { if (defaultSessionConfigBuilder_ == null) { defaultSessionConfigBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.ConfigProto, org.tensorflow.framework.ConfigProto.Builder, org.tensorflow.framework.ConfigProtoOrBuilder>( getDefaultSessionConfig(), getParentForChildren(), isClean()); defaultSessionConfig_ = null; } return defaultSessionConfigBuilder_; } private java.lang.Object protocol_ = ""; /** *
     * The protocol to be used by this server.
     * Acceptable values include: "grpc".
     * 
* * string protocol = 5; * @return The protocol. */ public java.lang.String getProtocol() { java.lang.Object ref = protocol_; if (!(ref instanceof java.lang.String)) { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); protocol_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The protocol to be used by this server.
     * Acceptable values include: "grpc".
     * 
* * string protocol = 5; * @return The bytes for protocol. */ public org.nd4j.shade.protobuf.ByteString getProtocolBytes() { java.lang.Object ref = protocol_; if (ref instanceof String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); protocol_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } /** *
     * The protocol to be used by this server.
     * Acceptable values include: "grpc".
     * 
* * string protocol = 5; * @param value The protocol to set. * @return This builder for chaining. */ public Builder setProtocol( java.lang.String value) { if (value == null) { throw new NullPointerException(); } protocol_ = value; onChanged(); return this; } /** *
     * The protocol to be used by this server.
     * Acceptable values include: "grpc".
     * 
* * string protocol = 5; * @return This builder for chaining. */ public Builder clearProtocol() { protocol_ = getDefaultInstance().getProtocol(); onChanged(); return this; } /** *
     * The protocol to be used by this server.
     * Acceptable values include: "grpc".
     * 
* * string protocol = 5; * @param value The bytes for protocol to set. * @return This builder for chaining. */ public Builder setProtocolBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); protocol_ = value; 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.ServerDef) } // @@protoc_insertion_point(class_scope:tensorflow.ServerDef) private static final org.tensorflow.distruntime.ServerDef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.distruntime.ServerDef(); } public static org.tensorflow.distruntime.ServerDef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final org.nd4j.shade.protobuf.Parser PARSER = new org.nd4j.shade.protobuf.AbstractParser() { @java.lang.Override public ServerDef parsePartialFrom( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return new ServerDef(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.ServerDef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy