Class SearchResponse.Summary.SafetyAttributes.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder> implements SearchResponse.Summary.SafetyAttributesOrBuilder
Safety Attribute categories and their associated confidence scores.
Protobuf typegoogle.cloud.discoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResponse.Summary.SafetyAttributes.BuilderaddAllCategories(Iterable<String> values)The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.BuilderaddAllScores(Iterable<? extends Float> values)The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.BuilderaddCategories(String value)The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.BuilderaddCategoriesBytes(com.google.protobuf.ByteString value)The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SearchResponse.Summary.SafetyAttributes.BuilderaddScores(float value)The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributesbuild()SearchResponse.Summary.SafetyAttributesbuildPartial()SearchResponse.Summary.SafetyAttributes.Builderclear()SearchResponse.Summary.SafetyAttributes.BuilderclearCategories()The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)SearchResponse.Summary.SafetyAttributes.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)SearchResponse.Summary.SafetyAttributes.BuilderclearScores()The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.Builderclone()StringgetCategories(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.intgetCategoriesCount()The display names of Safety Attribute categories associated with the generated content.com.google.protobuf.ProtocolStringListgetCategoriesList()The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetScores(int index)The confidence scores of the each category, higher value means higher confidence.intgetScoresCount()The confidence scores of the each category, higher value means higher confidence.List<Float>getScoresList()The confidence scores of the each category, higher value means higher confidence.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()SearchResponse.Summary.SafetyAttributes.BuildermergeFrom(SearchResponse.Summary.SafetyAttributes other)SearchResponse.Summary.SafetyAttributes.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)SearchResponse.Summary.SafetyAttributes.BuildermergeFrom(com.google.protobuf.Message other)SearchResponse.Summary.SafetyAttributes.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SearchResponse.Summary.SafetyAttributes.BuildersetCategories(int index, String value)The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SearchResponse.Summary.SafetyAttributes.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)SearchResponse.Summary.SafetyAttributes.BuildersetScores(int index, float value)The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.BuildersetUnknownFields(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, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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<SearchResponse.Summary.SafetyAttributes.Builder>
-
clear
public 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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
getDefaultInstanceForType
public SearchResponse.Summary.SafetyAttributes getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public SearchResponse.Summary.SafetyAttributes build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SearchResponse.Summary.SafetyAttributes buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SearchResponse.Summary.SafetyAttributes.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<SearchResponse.Summary.SafetyAttributes.Builder>
-
setField
public SearchResponse.Summary.SafetyAttributes.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<SearchResponse.Summary.SafetyAttributes.Builder>
-
clearField
public SearchResponse.Summary.SafetyAttributes.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
clearOneof
public SearchResponse.Summary.SafetyAttributes.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
setRepeatedField
public SearchResponse.Summary.SafetyAttributes.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<SearchResponse.Summary.SafetyAttributes.Builder>
-
addRepeatedField
public SearchResponse.Summary.SafetyAttributes.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<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeFrom
public SearchResponse.Summary.SafetyAttributes.Builder mergeFrom(com.google.protobuf.Message other)
- 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.GeneratedMessageV3.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
public String getCategories(int index)
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
public SearchResponse.Summary.SafetyAttributes.Builder setCategories(int index, String value)
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
public SearchResponse.Summary.SafetyAttributes.Builder addCategories(String value)
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
public SearchResponse.Summary.SafetyAttributes.Builder addAllCategories(Iterable<String> values)
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
public SearchResponse.Summary.SafetyAttributes.Builder 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
public List<Float> 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
public SearchResponse.Summary.SafetyAttributes.Builder setScores(int index, float value)
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
public SearchResponse.Summary.SafetyAttributes.Builder addScores(float value)
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
public SearchResponse.Summary.SafetyAttributes.Builder 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.
-
setUnknownFields
public final SearchResponse.Summary.SafetyAttributes.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeUnknownFields
public final SearchResponse.Summary.SafetyAttributes.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
-