Class: Google::Privacy::Dlp::V2::PrivacyMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb

Overview

Privacy metric to compute for reidentification risk analysis.

Defined Under Namespace

Classes: CategoricalStatsConfig, DeltaPresenceEstimationConfig, KAnonymityConfig, KMapEstimationConfig, LDiversityConfig, NumericalStatsConfig

Instance Attribute Summary collapse

Instance Attribute Details

#categorical_stats_configGoogle::Privacy::Dlp::V2::PrivacyMetric::CategoricalStatsConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end

#delta_presence_estimation_configGoogle::Privacy::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end

#k_anonymity_configGoogle::Privacy::Dlp::V2::PrivacyMetric::KAnonymityConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end

#k_map_estimation_configGoogle::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end

#l_diversity_configGoogle::Privacy::Dlp::V2::PrivacyMetric::LDiversityConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end

#numerical_stats_configGoogle::Privacy::Dlp::V2::PrivacyMetric::NumericalStatsConfig



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb', line 658

class PrivacyMetric
  # Compute numerical stats over an individual column, including
  # min, max, and quantiles.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute numerical stats on. Supported types are
  #     integer, float, date, datetime, timestamp, time.
  class NumericalStatsConfig; end

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Field to compute categorical stats on. All column types are
  #     supported except for arrays and structs. However, it may be more
  #     informative to use NumericalStats when the field type is supported,
  #     depending on the data.
  class CategoricalStatsConfig; end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of fields to compute k-anonymity over. When multiple fields are
  #     specified, they are considered a single composite key. Structs and
  #     repeated data types are not supported; however, nested fields are
  #     supported so long as they are not structs themselves or nested within
  #     a repeated field.
  # @!attribute [rw] entity_id
  #   @return [Google::Privacy::Dlp::V2::EntityId]
  #     Optional message indicating that multiple rows might be associated to a
  #     single individual. If the same entity_id is associated to multiple
  #     quasi-identifier tuples over distict rows, we consider the entire
  #     collection of tuples as the composite quasi-identifier. This collection
  #     is a multiset: the order in which the different tuples appear in the
  #     dataset is ignored, but their frequency is taken into account.
  #
  #     Important note: a maximum of 1000 rows can be associated to a single
  #     entity ID. If more rows are associated with the same entity ID, some
  #     might be ignored.
  class KAnonymityConfig; end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::FieldId>]
  #     Set of quasi-identifiers indicating how equivalence classes are
  #     defined for the l-diversity computation. When multiple fields are
  #     specified, they are considered a single composite key.
  # @!attribute [rw] sensitive_attribute
  #   @return [Google::Privacy::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig; end

  # Reidentifiability metric. This corresponds to a risk model similar to what
  # is called "journalist risk" in the literature, except the attack dataset is
  # statistically modeled instead of being perfectly known. This can be done
  # using publicly available data (like the US Census), or using a custom
  # statistical model (indicated as one or several BigQuery tables), or by
  # extrapolating from the distribution of values in the input dataset.
  # A column with a semantic tag attached.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Fields considered to be quasi-identifiers. No two columns can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers column must appear in exactly one column
  #     of one auxiliary table.
  class KMapEstimationConfig
    # @!attribute [rw] field
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     Identifies the column. [required]
    # @!attribute [rw] info_type
    #   @return [Google::Privacy::Dlp::V2::InfoType]
    #     A column can be tagged with a InfoType to use the relevant public
    #     dataset as a statistical model of population, if available. We
    #     currently support US ZIP codes, region codes, ages and genders.
    #     To programmatically obtain the list of supported InfoTypes, use
    #     ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
    # @!attribute [rw] custom_tag
    #   @return [String]
    #     A column can be tagged with a custom tag. In this case, the user must
    #     indicate an auxiliary table that contains statistical information on
    #     the possible values of this column (below).
    # @!attribute [rw] inferred
    #   @return [Google::Protobuf::Empty]
    #     If no semantic tag is indicated, we infer the statistical model from
    #     the distribution of values in the input data
    class TaggedField; end

    # An auxiliary table contains statistical information on the relative
    # frequency of different quasi-identifiers values. It has one or several
    # quasi-identifiers columns, and one column that indicates the relative
    # frequency of each quasi-identifier tuple.
    # If a tuple is present in the data but not in the auxiliary table, the
    # corresponding relative frequency is assumed to be zero (and thus, the
    # tuple is highly reidentifiable).
    # @!attribute [rw] table
    #   @return [Google::Privacy::Dlp::V2::BigQueryTable]
    #     Auxiliary table location. [required]
    # @!attribute [rw] quasi_ids
    #   @return [Array<Google::Privacy::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Quasi-identifier columns. [required]
    # @!attribute [rw] relative_frequency
    #   @return [Google::Privacy::Dlp::V2::FieldId]
    #     The relative frequency column must contain a floating-point number
    #     between 0 and 1 (inclusive). Null values are assumed to be zero.
    #     [required]
    class AuxiliaryTable
      # A quasi-identifier column has a custom_tag, used to know which column
      # in the data corresponds to which column in the statistical model.
      # @!attribute [rw] field
      #   @return [Google::Privacy::Dlp::V2::FieldId]
      # @!attribute [rw] custom_tag
      #   @return [String]
      class QuasiIdField; end
    end
  end

  # δ-presence metric, used to estimate how likely it is for an attacker to
  # figure out that one given individual appears in a de-identified dataset.
  # Similarly to the k-map metric, we cannot compute δ-presence exactly without
  # knowing the attack dataset, so we use a statistical model instead.
  # @!attribute [rw] quasi_ids
  #   @return [Array<Google::Privacy::Dlp::V2::QuasiId>]
  #     Fields considered to be quasi-identifiers. No two fields can have the
  #     same tag. [required]
  # @!attribute [rw] region_code
  #   @return [String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Required if no column is tagged with a region-specific InfoType (like
  #     US_ZIP_5) or a region code.
  # @!attribute [rw] auxiliary_tables
  #   @return [Array<Google::Privacy::Dlp::V2::StatisticalTable>]
  #     Several auxiliary tables can be used in the analysis. Each custom_tag
  #     used to tag a quasi-identifiers field must appear in exactly one
  #     field of one auxiliary table.
  class DeltaPresenceEstimationConfig; end
end