Class GenerateGroundedContentResponse.Candidate.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerateGroundedContentResponse.Candidate.Builder>
com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.Builder
- All Implemented Interfaces:
GenerateGroundedContentResponse.CandidateOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GenerateGroundedContentResponse.Candidate
public static final class GenerateGroundedContentResponse.Candidate.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GenerateGroundedContentResponse.Candidate.Builder>
implements GenerateGroundedContentResponse.CandidateOrBuilder
A response candidate generated from the model.Protobuf type
google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Content of the candidate.Grounding metadata for the generated content.The overall grounding score for the candidate, in the range of [0, 1].Index of the candidate.Content of the candidate.Content of the candidate.Content of the candidate.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorGrounding metadata for the generated content.Grounding metadata for the generated content.Grounding metadata for the generated content.floatThe overall grounding score for the candidate, in the range of [0, 1].intgetIndex()Index of the candidate.booleanContent of the candidate.booleanGrounding metadata for the generated content.booleanThe overall grounding score for the candidate, in the range of [0, 1].protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanContent of the candidate.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Grounding metadata for the generated content.Content of the candidate.setContent(GroundedGenerationContent.Builder builderForValue) Content of the candidate.Grounding metadata for the generated content.setGroundingMetadata(GenerateGroundedContentResponse.Candidate.GroundingMetadata.Builder builderForValue) Grounding metadata for the generated content.setGroundingScore(float value) The overall grounding score for the candidate, in the range of [0, 1].setIndex(int value) Index of the candidate.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<GenerateGroundedContentResponse.Candidate.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<GenerateGroundedContentResponse.Candidate.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<GenerateGroundedContentResponse.Candidate.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
public GenerateGroundedContentResponse.Candidate.Builder mergeFrom(com.google.protobuf.Message other) - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateGroundedContentResponse.Candidate.Builder>
-
mergeFrom
public GenerateGroundedContentResponse.Candidate.Builder mergeFrom(GenerateGroundedContentResponse.Candidate other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GenerateGroundedContentResponse.Candidate.Builder>
-
mergeFrom
public GenerateGroundedContentResponse.Candidate.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<GenerateGroundedContentResponse.Candidate.Builder>- Throws:
IOException
-
getIndex
public int getIndex()Index of the candidate.
int32 index = 1;- Specified by:
getIndexin interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- The index.
-
setIndex
Index of the candidate.
int32 index = 1;- Parameters:
value- The index to set.- Returns:
- This builder for chaining.
-
clearIndex
Index of the candidate.
int32 index = 1;- Returns:
- This builder for chaining.
-
hasContent
public boolean hasContent()Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2;- Specified by:
hasContentin interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- Whether the content field is set.
-
getContent
Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2;- Specified by:
getContentin interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- The content.
-
setContent
public GenerateGroundedContentResponse.Candidate.Builder setContent(GroundedGenerationContent value) Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2; -
setContent
public GenerateGroundedContentResponse.Candidate.Builder setContent(GroundedGenerationContent.Builder builderForValue) Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2; -
mergeContent
public GenerateGroundedContentResponse.Candidate.Builder mergeContent(GroundedGenerationContent value) Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2; -
clearContent
Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2; -
getContentBuilder
Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2; -
getContentOrBuilder
Content of the candidate.
.google.cloud.discoveryengine.v1beta.GroundedGenerationContent content = 2;- Specified by:
getContentOrBuilderin interfaceGenerateGroundedContentResponse.CandidateOrBuilder
-
hasGroundingScore
public boolean hasGroundingScore()The overall grounding score for the candidate, in the range of [0, 1].
optional float grounding_score = 3;- Specified by:
hasGroundingScorein interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- Whether the groundingScore field is set.
-
getGroundingScore
public float getGroundingScore()The overall grounding score for the candidate, in the range of [0, 1].
optional float grounding_score = 3;- Specified by:
getGroundingScorein interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- The groundingScore.
-
setGroundingScore
The overall grounding score for the candidate, in the range of [0, 1].
optional float grounding_score = 3;- Parameters:
value- The groundingScore to set.- Returns:
- This builder for chaining.
-
clearGroundingScore
The overall grounding score for the candidate, in the range of [0, 1].
optional float grounding_score = 3;- Returns:
- This builder for chaining.
-
hasGroundingMetadata
public boolean hasGroundingMetadata()Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4;- Specified by:
hasGroundingMetadatain interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- Whether the groundingMetadata field is set.
-
getGroundingMetadata
Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4;- Specified by:
getGroundingMetadatain interfaceGenerateGroundedContentResponse.CandidateOrBuilder- Returns:
- The groundingMetadata.
-
setGroundingMetadata
public GenerateGroundedContentResponse.Candidate.Builder setGroundingMetadata(GenerateGroundedContentResponse.Candidate.GroundingMetadata value) Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4; -
setGroundingMetadata
public GenerateGroundedContentResponse.Candidate.Builder setGroundingMetadata(GenerateGroundedContentResponse.Candidate.GroundingMetadata.Builder builderForValue) Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4; -
mergeGroundingMetadata
public GenerateGroundedContentResponse.Candidate.Builder mergeGroundingMetadata(GenerateGroundedContentResponse.Candidate.GroundingMetadata value) Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4; -
clearGroundingMetadata
Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4; -
getGroundingMetadataBuilder
public GenerateGroundedContentResponse.Candidate.GroundingMetadata.Builder getGroundingMetadataBuilder()Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4; -
getGroundingMetadataOrBuilder
public GenerateGroundedContentResponse.Candidate.GroundingMetadataOrBuilder getGroundingMetadataOrBuilder()Grounding metadata for the generated content.
.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata grounding_metadata = 4;- Specified by:
getGroundingMetadataOrBuilderin interfaceGenerateGroundedContentResponse.CandidateOrBuilder
-