Enum DataMaskingPolicy.PredefinedExpression
- java.lang.Object
-
- java.lang.Enum<DataMaskingPolicy.PredefinedExpression>
-
- com.google.cloud.bigquery.datapolicies.v1.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 enumgoogle.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS_NULL
Masking expression to replace data with NULLs.DATE_YEAR_MASK
Masking expression to only show the year of `Date`, `DateTime` and `TimeStamp`.DEFAULT_MASKING_VALUE
Masking expression to replace data with their default masking values.EMAIL_MASK
Masking expression for email addresses.FIRST_FOUR_CHARACTERS
Masking expression shows the first four characters of text.LAST_FOUR_CHARACTERS
Masking expression shows the last four characters of text.PREDEFINED_EXPRESSION_UNSPECIFIED
Default, unspecified predefined expression.SHA256
Masking expression to replace data with SHA-256 hash.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static int
ALWAYS_NULL_VALUE
Masking expression to replace data with NULLs.static int
DATE_YEAR_MASK_VALUE
Masking expression to only show the year of `Date`, `DateTime` and `TimeStamp`.static int
DEFAULT_MASKING_VALUE_VALUE
Masking expression to replace data with their default masking values.static int
EMAIL_MASK_VALUE
Masking expression for email addresses.static int
FIRST_FOUR_CHARACTERS_VALUE
Masking expression shows the first four characters of text.static int
LAST_FOUR_CHARACTERS_VALUE
Masking expression shows the last four characters of text.static int
PREDEFINED_EXPRESSION_UNSPECIFIED_VALUE
Default, unspecified predefined expression.static int
SHA256_VALUE
Masking expression to replace data with SHA-256 hash.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DataMaskingPolicy.PredefinedExpression
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<DataMaskingPolicy.PredefinedExpression>
internalGetValueMap()
static DataMaskingPolicy.PredefinedExpression
valueOf(int value)
Deprecated.static DataMaskingPolicy.PredefinedExpression
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static DataMaskingPolicy.PredefinedExpression
valueOf(String name)
Returns the enum constant of this type with the specified name.static DataMaskingPolicy.PredefinedExpression[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PREDEFINED_EXPRESSION_UNSPECIFIED
public static final DataMaskingPolicy.PredefinedExpression PREDEFINED_EXPRESSION_UNSPECIFIED
Default, unspecified predefined expression. No masking will take place since no expression is specified.
PREDEFINED_EXPRESSION_UNSPECIFIED = 0;
-
SHA256
public static final DataMaskingPolicy.PredefinedExpression SHA256
Masking expression to replace data with SHA-256 hash.
SHA256 = 3;
-
ALWAYS_NULL
public static final DataMaskingPolicy.PredefinedExpression ALWAYS_NULL
Masking expression to replace data with NULLs.
ALWAYS_NULL = 5;
-
DEFAULT_MASKING_VALUE
public static final DataMaskingPolicy.PredefinedExpression 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 = 7;
-
LAST_FOUR_CHARACTERS
public static final DataMaskingPolicy.PredefinedExpression 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 = 9;
-
FIRST_FOUR_CHARACTERS
public static final DataMaskingPolicy.PredefinedExpression 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 = 10;
-
EMAIL_MASK
public static final DataMaskingPolicy.PredefinedExpression 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 = 12;
-
DATE_YEAR_MASK
public static final DataMaskingPolicy.PredefinedExpression DATE_YEAR_MASK
Masking expression to only show the year 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 the <a href="https://cloud.google.com/bigquery/docs/reference/system-variables">System variables reference</a>.
DATE_YEAR_MASK = 13;
-
UNRECOGNIZED
public static final DataMaskingPolicy.PredefinedExpression UNRECOGNIZED
-
-
Field Detail
-
PREDEFINED_EXPRESSION_UNSPECIFIED_VALUE
public static final int PREDEFINED_EXPRESSION_UNSPECIFIED_VALUE
Default, unspecified predefined expression. No masking will take place since no expression is specified.
PREDEFINED_EXPRESSION_UNSPECIFIED = 0;
- See Also:
- Constant Field Values
-
SHA256_VALUE
public static final int SHA256_VALUE
Masking expression to replace data with SHA-256 hash.
SHA256 = 3;
- See Also:
- Constant Field Values
-
ALWAYS_NULL_VALUE
public static final int ALWAYS_NULL_VALUE
Masking expression to replace data with NULLs.
ALWAYS_NULL = 5;
- See Also:
- Constant Field Values
-
DEFAULT_MASKING_VALUE_VALUE
public static final int DEFAULT_MASKING_VALUE_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 = 7;
- See Also:
- Constant Field Values
-
LAST_FOUR_CHARACTERS_VALUE
public static final int LAST_FOUR_CHARACTERS_VALUE
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 = 9;
- See Also:
- Constant Field Values
-
FIRST_FOUR_CHARACTERS_VALUE
public static final int FIRST_FOUR_CHARACTERS_VALUE
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 = 10;
- See Also:
- Constant Field Values
-
EMAIL_MASK_VALUE
public static final int EMAIL_MASK_VALUE
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 = 12;
- See Also:
- Constant Field Values
-
DATE_YEAR_MASK_VALUE
public static final int DATE_YEAR_MASK_VALUE
Masking expression to only show the year 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 the <a href="https://cloud.google.com/bigquery/docs/reference/system-variables">System variables reference</a>.
DATE_YEAR_MASK = 13;
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static DataMaskingPolicy.PredefinedExpression[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataMaskingPolicy.PredefinedExpression c : DataMaskingPolicy.PredefinedExpression.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataMaskingPolicy.PredefinedExpression valueOf(String name)
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:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static DataMaskingPolicy.PredefinedExpression valueOf(int value)
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
public static DataMaskingPolicy.PredefinedExpression forNumber(int value)
- 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:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final 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
-
-