Send feedback
Class Context (0.1.0)
Stay organized with collections
Save and categorize content based on your preferences.
public final class Context extends GeneratedMessageV3 implements ContextOrBuilder
A collection of context to apply to this conversation
Protobuf type google.cloud.geminidataanalytics.v1beta.Context
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
DATASOURCE_REFERENCES_FIELD_NUMBER
public static final int DATASOURCE_REFERENCES_FIELD_NUMBER
Field Value
Type
Description
int
EXAMPLE_QUERIES_FIELD_NUMBER
public static final int EXAMPLE_QUERIES_FIELD_NUMBER
Field Value
Type
Description
int
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
Field Value
Type
Description
int
SYSTEM_INSTRUCTION_FIELD_NUMBER
public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static Context getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Context . Builder newBuilder ()
newBuilder(Context prototype)
public static Context . Builder newBuilder ( Context prototype )
Parameter
Name
Description
prototype
Context
parseDelimitedFrom(InputStream input)
public static Context parseDelimitedFrom ( InputStream input )
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Context parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static Context parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Context parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static Context parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Context parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
parseFrom(CodedInputStream input)
public static Context parseFrom ( CodedInputStream input )
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Context parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(InputStream input)
public static Context parseFrom ( InputStream input )
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Context parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static Context parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Context parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<Context> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDatasourceReferences()
public DatasourceReferences getDatasourceReferences ()
Required. Data sources that are available for answering the question.
.google.cloud.geminidataanalytics.v1beta.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED];
getDatasourceReferencesOrBuilder()
public DatasourceReferencesOrBuilder getDatasourceReferencesOrBuilder ()
Required. Data sources that are available for answering the question.
.google.cloud.geminidataanalytics.v1beta.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED];
getDefaultInstanceForType()
public Context getDefaultInstanceForType ()
getExampleQueries(int index)
public ExampleQuery getExampleQueries ( int index )
Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present.
repeated .google.cloud.geminidataanalytics.v1beta.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
index
int
getExampleQueriesCount()
public int getExampleQueriesCount ()
Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present.
repeated .google.cloud.geminidataanalytics.v1beta.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
int
getExampleQueriesList()
public List<ExampleQuery> getExampleQueriesList ()
Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present.
repeated .google.cloud.geminidataanalytics.v1beta.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL];
getExampleQueriesOrBuilder(int index)
public ExampleQueryOrBuilder getExampleQueriesOrBuilder ( int index )
Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present.
repeated .google.cloud.geminidataanalytics.v1beta.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
index
int
getExampleQueriesOrBuilderList()
public List <? extends ExampleQueryOrBuilder > getExampleQueriesOrBuilderList ()
Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present.
repeated .google.cloud.geminidataanalytics.v1beta.ExampleQuery example_queries = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
List <? extends com.google.cloud.geminidataanalytics.v1beta.ExampleQueryOrBuilder >
getOptions()
public ConversationOptions getOptions ()
Optional. Additional options for the conversation.
.google.cloud.geminidataanalytics.v1beta.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL];
getOptionsOrBuilder()
public ConversationOptionsOrBuilder getOptionsOrBuilder ()
Optional. Additional options for the conversation.
.google.cloud.geminidataanalytics.v1beta.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL];
getParserForType()
public Parser<Context> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
getSystemInstruction()
public String getSystemInstruction ()
Optional. The basic entry point for data owners creating domain knowledge
for Agent.
Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
can help the model understand the business context around a user question.
string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
String
The systemInstruction.
getSystemInstructionBytes()
public ByteString getSystemInstructionBytes ()
Optional. The basic entry point for data owners creating domain knowledge
for Agent.
Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age
is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
can help the model understand the business context around a user question.
string system_instruction = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
ByteString
The bytes for systemInstruction.
hasDatasourceReferences()
public boolean hasDatasourceReferences ()
Required. Data sources that are available for answering the question.
.google.cloud.geminidataanalytics.v1beta.DatasourceReferences datasource_references = 7 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
boolean
Whether the datasourceReferences field is set.
hasOptions()
public boolean hasOptions ()
Optional. Additional options for the conversation.
.google.cloud.geminidataanalytics.v1beta.ConversationOptions options = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
boolean
Whether the options field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Context . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Context . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public Context . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]