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-16 UTC."],[],[],null,["# Class PredictionServiceGrpc (1.32.0)\n\n public final class PredictionServiceGrpc\n\nA service for online predictions and explanations. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e PredictionServiceGrpc \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Fields\n-------------\n\n### SERVICE_NAME\n\n public static final String SERVICE_NAME\n\nStatic Methods\n--------------\n\n### bindService(PredictionServiceGrpc.AsyncService service)\n\n public static final ServerServiceDefinition bindService(PredictionServiceGrpc.AsyncService service)\n\n### getDirectPredictMethod()\n\n public static MethodDescriptor\u003cDirectPredictRequest,DirectPredictResponse\u003e getDirectPredictMethod()\n\n### getDirectRawPredictMethod()\n\n public static MethodDescriptor\u003cDirectRawPredictRequest,DirectRawPredictResponse\u003e getDirectRawPredictMethod()\n\n### getExplainMethod()\n\n public static MethodDescriptor\u003cExplainRequest,ExplainResponse\u003e getExplainMethod()\n\n### getGenerateContentMethod()\n\n public static MethodDescriptor\u003cGenerateContentRequest,GenerateContentResponse\u003e getGenerateContentMethod()\n\n### getPredictMethod()\n\n public static MethodDescriptor\u003cPredictRequest,PredictResponse\u003e getPredictMethod()\n\n### getRawPredictMethod()\n\n public static MethodDescriptor\u003cRawPredictRequest,HttpBody\u003e getRawPredictMethod()\n\n### getServerStreamingPredictMethod()\n\n public static MethodDescriptor\u003cStreamingPredictRequest,StreamingPredictResponse\u003e getServerStreamingPredictMethod()\n\n### getServiceDescriptor()\n\n public static ServiceDescriptor getServiceDescriptor()\n\n### getStreamDirectPredictMethod()\n\n public static MethodDescriptor\u003cStreamDirectPredictRequest,StreamDirectPredictResponse\u003e getStreamDirectPredictMethod()\n\n### getStreamDirectRawPredictMethod()\n\n public static MethodDescriptor\u003cStreamDirectRawPredictRequest,StreamDirectRawPredictResponse\u003e getStreamDirectRawPredictMethod()\n\n### getStreamGenerateContentMethod()\n\n public static MethodDescriptor\u003cGenerateContentRequest,GenerateContentResponse\u003e getStreamGenerateContentMethod()\n\n### getStreamRawPredictMethod()\n\n public static MethodDescriptor\u003cStreamRawPredictRequest,HttpBody\u003e getStreamRawPredictMethod()\n\n### getStreamingPredictMethod()\n\n public static MethodDescriptor\u003cStreamingPredictRequest,StreamingPredictResponse\u003e getStreamingPredictMethod()\n\n### getStreamingRawPredictMethod()\n\n public static MethodDescriptor\u003cStreamingRawPredictRequest,StreamingRawPredictResponse\u003e getStreamingRawPredictMethod()\n\n### newBlockingStub(Channel channel)\n\n public static PredictionServiceGrpc.PredictionServiceBlockingStub newBlockingStub(Channel channel)\n\nCreates a new blocking-style stub that supports unary and streaming output calls on the service\n\n### newBlockingV2Stub(Channel channel)\n\n public static PredictionServiceGrpc.PredictionServiceBlockingV2Stub newBlockingV2Stub(Channel channel)\n\nCreates a new blocking-style stub that supports all types of calls on the service\n\n### newFutureStub(Channel channel)\n\n public static PredictionServiceGrpc.PredictionServiceFutureStub newFutureStub(Channel channel)\n\nCreates a new ListenableFuture-style stub that supports unary calls on the service\n\n### newStub(Channel channel)\n\n public static PredictionServiceGrpc.PredictionServiceStub newStub(Channel channel)\n\nCreates a new async stub that supports all call types for the service"]]