Class CustomInfoType

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

    public final class CustomInfoType
    extends com.google.protobuf.GeneratedMessageV3
    implements CustomInfoTypeOrBuilder
     Custom information type provided by the user. Used to find domain-specific
     sensitive information configurable to the data in question.
     
    Protobuf type google.privacy.dlp.v2.CustomInfoType
    See Also:
    Serialized Form
    • 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
      • hasInfoType

        public boolean hasInfoType()
         CustomInfoType can either be a new infoType, or an extension of built-in
         infoType, when the name matches one of existing infoTypes and that infoType
         is specified in `InspectContent.info_types` field. Specifying the latter
         adds findings to the one detected by the system. If built-in info type is
         not specified in `InspectContent.info_types` list then the name is treated
         as a custom info type.
         
        .google.privacy.dlp.v2.InfoType info_type = 1;
        Specified by:
        hasInfoType in interface CustomInfoTypeOrBuilder
        Returns:
        Whether the infoType field is set.
      • getInfoType

        public InfoType getInfoType()
         CustomInfoType can either be a new infoType, or an extension of built-in
         infoType, when the name matches one of existing infoTypes and that infoType
         is specified in `InspectContent.info_types` field. Specifying the latter
         adds findings to the one detected by the system. If built-in info type is
         not specified in `InspectContent.info_types` list then the name is treated
         as a custom info type.
         
        .google.privacy.dlp.v2.InfoType info_type = 1;
        Specified by:
        getInfoType in interface CustomInfoTypeOrBuilder
        Returns:
        The infoType.
      • getInfoTypeOrBuilder

        public InfoTypeOrBuilder getInfoTypeOrBuilder()
         CustomInfoType can either be a new infoType, or an extension of built-in
         infoType, when the name matches one of existing infoTypes and that infoType
         is specified in `InspectContent.info_types` field. Specifying the latter
         adds findings to the one detected by the system. If built-in info type is
         not specified in `InspectContent.info_types` list then the name is treated
         as a custom info type.
         
        .google.privacy.dlp.v2.InfoType info_type = 1;
        Specified by:
        getInfoTypeOrBuilder in interface CustomInfoTypeOrBuilder
      • getLikelihoodValue

        public int getLikelihoodValue()
         Likelihood to return for this CustomInfoType. This base value can be
         altered by a detection rule if the finding meets the criteria specified by
         the rule. Defaults to `VERY_LIKELY` if not specified.
         
        .google.privacy.dlp.v2.Likelihood likelihood = 6;
        Specified by:
        getLikelihoodValue in interface CustomInfoTypeOrBuilder
        Returns:
        The enum numeric value on the wire for likelihood.
      • getLikelihood

        public Likelihood getLikelihood()
         Likelihood to return for this CustomInfoType. This base value can be
         altered by a detection rule if the finding meets the criteria specified by
         the rule. Defaults to `VERY_LIKELY` if not specified.
         
        .google.privacy.dlp.v2.Likelihood likelihood = 6;
        Specified by:
        getLikelihood in interface CustomInfoTypeOrBuilder
        Returns:
        The likelihood.
      • hasDictionary

        public boolean hasDictionary()
         A list of phrases to detect as a CustomInfoType.
         
        .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;
        Specified by:
        hasDictionary in interface CustomInfoTypeOrBuilder
        Returns:
        Whether the dictionary field is set.
      • hasRegex

        public boolean hasRegex()
         Regular expression based CustomInfoType.
         
        .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;
        Specified by:
        hasRegex in interface CustomInfoTypeOrBuilder
        Returns:
        Whether the regex field is set.
      • hasSurrogateType

        public boolean hasSurrogateType()
         Message for detecting output from deidentification transformations that
         support reversing.
         
        .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;
        Specified by:
        hasSurrogateType in interface CustomInfoTypeOrBuilder
        Returns:
        Whether the surrogateType field is set.
      • getSurrogateType

        public CustomInfoType.SurrogateType getSurrogateType()
         Message for detecting output from deidentification transformations that
         support reversing.
         
        .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;
        Specified by:
        getSurrogateType in interface CustomInfoTypeOrBuilder
        Returns:
        The surrogateType.
      • hasStoredType

        public boolean hasStoredType()
         Load an existing `StoredInfoType` resource for use in
         `InspectDataSource`. Not currently supported in `InspectContent`.
         
        .google.privacy.dlp.v2.StoredType stored_type = 5;
        Specified by:
        hasStoredType in interface CustomInfoTypeOrBuilder
        Returns:
        Whether the storedType field is set.
      • getStoredType

        public StoredType getStoredType()
         Load an existing `StoredInfoType` resource for use in
         `InspectDataSource`. Not currently supported in `InspectContent`.
         
        .google.privacy.dlp.v2.StoredType stored_type = 5;
        Specified by:
        getStoredType in interface CustomInfoTypeOrBuilder
        Returns:
        The storedType.
      • getStoredTypeOrBuilder

        public StoredTypeOrBuilder getStoredTypeOrBuilder()
         Load an existing `StoredInfoType` resource for use in
         `InspectDataSource`. Not currently supported in `InspectContent`.
         
        .google.privacy.dlp.v2.StoredType stored_type = 5;
        Specified by:
        getStoredTypeOrBuilder in interface CustomInfoTypeOrBuilder
      • getDetectionRulesList

        public List<CustomInfoType.DetectionRule> getDetectionRulesList()
         Set of detection rules to apply to all findings of this CustomInfoType.
         Rules are applied in order that they are specified. Not supported for the
         `surrogate_type` CustomInfoType.
         
        repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
        Specified by:
        getDetectionRulesList in interface CustomInfoTypeOrBuilder
      • getDetectionRulesOrBuilderList

        public List<? extends CustomInfoType.DetectionRuleOrBuilder> getDetectionRulesOrBuilderList()
         Set of detection rules to apply to all findings of this CustomInfoType.
         Rules are applied in order that they are specified. Not supported for the
         `surrogate_type` CustomInfoType.
         
        repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
        Specified by:
        getDetectionRulesOrBuilderList in interface CustomInfoTypeOrBuilder
      • getDetectionRulesCount

        public int getDetectionRulesCount()
         Set of detection rules to apply to all findings of this CustomInfoType.
         Rules are applied in order that they are specified. Not supported for the
         `surrogate_type` CustomInfoType.
         
        repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
        Specified by:
        getDetectionRulesCount in interface CustomInfoTypeOrBuilder
      • getDetectionRules

        public CustomInfoType.DetectionRule getDetectionRules​(int index)
         Set of detection rules to apply to all findings of this CustomInfoType.
         Rules are applied in order that they are specified. Not supported for the
         `surrogate_type` CustomInfoType.
         
        repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
        Specified by:
        getDetectionRules in interface CustomInfoTypeOrBuilder
      • getDetectionRulesOrBuilder

        public CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder​(int index)
         Set of detection rules to apply to all findings of this CustomInfoType.
         Rules are applied in order that they are specified. Not supported for the
         `surrogate_type` CustomInfoType.
         
        repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
        Specified by:
        getDetectionRulesOrBuilder in interface CustomInfoTypeOrBuilder
      • getExclusionTypeValue

        public int getExclusionTypeValue()
         If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
         to be returned. It still can be used for rules matching.
         
        .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;
        Specified by:
        getExclusionTypeValue in interface CustomInfoTypeOrBuilder
        Returns:
        The enum numeric value on the wire for exclusionType.
      • getExclusionType

        public CustomInfoType.ExclusionType getExclusionType()
         If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
         to be returned. It still can be used for rules matching.
         
        .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;
        Specified by:
        getExclusionType in interface CustomInfoTypeOrBuilder
        Returns:
        The exclusionType.
      • 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 CustomInfoType parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static CustomInfoType getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<CustomInfoType> parser()
      • getParserForType

        public com.google.protobuf.Parser<CustomInfoType> 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 CustomInfoType getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder