com.google.protobuf.FieldMask .
| Modifier and Type | Class and Description |
|---|---|
| public static class | FieldMaskUtil.MergeOptions
Options to customize merging behavior. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FieldMask | fromFieldNumbers(Class<? extends Message> type, int... fieldNumbers)
Constructs a FieldMask from the passed field numbers. |
| public static FieldMask | fromFieldNumbers(Class<? extends Message> type, Iterable<Integer> fieldNumbers)
Constructs a FieldMask from the passed field numbers. |
| public static FieldMask | fromJsonString(String value)
Converts a field mask from a Proto3 JSON string, that is splitting the paths along commas and converting from camel case to snake case. |
| public static FieldMask | |
| public static FieldMask | fromString(Class<? extends Message> type, String value)
Parses from a string to a FieldMask and validates all field paths. |
| public static FieldMask | fromStringList(Class<? extends Message> type, Iterable<String> paths)
Constructs a FieldMask for a list of field paths in a certain type. |
| public static FieldMask | |
| public static boolean | |
| public static boolean | isValid(Descriptors.
Checks whether paths in a given fields mask are valid. |
| public static boolean | |
| public static boolean | isValid(Descriptors.
Checks whether paths in a given fields mask are valid. |
| public static void | merge(FieldMask mask, Message source, Message.
Merges fields specified by a FieldMask from one message to another with the specified merge options. |
| public static void | |
| public static FieldMask | |
| public static String | toJsonString(FieldMask fieldMask)
Converts a field mask to a Proto3 JSON string, that is converting from snake case to camel case and joining all paths into one string with commas. |
| public static String | |
| public static FieldMask |
| FIELD_PATH_SEPARATOR | back to summary |
|---|---|
| private static final String FIELD_PATH_SEPARATOR | |
| FIELD_PATH_SEPARATOR_REGEX | back to summary |
|---|---|
| private static final String FIELD_PATH_SEPARATOR_REGEX | |
| FIELD_SEPARATOR_REGEX | back to summary |
|---|---|
| private static final String FIELD_SEPARATOR_REGEX | |
| FieldMaskUtil | back to summary |
|---|---|
| private FieldMaskUtil() | |
| fromFieldNumbers | back to summary |
|---|---|
| public static FieldMask fromFieldNumbers(Class<? extends Message> type, int... fieldNumbers) Constructs a FieldMask from the passed field numbers.
| |
| fromFieldNumbers | back to summary |
|---|---|
| public static FieldMask fromFieldNumbers(Class<? extends Message> type, Iterable<Integer> fieldNumbers) Constructs a FieldMask from the passed field numbers.
| |
| fromJsonString | back to summary |
|---|---|
| public static FieldMask fromJsonString(String value) Converts a field mask from a Proto3 JSON string, that is splitting the paths along commas and converting from camel case to snake case. | |
| fromString | back to summary |
|---|---|
| public static FieldMask fromString(String value) Parses from a string to a FieldMask. | |
| fromString | back to summary |
|---|---|
| public static FieldMask fromString(Class<? extends Message> type, String value) Parses from a string to a FieldMask and validates all field paths.
| |
| fromStringList | back to summary |
|---|---|
| public static FieldMask fromStringList(Class<? extends Message> type, Iterable<String> paths) Constructs a FieldMask for a list of field paths in a certain type.
| |
| intersection | back to summary |
|---|---|
| public static FieldMask intersection(FieldMask mask1, FieldMask mask2) Calculates the intersection of two FieldMasks. | |
| isValid | back to summary |
|---|---|
| public static boolean isValid(Class<? extends Message> type, FieldMask fieldMask) Checks whether paths in a given fields mask are valid. | |
| isValid | back to summary |
|---|---|
| public static boolean isValid(Descriptors. Checks whether paths in a given fields mask are valid. | |
| isValid | back to summary |
|---|---|
| public static boolean isValid(Class<? extends Message> type, String path) Checks whether a given field path is valid. | |
| isValid | back to summary |
|---|---|
| public static boolean isValid(Descriptors. Checks whether paths in a given fields mask are valid. | |
| merge | back to summary |
|---|---|
| public static void merge(FieldMask mask, Message source, Message. Merges fields specified by a FieldMask from one message to another with the specified merge options. | |
| merge | back to summary |
|---|---|
| public static void merge(FieldMask mask, Message source, Message. Merges fields specified by a FieldMask from one message to another. | |
| normalize | back to summary |
|---|---|
| public static FieldMask normalize(FieldMask mask) Converts a FieldMask to its canonical form. In the canonical form of a FieldMask, all field paths are sorted alphabetically and redundant field paths are removed. | |
| toJsonString | back to summary |
|---|---|
| public static String toJsonString(FieldMask fieldMask) Converts a field mask to a Proto3 JSON string, that is converting from snake case to camel case and joining all paths into one string with commas. | |
| toString | back to summary |
|---|---|
| public static String toString(FieldMask fieldMask) Converts a FieldMask to a string. | |
| union | back to summary |
|---|---|
| public static FieldMask union(FieldMask firstMask, FieldMask secondMask, FieldMask... otherMasks) Creates a union of two or more FieldMasks. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | replaceMessageFields()
Whether to replace message fields (i.e., discard existing content in destination message fields). |
| public boolean | replacePrimitiveFields()
Whether to replace primitive (non-repeated and non-message) fields in destination message fields with the source primitive fields (i.e., clear destination field if source field is not set). |
| public boolean | replaceRepeatedFields()
Whether to replace repeated fields (i.e., discard existing content in destination repeated fields). |
| public FieldMaskUtil. | |
| public FieldMaskUtil. | setReplacePrimitiveFields(boolean value)
Specify whether to replace primitive (non-repeated and non-message) fields in destination message fields with the source primitive fields. |
| public FieldMaskUtil. |
| replaceMessageFields | back to summary |
|---|---|
| private boolean replaceMessageFields | |
| replacePrimitiveFields | back to summary |
|---|---|
| private boolean replacePrimitiveFields | |
| replaceRepeatedFields | back to summary |
|---|---|
| private boolean replaceRepeatedFields | |
| MergeOptions | back to summary |
|---|---|
| public MergeOptions() | |
| replaceMessageFields | back to summary |
|---|---|
| public boolean replaceMessageFields() Whether to replace message fields (i.e., discard existing content in destination message fields). | |
| replacePrimitiveFields | back to summary |
|---|---|
| public boolean replacePrimitiveFields() Whether to replace primitive (non-repeated and non-message) fields in destination message fields with the source primitive fields (i.e., clear destination field if source field is not set). | |
| replaceRepeatedFields | back to summary |
|---|---|
| public boolean replaceRepeatedFields() Whether to replace repeated fields (i.e., discard existing content in destination repeated fields). | |
| setReplaceMessageFields | back to summary |
|---|---|
| public FieldMaskUtil. Specify whether to replace message fields. Defaults to false. If true, discard existing content in destination message fields when merging. If false, merge the source message field into the destination message field.
| |
| setReplacePrimitiveFields | back to summary |
|---|---|
| public FieldMaskUtil. Specify whether to replace primitive (non-repeated and non-message) fields in destination message fields with the source primitive fields. Defaults to false. If true, set the value of the destination primitive field to the source primitive field if the source field is set, but clear the destination field otherwise. If false, always set the value of the destination primitive field to the source primitive field, and if the source field is unset, the default value of the source field is copied to the destination.
| |
| setReplaceRepeatedFields | back to summary |
|---|---|
| public FieldMaskUtil. Specify whether to replace repeated fields. Defaults to false. If true, discard existing content in destination repeated fields) when merging. If false, append elements from source repeated field to the destination repeated field.
| |