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, unknownFields
memoizedSize
memoizedHashCode
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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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 MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
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.
int32 number_to_mask = 2;
getNumberToMask
in interface CharacterMaskConfigOrBuilder
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 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
public 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 CharacterMaskConfigOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static CharacterMaskConfig parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static CharacterMaskConfig parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static CharacterMaskConfig parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static CharacterMaskConfig parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static CharacterMaskConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public CharacterMaskConfig.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static CharacterMaskConfig.Builder newBuilder()
public static CharacterMaskConfig.Builder newBuilder(CharacterMaskConfig prototype)
public CharacterMaskConfig.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected CharacterMaskConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static CharacterMaskConfig getDefaultInstance()
public static Parser<CharacterMaskConfig> parser()
public Parser<CharacterMaskConfig> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public CharacterMaskConfig getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder