Package com.google.privacy.dlp.v2
Class CharacterMaskConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
com.google.privacy.dlp.v2.CharacterMaskConfig.Builder
- All Implemented Interfaces:
CharacterMaskConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CharacterMaskConfig
public static final class CharacterMaskConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
implements CharacterMaskConfigOrBuilder
Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. This can be used on data of any type (numbers, longs, and so on) and when de-identifying structured data we'll attempt to preserve the original data's type. (This allows you to take a long like 123 and modify it to a string like **3.Protobuf type
google.privacy.dlp.v2.CharacterMaskConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllCharactersToIgnore(Iterable<? extends CharsToIgnore> values) When masking a string, items in this list will be skipped when replacing characters.addCharactersToIgnore(int index, CharsToIgnore value) When masking a string, items in this list will be skipped when replacing characters.addCharactersToIgnore(int index, CharsToIgnore.Builder builderForValue) When masking a string, items in this list will be skipped when replacing characters.When masking a string, items in this list will be skipped when replacing characters.addCharactersToIgnore(CharsToIgnore.Builder builderForValue) When masking a string, items in this list will be skipped when replacing characters.When masking a string, items in this list will be skipped when replacing characters.addCharactersToIgnoreBuilder(int index) When masking a string, items in this list will be skipped when replacing characters.build()clear()When masking a string, items in this list will be skipped when replacing characters.Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number.Number of characters to mask.Mask characters in reverse order.getCharactersToIgnore(int index) When masking a string, items in this list will be skipped when replacing characters.getCharactersToIgnoreBuilder(int index) When masking a string, items in this list will be skipped when replacing characters.When masking a string, items in this list will be skipped when replacing characters.intWhen masking a string, items in this list will be skipped when replacing characters.When masking a string, items in this list will be skipped when replacing characters.getCharactersToIgnoreOrBuilder(int index) When masking a string, items in this list will be skipped when replacing characters.List<? extends CharsToIgnoreOrBuilder>When masking a string, items in this list will be skipped when replacing characters.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorCharacter to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number.com.google.protobuf.ByteStringCharacter to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number.intNumber of characters to mask.booleanMask characters in reverse order.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(CharacterMaskConfig other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeCharactersToIgnore(int index) When masking a string, items in this list will be skipped when replacing characters.setCharactersToIgnore(int index, CharsToIgnore value) When masking a string, items in this list will be skipped when replacing characters.setCharactersToIgnore(int index, CharsToIgnore.Builder builderForValue) When masking a string, items in this list will be skipped when replacing characters.setMaskingCharacter(String value) Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number.setMaskingCharacterBytes(com.google.protobuf.ByteString value) Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number.setNumberToMask(int value) Number of characters to mask.setReverseOrder(boolean value) Mask characters in reverse order.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CharacterMaskConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CharacterMaskConfig.Builder>
-
mergeFrom
public CharacterMaskConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CharacterMaskConfig.Builder>- Throws:
IOException
-
getMaskingCharacter
Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.
string masking_character = 1;- Specified by:
getMaskingCharacterin interfaceCharacterMaskConfigOrBuilder- Returns:
- The maskingCharacter.
-
getMaskingCharacterBytes
public com.google.protobuf.ByteString getMaskingCharacterBytes()Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.
string masking_character = 1;- Specified by:
getMaskingCharacterBytesin interfaceCharacterMaskConfigOrBuilder- Returns:
- The bytes for maskingCharacter.
-
setMaskingCharacter
Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.
string masking_character = 1;- Parameters:
value- The maskingCharacter to set.- Returns:
- This builder for chaining.
-
clearMaskingCharacter
Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.
string masking_character = 1;- Returns:
- This builder for chaining.
-
setMaskingCharacterBytes
Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.
string masking_character = 1;- Parameters:
value- The bytes for maskingCharacter to set.- Returns:
- This builder for chaining.
-
getNumberToMask
public int getNumberToMask()Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values: - `masking_character` is `*` - `number_to_mask` is `-4` - `reverse_order` is `false` - `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` The resulting de-identified string is `****-****-****-3456`. Cloud DLP masks all but the last four characters. If `reverse_order` is `true`, all but the first four characters are masked as `1234-****-****-****`.
int32 number_to_mask = 2;- Specified by:
getNumberToMaskin interfaceCharacterMaskConfigOrBuilder- Returns:
- The numberToMask.
-
setNumberToMask
Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values: - `masking_character` is `*` - `number_to_mask` is `-4` - `reverse_order` is `false` - `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` The resulting de-identified string is `****-****-****-3456`. Cloud DLP masks all but the last four characters. If `reverse_order` is `true`, all but the first four characters are masked as `1234-****-****-****`.
int32 number_to_mask = 2;- Parameters:
value- The numberToMask to set.- Returns:
- This builder for chaining.
-
clearNumberToMask
Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values: - `masking_character` is `*` - `number_to_mask` is `-4` - `reverse_order` is `false` - `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` The resulting de-identified string is `****-****-****-3456`. Cloud DLP masks all but the last four characters. If `reverse_order` is `true`, all but the first four characters are masked as `1234-****-****-****`.
int32 number_to_mask = 2;- Returns:
- This builder for chaining.
-
getReverseOrder
public boolean getReverseOrder()Mask characters in reverse order. For example, if `masking_character` is `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` is `true`, then the string `12345` is masked as `12***`.
bool reverse_order = 3;- Specified by:
getReverseOrderin interfaceCharacterMaskConfigOrBuilder- Returns:
- The reverseOrder.
-
setReverseOrder
Mask characters in reverse order. For example, if `masking_character` is `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` is `true`, then the string `12345` is masked as `12***`.
bool reverse_order = 3;- Parameters:
value- The reverseOrder to set.- Returns:
- This builder for chaining.
-
clearReverseOrder
Mask characters in reverse order. For example, if `masking_character` is `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` is `true`, then the string `12345` is masked as `12***`.
bool reverse_order = 3;- Returns:
- This builder for chaining.
-
getCharactersToIgnoreList
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;- Specified by:
getCharactersToIgnoreListin interfaceCharacterMaskConfigOrBuilder
-
getCharactersToIgnoreCount
public int getCharactersToIgnoreCount()When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;- Specified by:
getCharactersToIgnoreCountin interfaceCharacterMaskConfigOrBuilder
-
getCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;- Specified by:
getCharactersToIgnorein interfaceCharacterMaskConfigOrBuilder
-
setCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
setCharactersToIgnore
public CharacterMaskConfig.Builder setCharactersToIgnore(int index, CharsToIgnore.Builder builderForValue) When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addCharactersToIgnore
public CharacterMaskConfig.Builder addCharactersToIgnore(int index, CharsToIgnore.Builder builderForValue) When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addAllCharactersToIgnore
public CharacterMaskConfig.Builder addAllCharactersToIgnore(Iterable<? extends CharsToIgnore> values) When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
clearCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
removeCharactersToIgnore
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
getCharactersToIgnoreBuilder
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
getCharactersToIgnoreOrBuilder
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;- Specified by:
getCharactersToIgnoreOrBuilderin interfaceCharacterMaskConfigOrBuilder
-
getCharactersToIgnoreOrBuilderList
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;- Specified by:
getCharactersToIgnoreOrBuilderListin interfaceCharacterMaskConfigOrBuilder
-
addCharactersToIgnoreBuilder
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
addCharactersToIgnoreBuilder
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; -
getCharactersToIgnoreBuilderList
When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;
-