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

tensorflow.serving.Resources Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow_serving/resources/resources.proto

package tensorflow.serving;

public final class Resources {
  private Resources() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface ResourceOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.serving.Resource)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * The type of device on which the resource resides, e.g. CPU or GPU.
     * 
* * string device = 1; */ java.lang.String getDevice(); /** *
     * The type of device on which the resource resides, e.g. CPU or GPU.
     * 
* * string device = 1; */ com.google.protobuf.ByteString getDeviceBytes(); /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ boolean hasDeviceInstance(); /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ com.google.protobuf.UInt32Value getDeviceInstance(); /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ com.google.protobuf.UInt32ValueOrBuilder getDeviceInstanceOrBuilder(); /** *
     * The kind of resource on the device (instance), e.g. RAM or compute share.
     * A given type of resource should have a standard unit that represents the
     * smallest useful quantization. We strongly recommend including the unit
     * (e.g. bytes or millicores) in this string, as in "ram_bytes".
     * 
* * string kind = 3; */ java.lang.String getKind(); /** *
     * The kind of resource on the device (instance), e.g. RAM or compute share.
     * A given type of resource should have a standard unit that represents the
     * smallest useful quantization. We strongly recommend including the unit
     * (e.g. bytes or millicores) in this string, as in "ram_bytes".
     * 
* * string kind = 3; */ com.google.protobuf.ByteString getKindBytes(); } /** *
   * One kind of resource on one device (or type of device).
   * 
* * Protobuf type {@code tensorflow.serving.Resource} */ public static final class Resource extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.serving.Resource) ResourceOrBuilder { private static final long serialVersionUID = 0L; // Use Resource.newBuilder() to construct. private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Resource() { device_ = ""; kind_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Resource( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); device_ = s; break; } case 18: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (deviceInstance_ != null) { subBuilder = deviceInstance_.toBuilder(); } deviceInstance_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(deviceInstance_); deviceInstance_ = subBuilder.buildPartial(); } break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); kind_ = s; break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.Resource.class, tensorflow.serving.Resources.Resource.Builder.class); } public static final int DEVICE_FIELD_NUMBER = 1; private volatile java.lang.Object device_; /** *
     * The type of device on which the resource resides, e.g. CPU or GPU.
     * 
* * string device = 1; */ public java.lang.String getDevice() { java.lang.Object ref = device_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); device_ = s; return s; } } /** *
     * The type of device on which the resource resides, e.g. CPU or GPU.
     * 
* * string device = 1; */ public com.google.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEVICE_INSTANCE_FIELD_NUMBER = 2; private com.google.protobuf.UInt32Value deviceInstance_; /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public boolean hasDeviceInstance() { return deviceInstance_ != null; } /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public com.google.protobuf.UInt32Value getDeviceInstance() { return deviceInstance_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : deviceInstance_; } /** *
     * A specific instance of the device of type 'device' to which the resources
     * are bound (instances are assumed to be numbered 0, 1, ...).
     * When representing the resources required by a servable that has yet to be
     * loaded, this field is optional. If not set, it denotes that the servable's
     * resources are not (yet) bound to a specific instance.
     * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public com.google.protobuf.UInt32ValueOrBuilder getDeviceInstanceOrBuilder() { return getDeviceInstance(); } public static final int KIND_FIELD_NUMBER = 3; private volatile java.lang.Object kind_; /** *
     * The kind of resource on the device (instance), e.g. RAM or compute share.
     * A given type of resource should have a standard unit that represents the
     * smallest useful quantization. We strongly recommend including the unit
     * (e.g. bytes or millicores) in this string, as in "ram_bytes".
     * 
* * string kind = 3; */ public java.lang.String getKind() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } } /** *
     * The kind of resource on the device (instance), e.g. RAM or compute share.
     * A given type of resource should have a standard unit that represents the
     * smallest useful quantization. We strongly recommend including the unit
     * (e.g. bytes or millicores) in this string, as in "ram_bytes".
     * 
* * string kind = 3; */ public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getDeviceBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, device_); } if (deviceInstance_ != null) { output.writeMessage(2, getDeviceInstance()); } if (!getKindBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getDeviceBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, device_); } if (deviceInstance_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getDeviceInstance()); } if (!getKindBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); } 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 tensorflow.serving.Resources.Resource)) { return super.equals(obj); } tensorflow.serving.Resources.Resource other = (tensorflow.serving.Resources.Resource) obj; boolean result = true; result = result && getDevice() .equals(other.getDevice()); result = result && (hasDeviceInstance() == other.hasDeviceInstance()); if (hasDeviceInstance()) { result = result && getDeviceInstance() .equals(other.getDeviceInstance()); } result = result && getKind() .equals(other.getKind()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DEVICE_FIELD_NUMBER; hash = (53 * hash) + getDevice().hashCode(); if (hasDeviceInstance()) { hash = (37 * hash) + DEVICE_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getDeviceInstance().hashCode(); } hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.serving.Resources.Resource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.Resource parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.Resource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.Resource parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.Resource parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.Resource parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.Resource parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.Resource parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.serving.Resources.Resource parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.Resource parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.Resource parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.serving.Resources.Resource prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * One kind of resource on one device (or type of device).
     * 
* * Protobuf type {@code tensorflow.serving.Resource} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.serving.Resource) tensorflow.serving.Resources.ResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.Resource.class, tensorflow.serving.Resources.Resource.Builder.class); } // Construct using tensorflow.serving.Resources.Resource.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); device_ = ""; if (deviceInstanceBuilder_ == null) { deviceInstance_ = null; } else { deviceInstance_ = null; deviceInstanceBuilder_ = null; } kind_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_Resource_descriptor; } @java.lang.Override public tensorflow.serving.Resources.Resource getDefaultInstanceForType() { return tensorflow.serving.Resources.Resource.getDefaultInstance(); } @java.lang.Override public tensorflow.serving.Resources.Resource build() { tensorflow.serving.Resources.Resource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.serving.Resources.Resource buildPartial() { tensorflow.serving.Resources.Resource result = new tensorflow.serving.Resources.Resource(this); result.device_ = device_; if (deviceInstanceBuilder_ == null) { result.deviceInstance_ = deviceInstance_; } else { result.deviceInstance_ = deviceInstanceBuilder_.build(); } result.kind_ = kind_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.serving.Resources.Resource) { return mergeFrom((tensorflow.serving.Resources.Resource)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.serving.Resources.Resource other) { if (other == tensorflow.serving.Resources.Resource.getDefaultInstance()) return this; if (!other.getDevice().isEmpty()) { device_ = other.device_; onChanged(); } if (other.hasDeviceInstance()) { mergeDeviceInstance(other.getDeviceInstance()); } if (!other.getKind().isEmpty()) { kind_ = other.kind_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.serving.Resources.Resource parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.serving.Resources.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object device_ = ""; /** *
       * The type of device on which the resource resides, e.g. CPU or GPU.
       * 
* * string device = 1; */ public java.lang.String getDevice() { java.lang.Object ref = device_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); device_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The type of device on which the resource resides, e.g. CPU or GPU.
       * 
* * string device = 1; */ public com.google.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The type of device on which the resource resides, e.g. CPU or GPU.
       * 
* * string device = 1; */ public Builder setDevice( java.lang.String value) { if (value == null) { throw new NullPointerException(); } device_ = value; onChanged(); return this; } /** *
       * The type of device on which the resource resides, e.g. CPU or GPU.
       * 
* * string device = 1; */ public Builder clearDevice() { device_ = getDefaultInstance().getDevice(); onChanged(); return this; } /** *
       * The type of device on which the resource resides, e.g. CPU or GPU.
       * 
* * string device = 1; */ public Builder setDeviceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); device_ = value; onChanged(); return this; } private com.google.protobuf.UInt32Value deviceInstance_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> deviceInstanceBuilder_; /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public boolean hasDeviceInstance() { return deviceInstanceBuilder_ != null || deviceInstance_ != null; } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public com.google.protobuf.UInt32Value getDeviceInstance() { if (deviceInstanceBuilder_ == null) { return deviceInstance_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : deviceInstance_; } else { return deviceInstanceBuilder_.getMessage(); } } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public Builder setDeviceInstance(com.google.protobuf.UInt32Value value) { if (deviceInstanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } deviceInstance_ = value; onChanged(); } else { deviceInstanceBuilder_.setMessage(value); } return this; } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public Builder setDeviceInstance( com.google.protobuf.UInt32Value.Builder builderForValue) { if (deviceInstanceBuilder_ == null) { deviceInstance_ = builderForValue.build(); onChanged(); } else { deviceInstanceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public Builder mergeDeviceInstance(com.google.protobuf.UInt32Value value) { if (deviceInstanceBuilder_ == null) { if (deviceInstance_ != null) { deviceInstance_ = com.google.protobuf.UInt32Value.newBuilder(deviceInstance_).mergeFrom(value).buildPartial(); } else { deviceInstance_ = value; } onChanged(); } else { deviceInstanceBuilder_.mergeFrom(value); } return this; } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public Builder clearDeviceInstance() { if (deviceInstanceBuilder_ == null) { deviceInstance_ = null; onChanged(); } else { deviceInstance_ = null; deviceInstanceBuilder_ = null; } return this; } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public com.google.protobuf.UInt32Value.Builder getDeviceInstanceBuilder() { onChanged(); return getDeviceInstanceFieldBuilder().getBuilder(); } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ public com.google.protobuf.UInt32ValueOrBuilder getDeviceInstanceOrBuilder() { if (deviceInstanceBuilder_ != null) { return deviceInstanceBuilder_.getMessageOrBuilder(); } else { return deviceInstance_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : deviceInstance_; } } /** *
       * A specific instance of the device of type 'device' to which the resources
       * are bound (instances are assumed to be numbered 0, 1, ...).
       * When representing the resources required by a servable that has yet to be
       * loaded, this field is optional. If not set, it denotes that the servable's
       * resources are not (yet) bound to a specific instance.
       * 
* * .google.protobuf.UInt32Value device_instance = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getDeviceInstanceFieldBuilder() { if (deviceInstanceBuilder_ == null) { deviceInstanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getDeviceInstance(), getParentForChildren(), isClean()); deviceInstance_ = null; } return deviceInstanceBuilder_; } private java.lang.Object kind_ = ""; /** *
       * The kind of resource on the device (instance), e.g. RAM or compute share.
       * A given type of resource should have a standard unit that represents the
       * smallest useful quantization. We strongly recommend including the unit
       * (e.g. bytes or millicores) in this string, as in "ram_bytes".
       * 
* * string kind = 3; */ public java.lang.String getKind() { java.lang.Object ref = kind_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The kind of resource on the device (instance), e.g. RAM or compute share.
       * A given type of resource should have a standard unit that represents the
       * smallest useful quantization. We strongly recommend including the unit
       * (e.g. bytes or millicores) in this string, as in "ram_bytes".
       * 
* * string kind = 3; */ public com.google.protobuf.ByteString getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The kind of resource on the device (instance), e.g. RAM or compute share.
       * A given type of resource should have a standard unit that represents the
       * smallest useful quantization. We strongly recommend including the unit
       * (e.g. bytes or millicores) in this string, as in "ram_bytes".
       * 
* * string kind = 3; */ public Builder setKind( java.lang.String value) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); return this; } /** *
       * The kind of resource on the device (instance), e.g. RAM or compute share.
       * A given type of resource should have a standard unit that represents the
       * smallest useful quantization. We strongly recommend including the unit
       * (e.g. bytes or millicores) in this string, as in "ram_bytes".
       * 
* * string kind = 3; */ public Builder clearKind() { kind_ = getDefaultInstance().getKind(); onChanged(); return this; } /** *
       * The kind of resource on the device (instance), e.g. RAM or compute share.
       * A given type of resource should have a standard unit that represents the
       * smallest useful quantization. We strongly recommend including the unit
       * (e.g. bytes or millicores) in this string, as in "ram_bytes".
       * 
* * string kind = 3; */ public Builder setKindBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); kind_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.serving.Resource) } // @@protoc_insertion_point(class_scope:tensorflow.serving.Resource) private static final tensorflow.serving.Resources.Resource DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.serving.Resources.Resource(); } public static tensorflow.serving.Resources.Resource getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Resource(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.serving.Resources.Resource getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ResourceAllocationOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.serving.ResourceAllocation) com.google.protobuf.MessageOrBuilder { /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ java.util.List getResourceQuantitiesList(); /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ tensorflow.serving.Resources.ResourceAllocation.Entry getResourceQuantities(int index); /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ int getResourceQuantitiesCount(); /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ java.util.List getResourceQuantitiesOrBuilderList(); /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder getResourceQuantitiesOrBuilder( int index); } /** *
   * An allocation of one or more kinds of resources, along with the quantity of
   * each. Used to denote the resources that a servable (or collection of
   * servables) will use or is currently using. Also used to denote resources
   * available to the serving system for loading more servables.
   * 
* * Protobuf type {@code tensorflow.serving.ResourceAllocation} */ public static final class ResourceAllocation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.serving.ResourceAllocation) ResourceAllocationOrBuilder { private static final long serialVersionUID = 0L; // Use ResourceAllocation.newBuilder() to construct. private ResourceAllocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResourceAllocation() { resourceQuantities_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ResourceAllocation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { resourceQuantities_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } resourceQuantities_.add( input.readMessage(tensorflow.serving.Resources.ResourceAllocation.Entry.parser(), extensionRegistry)); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { resourceQuantities_ = java.util.Collections.unmodifiableList(resourceQuantities_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.ResourceAllocation.class, tensorflow.serving.Resources.ResourceAllocation.Builder.class); } public interface EntryOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.serving.ResourceAllocation.Entry) com.google.protobuf.MessageOrBuilder { /** * .tensorflow.serving.Resource resource = 1; */ boolean hasResource(); /** * .tensorflow.serving.Resource resource = 1; */ tensorflow.serving.Resources.Resource getResource(); /** * .tensorflow.serving.Resource resource = 1; */ tensorflow.serving.Resources.ResourceOrBuilder getResourceOrBuilder(); /** * uint64 quantity = 2; */ long getQuantity(); } /** *
     * A collection of resources, each with a quantity. Treated as a resource->
     * quantity map, i.e. no resource can repeat and the order is immaterial.
     * 
* * Protobuf type {@code tensorflow.serving.ResourceAllocation.Entry} */ public static final class Entry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.serving.ResourceAllocation.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Entry() { quantity_ = 0L; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Entry( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { tensorflow.serving.Resources.Resource.Builder subBuilder = null; if (resource_ != null) { subBuilder = resource_.toBuilder(); } resource_ = input.readMessage(tensorflow.serving.Resources.Resource.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resource_); resource_ = subBuilder.buildPartial(); } break; } case 16: { quantity_ = input.readUInt64(); break; } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.ResourceAllocation.Entry.class, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder.class); } public static final int RESOURCE_FIELD_NUMBER = 1; private tensorflow.serving.Resources.Resource resource_; /** * .tensorflow.serving.Resource resource = 1; */ public boolean hasResource() { return resource_ != null; } /** * .tensorflow.serving.Resource resource = 1; */ public tensorflow.serving.Resources.Resource getResource() { return resource_ == null ? tensorflow.serving.Resources.Resource.getDefaultInstance() : resource_; } /** * .tensorflow.serving.Resource resource = 1; */ public tensorflow.serving.Resources.ResourceOrBuilder getResourceOrBuilder() { return getResource(); } public static final int QUANTITY_FIELD_NUMBER = 2; private long quantity_; /** * uint64 quantity = 2; */ public long getQuantity() { return quantity_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (resource_ != null) { output.writeMessage(1, getResource()); } if (quantity_ != 0L) { output.writeUInt64(2, quantity_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getResource()); } if (quantity_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, quantity_); } 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 tensorflow.serving.Resources.ResourceAllocation.Entry)) { return super.equals(obj); } tensorflow.serving.Resources.ResourceAllocation.Entry other = (tensorflow.serving.Resources.ResourceAllocation.Entry) obj; boolean result = true; result = result && (hasResource() == other.hasResource()); if (hasResource()) { result = result && getResource() .equals(other.getResource()); } result = result && (getQuantity() == other.getQuantity()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } hash = (37 * hash) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getQuantity()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation.Entry parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.serving.Resources.ResourceAllocation.Entry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * A collection of resources, each with a quantity. Treated as a resource->
       * quantity map, i.e. no resource can repeat and the order is immaterial.
       * 
* * Protobuf type {@code tensorflow.serving.ResourceAllocation.Entry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.serving.ResourceAllocation.Entry) tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.ResourceAllocation.Entry.class, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder.class); } // Construct using tensorflow.serving.Resources.ResourceAllocation.Entry.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (resourceBuilder_ == null) { resource_ = null; } else { resource_ = null; resourceBuilder_ = null; } quantity_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation.Entry getDefaultInstanceForType() { return tensorflow.serving.Resources.ResourceAllocation.Entry.getDefaultInstance(); } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation.Entry build() { tensorflow.serving.Resources.ResourceAllocation.Entry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation.Entry buildPartial() { tensorflow.serving.Resources.ResourceAllocation.Entry result = new tensorflow.serving.Resources.ResourceAllocation.Entry(this); if (resourceBuilder_ == null) { result.resource_ = resource_; } else { result.resource_ = resourceBuilder_.build(); } result.quantity_ = quantity_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.serving.Resources.ResourceAllocation.Entry) { return mergeFrom((tensorflow.serving.Resources.ResourceAllocation.Entry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.serving.Resources.ResourceAllocation.Entry other) { if (other == tensorflow.serving.Resources.ResourceAllocation.Entry.getDefaultInstance()) return this; if (other.hasResource()) { mergeResource(other.getResource()); } if (other.getQuantity() != 0L) { setQuantity(other.getQuantity()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.serving.Resources.ResourceAllocation.Entry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.serving.Resources.ResourceAllocation.Entry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private tensorflow.serving.Resources.Resource resource_ = null; private com.google.protobuf.SingleFieldBuilderV3< tensorflow.serving.Resources.Resource, tensorflow.serving.Resources.Resource.Builder, tensorflow.serving.Resources.ResourceOrBuilder> resourceBuilder_; /** * .tensorflow.serving.Resource resource = 1; */ public boolean hasResource() { return resourceBuilder_ != null || resource_ != null; } /** * .tensorflow.serving.Resource resource = 1; */ public tensorflow.serving.Resources.Resource getResource() { if (resourceBuilder_ == null) { return resource_ == null ? tensorflow.serving.Resources.Resource.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } } /** * .tensorflow.serving.Resource resource = 1; */ public Builder setResource(tensorflow.serving.Resources.Resource value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; onChanged(); } else { resourceBuilder_.setMessage(value); } return this; } /** * .tensorflow.serving.Resource resource = 1; */ public Builder setResource( tensorflow.serving.Resources.Resource.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); onChanged(); } else { resourceBuilder_.setMessage(builderForValue.build()); } return this; } /** * .tensorflow.serving.Resource resource = 1; */ public Builder mergeResource(tensorflow.serving.Resources.Resource value) { if (resourceBuilder_ == null) { if (resource_ != null) { resource_ = tensorflow.serving.Resources.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); } else { resource_ = value; } onChanged(); } else { resourceBuilder_.mergeFrom(value); } return this; } /** * .tensorflow.serving.Resource resource = 1; */ public Builder clearResource() { if (resourceBuilder_ == null) { resource_ = null; onChanged(); } else { resource_ = null; resourceBuilder_ = null; } return this; } /** * .tensorflow.serving.Resource resource = 1; */ public tensorflow.serving.Resources.Resource.Builder getResourceBuilder() { onChanged(); return getResourceFieldBuilder().getBuilder(); } /** * .tensorflow.serving.Resource resource = 1; */ public tensorflow.serving.Resources.ResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? tensorflow.serving.Resources.Resource.getDefaultInstance() : resource_; } } /** * .tensorflow.serving.Resource resource = 1; */ private com.google.protobuf.SingleFieldBuilderV3< tensorflow.serving.Resources.Resource, tensorflow.serving.Resources.Resource.Builder, tensorflow.serving.Resources.ResourceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< tensorflow.serving.Resources.Resource, tensorflow.serving.Resources.Resource.Builder, tensorflow.serving.Resources.ResourceOrBuilder>( getResource(), getParentForChildren(), isClean()); resource_ = null; } return resourceBuilder_; } private long quantity_ ; /** * uint64 quantity = 2; */ public long getQuantity() { return quantity_; } /** * uint64 quantity = 2; */ public Builder setQuantity(long value) { quantity_ = value; onChanged(); return this; } /** * uint64 quantity = 2; */ public Builder clearQuantity() { quantity_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.serving.ResourceAllocation.Entry) } // @@protoc_insertion_point(class_scope:tensorflow.serving.ResourceAllocation.Entry) private static final tensorflow.serving.Resources.ResourceAllocation.Entry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.serving.Resources.ResourceAllocation.Entry(); } public static tensorflow.serving.Resources.ResourceAllocation.Entry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Entry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Entry(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation.Entry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int RESOURCE_QUANTITIES_FIELD_NUMBER = 1; private java.util.List resourceQuantities_; /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public java.util.List getResourceQuantitiesList() { return resourceQuantities_; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public java.util.List getResourceQuantitiesOrBuilderList() { return resourceQuantities_; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public int getResourceQuantitiesCount() { return resourceQuantities_.size(); } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.Entry getResourceQuantities(int index) { return resourceQuantities_.get(index); } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder getResourceQuantitiesOrBuilder( int index) { return resourceQuantities_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < resourceQuantities_.size(); i++) { output.writeMessage(1, resourceQuantities_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < resourceQuantities_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, resourceQuantities_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof tensorflow.serving.Resources.ResourceAllocation)) { return super.equals(obj); } tensorflow.serving.Resources.ResourceAllocation other = (tensorflow.serving.Resources.ResourceAllocation) obj; boolean result = true; result = result && getResourceQuantitiesList() .equals(other.getResourceQuantitiesList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getResourceQuantitiesCount() > 0) { hash = (37 * hash) + RESOURCE_QUANTITIES_FIELD_NUMBER; hash = (53 * hash) + getResourceQuantitiesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static tensorflow.serving.Resources.ResourceAllocation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(tensorflow.serving.Resources.ResourceAllocation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * An allocation of one or more kinds of resources, along with the quantity of
     * each. Used to denote the resources that a servable (or collection of
     * servables) will use or is currently using. Also used to denote resources
     * available to the serving system for loading more servables.
     * 
