Class SearchResponse.Summary.SafetyAttributes.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes.Builder
- All Implemented Interfaces:
SearchResponse.Summary.SafetyAttributesOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SearchResponse.Summary.SafetyAttributes
public static final class SearchResponse.Summary.SafetyAttributes.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
implements SearchResponse.Summary.SafetyAttributesOrBuilder
Safety Attribute categories and their associated confidence scores.Protobuf type
google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes-
Method Summary
Modifier and TypeMethodDescriptionaddAllCategories(Iterable<String> values) The display names of Safety Attribute categories associated with the generated content.addAllScores(Iterable<? extends Float> values) The confidence scores of the each category, higher value means higher confidence.addCategories(String value) The display names of Safety Attribute categories associated with the generated content.addCategoriesBytes(com.google.protobuf.ByteString value) The display names of Safety Attribute categories associated with the generated content.addScores(float value) The confidence scores of the each category, higher value means higher confidence.build()clear()The display names of Safety Attribute categories associated with the generated content.The confidence scores of the each category, higher value means higher confidence.getCategories(int index) The display names of Safety Attribute categories associated with the generated content.com.google.protobuf.ByteStringgetCategoriesBytes(int index) The display names of Safety Attribute categories associated with the generated content.intThe display names of Safety Attribute categories associated with the generated content.com.google.protobuf.ProtocolStringListThe display names of Safety Attribute categories associated with the generated content.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorfloatgetScores(int index) The confidence scores of the each category, higher value means higher confidence.intThe confidence scores of the each category, higher value means higher confidence.The confidence scores of the each category, higher value means higher confidence.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCategories(int index, String value) The display names of Safety Attribute categories associated with the generated content.setScores(int index, float value) The confidence scores of the each category, higher value means higher confidence.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.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.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.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
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeFrom
public SearchResponse.Summary.SafetyAttributes.Builder mergeFrom(SearchResponse.Summary.SafetyAttributes other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeFrom
public SearchResponse.Summary.SafetyAttributes.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<SearchResponse.Summary.SafetyAttributes.Builder>- Throws:
IOException
-
getCategoriesList
public com.google.protobuf.ProtocolStringList getCategoriesList()The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Specified by:
getCategoriesListin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Returns:
- A list containing the categories.
-
getCategoriesCount
public int getCategoriesCount()The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Specified by:
getCategoriesCountin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Returns:
- The count of categories.
-
getCategories
The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Specified by:
getCategoriesin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The categories at the given index.
-
getCategoriesBytes
public com.google.protobuf.ByteString getCategoriesBytes(int index) The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Specified by:
getCategoriesBytesin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the categories at the given index.
-
setCategories
The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Parameters:
index- The index to set the value at.value- The categories to set.- Returns:
- This builder for chaining.
-
addCategories
The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Parameters:
value- The categories to add.- Returns:
- This builder for chaining.
-
addAllCategories
The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Parameters:
values- The categories to add.- Returns:
- This builder for chaining.
-
clearCategories
The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Returns:
- This builder for chaining.
-
addCategoriesBytes
public SearchResponse.Summary.SafetyAttributes.Builder addCategoriesBytes(com.google.protobuf.ByteString value) The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.
repeated string categories = 1;- Parameters:
value- The bytes of the categories to add.- Returns:
- This builder for chaining.
-
getScoresList
The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Specified by:
getScoresListin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Returns:
- A list containing the scores.
-
getScoresCount
public int getScoresCount()The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Specified by:
getScoresCountin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Returns:
- The count of scores.
-
getScores
public float getScores(int index) The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Specified by:
getScoresin interfaceSearchResponse.Summary.SafetyAttributesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The scores at the given index.
-
setScores
The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Parameters:
index- The index to set the value at.value- The scores to set.- Returns:
- This builder for chaining.
-
addScores
The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Parameters:
value- The scores to add.- Returns:
- This builder for chaining.
-
addAllScores
public SearchResponse.Summary.SafetyAttributes.Builder addAllScores(Iterable<? extends Float> values) The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Parameters:
values- The scores to add.- Returns:
- This builder for chaining.
-
clearScores
The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.
repeated float scores = 2;- Returns:
- This builder for chaining.
-