Class FieldMaskedSerializer (2.11.0)

public class FieldMaskedSerializer implements JsonSerializer<ApiMessage>

JSON Serializer for messages with a field mask to selectively serialize fields.

Inheritance

java.lang.Object > FieldMaskedSerializer

Implements

com.google.gson.JsonSerializer<com.google.api.gax.httpjson.ApiMessage>

Constructors

FieldMaskedSerializer(List<String> fieldMask)

public FieldMaskedSerializer(List<String> fieldMask)
Parameter
NameDescription
fieldMaskList<String>

Methods

serialize(ApiMessage requestBody, Type typeOfSrc, JsonSerializationContext context)

public JsonElement serialize(ApiMessage requestBody, Type typeOfSrc, JsonSerializationContext context)
Parameters
NameDescription
requestBodyApiMessage
typeOfSrcType
contextcom.google.gson.JsonSerializationContext
Returns
TypeDescription
com.google.gson.JsonElement