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

org.tensorflow.framework.FunctionDefLibrary Maven / Gradle / Ivy

There is a newer version: 0.11.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: function.proto

package org.tensorflow.framework;

/**
 * 
 * A library is a set of named functions.
 * 
* * Protobuf type {@code tensorflow.FunctionDefLibrary} */ public final class FunctionDefLibrary extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.FunctionDefLibrary) FunctionDefLibraryOrBuilder { // Use FunctionDefLibrary.newBuilder() to construct. private FunctionDefLibrary(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FunctionDefLibrary() { function_ = java.util.Collections.emptyList(); gradient_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private FunctionDefLibrary( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { function_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } function_.add( input.readMessage(org.tensorflow.framework.FunctionDef.parser(), extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { gradient_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } gradient_.add( input.readMessage(org.tensorflow.framework.GradientDef.parser(), extensionRegistry)); 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)) { function_ = java.util.Collections.unmodifiableList(function_); } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { gradient_ = java.util.Collections.unmodifiableList(gradient_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.FunctionDefLibrary.class, org.tensorflow.framework.FunctionDefLibrary.Builder.class); } public static final int FUNCTION_FIELD_NUMBER = 1; private java.util.List function_; /** * repeated .tensorflow.FunctionDef function = 1; */ public java.util.List getFunctionList() { return function_; } /** * repeated .tensorflow.FunctionDef function = 1; */ public java.util.List getFunctionOrBuilderList() { return function_; } /** * repeated .tensorflow.FunctionDef function = 1; */ public int getFunctionCount() { return function_.size(); } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDef getFunction(int index) { return function_.get(index); } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDefOrBuilder getFunctionOrBuilder( int index) { return function_.get(index); } public static final int GRADIENT_FIELD_NUMBER = 2; private java.util.List gradient_; /** * repeated .tensorflow.GradientDef gradient = 2; */ public java.util.List getGradientList() { return gradient_; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public java.util.List getGradientOrBuilderList() { return gradient_; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public int getGradientCount() { return gradient_.size(); } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDef getGradient(int index) { return gradient_.get(index); } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDefOrBuilder getGradientOrBuilder( int index) { return gradient_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < function_.size(); i++) { output.writeMessage(1, function_.get(i)); } for (int i = 0; i < gradient_.size(); i++) { output.writeMessage(2, gradient_.get(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < function_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, function_.get(i)); } for (int i = 0; i < gradient_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, gradient_.get(i)); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.FunctionDefLibrary)) { return super.equals(obj); } org.tensorflow.framework.FunctionDefLibrary other = (org.tensorflow.framework.FunctionDefLibrary) obj; boolean result = true; result = result && getFunctionList() .equals(other.getFunctionList()); result = result && getGradientList() .equals(other.getGradientList()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getFunctionCount() > 0) { hash = (37 * hash) + FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getFunctionList().hashCode(); } if (getGradientCount() > 0) { hash = (37 * hash) + GRADIENT_FIELD_NUMBER; hash = (53 * hash) + getGradientList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.FunctionDefLibrary parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.FunctionDefLibrary parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.FunctionDefLibrary parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.framework.FunctionDefLibrary prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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 library is a set of named functions.
   * 
* * Protobuf type {@code tensorflow.FunctionDefLibrary} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.FunctionDefLibrary) org.tensorflow.framework.FunctionDefLibraryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.FunctionDefLibrary.class, org.tensorflow.framework.FunctionDefLibrary.Builder.class); } // Construct using org.tensorflow.framework.FunctionDefLibrary.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getFunctionFieldBuilder(); getGradientFieldBuilder(); } } public Builder clear() { super.clear(); if (functionBuilder_ == null) { function_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { functionBuilder_.clear(); } if (gradientBuilder_ == null) { gradient_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { gradientBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.FunctionProtos.internal_static_tensorflow_FunctionDefLibrary_descriptor; } public org.tensorflow.framework.FunctionDefLibrary getDefaultInstanceForType() { return org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance(); } public org.tensorflow.framework.FunctionDefLibrary build() { org.tensorflow.framework.FunctionDefLibrary result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.FunctionDefLibrary buildPartial() { org.tensorflow.framework.FunctionDefLibrary result = new org.tensorflow.framework.FunctionDefLibrary(this); int from_bitField0_ = bitField0_; if (functionBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { function_ = java.util.Collections.unmodifiableList(function_); bitField0_ = (bitField0_ & ~0x00000001); } result.function_ = function_; } else { result.function_ = functionBuilder_.build(); } if (gradientBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { gradient_ = java.util.Collections.unmodifiableList(gradient_); bitField0_ = (bitField0_ & ~0x00000002); } result.gradient_ = gradient_; } else { result.gradient_ = gradientBuilder_.build(); } onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.framework.FunctionDefLibrary) { return mergeFrom((org.tensorflow.framework.FunctionDefLibrary)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.FunctionDefLibrary other) { if (other == org.tensorflow.framework.FunctionDefLibrary.getDefaultInstance()) return this; if (functionBuilder_ == null) { if (!other.function_.isEmpty()) { if (function_.isEmpty()) { function_ = other.function_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureFunctionIsMutable(); function_.addAll(other.function_); } onChanged(); } } else { if (!other.function_.isEmpty()) { if (functionBuilder_.isEmpty()) { functionBuilder_.dispose(); functionBuilder_ = null; function_ = other.function_; bitField0_ = (bitField0_ & ~0x00000001); functionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFunctionFieldBuilder() : null; } else { functionBuilder_.addAllMessages(other.function_); } } } if (gradientBuilder_ == null) { if (!other.gradient_.isEmpty()) { if (gradient_.isEmpty()) { gradient_ = other.gradient_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureGradientIsMutable(); gradient_.addAll(other.gradient_); } onChanged(); } } else { if (!other.gradient_.isEmpty()) { if (gradientBuilder_.isEmpty()) { gradientBuilder_.dispose(); gradientBuilder_ = null; gradient_ = other.gradient_; bitField0_ = (bitField0_ & ~0x00000002); gradientBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getGradientFieldBuilder() : null; } else { gradientBuilder_.addAllMessages(other.gradient_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.FunctionDefLibrary parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.FunctionDefLibrary) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List function_ = java.util.Collections.emptyList(); private void ensureFunctionIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { function_ = new java.util.ArrayList(function_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder> functionBuilder_; /** * repeated .tensorflow.FunctionDef function = 1; */ public java.util.List getFunctionList() { if (functionBuilder_ == null) { return java.util.Collections.unmodifiableList(function_); } else { return functionBuilder_.getMessageList(); } } /** * repeated .tensorflow.FunctionDef function = 1; */ public int getFunctionCount() { if (functionBuilder_ == null) { return function_.size(); } else { return functionBuilder_.getCount(); } } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDef getFunction(int index) { if (functionBuilder_ == null) { return function_.get(index); } else { return functionBuilder_.getMessage(index); } } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder setFunction( int index, org.tensorflow.framework.FunctionDef value) { if (functionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFunctionIsMutable(); function_.set(index, value); onChanged(); } else { functionBuilder_.setMessage(index, value); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder setFunction( int index, org.tensorflow.framework.FunctionDef.Builder builderForValue) { if (functionBuilder_ == null) { ensureFunctionIsMutable(); function_.set(index, builderForValue.build()); onChanged(); } else { functionBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder addFunction(org.tensorflow.framework.FunctionDef value) { if (functionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFunctionIsMutable(); function_.add(value); onChanged(); } else { functionBuilder_.addMessage(value); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder addFunction( int index, org.tensorflow.framework.FunctionDef value) { if (functionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFunctionIsMutable(); function_.add(index, value); onChanged(); } else { functionBuilder_.addMessage(index, value); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder addFunction( org.tensorflow.framework.FunctionDef.Builder builderForValue) { if (functionBuilder_ == null) { ensureFunctionIsMutable(); function_.add(builderForValue.build()); onChanged(); } else { functionBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder addFunction( int index, org.tensorflow.framework.FunctionDef.Builder builderForValue) { if (functionBuilder_ == null) { ensureFunctionIsMutable(); function_.add(index, builderForValue.build()); onChanged(); } else { functionBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder addAllFunction( java.lang.Iterable values) { if (functionBuilder_ == null) { ensureFunctionIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, function_); onChanged(); } else { functionBuilder_.addAllMessages(values); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder clearFunction() { if (functionBuilder_ == null) { function_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { functionBuilder_.clear(); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public Builder removeFunction(int index) { if (functionBuilder_ == null) { ensureFunctionIsMutable(); function_.remove(index); onChanged(); } else { functionBuilder_.remove(index); } return this; } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDef.Builder getFunctionBuilder( int index) { return getFunctionFieldBuilder().getBuilder(index); } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDefOrBuilder getFunctionOrBuilder( int index) { if (functionBuilder_ == null) { return function_.get(index); } else { return functionBuilder_.getMessageOrBuilder(index); } } /** * repeated .tensorflow.FunctionDef function = 1; */ public java.util.List getFunctionOrBuilderList() { if (functionBuilder_ != null) { return functionBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(function_); } } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDef.Builder addFunctionBuilder() { return getFunctionFieldBuilder().addBuilder( org.tensorflow.framework.FunctionDef.getDefaultInstance()); } /** * repeated .tensorflow.FunctionDef function = 1; */ public org.tensorflow.framework.FunctionDef.Builder addFunctionBuilder( int index) { return getFunctionFieldBuilder().addBuilder( index, org.tensorflow.framework.FunctionDef.getDefaultInstance()); } /** * repeated .tensorflow.FunctionDef function = 1; */ public java.util.List getFunctionBuilderList() { return getFunctionFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder> getFunctionFieldBuilder() { if (functionBuilder_ == null) { functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.FunctionDef, org.tensorflow.framework.FunctionDef.Builder, org.tensorflow.framework.FunctionDefOrBuilder>( function_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); function_ = null; } return functionBuilder_; } private java.util.List gradient_ = java.util.Collections.emptyList(); private void ensureGradientIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { gradient_ = new java.util.ArrayList(gradient_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.GradientDef, org.tensorflow.framework.GradientDef.Builder, org.tensorflow.framework.GradientDefOrBuilder> gradientBuilder_; /** * repeated .tensorflow.GradientDef gradient = 2; */ public java.util.List getGradientList() { if (gradientBuilder_ == null) { return java.util.Collections.unmodifiableList(gradient_); } else { return gradientBuilder_.getMessageList(); } } /** * repeated .tensorflow.GradientDef gradient = 2; */ public int getGradientCount() { if (gradientBuilder_ == null) { return gradient_.size(); } else { return gradientBuilder_.getCount(); } } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDef getGradient(int index) { if (gradientBuilder_ == null) { return gradient_.get(index); } else { return gradientBuilder_.getMessage(index); } } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder setGradient( int index, org.tensorflow.framework.GradientDef value) { if (gradientBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureGradientIsMutable(); gradient_.set(index, value); onChanged(); } else { gradientBuilder_.setMessage(index, value); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder setGradient( int index, org.tensorflow.framework.GradientDef.Builder builderForValue) { if (gradientBuilder_ == null) { ensureGradientIsMutable(); gradient_.set(index, builderForValue.build()); onChanged(); } else { gradientBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder addGradient(org.tensorflow.framework.GradientDef value) { if (gradientBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureGradientIsMutable(); gradient_.add(value); onChanged(); } else { gradientBuilder_.addMessage(value); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder addGradient( int index, org.tensorflow.framework.GradientDef value) { if (gradientBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureGradientIsMutable(); gradient_.add(index, value); onChanged(); } else { gradientBuilder_.addMessage(index, value); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder addGradient( org.tensorflow.framework.GradientDef.Builder builderForValue) { if (gradientBuilder_ == null) { ensureGradientIsMutable(); gradient_.add(builderForValue.build()); onChanged(); } else { gradientBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder addGradient( int index, org.tensorflow.framework.GradientDef.Builder builderForValue) { if (gradientBuilder_ == null) { ensureGradientIsMutable(); gradient_.add(index, builderForValue.build()); onChanged(); } else { gradientBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder addAllGradient( java.lang.Iterable values) { if (gradientBuilder_ == null) { ensureGradientIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, gradient_); onChanged(); } else { gradientBuilder_.addAllMessages(values); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder clearGradient() { if (gradientBuilder_ == null) { gradient_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { gradientBuilder_.clear(); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public Builder removeGradient(int index) { if (gradientBuilder_ == null) { ensureGradientIsMutable(); gradient_.remove(index); onChanged(); } else { gradientBuilder_.remove(index); } return this; } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDef.Builder getGradientBuilder( int index) { return getGradientFieldBuilder().getBuilder(index); } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDefOrBuilder getGradientOrBuilder( int index) { if (gradientBuilder_ == null) { return gradient_.get(index); } else { return gradientBuilder_.getMessageOrBuilder(index); } } /** * repeated .tensorflow.GradientDef gradient = 2; */ public java.util.List getGradientOrBuilderList() { if (gradientBuilder_ != null) { return gradientBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(gradient_); } } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDef.Builder addGradientBuilder() { return getGradientFieldBuilder().addBuilder( org.tensorflow.framework.GradientDef.getDefaultInstance()); } /** * repeated .tensorflow.GradientDef gradient = 2; */ public org.tensorflow.framework.GradientDef.Builder addGradientBuilder( int index) { return getGradientFieldBuilder().addBuilder( index, org.tensorflow.framework.GradientDef.getDefaultInstance()); } /** * repeated .tensorflow.GradientDef gradient = 2; */ public java.util.List getGradientBuilderList() { return getGradientFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.GradientDef, org.tensorflow.framework.GradientDef.Builder, org.tensorflow.framework.GradientDefOrBuilder> getGradientFieldBuilder() { if (gradientBuilder_ == null) { gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.tensorflow.framework.GradientDef, org.tensorflow.framework.GradientDef.Builder, org.tensorflow.framework.GradientDefOrBuilder>( gradient_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); gradient_ = null; } return gradientBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:tensorflow.FunctionDefLibrary) } // @@protoc_insertion_point(class_scope:tensorflow.FunctionDefLibrary) private static final org.tensorflow.framework.FunctionDefLibrary DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.FunctionDefLibrary(); } public static org.tensorflow.framework.FunctionDefLibrary getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public FunctionDefLibrary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new FunctionDefLibrary(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.FunctionDefLibrary getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy