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.v1.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.v1.SearchResponse.Summary.SafetyAttributes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResponse.Summary.SafetyAttributes.Builder
addAllCategories(Iterable<String> values)
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.Builder
addAllScores(Iterable<? extends Float> values)
The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.Builder
addCategories(String value)
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.Builder
addCategoriesBytes(com.google.protobuf.ByteString value)
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SearchResponse.Summary.SafetyAttributes.Builder
addScores(float value)
The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes
build()
SearchResponse.Summary.SafetyAttributes
buildPartial()
SearchResponse.Summary.SafetyAttributes.Builder
clear()
SearchResponse.Summary.SafetyAttributes.Builder
clearCategories()
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SearchResponse.Summary.SafetyAttributes.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SearchResponse.Summary.SafetyAttributes.Builder
clearScores()
The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.Builder
clone()
String
getCategories(int index)
The display names of Safety Attribute categories associated with the generated content.com.google.protobuf.ByteString
getCategoriesBytes(int index)
The display names of Safety Attribute categories associated with the generated content.int
getCategoriesCount()
The display names of Safety Attribute categories associated with the generated content.com.google.protobuf.ProtocolStringList
getCategoriesList()
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
float
getScores(int index)
The confidence scores of the each category, higher value means higher confidence.int
getScoresCount()
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.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SearchResponse.Summary.SafetyAttributes.Builder
mergeFrom(SearchResponse.Summary.SafetyAttributes other)
SearchResponse.Summary.SafetyAttributes.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SearchResponse.Summary.SafetyAttributes.Builder
mergeFrom(com.google.protobuf.Message other)
SearchResponse.Summary.SafetyAttributes.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SearchResponse.Summary.SafetyAttributes.Builder
setCategories(int index, String value)
The display names of Safety Attribute categories associated with the generated content.SearchResponse.Summary.SafetyAttributes.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SearchResponse.Summary.SafetyAttributes.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SearchResponse.Summary.SafetyAttributes.Builder
setScores(int index, float value)
The confidence scores of the each category, higher value means higher confidence.SearchResponse.Summary.SafetyAttributes.Builder
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, 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
clear
public SearchResponse.Summary.SafetyAttributes.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
getDefaultInstanceForType
public SearchResponse.Summary.SafetyAttributes getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SearchResponse.Summary.SafetyAttributes build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SearchResponse.Summary.SafetyAttributes buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SearchResponse.Summary.SafetyAttributes.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in 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:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
clearField
public SearchResponse.Summary.SafetyAttributes.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
clearOneof
public SearchResponse.Summary.SafetyAttributes.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in 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:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in 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:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeFrom
public SearchResponse.Summary.SafetyAttributes.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in 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:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getCategoriesList
in 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:
getCategoriesCount
in 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:
getCategories
in 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:
getCategoriesBytes
in 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:
getScoresList
in 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:
getScoresCount
in 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:
getScores
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
mergeUnknownFields
public final SearchResponse.Summary.SafetyAttributes.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SearchResponse.Summary.SafetyAttributes.Builder>
-
-