Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
[[["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-03 UTC."],[],[],null,["# Interface ContentOrBuilder (1.32.0)\n\n public interface ContentOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getParts(int index)\n\n public abstract Part getParts(int index)\n\nRequired. Ordered `Parts` that constitute a single message. Parts may have\ndifferent IANA MIME types.\n\n`\nrepeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPartsCount()\n\n public abstract int getPartsCount()\n\nRequired. Ordered `Parts` that constitute a single message. Parts may have\ndifferent IANA MIME types.\n\n`\nrepeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPartsList()\n\n public abstract List\u003cPart\u003e getPartsList()\n\nRequired. Ordered `Parts` that constitute a single message. Parts may have\ndifferent IANA MIME types.\n\n`\nrepeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPartsOrBuilder(int index)\n\n public abstract PartOrBuilder getPartsOrBuilder(int index)\n\nRequired. Ordered `Parts` that constitute a single message. Parts may have\ndifferent IANA MIME types.\n\n`\nrepeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getPartsOrBuilderList()\n\n public abstract List\u003c? extends PartOrBuilder\u003e getPartsOrBuilderList()\n\nRequired. Ordered `Parts` that constitute a single message. Parts may have\ndifferent IANA MIME types.\n\n`\nrepeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getRole()\n\n public abstract String getRole()\n\nOptional. The producer of the content. Must be either 'user' or 'model'.\n\nUseful to set for multi-turn conversations, otherwise can be left blank\nor unset.\n\n`string role = 1 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getRoleBytes()\n\n public abstract ByteString getRoleBytes()\n\nOptional. The producer of the content. Must be either 'user' or 'model'.\n\nUseful to set for multi-turn conversations, otherwise can be left blank\nor unset.\n\n`string role = 1 [(.google.api.field_behavior) = OPTIONAL];`"]]