Send feedback
  
   
 
  
    
      Class Example (3.79.0) 
  
  
  
   
  
    
  
  
    
    
    
    
    
  Version latestkeyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   final   class  Example   extends   GeneratedMessageV3   implements   ExampleOrBuilder  
   A single example to upload or read from the Example Store.
 Protobuf type google.cloud.aiplatform.v1beta1.Example
    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
   
  
  
    
public   static   final   int   CREATE_TIME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   DISPLAY_NAME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  
  
    
public   static   final   int   EXAMPLE_ID_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  STORED_CONTENTS_EXAMPLE_FIELD_NUMBER 
  
    
public   static   final   int   STORED_CONTENTS_EXAMPLE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  
    
public   static   Example   getDefaultInstance ()  
  
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  
    
public   static   Example . Builder   newBuilder ()  
  
  
    
public   static   Example . Builder   newBuilder ( Example   prototype )  
  
    
      
        Parameter  
      
        Name Description  
      
        prototypeExample  
     
  
  
  
    
public   static   Example   parseDelimitedFrom ( InputStream   input )  
  
  
  
  
    
public   static   Example   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Example   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
  
  
    
public   static   Example   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Example   parseFrom ( ByteString   data )  
  
  
  
  
    
public   static   Example   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Example   parseFrom ( CodedInputStream   input )  
  
  
  
  
    
public   static   Example   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Example   parseFrom ( InputStream   input )  
  
  
  
  
    
public   static   Example   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Example   parseFrom ( ByteBuffer   data )  
  
  
  
  
    
public   static   Example   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  
  
    
public   static   Parser<Example>   parser ()  
  
  Methods
   
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  Overrides 
  
  
    
public   Timestamp   getCreateTime ()  
   Output only. Timestamp when this Example was created.
 .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
 
    
      
        Returns  
      
        Type Description  
      
        Timestamp The createTime.
 
     
  
  
    
public   TimestampOrBuilder   getCreateTimeOrBuilder ()  
   Output only. Timestamp when this Example was created.
 .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
 
    
public   Example   getDefaultInstanceForType ()  
  
  
    
public   String   getDisplayName ()  
   Optional. The display name for Example.
 string display_name = 1 [(.google.api.field_behavior) = OPTIONAL];
    
      
        Returns  
      
        Type Description  
      
        String The displayName.
 
     
  
  
    
public   ByteString   getDisplayNameBytes ()  
   Optional. The display name for Example.
 string display_name = 1 [(.google.api.field_behavior) = OPTIONAL];
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for displayName.
 
     
  
  
    
public   String   getExampleId ()  
   Optional. Immutable. Unique identifier of an example. If not specified when
 upserting new examples, the example_id will be generated.
 
 string example_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
 
    
      
        Returns  
      
        Type Description  
      
        String The exampleId.
 
     
  
  
    
public   ByteString   getExampleIdBytes ()  
   Optional. Immutable. Unique identifier of an example. If not specified when
 upserting new examples, the example_id will be generated.
 
 string example_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
 
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for exampleId.
 
     
  
  
    
public   Example . ExampleTypeCase   getExampleTypeCase ()  
  
  
    
public   Parser<Example>   getParserForType ()  
  
  Overrides 
  
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  getStoredContentsExample() 
  
    
public   StoredContentsExample   getStoredContentsExample ()  
   An example of chat history and its expected outcome to be used with
 GenerateContent.
 .google.cloud.aiplatform.v1beta1.StoredContentsExample stored_contents_example = 6;
 
getStoredContentsExampleOrBuilder() 
  
    
public   StoredContentsExampleOrBuilder   getStoredContentsExampleOrBuilder ()  
   An example of chat history and its expected outcome to be used with
 GenerateContent.
 .google.cloud.aiplatform.v1beta1.StoredContentsExample stored_contents_example = 6;
 
    
public   boolean   hasCreateTime ()  
   Output only. Timestamp when this Example was created.
 .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
 
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the createTime field is set.
 
     
  
  hasStoredContentsExample() 
  
    
public   boolean   hasStoredContentsExample ()  
   An example of chat history and its expected outcome to be used with
 GenerateContent.
 .google.cloud.aiplatform.v1beta1.StoredContentsExample stored_contents_example = 6;
 
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the storedContentsExample field is set.
 
     
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  
    
public   Example . Builder   newBuilderForType ()  
  
  
    
protected   Example . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  
    
public   Example . Builder   toBuilder ()  
  
  
    
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-10-29 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-10-29 UTC."],[],[]]