public final class CharacterMaskConfig extends 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.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| 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 |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
CharsToIgnore |
getCharactersToIgnore(int index)
When masking a string, items in this list will be skipped when replacing.
|
int |
getCharactersToIgnoreCount()
When masking a string, items in this list will be skipped when replacing.
|
java.util.List<CharsToIgnore> |
getCharactersToIgnoreList()
When masking a string, items in this list will be skipped when replacing.
|
CharsToIgnoreOrBuilder |
getCharactersToIgnoreOrBuilder(int index)
When masking a string, items in this list will be skipped when replacing.
|
java.util.List<? extends CharsToIgnoreOrBuilder> |
getCharactersToIgnoreOrBuilderList()
When masking a string, items in this list will be skipped when replacing.
|
static CharacterMaskConfig |
getDefaultInstance() |
CharacterMaskConfig |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getMaskingCharacter()
Character to mask the sensitive values—for example, "*" for an
alphabetic string such as name, or "0" for a numeric string such as ZIP
code or credit card number.
|
ByteString |
getMaskingCharacterBytes()
Character to mask the sensitive values—for example, "*" for an
alphabetic string such as name, or "0" for a numeric string such as ZIP
code or credit card number.
|
int |
getNumberToMask()
Number of characters to mask.
|
Parser<CharacterMaskConfig> |
getParserForType() |
boolean |
getReverseOrder()
Mask characters in reverse order.
|
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static CharacterMaskConfig.Builder |
newBuilder() |
static CharacterMaskConfig.Builder |
newBuilder(CharacterMaskConfig prototype) |
CharacterMaskConfig.Builder |
newBuilderForType() |
protected CharacterMaskConfig.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static CharacterMaskConfig |
parseDelimitedFrom(java.io.InputStream input) |
static CharacterMaskConfig |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(byte[] data) |
static CharacterMaskConfig |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(java.nio.ByteBuffer data) |
static CharacterMaskConfig |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(ByteString data) |
static CharacterMaskConfig |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(CodedInputStream input) |
static CharacterMaskConfig |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static CharacterMaskConfig |
parseFrom(java.io.InputStream input) |
static CharacterMaskConfig |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<CharacterMaskConfig> |
parser() |
CharacterMaskConfig.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, 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, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic 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
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.lang.String getMaskingCharacter()
Character to mask the sensitive values—for example, "*" for an alphabetic string such as name, or "0" for a numeric string such as ZIP code or credit card number. String must have length 1. If not supplied, we will default to "*" for strings, 0 for digits.
string masking_character = 1;getMaskingCharacter in interface CharacterMaskConfigOrBuilderpublic ByteString getMaskingCharacterBytes()
Character to mask the sensitive values—for example, "*" for an alphabetic string such as name, or "0" for a numeric string such as ZIP code or credit card number. String must have length 1. If not supplied, we will default to "*" for strings, 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.
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 1234-5678-9012-3456 -> 00000000000000-3456 If `masking_character` is '*', `number_to_mask` is 3, and `reverse_order` is true, then 12345 -> 12***
bool reverse_order = 3;getReverseOrder in interface CharacterMaskConfigOrBuilderpublic java.util.List<CharsToIgnore> getCharactersToIgnoreList()
When masking a string, items in this list will be skipped when replacing. For example, if your string is 555-555-5555 and you ask us to skip `-` and mask 5 chars with * we would produce ***-*55-5555.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;getCharactersToIgnoreList in interface CharacterMaskConfigOrBuilderpublic java.util.List<? extends CharsToIgnoreOrBuilder> getCharactersToIgnoreOrBuilderList()
When masking a string, items in this list will be skipped when replacing. For example, if your string is 555-555-5555 and you ask us to skip `-` and mask 5 chars with * we would produce ***-*55-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. For example, if your string is 555-555-5555 and you ask us to skip `-` and mask 5 chars with * we would produce ***-*55-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. For example, if your string is 555-555-5555 and you ask us to skip `-` and mask 5 chars with * we would produce ***-*55-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. For example, if your string is 555-555-5555 and you ask us to skip `-` and mask 5 chars with * we would produce ***-*55-5555.
repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4;getCharactersToIgnoreOrBuilder in interface CharacterMaskConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static CharacterMaskConfig parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static CharacterMaskConfig parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static CharacterMaskConfig parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static CharacterMaskConfig parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static CharacterMaskConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic CharacterMaskConfig.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static CharacterMaskConfig.Builder newBuilder()
public static CharacterMaskConfig.Builder newBuilder(CharacterMaskConfig prototype)
public CharacterMaskConfig.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected CharacterMaskConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static CharacterMaskConfig getDefaultInstance()
public static Parser<CharacterMaskConfig> parser()
public Parser<CharacterMaskConfig> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public CharacterMaskConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder