Class FieldTransformation

  • All Implemented Interfaces:
    FieldTransformationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class FieldTransformation
    extends com.google.protobuf.GeneratedMessageV3
    implements FieldTransformationOrBuilder
     The transformation to apply to the field.
     
    Protobuf type google.privacy.dlp.v2.FieldTransformation
    See Also:
    Serialized Form
    • Field Detail

      • PRIMITIVE_TRANSFORMATION_FIELD_NUMBER

        public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER

        public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getFieldsList

        public List<FieldId> getFieldsList()
         Required. Input field(s) to apply the transformation to.
         When you have columns that reference their position within a list,
         omit the index from the FieldId. FieldId name matching ignores the index.
         For example, instead of "contact.nums[0].type", use "contact.nums.type".
         
        repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsList in interface FieldTransformationOrBuilder
      • getFieldsOrBuilderList

        public List<? extends FieldIdOrBuilder> getFieldsOrBuilderList()
         Required. Input field(s) to apply the transformation to.
         When you have columns that reference their position within a list,
         omit the index from the FieldId. FieldId name matching ignores the index.
         For example, instead of "contact.nums[0].type", use "contact.nums.type".
         
        repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsOrBuilderList in interface FieldTransformationOrBuilder
      • getFieldsCount

        public int getFieldsCount()
         Required. Input field(s) to apply the transformation to.
         When you have columns that reference their position within a list,
         omit the index from the FieldId. FieldId name matching ignores the index.
         For example, instead of "contact.nums[0].type", use "contact.nums.type".
         
        repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsCount in interface FieldTransformationOrBuilder
      • getFields

        public FieldId getFields​(int index)
         Required. Input field(s) to apply the transformation to.
         When you have columns that reference their position within a list,
         omit the index from the FieldId. FieldId name matching ignores the index.
         For example, instead of "contact.nums[0].type", use "contact.nums.type".
         
        repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFields in interface FieldTransformationOrBuilder
      • getFieldsOrBuilder

        public FieldIdOrBuilder getFieldsOrBuilder​(int index)
         Required. Input field(s) to apply the transformation to.
         When you have columns that reference their position within a list,
         omit the index from the FieldId. FieldId name matching ignores the index.
         For example, instead of "contact.nums[0].type", use "contact.nums.type".
         
        repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFieldsOrBuilder in interface FieldTransformationOrBuilder
      • hasCondition

        public boolean hasCondition()
         Only apply the transformation if the condition evaluates to true for the
         given `RecordCondition`. The conditions are allowed to reference fields
         that are not used in the actual transformation.
        
         Example Use Cases:
        
         - Apply a different bucket transformation to an age column if the zip code
         column for the same record is within a specific range.
         - Redact a field if the date of birth field is greater than 85.
         
        .google.privacy.dlp.v2.RecordCondition condition = 3;
        Specified by:
        hasCondition in interface FieldTransformationOrBuilder
        Returns:
        Whether the condition field is set.
      • getCondition

        public RecordCondition getCondition()
         Only apply the transformation if the condition evaluates to true for the
         given `RecordCondition`. The conditions are allowed to reference fields
         that are not used in the actual transformation.
        
         Example Use Cases:
        
         - Apply a different bucket transformation to an age column if the zip code
         column for the same record is within a specific range.
         - Redact a field if the date of birth field is greater than 85.
         
        .google.privacy.dlp.v2.RecordCondition condition = 3;
        Specified by:
        getCondition in interface FieldTransformationOrBuilder
        Returns:
        The condition.
      • getConditionOrBuilder

        public RecordConditionOrBuilder getConditionOrBuilder()
         Only apply the transformation if the condition evaluates to true for the
         given `RecordCondition`. The conditions are allowed to reference fields
         that are not used in the actual transformation.
        
         Example Use Cases:
        
         - Apply a different bucket transformation to an age column if the zip code
         column for the same record is within a specific range.
         - Redact a field if the date of birth field is greater than 85.
         
        .google.privacy.dlp.v2.RecordCondition condition = 3;
        Specified by:
        getConditionOrBuilder in interface FieldTransformationOrBuilder
      • hasPrimitiveTransformation

        public boolean hasPrimitiveTransformation()
         Apply the transformation to the entire field.
         
        .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;
        Specified by:
        hasPrimitiveTransformation in interface FieldTransformationOrBuilder
        Returns:
        Whether the primitiveTransformation field is set.
      • hasInfoTypeTransformations

        public boolean hasInfoTypeTransformations()
         Treat the contents of the field as free text, and selectively
         transform content that matches an `InfoType`.
         
        .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;
        Specified by:
        hasInfoTypeTransformations in interface FieldTransformationOrBuilder
        Returns:
        Whether the infoTypeTransformations field is set.
      • getInfoTypeTransformations

        public InfoTypeTransformations getInfoTypeTransformations()
         Treat the contents of the field as free text, and selectively
         transform content that matches an `InfoType`.
         
        .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;
        Specified by:
        getInfoTypeTransformations in interface FieldTransformationOrBuilder
        Returns:
        The infoTypeTransformations.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static FieldTransformation parseFrom​(ByteBuffer data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(ByteBuffer data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(com.google.protobuf.ByteString data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(com.google.protobuf.ByteString data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(byte[] data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(byte[] data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static FieldTransformation parseFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Throws:
        IOException
      • newBuilderForType

        public FieldTransformation.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public FieldTransformation.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected FieldTransformation.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<FieldTransformation> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public FieldTransformation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder