Package tensorflow.serving
Class InputOuterClass.ExampleListWithContext.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<InputOuterClass.ExampleListWithContext.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
tensorflow.serving.InputOuterClass.ExampleListWithContext.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,InputOuterClass.ExampleListWithContextOrBuilder
- Enclosing class:
InputOuterClass.ExampleListWithContext
public static final class InputOuterClass.ExampleListWithContext.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
implements InputOuterClass.ExampleListWithContextOrBuilder
Specifies one or more independent input Examples, with a common context
Example.
The common use case for context is to cleanly and optimally specify some
features that are common across multiple examples.
See example below with a search query as the context and multiple restaurants
to perform some inference on.
context: {
features: {
feature: {
key : "query"
value: {
bytes_list: {
value: [ "pizza" ]
}
}
}
}
}
examples: {
features: {
feature: {
key : "cuisine"
value: {
bytes_list: {
value: [ "Pizzeria" ]
}
}
}
}
}
examples: {
features: {
feature: {
key : "cuisine"
value: {
bytes_list: {
value: [ "Taqueria" ]
}
}
}
}
}
Implementations of ExampleListWithContext merge the context Example into each
of the Examples. Note that feature keys must not be duplicated between the
Examples and context Example, or the behavior is undefined.
See also:
tensorflow/core/example/example.proto
https://developers.google.com/protocol-buffers/docs/proto3#maps
Protobuf type tensorflow.serving.ExampleListWithContext-
Method Summary
Modifier and TypeMethodDescriptionaddAllExamples(Iterable<? extends Example> values) repeated .tensorflow.Example examples = 1;addExamples(int index, Example value) repeated .tensorflow.Example examples = 1;addExamples(int index, Example.Builder builderForValue) repeated .tensorflow.Example examples = 1;addExamples(Example value) repeated .tensorflow.Example examples = 1;addExamples(Example.Builder builderForValue) repeated .tensorflow.Example examples = 1;repeated .tensorflow.Example examples = 1;addExamplesBuilder(int index) repeated .tensorflow.Example examples = 1;addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear().tensorflow.Example context = 2;repeated .tensorflow.Example examples = 1;clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone().tensorflow.Example context = 2;.tensorflow.Example context = 2;.tensorflow.Example context = 2;static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetExamples(int index) repeated .tensorflow.Example examples = 1;getExamplesBuilder(int index) repeated .tensorflow.Example examples = 1;repeated .tensorflow.Example examples = 1;intrepeated .tensorflow.Example examples = 1;repeated .tensorflow.Example examples = 1;getExamplesOrBuilder(int index) repeated .tensorflow.Example examples = 1;List<? extends ExampleOrBuilder> repeated .tensorflow.Example examples = 1;boolean.tensorflow.Example context = 2;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeContext(Example value) .tensorflow.Example context = 2;mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeExamples(int index) repeated .tensorflow.Example examples = 1;setContext(Example value) .tensorflow.Example context = 2;setContext(Example.Builder builderForValue) .tensorflow.Example context = 2;setExamples(int index, Example value) repeated .tensorflow.Example examples = 1;setExamples(int index, Example.Builder builderForValue) repeated .tensorflow.Example examples = 1;setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
setField
public InputOuterClass.ExampleListWithContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
clearField
public InputOuterClass.ExampleListWithContext.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
clearOneof
public InputOuterClass.ExampleListWithContext.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
setRepeatedField
public InputOuterClass.ExampleListWithContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
addRepeatedField
public InputOuterClass.ExampleListWithContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
mergeFrom
public InputOuterClass.ExampleListWithContext.Builder mergeFrom(InputOuterClass.ExampleListWithContext other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
mergeFrom
public InputOuterClass.ExampleListWithContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<InputOuterClass.ExampleListWithContext.Builder>- Throws:
IOException
-
getExamplesList
repeated .tensorflow.Example examples = 1;- Specified by:
getExamplesListin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
getExamplesCount
public int getExamplesCount()repeated .tensorflow.Example examples = 1;- Specified by:
getExamplesCountin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
getExamples
repeated .tensorflow.Example examples = 1;- Specified by:
getExamplesin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
setExamples
repeated .tensorflow.Example examples = 1; -
setExamples
public InputOuterClass.ExampleListWithContext.Builder setExamples(int index, Example.Builder builderForValue) repeated .tensorflow.Example examples = 1; -
addExamples
repeated .tensorflow.Example examples = 1; -
addExamples
repeated .tensorflow.Example examples = 1; -
addExamples
repeated .tensorflow.Example examples = 1; -
addExamples
public InputOuterClass.ExampleListWithContext.Builder addExamples(int index, Example.Builder builderForValue) repeated .tensorflow.Example examples = 1; -
addAllExamples
public InputOuterClass.ExampleListWithContext.Builder addAllExamples(Iterable<? extends Example> values) repeated .tensorflow.Example examples = 1; -
clearExamples
repeated .tensorflow.Example examples = 1; -
removeExamples
repeated .tensorflow.Example examples = 1; -
getExamplesBuilder
repeated .tensorflow.Example examples = 1; -
getExamplesOrBuilder
repeated .tensorflow.Example examples = 1;- Specified by:
getExamplesOrBuilderin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
getExamplesOrBuilderList
repeated .tensorflow.Example examples = 1;- Specified by:
getExamplesOrBuilderListin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
addExamplesBuilder
repeated .tensorflow.Example examples = 1; -
addExamplesBuilder
repeated .tensorflow.Example examples = 1; -
getExamplesBuilderList
repeated .tensorflow.Example examples = 1; -
hasContext
public boolean hasContext().tensorflow.Example context = 2;- Specified by:
hasContextin interfaceInputOuterClass.ExampleListWithContextOrBuilder- Returns:
- Whether the context field is set.
-
getContext
.tensorflow.Example context = 2;- Specified by:
getContextin interfaceInputOuterClass.ExampleListWithContextOrBuilder- Returns:
- The context.
-
setContext
.tensorflow.Example context = 2; -
setContext
.tensorflow.Example context = 2; -
mergeContext
.tensorflow.Example context = 2; -
clearContext
.tensorflow.Example context = 2; -
getContextBuilder
.tensorflow.Example context = 2; -
getContextOrBuilder
.tensorflow.Example context = 2;- Specified by:
getContextOrBuilderin interfaceInputOuterClass.ExampleListWithContextOrBuilder
-
setUnknownFields
public final InputOuterClass.ExampleListWithContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-
mergeUnknownFields
public final InputOuterClass.ExampleListWithContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<InputOuterClass.ExampleListWithContext.Builder>
-