* * Protobuf type {@code tensorflow.serving.ResourceAllocation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.serving.ResourceAllocation) tensorflow.serving.Resources.ResourceAllocationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_fieldAccessorTable .ensureFieldAccessorsInitialized( tensorflow.serving.Resources.ResourceAllocation.class, tensorflow.serving.Resources.ResourceAllocation.Builder.class); } // Construct using tensorflow.serving.Resources.ResourceAllocation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getResourceQuantitiesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (resourceQuantitiesBuilder_ == null) { resourceQuantities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { resourceQuantitiesBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return tensorflow.serving.Resources.internal_static_tensorflow_serving_ResourceAllocation_descriptor; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation getDefaultInstanceForType() { return tensorflow.serving.Resources.ResourceAllocation.getDefaultInstance(); } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation build() { tensorflow.serving.Resources.ResourceAllocation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation buildPartial() { tensorflow.serving.Resources.ResourceAllocation result = new tensorflow.serving.Resources.ResourceAllocation(this); int from_bitField0_ = bitField0_; if (resourceQuantitiesBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { resourceQuantities_ = java.util.Collections.unmodifiableList(resourceQuantities_); bitField0_ = (bitField0_ & ~0x00000001); } result.resourceQuantities_ = resourceQuantities_; } else { result.resourceQuantities_ = resourceQuantitiesBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return (Builder) super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof tensorflow.serving.Resources.ResourceAllocation) { return mergeFrom((tensorflow.serving.Resources.ResourceAllocation)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(tensorflow.serving.Resources.ResourceAllocation other) { if (other == tensorflow.serving.Resources.ResourceAllocation.getDefaultInstance()) return this; if (resourceQuantitiesBuilder_ == null) { if (!other.resourceQuantities_.isEmpty()) { if (resourceQuantities_.isEmpty()) { resourceQuantities_ = other.resourceQuantities_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureResourceQuantitiesIsMutable(); resourceQuantities_.addAll(other.resourceQuantities_); } onChanged(); } } else { if (!other.resourceQuantities_.isEmpty()) { if (resourceQuantitiesBuilder_.isEmpty()) { resourceQuantitiesBuilder_.dispose(); resourceQuantitiesBuilder_ = null; resourceQuantities_ = other.resourceQuantities_; bitField0_ = (bitField0_ & ~0x00000001); resourceQuantitiesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getResourceQuantitiesFieldBuilder() : null; } else { resourceQuantitiesBuilder_.addAllMessages(other.resourceQuantities_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { tensorflow.serving.Resources.ResourceAllocation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (tensorflow.serving.Resources.ResourceAllocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List resourceQuantities_ = java.util.Collections.emptyList(); private void ensureResourceQuantitiesIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { resourceQuantities_ = new java.util.ArrayList(resourceQuantities_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.serving.Resources.ResourceAllocation.Entry, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder, tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder> resourceQuantitiesBuilder_; /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public java.util.List getResourceQuantitiesList() { if (resourceQuantitiesBuilder_ == null) { return java.util.Collections.unmodifiableList(resourceQuantities_); } else { return resourceQuantitiesBuilder_.getMessageList(); } } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public int getResourceQuantitiesCount() { if (resourceQuantitiesBuilder_ == null) { return resourceQuantities_.size(); } else { return resourceQuantitiesBuilder_.getCount(); } } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.Entry getResourceQuantities(int index) { if (resourceQuantitiesBuilder_ == null) { return resourceQuantities_.get(index); } else { return resourceQuantitiesBuilder_.getMessage(index); } } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder setResourceQuantities( int index, tensorflow.serving.Resources.ResourceAllocation.Entry value) { if (resourceQuantitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceQuantitiesIsMutable(); resourceQuantities_.set(index, value); onChanged(); } else { resourceQuantitiesBuilder_.setMessage(index, value); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder setResourceQuantities( int index, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder builderForValue) { if (resourceQuantitiesBuilder_ == null) { ensureResourceQuantitiesIsMutable(); resourceQuantities_.set(index, builderForValue.build()); onChanged(); } else { resourceQuantitiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder addResourceQuantities(tensorflow.serving.Resources.ResourceAllocation.Entry value) { if (resourceQuantitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceQuantitiesIsMutable(); resourceQuantities_.add(value); onChanged(); } else { resourceQuantitiesBuilder_.addMessage(value); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder addResourceQuantities( int index, tensorflow.serving.Resources.ResourceAllocation.Entry value) { if (resourceQuantitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureResourceQuantitiesIsMutable(); resourceQuantities_.add(index, value); onChanged(); } else { resourceQuantitiesBuilder_.addMessage(index, value); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder addResourceQuantities( tensorflow.serving.Resources.ResourceAllocation.Entry.Builder builderForValue) { if (resourceQuantitiesBuilder_ == null) { ensureResourceQuantitiesIsMutable(); resourceQuantities_.add(builderForValue.build()); onChanged(); } else { resourceQuantitiesBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder addResourceQuantities( int index, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder builderForValue) { if (resourceQuantitiesBuilder_ == null) { ensureResourceQuantitiesIsMutable(); resourceQuantities_.add(index, builderForValue.build()); onChanged(); } else { resourceQuantitiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder addAllResourceQuantities( java.lang.Iterable values) { if (resourceQuantitiesBuilder_ == null) { ensureResourceQuantitiesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, resourceQuantities_); onChanged(); } else { resourceQuantitiesBuilder_.addAllMessages(values); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder clearResourceQuantities() { if (resourceQuantitiesBuilder_ == null) { resourceQuantities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { resourceQuantitiesBuilder_.clear(); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public Builder removeResourceQuantities(int index) { if (resourceQuantitiesBuilder_ == null) { ensureResourceQuantitiesIsMutable(); resourceQuantities_.remove(index); onChanged(); } else { resourceQuantitiesBuilder_.remove(index); } return this; } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.Entry.Builder getResourceQuantitiesBuilder( int index) { return getResourceQuantitiesFieldBuilder().getBuilder(index); } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder getResourceQuantitiesOrBuilder( int index) { if (resourceQuantitiesBuilder_ == null) { return resourceQuantities_.get(index); } else { return resourceQuantitiesBuilder_.getMessageOrBuilder(index); } } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public java.util.List getResourceQuantitiesOrBuilderList() { if (resourceQuantitiesBuilder_ != null) { return resourceQuantitiesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(resourceQuantities_); } } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.Entry.Builder addResourceQuantitiesBuilder() { return getResourceQuantitiesFieldBuilder().addBuilder( tensorflow.serving.Resources.ResourceAllocation.Entry.getDefaultInstance()); } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public tensorflow.serving.Resources.ResourceAllocation.Entry.Builder addResourceQuantitiesBuilder( int index) { return getResourceQuantitiesFieldBuilder().addBuilder( index, tensorflow.serving.Resources.ResourceAllocation.Entry.getDefaultInstance()); } /** * repeated .tensorflow.serving.ResourceAllocation.Entry resource_quantities = 1; */ public java.util.List getResourceQuantitiesBuilderList() { return getResourceQuantitiesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.serving.Resources.ResourceAllocation.Entry, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder, tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder> getResourceQuantitiesFieldBuilder() { if (resourceQuantitiesBuilder_ == null) { resourceQuantitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< tensorflow.serving.Resources.ResourceAllocation.Entry, tensorflow.serving.Resources.ResourceAllocation.Entry.Builder, tensorflow.serving.Resources.ResourceAllocation.EntryOrBuilder>( resourceQuantities_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); resourceQuantities_ = null; } return resourceQuantitiesBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.serving.ResourceAllocation) } // @@protoc_insertion_point(class_scope:tensorflow.serving.ResourceAllocation) private static final tensorflow.serving.Resources.ResourceAllocation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new tensorflow.serving.Resources.ResourceAllocation(); } public static tensorflow.serving.Resources.ResourceAllocation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceAllocation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ResourceAllocation(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public tensorflow.serving.Resources.ResourceAllocation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_serving_Resource_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_serving_Resource_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_serving_ResourceAllocation_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_serving_ResourceAllocation_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_tensorflow_serving_ResourceAllocation_Entry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n,tensorflow_serving/resources/resources" + ".proto\022\022tensorflow.serving\032\036google/proto" + "buf/wrappers.proto\"_\n\010Resource\022\016\n\006device" + "\030\001 \001(\t\0225\n\017device_instance\030\002 \001(\0132\034.google" + ".protobuf.UInt32Value\022\014\n\004kind\030\003 \001(\t\"\252\001\n\022" + "ResourceAllocation\022I\n\023resource_quantitie" + "s\030\001 \003(\0132,.tensorflow.serving.ResourceAll" + "ocation.Entry\032I\n\005Entry\022.\n\010resource\030\001 \001(\013" + "2\034.tensorflow.serving.Resource\022\020\n\010quanti" + "ty\030\002 \001(\004b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.WrappersProto.getDescriptor(), }, assigner); internal_static_tensorflow_serving_Resource_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_tensorflow_serving_Resource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_serving_Resource_descriptor, new java.lang.String[] { "Device", "DeviceInstance", "Kind", }); internal_static_tensorflow_serving_ResourceAllocation_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_tensorflow_serving_ResourceAllocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_serving_ResourceAllocation_descriptor, new java.lang.String[] { "ResourceQuantities", }); internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor = internal_static_tensorflow_serving_ResourceAllocation_descriptor.getNestedTypes().get(0); internal_static_tensorflow_serving_ResourceAllocation_Entry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_tensorflow_serving_ResourceAllocation_Entry_descriptor, new java.lang.String[] { "Resource", "Quantity", }); com.google.protobuf.WrappersProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy