Returns the identifier established by the client that must be a string or a number or
null for a notification and therefore not expect to receive a response.
Sets the given field value (may be null) for the given field name. Any existing value
for the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.
Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.
Sets the identifier established by the client that must be a string or a number or null
for a notification and therefore not expect to receive a response.
[[["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,["# Class JsonRpcRequest (2.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0 (latest)](/java/docs/reference/google-http-client/latest/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.47.1](/java/docs/reference/google-http-client/1.47.1/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.46.3](/java/docs/reference/google-http-client/1.46.3/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.45.3](/java/docs/reference/google-http-client/1.45.3/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.44.2](/java/docs/reference/google-http-client/1.44.2/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.43.2](/java/docs/reference/google-http-client/1.43.2/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.42.3](/java/docs/reference/google-http-client/1.42.3/com.google.api.client.json.rpc2.JsonRpcRequest)\n- [1.41.8](/java/docs/reference/google-http-client/1.41.8/com.google.api.client.json.rpc2.JsonRpcRequest) \n\n public class JsonRpcRequest extends GenericData\n\n[Beta](/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta) \n\nJSON-RPC 2.0 request object.\n\nImplementation is not thread-safe. \n\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [AbstractMap](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html) \\\u003e [GenericData](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData) \\\u003e JsonRpcRequest \n\nInherited Members\n-----------------\n\n[GenericData.clone()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_clone__) \n[GenericData.entrySet()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_entrySet__) \n[GenericData.equals(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_equals_java_lang_Object_) \n[GenericData.get(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_get_java_lang_Object_) \n[GenericData.getClassInfo()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_getClassInfo__) \n[GenericData.getUnknownKeys()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_getUnknownKeys__) \n[GenericData.hashCode()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_hashCode__) \n[GenericData.put(String,Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_put_java_lang_String_java_lang_Object_) \n[GenericData.putAll(Map\\\u003c? extends String,?\\\u003e)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_putAll_java_util_Map___extends_java_lang_String____) \n[GenericData.remove(Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_remove_java_lang_Object_) \n[GenericData.set(String,Object)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_set_java_lang_String_java_lang_Object_) \n[GenericData.setUnknownKeys(Map\\\u003cString,Object\\\u003e)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_setUnknownKeys_java_util_Map_java_lang_String_java_lang_Object__) \n[GenericData.toString()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_toString__) \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.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.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[AbstractMap.clear()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#clear--) \n[AbstractMap.containsKey(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsKey-java.lang.Object-) \n[AbstractMap.containsValue(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsValue-java.lang.Object-) \n[AbstractMap.isEmpty()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#isEmpty--) \n[AbstractMap.keySet()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#keySet--) \n[AbstractMap.put(K,V)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#put-K-V-) \n[AbstractMap.putAll(Map\\\u003c? extends K,? extends V\\\u003e)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#putAll-java.util.Map\u003c? extends K-? extends V\u003e-) \n[AbstractMap.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#size--) \n[AbstractMap.values()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#values--)\n\nConstructors\n------------\n\n### JsonRpcRequest()\n\n public JsonRpcRequest()\n\nMethods\n-------\n\n### clone()\n\n public JsonRpcRequest clone()\n\nMakes a \"deep\" clone of the generic data, in which the clone is completely independent of the\noriginal.\n\n**Overrides** \n[GenericData.clone()](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_clone__)\n\n### getId()\n\n public Object getId()\n\nReturns the identifier established by the client that must be a string or a number or `\nnull` for a notification and therefore not expect to receive a response.\n\n### getMethod()\n\n public String getMethod()\n\nReturns the name of the method to be invoked.\n\n### getParameters()\n\n public Object getParameters()\n\nReturns the structured value that holds the parameter values to be used during the invocation\nof the method or `null` for none.\n\n### getVersion()\n\n public String getVersion()\n\nReturns the version of the JSON-RPC protocol which is `\"2.0\"`.\n\n### set(String fieldName, Object value)\n\n public JsonRpcRequest set(String fieldName, Object value)\n\nSets the given field value (may be `null`) for the given field name. Any existing value\nfor the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.\n\nOverriding is only supported for the purpose of calling the super implementation and\nchanging the return type, but nothing else.\n\n**Overrides** \n[GenericData.set(String fieldName, Object value)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.GenericData#com_google_api_client_util_GenericData_set_java_lang_String_java_lang_Object_)\n\n### setId(Object id)\n\n public void setId(Object id)\n\nSets the identifier established by the client that must be a string or a number or `null`\nfor a notification and therefore not expect to receive a response.\n\n### setMethod(String method)\n\n public void setMethod(String method)\n\nSets the name of the method to be invoked.\n\n### setParameters(Object parameters)\n\n public void setParameters(Object parameters)\n\nSets the structured value that holds the parameter values to be used during the invocation of\nthe method or `null` for none."]]