public class PatchBuilder
extends java.lang.Object
new PatchBuilder()
.set("labels.starred", true)
.set("labels.hidden", false)
.getMap();
returns a Map, which will be serialized to the following JSON:
{
"labels": {
"starred": true,
"hidden": false
}
}
}
AbstractGoogleApiOperations.patch(String, Object, Class)| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PATH_DELIMITER |
| Constructor and Description |
|---|
PatchBuilder() |
| Modifier and Type | Method and Description |
|---|---|
PatchBuilder |
delete(java.lang.String path)
Defines a property to be deleted by setting its value to null.
|
java.util.Map<java.lang.String,java.lang.Object> |
getMap()
Returns the map created so far
|
PatchBuilder |
set(java.lang.String path,
java.lang.Enum<?> value)
Adds a property and a value to be set in the PATCH request
|
PatchBuilder |
set(java.lang.String path,
java.lang.Object value)
Adds a property and a value to be set in the PATCH request
|
public static final java.lang.String PATH_DELIMITER
public PatchBuilder set(java.lang.String path, java.lang.Object value)
path - the path representing the property, with "." representing nested propertiesvalue - the value to be set for the propertyPatchBuilder instancepublic PatchBuilder set(java.lang.String path, java.lang.Enum<?> value)
path - the path representing the property, with "." representing nested propertiesvalue - the value to be set for the propertyPatchBuilder instancepublic PatchBuilder delete(java.lang.String path)
set(String, Object) with null valuepath - the path representing the property, with "." representing nested propertiesPatchBuilder instancepublic java.util.Map<java.lang.String,java.lang.Object> getMap()