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-08-28 UTC."],[],[],null,["# Interface TokensInfoOrBuilder (1.32.0)\n\n public interface TokensInfoOrBuilder 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### getRole()\n\n public abstract String getRole()\n\nOptional. Optional fields for the role from the corresponding Content.\n\n`string role = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getRoleBytes()\n\n public abstract ByteString getRoleBytes()\n\nOptional. Optional fields for the role from the corresponding Content.\n\n`string role = 3 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getTokenIds(int index)\n\n public abstract long getTokenIds(int index)\n\nA list of token ids from the input.\n\n`repeated int64 token_ids = 2;`\n\n### getTokenIdsCount()\n\n public abstract int getTokenIdsCount()\n\nA list of token ids from the input.\n\n`repeated int64 token_ids = 2;`\n\n### getTokenIdsList()\n\n public abstract List\u003cLong\u003e getTokenIdsList()\n\nA list of token ids from the input.\n\n`repeated int64 token_ids = 2;`\n\n### getTokens(int index)\n\n public abstract ByteString getTokens(int index)\n\nA list of tokens from the input.\n\n`repeated bytes tokens = 1;`\n\n### getTokensCount()\n\n public abstract int getTokensCount()\n\nA list of tokens from the input.\n\n`repeated bytes tokens = 1;`\n\n### getTokensList()\n\n public abstract List\u003cByteString\u003e getTokensList()\n\nA list of tokens from the input.\n\n`repeated bytes tokens = 1;`"]]