public final class CharacterMaskConfig extends com.google.protobuf.GeneratedMessageV3 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| Modifier and Type | Class and Description |
|---|---|
static class |
CharacterMaskConfig.Builder
Partially mask a string by replacing a given number of characters with a
fixed character.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CHARACTERS_TO_IGNORE_FIELD_NUMBER |
static int |
MASKING_CHARACTER_FIELD_NUMBER |
static int |
NUMBER_TO_MASK_FIELD_NUMBER |
static int |
REVERSE_ORDER_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
CharsToIgnore |
getCharactersToIgnore(int index)
When masking a string, items in this list will be skipped when replacing
characters.
|
int |
getCharactersToIgnoreCount()
When masking a string, items in this list will be skipped when replacing
characters.
|
List<CharsToIgnore> |
getCharactersToIgnoreList()
When masking a string, items in this list will be skipped when replacing
characters.
|
CharsToIgnoreOrBuilder |
getCharactersToIgnoreOrBuilder(int index)
When masking a string, items in this list will be skipped when replacing
characters.
|
List<? extends CharsToIgnoreOrBuilder> |
getCharactersToIgnoreOrBuilderList()
When masking a string, items in this list will be skipped when replacing
characters.
|
static CharacterMaskConfig |
getDefaultInstance() |
CharacterMaskConfig |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
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.
|
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.
|
int |
getNumberToMask()
Number of characters to mask.
|
com.google.protobuf.Parser<CharacterMaskConfig> |
getParserForType() |
boolean |
getReverseOrder()
Mask characters in reverse order.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static CharacterMaskConfig.Builder |
newBuilder() |
static CharacterMaskConfig.Builder |
newBuilder(CharacterMaskConfig prototype) |
CharacterMaskConfig.Builder |
newBuilderForType() |
protected CharacterMaskConfig.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static CharacterMaskConfig |
parseDelimitedFrom(InputStream input) |
static CharacterMaskConfig |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(byte[] data) |
static CharacterMaskConfig |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(ByteBuffer data) |
static CharacterMaskConfig |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(com.google.protobuf.ByteString data) |
static CharacterMaskConfig |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(com.google.protobuf.CodedInputStream input) |
static CharacterMaskConfig |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(InputStream input) |
static CharacterMaskConfig |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<CharacterMaskConfig> |
parser() |
CharacterMaskConfig.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MASKING_CHARACTER_FIELD_NUMBER
public static final int NUMBER_TO_MASK_FIELD_NUMBER
public static final int REVERSE_ORDER_FIELD_NUMBER
public static final int CHARACTERS_TO_IGNORE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String 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;getMaskingCharacter in interface CharacterMaskConfigOrBuilderpublic 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;getMaskingCharacterBytes in interface CharacterMaskConfigOrBuilderpublic 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;getNumberToMask in interface CharacterMaskConfigOrBuilderpublic 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;getReverseOrder in interface CharacterMaskConfigOrBuilderpublic List<CharsToIgnore> 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;getCharactersToIgnoreList in interface CharacterMaskConfigOrBuilderpublic List<? extends CharsToIgnoreOrBuilder> 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;getCharactersToIgnoreOrBuilderList in interface CharacterMaskConfigOrBuilderpublic 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;getCharactersToIgnoreCount in interface CharacterMaskConfigOrBuilderpublic CharsToIgnore getCharactersToIgnore(int index)
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;getCharactersToIgnore in interface CharacterMaskConfigOrBuilderpublic CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder(int index)
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 in interface CharacterMaskConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static CharacterMaskConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(InputStream input) throws IOException
IOExceptionpublic static CharacterMaskConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CharacterMaskConfig parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static CharacterMaskConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static CharacterMaskConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static CharacterMaskConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic CharacterMaskConfig.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static CharacterMaskConfig.Builder newBuilder()
public static CharacterMaskConfig.Builder newBuilder(CharacterMaskConfig prototype)
public CharacterMaskConfig.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected CharacterMaskConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static CharacterMaskConfig getDefaultInstance()
public static com.google.protobuf.Parser<CharacterMaskConfig> parser()
public com.google.protobuf.Parser<CharacterMaskConfig> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public CharacterMaskConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 Google LLC. All rights reserved.