Enum DataMaskingPolicy.PredefinedExpression
java.lang.Object
java.lang.Enum<DataMaskingPolicy.PredefinedExpression>
com.google.cloud.bigquery.datapolicies.v2.DataMaskingPolicy.PredefinedExpression
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<DataMaskingPolicy.PredefinedExpression>
- Enclosing class:
- DataMaskingPolicy
public static enum DataMaskingPolicy.PredefinedExpression
extends Enum<DataMaskingPolicy.PredefinedExpression>
implements com.google.protobuf.ProtocolMessageEnum
The available masking rules. Learn more here: https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.Protobuf enum
google.cloud.bigquery.datapolicies.v2.DataMaskingPolicy.PredefinedExpression-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMasking expression to replace data with NULLs.Masking expression to only show the <i>year</i> of `Date`, `DateTime` and `TimeStamp`.Masking expression to replace data with their default masking values.Masking expression for email addresses.Masking expression shows the first four characters of text.Masking expression shows the last four characters of text.Default, unspecified predefined expression.Masking expression that uses hashing to mask column data.Masking expression to replace data with SHA-256 hash. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMasking expression to replace data with NULLs.static final intMasking expression to only show the <i>year</i> of `Date`, `DateTime` and `TimeStamp`.static final intMasking expression to replace data with their default masking values.static final intMasking expression for email addresses.static final intMasking expression shows the first four characters of text.static final intMasking expression shows the last four characters of text.static final intDefault, unspecified predefined expression.static final intMasking expression that uses hashing to mask column data.static final intMasking expression to replace data with SHA-256 hash. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<DataMaskingPolicy.PredefinedExpression>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PREDEFINED_EXPRESSION_UNSPECIFIED
Default, unspecified predefined expression. No masking will take place since no expression is specified.
PREDEFINED_EXPRESSION_UNSPECIFIED = 0; -
SHA256
Masking expression to replace data with SHA-256 hash.
SHA256 = 1; -
ALWAYS_NULL
Masking expression to replace data with NULLs.
ALWAYS_NULL = 2; -
DEFAULT_MASKING_VALUE
Masking expression to replace data with their default masking values. The default masking values for each type listed as below: * STRING: "" * BYTES: b'' * INTEGER: 0 * FLOAT: 0.0 * NUMERIC: 0 * BOOLEAN: FALSE * TIMESTAMP: 1970-01-01 00:00:00 UTC * DATE: 1970-01-01 * TIME: 00:00:00 * DATETIME: 1970-01-01T00:00:00 * GEOGRAPHY: POINT(0 0) * BIGNUMERIC: 0 * ARRAY: [] * STRUCT: NOT_APPLICABLE * JSON: NULL
DEFAULT_MASKING_VALUE = 3; -
LAST_FOUR_CHARACTERS
Masking expression shows the last four characters of text. The masking behavior is as follows: * If text length > 4 characters: Replace text with XXXXX, append last four characters of original text. * If text length <= 4 characters: Apply SHA-256 hash.
LAST_FOUR_CHARACTERS = 4; -
FIRST_FOUR_CHARACTERS
Masking expression shows the first four characters of text. The masking behavior is as follows: * If text length > 4 characters: Replace text with XXXXX, prepend first four characters of original text. * If text length <= 4 characters: Apply SHA-256 hash.
FIRST_FOUR_CHARACTERS = 5; -
EMAIL_MASK
Masking expression for email addresses. The masking behavior is as follows: * Syntax-valid email address: Replace username with XXXXX. For example, cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. * Syntax-invalid email address: Apply SHA-256 hash. For more information, see [Email mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options).
EMAIL_MASK = 6; -
DATE_YEAR_MASK
Masking expression to only show the <i>year</i> of `Date`, `DateTime` and `TimeStamp`. For example, with the year 2076: * DATE : 2076-01-01 * DATETIME : 2076-01-01T00:00:00 * TIMESTAMP : 2076-01-01 00:00:00 UTC Truncation occurs according to the UTC time zone. To change this, adjust the default time zone using the `time_zone` system variable. For more information, see [System variables reference](https://cloud.google.com/bigquery/docs/reference/system-variables).
DATE_YEAR_MASK = 7; -
RANDOM_HASH
Masking expression that uses hashing to mask column data. It differs from SHA256 in that a unique random value is generated for each query and is added to the hash input, resulting in the hash / masked result to be different for each query. Hence the name "random hash".
RANDOM_HASH = 8; -
UNRECOGNIZED
-
-
Field Details
-
PREDEFINED_EXPRESSION_UNSPECIFIED_VALUE
public static final int PREDEFINED_EXPRESSION_UNSPECIFIED_VALUEDefault, unspecified predefined expression. No masking will take place since no expression is specified.
PREDEFINED_EXPRESSION_UNSPECIFIED = 0;- See Also:
-
SHA256_VALUE
public static final int SHA256_VALUEMasking expression to replace data with SHA-256 hash.
SHA256 = 1;- See Also:
-
ALWAYS_NULL_VALUE
public static final int ALWAYS_NULL_VALUEMasking expression to replace data with NULLs.
ALWAYS_NULL = 2;- See Also:
-
DEFAULT_MASKING_VALUE_VALUE
public static final int DEFAULT_MASKING_VALUE_VALUEMasking expression to replace data with their default masking values. The default masking values for each type listed as below: * STRING: "" * BYTES: b'' * INTEGER: 0 * FLOAT: 0.0 * NUMERIC: 0 * BOOLEAN: FALSE * TIMESTAMP: 1970-01-01 00:00:00 UTC * DATE: 1970-01-01 * TIME: 00:00:00 * DATETIME: 1970-01-01T00:00:00 * GEOGRAPHY: POINT(0 0) * BIGNUMERIC: 0 * ARRAY: [] * STRUCT: NOT_APPLICABLE * JSON: NULL
DEFAULT_MASKING_VALUE = 3;- See Also:
-
LAST_FOUR_CHARACTERS_VALUE
public static final int LAST_FOUR_CHARACTERS_VALUEMasking expression shows the last four characters of text. The masking behavior is as follows: * If text length > 4 characters: Replace text with XXXXX, append last four characters of original text. * If text length <= 4 characters: Apply SHA-256 hash.
LAST_FOUR_CHARACTERS = 4;- See Also:
-
FIRST_FOUR_CHARACTERS_VALUE
public static final int FIRST_FOUR_CHARACTERS_VALUEMasking expression shows the first four characters of text. The masking behavior is as follows: * If text length > 4 characters: Replace text with XXXXX, prepend first four characters of original text. * If text length <= 4 characters: Apply SHA-256 hash.
FIRST_FOUR_CHARACTERS = 5;- See Also:
-
EMAIL_MASK_VALUE
public static final int EMAIL_MASK_VALUEMasking expression for email addresses. The masking behavior is as follows: * Syntax-valid email address: Replace username with XXXXX. For example, cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. * Syntax-invalid email address: Apply SHA-256 hash. For more information, see [Email mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options).
EMAIL_MASK = 6;- See Also:
-
DATE_YEAR_MASK_VALUE
public static final int DATE_YEAR_MASK_VALUEMasking expression to only show the <i>year</i> of `Date`, `DateTime` and `TimeStamp`. For example, with the year 2076: * DATE : 2076-01-01 * DATETIME : 2076-01-01T00:00:00 * TIMESTAMP : 2076-01-01 00:00:00 UTC Truncation occurs according to the UTC time zone. To change this, adjust the default time zone using the `time_zone` system variable. For more information, see [System variables reference](https://cloud.google.com/bigquery/docs/reference/system-variables).
DATE_YEAR_MASK = 7;- See Also:
-
RANDOM_HASH_VALUE
public static final int RANDOM_HASH_VALUEMasking expression that uses hashing to mask column data. It differs from SHA256 in that a unique random value is generated for each query and is added to the hash input, resulting in the hash / masked result to be different for each query. Hence the name "random hash".
RANDOM_HASH = 8;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<DataMaskingPolicy.PredefinedExpression> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static DataMaskingPolicy.PredefinedExpression valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-