Class: Google::Cloud::Dlp::V2::PrivacyMetric

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/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_config::Google::Cloud::Dlp::V2::PrivacyMetric::CategoricalStatsConfig

Returns Categorical stats

Note: The following fields are mutually exclusive: categorical_stats_config, numerical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::CategoricalStatsConfig)

    Categorical stats

    Note: The following fields are mutually exclusive: categorical_stats_config, numerical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#delta_presence_estimation_config::Google::Cloud::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig

Returns delta-presence

Note: The following fields are mutually exclusive: delta_presence_estimation_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::DeltaPresenceEstimationConfig)

    delta-presence

    Note: The following fields are mutually exclusive: delta_presence_estimation_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#k_anonymity_config::Google::Cloud::Dlp::V2::PrivacyMetric::KAnonymityConfig

Returns K-anonymity

Note: The following fields are mutually exclusive: k_anonymity_config, numerical_stats_config, categorical_stats_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::KAnonymityConfig)

    K-anonymity

    Note: The following fields are mutually exclusive: k_anonymity_config, numerical_stats_config, categorical_stats_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#k_map_estimation_config::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig

Returns k-map

Note: The following fields are mutually exclusive: k_map_estimation_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig)

    k-map

    Note: The following fields are mutually exclusive: k_map_estimation_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#l_diversity_config::Google::Cloud::Dlp::V2::PrivacyMetric::LDiversityConfig

Returns l-diversity

Note: The following fields are mutually exclusive: l_diversity_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::LDiversityConfig)

    l-diversity

    Note: The following fields are mutually exclusive: l_diversity_config, numerical_stats_config, categorical_stats_config, k_anonymity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#numerical_stats_config::Google::Cloud::Dlp::V2::PrivacyMetric::NumericalStatsConfig

Returns Numerical stats

Note: The following fields are mutually exclusive: numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Dlp::V2::PrivacyMetric::NumericalStatsConfig)

    Numerical stats

    Note: The following fields are mutually exclusive: numerical_stats_config, categorical_stats_config, k_anonymity_config, l_diversity_config, k_map_estimation_config, delta_presence_estimation_config. If a field in that set is populated, all other fields in the set will automatically be cleared.



2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'proto_docs/google/privacy/dlp/v2/dlp.rb', line 2030

class PrivacyMetric
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

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

  # Compute numerical stats over an individual column, including
  # number of distinct values and value count distribution.
  # @!attribute [rw] field
  #   @return [::Google::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # k-anonymity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::EntityId]
  #     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 distinct 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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # l-diversity metric, used for analysis of reidentification risk.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::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::Cloud::Dlp::V2::FieldId]
  #     Sensitive field for computing the l-value.
  class LDiversityConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  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.
  # @!attribute [rw] quasi_ids
  #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::TaggedField>]
  #     Required. Fields considered to be quasi-identifiers. No two columns can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # A column with a semantic tag attached.
    # @!attribute [rw] field
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. Identifies the column.
    # @!attribute [rw] info_type
    #   @return [::Google::Cloud::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.
    #
    #     Note: The following fields are mutually exclusive: `info_type`, `custom_tag`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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.
    #
    #     Note: The following fields are mutually exclusive: `custom_tag`, `info_type`, `inferred`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    # @!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
    #
    #     Note: The following fields are mutually exclusive: `inferred`, `info_type`, `custom_tag`. If a field in that set is populated, all other fields in the set will automatically be cleared.
    class TaggedField
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    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::Cloud::Dlp::V2::BigQueryTable]
    #     Required. Auxiliary table location.
    # @!attribute [rw] quasi_ids
    #   @return [::Array<::Google::Cloud::Dlp::V2::PrivacyMetric::KMapEstimationConfig::AuxiliaryTable::QuasiIdField>]
    #     Required. Quasi-identifier columns.
    # @!attribute [rw] relative_frequency
    #   @return [::Google::Cloud::Dlp::V2::FieldId]
    #     Required. The relative frequency column must contain a floating-point
    #     number between 0 and 1 (inclusive). Null values are assumed to be zero.
    class AuxiliaryTable
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # 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::Cloud::Dlp::V2::FieldId]
      #     Identifies the column.
      # @!attribute [rw] custom_tag
      #   @return [::String]
      #     A auxiliary field.
      class QuasiIdField
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      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::Cloud::Dlp::V2::QuasiId>]
  #     Required. Fields considered to be quasi-identifiers. No two fields can
  #     have the same tag.
  # @!attribute [rw] region_code
  #   @return [::String]
  #     ISO 3166-1 alpha-2 region code to use in the statistical modeling.
  #     Set 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::Cloud::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
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end