# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T01:58:13+00:00
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class GooglePrivacyDlpV2ActivateJobTriggerRequest(BaseModel):
pass
class GooglePrivacyDlpV2AllInfoTypes(BaseModel):
pass
class GooglePrivacyDlpV2AllText(BaseModel):
pass
class SampleMethod(Enum):
SAMPLE_METHOD_UNSPECIFIED = 'SAMPLE_METHOD_UNSPECIFIED'
TOP = 'TOP'
RANDOM_START = 'RANDOM_START'
class GooglePrivacyDlpV2BigQueryTable(BaseModel):
datasetId: Optional[str] = Field(None, description='Dataset ID of the table.')
projectId: Optional[str] = Field(
None,
description='The Google Cloud Platform project ID of the project containing the table. If omitted, project ID is inferred from the API call.',
)
tableId: Optional[str] = Field(None, description='Name of the table.')
class GooglePrivacyDlpV2BoundingBox(BaseModel):
height: Optional[int] = Field(
None, description='Height of the bounding box in pixels.'
)
left: Optional[int] = Field(
None, description='Left coordinate of the bounding box. (0,0) is upper left.'
)
top: Optional[int] = Field(
None, description='Top coordinate of the bounding box. (0,0) is upper left.'
)
width: Optional[int] = Field(
None, description='Width of the bounding box in pixels.'
)
class Type(Enum):
BYTES_TYPE_UNSPECIFIED = 'BYTES_TYPE_UNSPECIFIED'
IMAGE = 'IMAGE'
IMAGE_JPEG = 'IMAGE_JPEG'
IMAGE_BMP = 'IMAGE_BMP'
IMAGE_PNG = 'IMAGE_PNG'
IMAGE_SVG = 'IMAGE_SVG'
TEXT_UTF8 = 'TEXT_UTF8'
WORD_DOCUMENT = 'WORD_DOCUMENT'
PDF = 'PDF'
POWERPOINT_DOCUMENT = 'POWERPOINT_DOCUMENT'
EXCEL_DOCUMENT = 'EXCEL_DOCUMENT'
AVRO = 'AVRO'
CSV = 'CSV'
TSV = 'TSV'
class GooglePrivacyDlpV2ByteContentItem(BaseModel):
data: Optional[str] = Field(None, description='Content data to inspect or redact.')
type: Optional[Type] = Field(
None,
description='The type of data stored in the bytes string. Default will be TEXT_UTF8.',
)
class GooglePrivacyDlpV2CancelDlpJobRequest(BaseModel):
pass
class CommonCharactersToIgnore(Enum):
COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 'COMMON_CHARS_TO_IGNORE_UNSPECIFIED'
NUMERIC = 'NUMERIC'
ALPHA_UPPER_CASE = 'ALPHA_UPPER_CASE'
ALPHA_LOWER_CASE = 'ALPHA_LOWER_CASE'
PUNCTUATION = 'PUNCTUATION'
WHITESPACE = 'WHITESPACE'
class GooglePrivacyDlpV2CharsToIgnore(BaseModel):
charactersToSkip: Optional[str] = Field(
None, description='Characters to not transform when masking.'
)
commonCharactersToIgnore: Optional[CommonCharactersToIgnore] = Field(
None,
description='Common characters to not transform when masking. Useful to avoid removing punctuation.',
)
class GooglePrivacyDlpV2CloudStorageFileSet(BaseModel):
url: Optional[str] = Field(
None,
description='The url, in the format `gs:///`. Trailing wildcard in the path is allowed.',
)
class FileType(Enum):
FILE_TYPE_UNSPECIFIED = 'FILE_TYPE_UNSPECIFIED'
BINARY_FILE = 'BINARY_FILE'
TEXT_FILE = 'TEXT_FILE'
IMAGE = 'IMAGE'
WORD = 'WORD'
PDF = 'PDF'
AVRO = 'AVRO'
CSV = 'CSV'
TSV = 'TSV'
POWERPOINT = 'POWERPOINT'
EXCEL = 'EXCEL'
class GooglePrivacyDlpV2CloudStoragePath(BaseModel):
path: Optional[str] = Field(
None,
description='A url representing a file or path (no wildcards) in Cloud Storage. Example: gs://[BUCKET_NAME]/dictionary.txt',
)
class GooglePrivacyDlpV2CloudStorageRegexFileSet(BaseModel):
bucketName: Optional[str] = Field(
None, description='The name of a Cloud Storage bucket. Required.'
)
excludeRegex: Optional[List[str]] = Field(
None,
description='A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.',
)
includeRegex: Optional[List[str]] = Field(
None,
description='A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.',
)
class GooglePrivacyDlpV2Color(BaseModel):
blue: Optional[float] = Field(
None,
description='The amount of blue in the color as a value in the interval [0, 1].',
)
green: Optional[float] = Field(
None,
description='The amount of green in the color as a value in the interval [0, 1].',
)
red: Optional[float] = Field(
None,
description='The amount of red in the color as a value in the interval [0, 1].',
)
class Operator(Enum):
RELATIONAL_OPERATOR_UNSPECIFIED = 'RELATIONAL_OPERATOR_UNSPECIFIED'
EQUAL_TO = 'EQUAL_TO'
NOT_EQUAL_TO = 'NOT_EQUAL_TO'
GREATER_THAN = 'GREATER_THAN'
LESS_THAN = 'LESS_THAN'
GREATER_THAN_OR_EQUALS = 'GREATER_THAN_OR_EQUALS'
LESS_THAN_OR_EQUALS = 'LESS_THAN_OR_EQUALS'
EXISTS = 'EXISTS'
class GooglePrivacyDlpV2Container(BaseModel):
fullPath: Optional[str] = Field(
None,
description="A string representation of the full container name. Examples: - BigQuery: 'Project:DataSetId.TableId' - Cloud Storage: 'gs://Bucket/folders/filename.txt'",
)
projectId: Optional[str] = Field(
None,
description='Project where the finding was found. Can be different from the project that owns the finding.',
)
relativePath: Optional[str] = Field(
None,
description='The rest of the path after the root. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`',
)
rootPath: Optional[str] = Field(
None,
description='The root of the container. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`',
)
type: Optional[str] = Field(
None, description='Container type, for example BigQuery or Cloud Storage.'
)
updateTime: Optional[str] = Field(
None,
description="Findings container modification timestamp, if applicable. For Cloud Storage, this field contains the last file modification timestamp. For a BigQuery table, this field contains the last_modified_time property. For Datastore, this field isn't populated.",
)
version: Optional[str] = Field(
None,
description='Findings container version, if available ("generation" for Cloud Storage).',
)
class CommonAlphabet(Enum):
FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 'FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED'
NUMERIC = 'NUMERIC'
HEXADECIMAL = 'HEXADECIMAL'
UPPER_CASE_ALPHA_NUMERIC = 'UPPER_CASE_ALPHA_NUMERIC'
ALPHA_NUMERIC = 'ALPHA_NUMERIC'
class ExclusionType(Enum):
EXCLUSION_TYPE_UNSPECIFIED = 'EXCLUSION_TYPE_UNSPECIFIED'
EXCLUSION_TYPE_EXCLUDE = 'EXCLUSION_TYPE_EXCLUDE'
class Likelihood(Enum):
LIKELIHOOD_UNSPECIFIED = 'LIKELIHOOD_UNSPECIFIED'
VERY_UNLIKELY = 'VERY_UNLIKELY'
UNLIKELY = 'UNLIKELY'
POSSIBLE = 'POSSIBLE'
LIKELY = 'LIKELY'
VERY_LIKELY = 'VERY_LIKELY'
class GooglePrivacyDlpV2DataProfileLocation(BaseModel):
folderId: Optional[str] = Field(
None, description='The ID of the Folder within an organization to scan.'
)
organizationId: Optional[str] = Field(
None, description='The ID of an organization to scan.'
)
class Event(Enum):
EVENT_TYPE_UNSPECIFIED = 'EVENT_TYPE_UNSPECIFIED'
NEW_PROFILE = 'NEW_PROFILE'
CHANGED_PROFILE = 'CHANGED_PROFILE'
SCORE_INCREASED = 'SCORE_INCREASED'
ERROR_CHANGED = 'ERROR_CHANGED'
class Score(Enum):
RISK_SCORE_UNSPECIFIED = 'RISK_SCORE_UNSPECIFIED'
RISK_LOW = 'RISK_LOW'
RISK_MODERATE = 'RISK_MODERATE'
RISK_HIGH = 'RISK_HIGH'
class GooglePrivacyDlpV2DataRiskLevel(BaseModel):
score: Optional[Score] = Field(
None, description='The score applied to the resource.'
)
class DayOfWeek(Enum):
DAY_OF_WEEK_UNSPECIFIED = 'DAY_OF_WEEK_UNSPECIFIED'
MONDAY = 'MONDAY'
TUESDAY = 'TUESDAY'
WEDNESDAY = 'WEDNESDAY'
THURSDAY = 'THURSDAY'
FRIDAY = 'FRIDAY'
SATURDAY = 'SATURDAY'
SUNDAY = 'SUNDAY'
class FileTypesToTransformEnum(Enum):
FILE_TYPE_UNSPECIFIED = 'FILE_TYPE_UNSPECIFIED'
BINARY_FILE = 'BINARY_FILE'
TEXT_FILE = 'TEXT_FILE'
IMAGE = 'IMAGE'
WORD = 'WORD'
PDF = 'PDF'
AVRO = 'AVRO'
CSV = 'CSV'
TSV = 'TSV'
POWERPOINT = 'POWERPOINT'
EXCEL = 'EXCEL'
class GooglePrivacyDlpV2DeidentifyDataSourceStats(BaseModel):
transformationCount: Optional[str] = Field(
None, description='Number of successfully applied transformations.'
)
transformationErrorCount: Optional[str] = Field(
None,
description='Number of errors encountered while trying to apply transformations.',
)
transformedBytes: Optional[str] = Field(
None, description='Total size in bytes that were transformed in some way.'
)
class State(Enum):
JOB_STATE_UNSPECIFIED = 'JOB_STATE_UNSPECIFIED'
PENDING = 'PENDING'
RUNNING = 'RUNNING'
DONE = 'DONE'
CANCELED = 'CANCELED'
FAILED = 'FAILED'
ACTIVE = 'ACTIVE'
class Type1(Enum):
DLP_JOB_TYPE_UNSPECIFIED = 'DLP_JOB_TYPE_UNSPECIFIED'
INSPECT_JOB = 'INSPECT_JOB'
RISK_ANALYSIS_JOB = 'RISK_ANALYSIS_JOB'
class GooglePrivacyDlpV2DocumentLocation(BaseModel):
fileOffset: Optional[str] = Field(
None,
description='Offset of the line, from the beginning of the file, where the finding is located.',
)
class MatchingType(Enum):
MATCHING_TYPE_UNSPECIFIED = 'MATCHING_TYPE_UNSPECIFIED'
MATCHING_TYPE_FULL_MATCH = 'MATCHING_TYPE_FULL_MATCH'
MATCHING_TYPE_PARTIAL_MATCH = 'MATCHING_TYPE_PARTIAL_MATCH'
MATCHING_TYPE_INVERSE_MATCH = 'MATCHING_TYPE_INVERSE_MATCH'
class GooglePrivacyDlpV2Export(BaseModel):
profileTable: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None,
description='Store all table and column profiles in an existing table or a new table in an existing dataset. Each re-generation will result in a new row in BigQuery.',
)
class LogicalOperator(Enum):
LOGICAL_OPERATOR_UNSPECIFIED = 'LOGICAL_OPERATOR_UNSPECIFIED'
AND = 'AND'
class GooglePrivacyDlpV2FieldId(BaseModel):
name: Optional[str] = Field(None, description='Name describing the field.')
class GooglePrivacyDlpV2FileSet(BaseModel):
regexFileSet: Optional[GooglePrivacyDlpV2CloudStorageRegexFileSet] = Field(
None,
description='The regex-filtered set of files to scan. Exactly one of `url` or `regex_file_set` must be set.',
)
url: Optional[str] = Field(
None,
description='The Cloud Storage url of the file(s) to scan, in the format `gs:///`. Trailing wildcard in the path is allowed. If the url ends in a trailing slash, the bucket or directory represented by the url will be scanned non-recursively (content in sub-directories will not be scanned). This means that `gs://mybucket/` is equivalent to `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` must be set.',
)
class GooglePrivacyDlpV2FinishDlpJobRequest(BaseModel):
pass
class GooglePrivacyDlpV2HybridInspectResponse(BaseModel):
pass
class GooglePrivacyDlpV2HybridInspectStatistics(BaseModel):
abortedCount: Optional[str] = Field(
None,
description='The number of hybrid inspection requests aborted because the job ran out of quota or was ended before they could be processed.',
)
pendingCount: Optional[str] = Field(
None,
description='The number of hybrid requests currently being processed. Only populated when called via method `getDlpJob`. A burst of traffic may cause hybrid inspect requests to be enqueued. Processing will take place as quickly as possible, but resource limitations may impact how long a request is enqueued for.',
)
processedCount: Optional[str] = Field(
None,
description='The number of hybrid inspection requests processed within this job.',
)
class GooglePrivacyDlpV2ImageLocation(BaseModel):
boundingBoxes: Optional[List[GooglePrivacyDlpV2BoundingBox]] = Field(
None,
description='Bounding boxes locating the pixels within the image containing the finding.',
)
class GooglePrivacyDlpV2InfoType(BaseModel):
name: Optional[str] = Field(
None,
description='Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.',
)
version: Optional[str] = Field(
None, description='Optional version name for this InfoType.'
)
class IndustryCategory(Enum):
INDUSTRY_UNSPECIFIED = 'INDUSTRY_UNSPECIFIED'
FINANCE = 'FINANCE'
HEALTH = 'HEALTH'
TELECOMMUNICATIONS = 'TELECOMMUNICATIONS'
class LocationCategory(Enum):
LOCATION_UNSPECIFIED = 'LOCATION_UNSPECIFIED'
GLOBAL = 'GLOBAL'
ARGENTINA = 'ARGENTINA'
AUSTRALIA = 'AUSTRALIA'
BELGIUM = 'BELGIUM'
BRAZIL = 'BRAZIL'
CANADA = 'CANADA'
CHILE = 'CHILE'
CHINA = 'CHINA'
COLOMBIA = 'COLOMBIA'
CROATIA = 'CROATIA'
DENMARK = 'DENMARK'
FRANCE = 'FRANCE'
FINLAND = 'FINLAND'
GERMANY = 'GERMANY'
HONG_KONG = 'HONG_KONG'
INDIA = 'INDIA'
INDONESIA = 'INDONESIA'
IRELAND = 'IRELAND'
ISRAEL = 'ISRAEL'
ITALY = 'ITALY'
JAPAN = 'JAPAN'
KOREA = 'KOREA'
MEXICO = 'MEXICO'
NEW_ZEALAND = 'NEW_ZEALAND'
THE_NETHERLANDS = 'THE_NETHERLANDS'
NORWAY = 'NORWAY'
PARAGUAY = 'PARAGUAY'
PERU = 'PERU'
POLAND = 'POLAND'
PORTUGAL = 'PORTUGAL'
SINGAPORE = 'SINGAPORE'
SOUTH_AFRICA = 'SOUTH_AFRICA'
SPAIN = 'SPAIN'
SWEDEN = 'SWEDEN'
TAIWAN = 'TAIWAN'
THAILAND = 'THAILAND'
TURKEY = 'TURKEY'
UNITED_KINGDOM = 'UNITED_KINGDOM'
UNITED_STATES = 'UNITED_STATES'
URUGUAY = 'URUGUAY'
VENEZUELA = 'VENEZUELA'
INTERNAL = 'INTERNAL'
class TypeCategory(Enum):
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
PII = 'PII'
SPII = 'SPII'
DEMOGRAPHIC = 'DEMOGRAPHIC'
CREDENTIAL = 'CREDENTIAL'
GOVERNMENT_ID = 'GOVERNMENT_ID'
DOCUMENT = 'DOCUMENT'
CONTEXTUAL_INFORMATION = 'CONTEXTUAL_INFORMATION'
class GooglePrivacyDlpV2InfoTypeCategory(BaseModel):
industryCategory: Optional[IndustryCategory] = Field(
None,
description='The group of relevant businesses where this infoType is commonly used',
)
locationCategory: Optional[LocationCategory] = Field(
None,
description='The region or country that issued the ID or document represented by the infoType.',
)
typeCategory: Optional[TypeCategory] = Field(
None, description='The class of identifiers where this infoType belongs'
)
class SupportedByEnum(Enum):
ENUM_TYPE_UNSPECIFIED = 'ENUM_TYPE_UNSPECIFIED'
INSPECT = 'INSPECT'
RISK_ANALYSIS = 'RISK_ANALYSIS'
class GooglePrivacyDlpV2InfoTypeLimit(BaseModel):
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='Type of information the findings limit applies to. Only one limit per info_type should be provided. If InfoTypeLimit does not have an info_type, the DLP API applies the limit against all info_types that are found but not specified in another InfoTypeLimit.',
)
maxFindings: Optional[int] = Field(
None, description='Max findings limit for the given infoType.'
)
class GooglePrivacyDlpV2InfoTypeStats(BaseModel):
count: Optional[str] = Field(
None, description='Number of findings for this infoType.'
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None, description='The type of finding this stat is for.'
)
class GooglePrivacyDlpV2InfoTypeSummary(BaseModel):
estimatedPrevalence: Optional[int] = Field(
None, description='Not populated for predicted infotypes.'
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None, description='The infoType.'
)
class ContentOption(Enum):
CONTENT_UNSPECIFIED = 'CONTENT_UNSPECIFIED'
CONTENT_TEXT = 'CONTENT_TEXT'
CONTENT_IMAGE = 'CONTENT_IMAGE'
class MinLikelihood(Enum):
LIKELIHOOD_UNSPECIFIED = 'LIKELIHOOD_UNSPECIFIED'
VERY_UNLIKELY = 'VERY_UNLIKELY'
UNLIKELY = 'UNLIKELY'
POSSIBLE = 'POSSIBLE'
LIKELY = 'LIKELY'
VERY_LIKELY = 'VERY_LIKELY'
class GooglePrivacyDlpV2JobNotificationEmails(BaseModel):
pass
class Status(Enum):
STATUS_UNSPECIFIED = 'STATUS_UNSPECIFIED'
HEALTHY = 'HEALTHY'
PAUSED = 'PAUSED'
CANCELLED = 'CANCELLED'
class GooglePrivacyDlpV2KindExpression(BaseModel):
name: Optional[str] = Field(None, description='The name of the kind.')
class GooglePrivacyDlpV2KmsWrappedCryptoKey(BaseModel):
cryptoKeyName: Optional[str] = Field(
None,
description='Required. The resource name of the KMS CryptoKey to use for unwrapping.',
)
wrappedKey: Optional[str] = Field(
None, description='Required. The wrapped data crypto key.'
)
class GooglePrivacyDlpV2LDiversityConfig(BaseModel):
quasiIds: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description='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.',
)
sensitiveAttribute: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Sensitive field for computing the l-value.'
)
class GooglePrivacyDlpV2LargeCustomDictionaryStats(BaseModel):
approxNumPhrases: Optional[str] = Field(
None, description='Approximate number of distinct phrases in the dictionary.'
)
class GooglePrivacyDlpV2LeaveUntransformed(BaseModel):
pass
class FixedLikelihood(Enum):
LIKELIHOOD_UNSPECIFIED = 'LIKELIHOOD_UNSPECIFIED'
VERY_UNLIKELY = 'VERY_UNLIKELY'
UNLIKELY = 'UNLIKELY'
POSSIBLE = 'POSSIBLE'
LIKELY = 'LIKELY'
VERY_LIKELY = 'VERY_LIKELY'
class GooglePrivacyDlpV2LikelihoodAdjustment(BaseModel):
fixedLikelihood: Optional[FixedLikelihood] = Field(
None, description='Set the likelihood of a finding to a fixed value.'
)
relativeLikelihood: Optional[int] = Field(
None,
description='Increase or decrease the likelihood by the specified number of levels. For example, if a finding would be `POSSIBLE` without the detection rule and `relative_likelihood` is 1, then it is upgraded to `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an adjustment of -1 when base likelihood is `VERY_LIKELY` will result in a final likelihood of `LIKELY`.',
)
class GooglePrivacyDlpV2Manual(BaseModel):
pass
class Type2(Enum):
METADATATYPE_UNSPECIFIED = 'METADATATYPE_UNSPECIFIED'
STORAGE_METADATA = 'STORAGE_METADATA'
class GooglePrivacyDlpV2NumericalStatsConfig(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Field to compute numerical stats on. Supported types are integer, float, date, datetime, timestamp, time.',
)
class GooglePrivacyDlpV2OtherInfoTypeSummary(BaseModel):
estimatedPrevalence: Optional[int] = Field(
None,
description='Approximate percentage of non-null rows that contained data detected by this infotype.',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None, description='The other infoType.'
)
class OutputSchema(Enum):
OUTPUT_SCHEMA_UNSPECIFIED = 'OUTPUT_SCHEMA_UNSPECIFIED'
BASIC_COLUMNS = 'BASIC_COLUMNS'
GCS_COLUMNS = 'GCS_COLUMNS'
DATASTORE_COLUMNS = 'DATASTORE_COLUMNS'
BIG_QUERY_COLUMNS = 'BIG_QUERY_COLUMNS'
ALL_COLUMNS = 'ALL_COLUMNS'
class GooglePrivacyDlpV2OutputStorageConfig(BaseModel):
outputSchema: Optional[OutputSchema] = Field(
None,
description='Schema used for writing the findings for Inspect jobs. This field is only used for Inspect and must be unspecified for Risk jobs. Columns are derived from the `Finding` object. If appending to an existing table, any columns from the predefined schema that are missing will be added. No columns in the existing table will be deleted. If unspecified, then all available columns will be used for a new table or an (existing) table with no schema, and no changes will be made to an existing table that has a schema. Only for use with external storage.',
)
table: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None,
description='Store findings in an existing table or a new table in an existing dataset. If table_id is not set a new one will be generated for you with the following format: dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used for generating the date details. For Inspect, each column in an existing output table must have the same name, type, and mode of a field in the `Finding` object. For Risk, an existing output table should be the output of a previous Risk analysis job run on the same source table, with the same privacy metric and quasi-identifiers. Risk jobs that analyze the same table but compute a different privacy metric, or use different sets of quasi-identifiers, cannot store their results in the same table.',
)
class GooglePrivacyDlpV2PartitionId(BaseModel):
namespaceId: Optional[str] = Field(
None,
description='If not empty, the ID of the namespace to which the entities belong.',
)
projectId: Optional[str] = Field(
None, description='The ID of the project to which the entities belong.'
)
class GooglePrivacyDlpV2PathElement(BaseModel):
id: Optional[str] = Field(
None,
description='The auto-allocated ID of the entity. Never equal to zero. Values less than zero are discouraged and may not be supported in the future.',
)
kind: Optional[str] = Field(
None,
description='The kind of the entity. A kind matching regex `__.*__` is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be `""`.',
)
name: Optional[str] = Field(
None,
description='The name of the entity. A name matching regex `__.*__` is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be `""`.',
)
class GooglePrivacyDlpV2Proximity(BaseModel):
windowAfter: Optional[int] = Field(
None, description='Number of characters after the finding to consider.'
)
windowBefore: Optional[int] = Field(
None,
description='Number of characters before the finding to consider. For tabular data, if you want to modify the likelihood of an entire column of findngs, set this to 1. For more information, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).',
)
class MinimumRiskScore(Enum):
PROFILE_SCORE_BUCKET_UNSPECIFIED = 'PROFILE_SCORE_BUCKET_UNSPECIFIED'
HIGH = 'HIGH'
MEDIUM_OR_HIGH = 'MEDIUM_OR_HIGH'
class MinimumSensitivityScore(Enum):
PROFILE_SCORE_BUCKET_UNSPECIFIED = 'PROFILE_SCORE_BUCKET_UNSPECIFIED'
HIGH = 'HIGH'
MEDIUM_OR_HIGH = 'MEDIUM_OR_HIGH'
class GooglePrivacyDlpV2PubSubCondition(BaseModel):
minimumRiskScore: Optional[MinimumRiskScore] = Field(
None, description='The minimum data risk score that triggers the condition.'
)
minimumSensitivityScore: Optional[MinimumSensitivityScore] = Field(
None, description='The minimum sensitivity level that triggers the condition.'
)
class LogicalOperator1(Enum):
LOGICAL_OPERATOR_UNSPECIFIED = 'LOGICAL_OPERATOR_UNSPECIFIED'
OR = 'OR'
AND = 'AND'
class GooglePrivacyDlpV2PubSubExpressions(BaseModel):
conditions: Optional[List[GooglePrivacyDlpV2PubSubCondition]] = Field(
None, description='Conditions to apply to the expression.'
)
logicalOperator: Optional[LogicalOperator1] = Field(
None, description='The operator to apply to the collection of conditions.'
)
class DetailOfMessage(Enum):
DETAIL_LEVEL_UNSPECIFIED = 'DETAIL_LEVEL_UNSPECIFIED'
TABLE_PROFILE = 'TABLE_PROFILE'
RESOURCE_NAME = 'RESOURCE_NAME'
class GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog(BaseModel):
pass
class GooglePrivacyDlpV2PublishSummaryToCscc(BaseModel):
pass
class GooglePrivacyDlpV2PublishToPubSub(BaseModel):
topic: Optional[str] = Field(
None,
description='Cloud Pub/Sub topic to send notifications to. The topic must have given publishing access rights to the DLP API service account executing the long running DlpJob sending the notifications. Format is projects/{project}/topics/{topic}.',
)
class GooglePrivacyDlpV2PublishToStackdriver(BaseModel):
pass
class GooglePrivacyDlpV2QuasiIdField(BaseModel):
customTag: Optional[str] = Field(None, description='A auxiliary field.')
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Identifies the column.'
)
class GooglePrivacyDlpV2QuasiIdentifierField(BaseModel):
customTag: Optional[str] = Field(
None,
description='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).',
)
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Identifies the column.'
)
class GooglePrivacyDlpV2Range(BaseModel):
end: Optional[str] = Field(
None, description='Index of the last character of the range (exclusive).'
)
start: Optional[str] = Field(
None, description='Index of the first character of the range (inclusive).'
)
class GooglePrivacyDlpV2RecordTransformation(BaseModel):
containerTimestamp: Optional[str] = Field(
None, description='Findings container modification timestamp, if applicable.'
)
containerVersion: Optional[str] = Field(
None,
description='Container version, if available ("generation" for Cloud Storage).',
)
fieldId: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='For record transformations, provide a field.'
)
class GooglePrivacyDlpV2RedactConfig(BaseModel):
pass
class GooglePrivacyDlpV2Regex(BaseModel):
groupIndexes: Optional[List[int]] = Field(
None,
description='The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included.',
)
pattern: Optional[str] = Field(
None,
description='Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub.',
)
class GooglePrivacyDlpV2ReplaceWithInfoTypeConfig(BaseModel):
pass
class GooglePrivacyDlpV2Result(BaseModel):
hybridStats: Optional[GooglePrivacyDlpV2HybridInspectStatistics] = Field(
None, description='Statistics related to the processing of hybrid inspect.'
)
infoTypeStats: Optional[List[GooglePrivacyDlpV2InfoTypeStats]] = Field(
None,
description='Statistics of how many instances of each info type were found during inspect job.',
)
processedBytes: Optional[str] = Field(
None, description='Total size in bytes that were processed.'
)
totalEstimatedBytes: Optional[str] = Field(
None, description='Estimate of the number of bytes to process.'
)
class GooglePrivacyDlpV2SaveFindings(BaseModel):
outputConfig: Optional[GooglePrivacyDlpV2OutputStorageConfig] = Field(
None, description='Location to store findings outside of DLP.'
)
class GooglePrivacyDlpV2Schedule(BaseModel):
recurrencePeriodDuration: Optional[str] = Field(
None,
description='With this option a job is started on a regular periodic basis. For example: every day (86400 seconds). A scheduled start time will be skipped if the previous execution has not ended when its scheduled time occurs. This value must be set to a time duration greater than or equal to 1 day and can be no longer than 60 days.',
)
class GooglePrivacyDlpV2SelectedInfoTypes(BaseModel):
infoTypes: Optional[List[GooglePrivacyDlpV2InfoType]] = Field(
None,
description='Required. InfoTypes to apply the transformation to. Required. Provided InfoType must be unique within the ImageTransformations message.',
)
class Score1(Enum):
SENSITIVITY_SCORE_UNSPECIFIED = 'SENSITIVITY_SCORE_UNSPECIFIED'
SENSITIVITY_LOW = 'SENSITIVITY_LOW'
SENSITIVITY_MODERATE = 'SENSITIVITY_MODERATE'
SENSITIVITY_HIGH = 'SENSITIVITY_HIGH'
class GooglePrivacyDlpV2SensitivityScore(BaseModel):
score: Optional[Score1] = Field(
None, description='The score applied to the resource.'
)
class GooglePrivacyDlpV2StatisticalTable(BaseModel):
quasiIds: Optional[List[GooglePrivacyDlpV2QuasiIdentifierField]] = Field(
None, description='Required. Quasi-identifier columns.'
)
relativeFrequency: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Required. The relative frequency column must contain a floating-point number between 0 and 1 (inclusive). Null values are assumed to be zero.',
)
table: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Required. Auxiliary table location.'
)
class GooglePrivacyDlpV2StorageMetadataLabel(BaseModel):
key: Optional[str] = None
class GooglePrivacyDlpV2StoredInfoTypeStats(BaseModel):
largeCustomDictionary: Optional[GooglePrivacyDlpV2LargeCustomDictionaryStats] = (
Field(
None,
description='StoredInfoType where findings are defined by a dictionary of phrases.',
)
)
class State1(Enum):
STORED_INFO_TYPE_STATE_UNSPECIFIED = 'STORED_INFO_TYPE_STATE_UNSPECIFIED'
PENDING = 'PENDING'
READY = 'READY'
FAILED = 'FAILED'
INVALID = 'INVALID'
class GooglePrivacyDlpV2StoredType(BaseModel):
createTime: Optional[str] = Field(
None,
description='Timestamp indicating when the version of the `StoredInfoType` used for inspection was created. Output-only field, populated by the system.',
)
name: Optional[str] = Field(
None,
description='Resource name of the requested `StoredInfoType`, for example `organizations/433245324/storedInfoTypes/432452342` or `projects/project-id/storedInfoTypes/432452342`.',
)
class Code(Enum):
TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 'TRANSFORMATION_RESULT_CODE_UNSPECIFIED'
SUCCESS = 'SUCCESS'
ERROR = 'ERROR'
class GooglePrivacyDlpV2SummaryResult(BaseModel):
code: Optional[Code] = Field(None, description='Outcome of the transformation.')
count: Optional[str] = Field(
None, description='Number of transformations counted by this result.'
)
details: Optional[str] = Field(
None,
description="A place for warnings or errors to show up if a transformation didn't work as expected.",
)
class GooglePrivacyDlpV2SurrogateType(BaseModel):
pass
class EncryptionStatus(Enum):
ENCRYPTION_STATUS_UNSPECIFIED = 'ENCRYPTION_STATUS_UNSPECIFIED'
ENCRYPTION_GOOGLE_MANAGED = 'ENCRYPTION_GOOGLE_MANAGED'
ENCRYPTION_CUSTOMER_MANAGED = 'ENCRYPTION_CUSTOMER_MANAGED'
class ResourceVisibility(Enum):
RESOURCE_VISIBILITY_UNSPECIFIED = 'RESOURCE_VISIBILITY_UNSPECIFIED'
RESOURCE_VISIBILITY_PUBLIC = 'RESOURCE_VISIBILITY_PUBLIC'
RESOURCE_VISIBILITY_RESTRICTED = 'RESOURCE_VISIBILITY_RESTRICTED'
class State2(Enum):
STATE_UNSPECIFIED = 'STATE_UNSPECIFIED'
RUNNING = 'RUNNING'
DONE = 'DONE'
class GooglePrivacyDlpV2TableLocation(BaseModel):
rowIndex: Optional[str] = Field(
None,
description='The zero-based index of the row where the finding is located. Only populated for resources that have a natural ordering, not BigQuery. In BigQuery, to identify the row a finding came from, populate BigQueryOptions.identifying_fields with your primary key column names and when you store the findings the value of those columns will be stored inside of Finding.',
)
class GooglePrivacyDlpV2TableOptions(BaseModel):
identifyingFields: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description="The columns that are the primary keys for table objects included in ContentItem. A copy of this cell's value will stored alongside alongside each finding so that the finding can be traced to the specific row it came from. No more than 3 may be provided.",
)
class GooglePrivacyDlpV2ThrowError(BaseModel):
pass
class PartToExtract(Enum):
TIME_PART_UNSPECIFIED = 'TIME_PART_UNSPECIFIED'
YEAR = 'YEAR'
MONTH = 'MONTH'
DAY_OF_MONTH = 'DAY_OF_MONTH'
DAY_OF_WEEK = 'DAY_OF_WEEK'
WEEK_OF_YEAR = 'WEEK_OF_YEAR'
HOUR_OF_DAY = 'HOUR_OF_DAY'
class GooglePrivacyDlpV2TimePartConfig(BaseModel):
partToExtract: Optional[PartToExtract] = Field(
None, description='The part of the time to keep.'
)
class GooglePrivacyDlpV2TimeZone(BaseModel):
offsetMinutes: Optional[int] = Field(
None,
description='Set only if the offset can be determined. Positive for time ahead of UTC. E.g. For "UTC-9", this value is -540.',
)
class GooglePrivacyDlpV2TimespanConfig(BaseModel):
enableAutoPopulationOfTimespanConfig: Optional[bool] = Field(
None,
description='When the job is started by a JobTrigger we will automatically figure out a valid start_time to avoid scanning files that have not been modified since the last time the JobTrigger executed. This will be based on the time of the execution of the last run of the JobTrigger or the timespan end_time used in the last run of the JobTrigger.',
)
endTime: Optional[str] = Field(
None,
description='Exclude files, tables, or rows newer than this value. If not set, no upper time limit is applied.',
)
startTime: Optional[str] = Field(
None,
description='Exclude files, tables, or rows older than this value. If not set, no lower time limit is applied.',
)
timestampField: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. *For BigQuery* If this value is not specified and the table was modified between the given start and end times, the entire table will be scanned. If this value is specified, then rows are filtered based on the given start and end times. Rows with a `NULL` value in the provided BigQuery column are skipped. Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and `DATETIME`. If your BigQuery table is [partitioned at ingestion time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), you can use any of the following pseudo-columns as your timestamp field. When used with Cloud DLP, these pseudo-column names are case sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME *For Datastore* If this value is specified, then entities are filtered based on the given start and end times. If an entity does not contain the provided timestamp property or contains empty or invalid values, then it is included. Valid data types of the provided timestamp property are: `TIMESTAMP`. See the [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan) related to this operation.',
)
class GooglePrivacyDlpV2TransformationConfig(BaseModel):
deidentifyTemplate: Optional[str] = Field(
None,
description='De-identify template. If this template is specified, it will serve as the default de-identify template. This template cannot contain `record_transformations` since it can be used for unstructured content such as free-form text files. If this template is not set, a default `ReplaceWithInfoTypeConfig` will be used to de-identify unstructured content.',
)
imageRedactTemplate: Optional[str] = Field(
None,
description='Image redact template. If this template is specified, it will serve as the de-identify template for images. If this template is not set, all findings in the image will be redacted with a black box.',
)
structuredDeidentifyTemplate: Optional[str] = Field(
None,
description='Structured de-identify template. If this template is specified, it will serve as the de-identify template for structured content such as delimited files and tables. If this template is not set but the `deidentify_template` is set, then `deidentify_template` will also apply to the structured content. If neither template is set, a default `ReplaceWithInfoTypeConfig` will be used to de-identify structured content.',
)
class Type3(Enum):
TRANSFORMATION_TYPE_UNSPECIFIED = 'TRANSFORMATION_TYPE_UNSPECIFIED'
RECORD_SUPPRESSION = 'RECORD_SUPPRESSION'
REPLACE_VALUE = 'REPLACE_VALUE'
REPLACE_DICTIONARY = 'REPLACE_DICTIONARY'
REDACT = 'REDACT'
CHARACTER_MASK = 'CHARACTER_MASK'
CRYPTO_REPLACE_FFX_FPE = 'CRYPTO_REPLACE_FFX_FPE'
FIXED_SIZE_BUCKETING = 'FIXED_SIZE_BUCKETING'
BUCKETING = 'BUCKETING'
REPLACE_WITH_INFO_TYPE = 'REPLACE_WITH_INFO_TYPE'
TIME_PART = 'TIME_PART'
CRYPTO_HASH = 'CRYPTO_HASH'
DATE_SHIFT = 'DATE_SHIFT'
CRYPTO_DETERMINISTIC_CONFIG = 'CRYPTO_DETERMINISTIC_CONFIG'
REDACT_IMAGE = 'REDACT_IMAGE'
class GooglePrivacyDlpV2TransformationDescription(BaseModel):
condition: Optional[str] = Field(
None,
description='A human-readable string representation of the `RecordCondition` corresponding to this transformation. Set if a `RecordCondition` was used to determine whether or not to apply this transformation. Examples: * (age_field > 85) * (age_field <= 18) * (zip_field exists) * (zip_field == 01234) && (city_field != "Springville") * (zip_field == 01234) && (age_field <= 18) && (city_field exists)',
)
description: Optional[str] = Field(
None,
description='A description of the transformation. This is empty for a RECORD_SUPPRESSION, or is the output of calling toString() on the `PrimitiveTransformation` protocol buffer message for any other type of transformation.',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='Set if the transformation was limited to a specific `InfoType`.',
)
type: Optional[Type3] = Field(None, description='The transformation type.')
class GooglePrivacyDlpV2TransformationDetailsStorageConfig(BaseModel):
table: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None,
description='The BigQuery table in which to store the output. This may be an existing table or in a new table in an existing dataset. If table_id is not set a new one will be generated for you with the following format: dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used for generating the date details.',
)
class GooglePrivacyDlpV2TransformationErrorHandling(BaseModel):
leaveUntransformed: Optional[GooglePrivacyDlpV2LeaveUntransformed] = Field(
None, description='Ignore errors'
)
throwError: Optional[GooglePrivacyDlpV2ThrowError] = Field(
None, description='Throw an error'
)
class ContainerType(Enum):
TRANSFORM_UNKNOWN_CONTAINER = 'TRANSFORM_UNKNOWN_CONTAINER'
TRANSFORM_BODY = 'TRANSFORM_BODY'
TRANSFORM_METADATA = 'TRANSFORM_METADATA'
TRANSFORM_TABLE = 'TRANSFORM_TABLE'
class GooglePrivacyDlpV2TransformationLocation(BaseModel):
containerType: Optional[ContainerType] = Field(
None,
description='Information about the functionality of the container where this finding occurred, if available.',
)
findingId: Optional[str] = Field(
None,
description='For infotype transformations, link to the corresponding findings ID so that location information does not need to be duplicated. Each findings ID correlates to an entry in the findings output table, this table only gets created when users specify to save findings (add the save findings action to the request).',
)
recordTransformation: Optional[GooglePrivacyDlpV2RecordTransformation] = Field(
None,
description='For record transformations, provide a field and container information.',
)
class ResultStatusType(Enum):
STATE_TYPE_UNSPECIFIED = 'STATE_TYPE_UNSPECIFIED'
INVALID_TRANSFORM = 'INVALID_TRANSFORM'
BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 'BIGQUERY_MAX_ROW_SIZE_EXCEEDED'
METADATA_UNRETRIEVABLE = 'METADATA_UNRETRIEVABLE'
SUCCESS = 'SUCCESS'
class GooglePrivacyDlpV2TransientCryptoKey(BaseModel):
name: Optional[str] = Field(
None,
description='Required. Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).',
)
class GooglePrivacyDlpV2Trigger(BaseModel):
manual: Optional[GooglePrivacyDlpV2Manual] = Field(
None,
description='For use with hybrid jobs. Jobs must be manually created and finished.',
)
schedule: Optional[GooglePrivacyDlpV2Schedule] = Field(
None,
description='Create a job on a repeating basis based on the elapse of time.',
)
class GooglePrivacyDlpV2UnwrappedCryptoKey(BaseModel):
key: Optional[str] = Field(None, description='Required. A 128/192/256 bit key.')
class DayOfWeekValue(Enum):
DAY_OF_WEEK_UNSPECIFIED = 'DAY_OF_WEEK_UNSPECIFIED'
MONDAY = 'MONDAY'
TUESDAY = 'TUESDAY'
WEDNESDAY = 'WEDNESDAY'
THURSDAY = 'THURSDAY'
FRIDAY = 'FRIDAY'
SATURDAY = 'SATURDAY'
SUNDAY = 'SUNDAY'
class GooglePrivacyDlpV2VersionDescription(BaseModel):
description: Optional[str] = Field(None, description='Description of the version.')
version: Optional[str] = Field(None, description='Name of the version')
class GooglePrivacyDlpV2WordList(BaseModel):
words: Optional[List[str]] = Field(
None,
description='Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. [required]',
)
class GoogleProtobufEmpty(BaseModel):
pass
class GoogleRpcStatus(BaseModel):
code: Optional[int] = Field(
None,
description='The status code, which should be an enum value of google.rpc.Code.',
)
details: Optional[List[Dict[str, Any]]] = Field(
None,
description='A list of messages that carry the error details. There is a common set of message types for APIs to use.',
)
message: Optional[str] = Field(
None,
description='A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.',
)
class GoogleTypeDate(BaseModel):
day: Optional[int] = Field(
None,
description="Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
)
month: Optional[int] = Field(
None,
description='Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.',
)
year: Optional[int] = Field(
None,
description='Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.',
)
class GoogleTypeTimeOfDay(BaseModel):
hours: Optional[int] = Field(
None,
description='Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.',
)
minutes: Optional[int] = Field(
None, description='Minutes of hour of day. Must be from 0 to 59.'
)
nanos: Optional[int] = Field(
None,
description='Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.',
)
seconds: Optional[int] = Field(
None,
description='Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.',
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class Type4(Enum):
DLP_JOB_TYPE_UNSPECIFIED = 'DLP_JOB_TYPE_UNSPECIFIED'
INSPECT_JOB = 'INSPECT_JOB'
RISK_ANALYSIS_JOB = 'RISK_ANALYSIS_JOB'
class GooglePrivacyDlpV2AuxiliaryTable(BaseModel):
quasiIds: Optional[List[GooglePrivacyDlpV2QuasiIdField]] = Field(
None, description='Required. Quasi-identifier columns.'
)
relativeFrequency: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Required. The relative frequency column must contain a floating-point number between 0 and 1 (inclusive). Null values are assumed to be zero.',
)
table: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Required. Auxiliary table location.'
)
class GooglePrivacyDlpV2BigQueryField(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Designated field in the BigQuery table.'
)
table: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Source table of the field.'
)
class GooglePrivacyDlpV2BigQueryKey(BaseModel):
rowNumber: Optional[str] = Field(
None,
description='Row number inferred at the time the table was scanned. This value is nondeterministic, cannot be queried, and may be null for inspection jobs. To locate findings within a table, specify `inspect_job.storage_config.big_query_options.identifying_fields` in `CreateDlpJobRequest`.',
)
tableReference: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Complete BigQuery table reference.'
)
class GooglePrivacyDlpV2BigQueryOptions(BaseModel):
excludedFields: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description='References to fields excluded from scanning. This allows you to skip inspection of entire columns which you know have no findings.',
)
identifyingFields: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description='Table fields that may uniquely identify a row within the table. When `actions.saveFindings.outputConfig.table` is specified, the values of columns specified here are available in the output table under `location.content_locations.record_location.record_key.id_values`. Nested fields such as `person.birthdate.year` are allowed.',
)
includedFields: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None, description='Limit scanning only to these fields.'
)
rowsLimit: Optional[str] = Field(
None,
description='Max number of rows to scan. If the table has more rows than this value, the rest of the rows are omitted. If not set, or if set to 0, all rows will be scanned. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig.',
)
rowsLimitPercent: Optional[int] = Field(
None,
description='Max percentage of rows to scan. The rest are omitted. The number of rows scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig.',
)
sampleMethod: Optional[SampleMethod] = None
tableReference: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Complete BigQuery table reference.'
)
class GooglePrivacyDlpV2CategoricalStatsConfig(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='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 GooglePrivacyDlpV2CharacterMaskConfig(BaseModel):
charactersToIgnore: Optional[List[GooglePrivacyDlpV2CharsToIgnore]] = Field(
None,
description='When masking a string, items in this list will be skipped when replacing characters. For example, if the input string is `555-555-5555` and you instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP returns `***-**5-5555`.',
)
maskingCharacter: Optional[str] = Field(
None,
description='Character to use to mask the sensitive values—for example, `*` for an alphabetic string such as a name, or `0` for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to `*` for strings, and `0` for digits.',
)
numberToMask: Optional[int] = Field(
None,
description='Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values: - `masking_character` is `*` - `number_to_mask` is `-4` - `reverse_order` is `false` - `CharsToIgnore` includes `-` - Input string is `1234-5678-9012-3456` The resulting de-identified string is `****-****-****-3456`. Cloud DLP masks all but the last four characters. If `reverse_order` is `true`, all but the first four characters are masked as `1234-****-****-****`.',
)
reverseOrder: Optional[bool] = Field(
None,
description='Mask characters in reverse order. For example, if `masking_character` is `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` is `true`, then the string `12345` is masked as `12***`.',
)
class GooglePrivacyDlpV2CloudStorageOptions(BaseModel):
bytesLimitPerFile: Optional[str] = Field(
None,
description="Max number of bytes to scan from a file. If a scanned file's size is bigger than this value then the rest of the bytes are omitted. Only one of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. Cannot be set if de-identification is requested.",
)
bytesLimitPerFilePercent: Optional[int] = Field(
None,
description='Max percentage of bytes to scan from a file. The rest are omitted. The number of bytes scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. Cannot be set if de-identification is requested.',
)
fileSet: Optional[GooglePrivacyDlpV2FileSet] = Field(
None, description='The set of one or more files to scan.'
)
fileTypes: Optional[List[FileType]] = Field(
None,
description="List of file type groups to include in the scan. If empty, all files are scanned and available data format processors are applied. In addition, the binary content of the selected files is always scanned as well. Images are scanned only as binary if the specified region does not support image inspection and no file_types were specified. Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.",
)
filesLimitPercent: Optional[int] = Field(
None,
description='Limits the number of files to scan to this percentage of the input FileSet. Number of files scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0.',
)
sampleMethod: Optional[SampleMethod] = None
class GooglePrivacyDlpV2CryptoKey(BaseModel):
kmsWrapped: Optional[GooglePrivacyDlpV2KmsWrappedCryptoKey] = Field(
None, description='Key wrapped using Cloud KMS'
)
transient: Optional[GooglePrivacyDlpV2TransientCryptoKey] = Field(
None, description='Transient crypto key'
)
unwrapped: Optional[GooglePrivacyDlpV2UnwrappedCryptoKey] = Field(
None, description='Unwrapped crypto key'
)
class GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig(BaseModel):
commonAlphabet: Optional[CommonAlphabet] = Field(
None, description='Common alphabets.'
)
context: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description="The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but: 1. there is no record present when transforming a given value or 1. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and unstructured `ContentItem`s. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that: - a 64 bit integer is encoded followed by a single byte of value 1 - a string is encoded in UTF-8 format followed by a single byte of value 2",
)
cryptoKey: Optional[GooglePrivacyDlpV2CryptoKey] = Field(
None, description='Required. The key used by the encryption algorithm.'
)
customAlphabet: Optional[str] = Field(
None,
description='This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range [2, 95]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ~`!@#$%^&*()_-+={[}]|\\:;"\'<,>.?/',
)
radix: Optional[int] = Field(
None,
description='The native way to select the alphabet. Must be in the range [2, 95].',
)
surrogateInfoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description="The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info_type_name(surrogate_character_count):surrogate For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE",
)
class GooglePrivacyDlpV2DataProfilePubSubCondition(BaseModel):
expressions: Optional[GooglePrivacyDlpV2PubSubExpressions] = Field(
None, description='An expression.'
)
class GooglePrivacyDlpV2DatastoreOptions(BaseModel):
kind: Optional[GooglePrivacyDlpV2KindExpression] = Field(
None, description='The kind to process.'
)
partitionId: Optional[GooglePrivacyDlpV2PartitionId] = Field(
None,
description='A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty.',
)
class GooglePrivacyDlpV2DateShiftConfig(BaseModel):
context: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.',
)
cryptoKey: Optional[GooglePrivacyDlpV2CryptoKey] = Field(
None,
description='Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.',
)
lowerBoundDays: Optional[int] = Field(
None,
description='Required. For example, -5 means shift date to at most 5 days back in the past.',
)
upperBoundDays: Optional[int] = Field(
None,
description='Required. Range of shift in days. Actual shift will be selected at random within this range (inclusive ends). Negative means shift to earlier in time. Must not be more than 365250 days (1000 years) each direction. For example, 3 means shift date to at most 3 days into the future.',
)
class GooglePrivacyDlpV2DateTime(BaseModel):
date: Optional[GoogleTypeDate] = Field(
None,
description='One or more of the following must be set. Must be a valid date or time value.',
)
dayOfWeek: Optional[DayOfWeek] = Field(None, description='Day of week')
time: Optional[GoogleTypeTimeOfDay] = Field(None, description='Time of day')
timeZone: Optional[GooglePrivacyDlpV2TimeZone] = Field(
None, description='Time zone'
)
class GooglePrivacyDlpV2Deidentify(BaseModel):
cloudStorageOutput: Optional[str] = Field(
None,
description='Required. User settable Cloud Storage bucket and folders to store de-identified files. This field must be set for cloud storage deidentification. The output Cloud Storage bucket must be different from the input bucket. De-identified files will overwrite files in the output path. Form of: gs://bucket/folder/ or gs://bucket',
)
fileTypesToTransform: Optional[List[FileTypesToTransformEnum]] = Field(
None,
description="List of user-specified file type groups to transform. If specified, only the files with these filetypes will be transformed. If empty, all supported files will be transformed. Supported types may be automatically added over time. If a file type is set in this field that isn't supported by the Deidentify action then the job will fail and will not be successfully created/started. Currently the only filetypes supported are: IMAGES, TEXT_FILES, CSV, TSV.",
)
transformationConfig: Optional[GooglePrivacyDlpV2TransformationConfig] = Field(
None,
description='User specified deidentify templates and configs for structured, unstructured, and image files.',
)
transformationDetailsStorageConfig: Optional[
GooglePrivacyDlpV2TransformationDetailsStorageConfig
] = Field(
None,
description='Config for storing transformation details. This is separate from the de-identified content, and contains metadata about the successful transformations and/or failures that occurred while de-identifying. This needs to be set in order for users to access information about the status of each transformation (see TransformationDetails message for more information about what is noted).',
)
class GooglePrivacyDlpV2Dictionary(BaseModel):
cloudStoragePath: Optional[GooglePrivacyDlpV2CloudStoragePath] = Field(
None,
description='Newline-delimited file of words in Cloud Storage. Only a single file is accepted.',
)
wordList: Optional[GooglePrivacyDlpV2WordList] = Field(
None, description='List of words or phrases to search for.'
)
class GooglePrivacyDlpV2EntityId(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Composite key indicating which field contains the entity identifier.',
)
class GooglePrivacyDlpV2Error(BaseModel):
details: Optional[GoogleRpcStatus] = Field(
None, description='Detailed error codes and messages.'
)
timestamps: Optional[List[str]] = Field(
None, description='The times the error occurred.'
)
class GooglePrivacyDlpV2ExcludeByHotword(BaseModel):
hotwordRegex: Optional[GooglePrivacyDlpV2Regex] = Field(
None,
description='Regular expression pattern defining what qualifies as a hotword.',
)
proximity: Optional[GooglePrivacyDlpV2Proximity] = Field(
None,
description='Range of characters within which the entire hotword must reside. The total length of the window cannot exceed 1000 characters. The windowBefore property in proximity should be set to 1 if the hotword needs to be included in a column header.',
)
class GooglePrivacyDlpV2ExcludeInfoTypes(BaseModel):
infoTypes: Optional[List[GooglePrivacyDlpV2InfoType]] = Field(
None,
description='InfoType list in ExclusionRule rule drops a finding when it overlaps or contained within with a finding of an infoType from this list. For example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and `exclusion_rule` containing `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number findings are dropped if they overlap with EMAIL_ADDRESS finding. That leads to "555-222-2222@example.org" to generate only a single finding, namely email address.',
)
class GooglePrivacyDlpV2ExclusionRule(BaseModel):
dictionary: Optional[GooglePrivacyDlpV2Dictionary] = Field(
None, description='Dictionary which defines the rule.'
)
excludeByHotword: Optional[GooglePrivacyDlpV2ExcludeByHotword] = Field(
None,
description='Drop if the hotword rule is contained in the proximate context. For tabular data, the context includes the column name.',
)
excludeInfoTypes: Optional[GooglePrivacyDlpV2ExcludeInfoTypes] = Field(
None, description='Set of infoTypes for which findings would affect this rule.'
)
matchingType: Optional[MatchingType] = Field(
None,
description='How the rule is applied, see MatchingType documentation for details.',
)
regex: Optional[GooglePrivacyDlpV2Regex] = Field(
None, description='Regular expression which defines the rule.'
)
class GooglePrivacyDlpV2FindingLimits(BaseModel):
maxFindingsPerInfoType: Optional[List[GooglePrivacyDlpV2InfoTypeLimit]] = Field(
None,
description='Configuration of findings limit given for specified infoTypes.',
)
maxFindingsPerItem: Optional[int] = Field(
None,
description="Max number of findings that are returned for each item scanned. When set within an InspectContentRequest, this field is ignored. This value isn't a hard limit. If the number of findings for an item reaches this limit, the inspection of that item ends gradually, not abruptly. Therefore, the actual number of findings that Cloud DLP returns for the item can be multiple times higher than this value.",
)
maxFindingsPerRequest: Optional[int] = Field(
None,
description="Max number of findings that are returned per request or job. If you set this field in an InspectContentRequest, the resulting maximum value is the value that you set or 3,000, whichever is lower. This value isn't a hard limit. If an inspection reaches this limit, the inspection ends gradually, not abruptly. Therefore, the actual number of findings that Cloud DLP returns can be multiple times higher than this value.",
)
class GooglePrivacyDlpV2HotwordRule(BaseModel):
hotwordRegex: Optional[GooglePrivacyDlpV2Regex] = Field(
None,
description='Regular expression pattern defining what qualifies as a hotword.',
)
likelihoodAdjustment: Optional[GooglePrivacyDlpV2LikelihoodAdjustment] = Field(
None, description='Likelihood adjustment to apply to all matching findings.'
)
proximity: Optional[GooglePrivacyDlpV2Proximity] = Field(
None,
description='Range of characters within which the entire hotword must reside. The total length of the window cannot exceed 1000 characters. The finding itself will be included in the window, so that hotwords can be used to match substrings of the finding itself. Suppose you want Cloud DLP to promote the likelihood of the phone number regex "\\(\\d{3}\\) \\d{3}-\\d{4}" if the area code is known to be the area code of a company\'s office. In this case, use the hotword regex "\\(xxx\\)", where "xxx" is the area code in question. For tabular data, if you want to modify the likelihood of an entire column of findngs, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).',
)
class GooglePrivacyDlpV2HybridFindingDetails(BaseModel):
containerDetails: Optional[GooglePrivacyDlpV2Container] = Field(
None,
description='Details about the container where the content being inspected is from.',
)
fileOffset: Optional[str] = Field(
None,
description='Offset in bytes of the line, from the beginning of the file, where the finding is located. Populate if the item being scanned is only part of a bigger item, such as a shard of a file and you want to track the absolute position of the finding.',
)
labels: Optional[Dict[str, str]] = Field(
None,
description='Labels to represent user provided metadata about the data being inspected. If configured by the job, some key values may be required. The labels associated with `Finding`\'s produced by hybrid inspection. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be associated with a given finding. Examples: * `"environment" : "production"` * `"pipeline" : "etl"`',
)
rowOffset: Optional[str] = Field(
None,
description='Offset of the row for tables. Populate if the row(s) being scanned are part of a bigger dataset and you want to keep track of their absolute position.',
)
tableOptions: Optional[GooglePrivacyDlpV2TableOptions] = Field(
None,
description='If the container is a table, additional information to make findings meaningful such as the columns that are primary keys. If not known ahead of time, can also be set within each inspect hybrid call and the two will be merged. Note that identifying_fields will only be stored to BigQuery, and only if the BigQuery action has been included.',
)
class GooglePrivacyDlpV2HybridOptions(BaseModel):
description: Optional[str] = Field(
None,
description='A short description of where the data is coming from. Will be stored once in the job. 256 max length.',
)
labels: Optional[Dict[str, str]] = Field(
None,
description='To organize findings, these labels will be added to each finding. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be associated with a given finding. Examples: * `"environment" : "production"` * `"pipeline" : "etl"`',
)
requiredFindingLabelKeys: Optional[List[str]] = Field(
None,
description="These are labels that each inspection request must include within their 'finding_labels' map. Request may contain others, but any missing one of these will be rejected. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more than 10 keys can be required.",
)
tableOptions: Optional[GooglePrivacyDlpV2TableOptions] = Field(
None,
description='If the container is a table, additional information to make findings meaningful such as the columns that are primary keys.',
)
class GooglePrivacyDlpV2ImageRedactionConfig(BaseModel):
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.',
)
redactAllText: Optional[bool] = Field(
None,
description='If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.',
)
redactionColor: Optional[GooglePrivacyDlpV2Color] = Field(
None,
description='The color to use when redacting content from an image. If not specified, the default is black.',
)
class GooglePrivacyDlpV2ImageTransformation(BaseModel):
allInfoTypes: Optional[GooglePrivacyDlpV2AllInfoTypes] = Field(
None,
description="Apply transformation to all findings not specified in other ImageTransformation's selected_info_types. Only one instance is allowed within the ImageTransformations message.",
)
allText: Optional[GooglePrivacyDlpV2AllText] = Field(
None,
description="Apply transformation to all text that doesn't match an infoType. Only one instance is allowed within the ImageTransformations message.",
)
redactionColor: Optional[GooglePrivacyDlpV2Color] = Field(
None,
description='The color to use when redacting content from an image. If not specified, the default is black.',
)
selectedInfoTypes: Optional[GooglePrivacyDlpV2SelectedInfoTypes] = Field(
None, description='Apply transformation to the selected info_types.'
)
class GooglePrivacyDlpV2ImageTransformations(BaseModel):
transforms: Optional[List[GooglePrivacyDlpV2ImageTransformation]] = None
class GooglePrivacyDlpV2InfoTypeDescription(BaseModel):
categories: Optional[List[GooglePrivacyDlpV2InfoTypeCategory]] = Field(
None, description='The category of the infoType.'
)
description: Optional[str] = Field(
None,
description='Description of the infotype. Translated when language is provided in the request.',
)
displayName: Optional[str] = Field(
None, description='Human readable form of the infoType name.'
)
name: Optional[str] = Field(None, description='Internal name of the infoType.')
sensitivityScore: Optional[GooglePrivacyDlpV2SensitivityScore] = Field(
None, description='The default sensitivity of the infoType.'
)
supportedBy: Optional[List[SupportedByEnum]] = Field(
None, description='Which parts of the API supports this InfoType.'
)
versions: Optional[List[GooglePrivacyDlpV2VersionDescription]] = Field(
None, description='A list of available versions for the infotype.'
)
class GooglePrivacyDlpV2InspectionRule(BaseModel):
exclusionRule: Optional[GooglePrivacyDlpV2ExclusionRule] = Field(
None, description='Exclusion rule.'
)
hotwordRule: Optional[GooglePrivacyDlpV2HotwordRule] = Field(
None, description='Hotword-based detection rule.'
)
class GooglePrivacyDlpV2InspectionRuleSet(BaseModel):
infoTypes: Optional[List[GooglePrivacyDlpV2InfoType]] = Field(
None, description='List of infoTypes this rule set is applied to.'
)
rules: Optional[List[GooglePrivacyDlpV2InspectionRule]] = Field(
None,
description='Set of rules to be applied to infoTypes. The rules are applied in order.',
)
class GooglePrivacyDlpV2KAnonymityConfig(BaseModel):
entityId: Optional[GooglePrivacyDlpV2EntityId] = Field(
None,
description='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.',
)
quasiIds: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description='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.',
)
class GooglePrivacyDlpV2Key(BaseModel):
partitionId: Optional[GooglePrivacyDlpV2PartitionId] = Field(
None,
description='Entities are partitioned into subsets, currently identified by a project ID and namespace ID. Queries are scoped to a single partition.',
)
path: Optional[List[GooglePrivacyDlpV2PathElement]] = Field(
None,
description="The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a _root entity_, the second element identifies a _child_ of the root entity, the third element identifies a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's _ancestors_. A path can never be empty, and a path can have at most 100 elements.",
)
class GooglePrivacyDlpV2LargeCustomDictionaryConfig(BaseModel):
bigQueryField: Optional[GooglePrivacyDlpV2BigQueryField] = Field(
None,
description='Field in a BigQuery table where each cell represents a dictionary phrase.',
)
cloudStorageFileSet: Optional[GooglePrivacyDlpV2CloudStorageFileSet] = Field(
None,
description='Set of files containing newline-delimited lists of dictionary phrases.',
)
outputPath: Optional[GooglePrivacyDlpV2CloudStoragePath] = Field(
None,
description='Location to store dictionary artifacts in Cloud Storage. These files will only be accessible by project owners and the DLP API. If any of these artifacts are modified, the dictionary is considered invalid and can no longer be used.',
)
class GooglePrivacyDlpV2ListInfoTypesResponse(BaseModel):
infoTypes: Optional[List[GooglePrivacyDlpV2InfoTypeDescription]] = Field(
None, description='Set of sensitive infoTypes.'
)
class GooglePrivacyDlpV2MetadataLocation(BaseModel):
storageLabel: Optional[GooglePrivacyDlpV2StorageMetadataLabel] = Field(
None, description='Storage metadata.'
)
type: Optional[Type2] = Field(
None, description='Type of metadata containing the finding.'
)
class GooglePrivacyDlpV2ProfileStatus(BaseModel):
status: Optional[GoogleRpcStatus] = Field(
None, description='Profiling status code and optional message'
)
timestamp: Optional[str] = Field(
None, description='Time when the profile generation status was updated'
)
class GooglePrivacyDlpV2PubSubNotification(BaseModel):
detailOfMessage: Optional[DetailOfMessage] = Field(
None,
description='How much data to include in the Pub/Sub message. If the user wishes to limit the size of the message, they can use resource_name and fetch the profile fields they wish to. Per table profile (not per column).',
)
event: Optional[Event] = Field(
None,
description='The type of event that triggers a Pub/Sub. At most one `PubSubNotification` per EventType is permitted.',
)
pubsubCondition: Optional[GooglePrivacyDlpV2DataProfilePubSubCondition] = Field(
None,
description='Conditions (e.g., data risk or sensitivity level) for triggering a Pub/Sub.',
)
topic: Optional[str] = Field(
None,
description='Cloud Pub/Sub topic to send notifications to. Format is projects/{project}/topics/{topic}.',
)
class GooglePrivacyDlpV2QuasiId(BaseModel):
customTag: Optional[str] = Field(
None,
description='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).',
)
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Required. Identifies the column.'
)
inferred: Optional[GoogleProtobufEmpty] = Field(
None,
description='If no semantic tag is indicated, we infer the statistical model from the distribution of values in the input data',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='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.',
)
class GooglePrivacyDlpV2QuoteInfo(BaseModel):
dateTime: Optional[GooglePrivacyDlpV2DateTime] = Field(
None, description='The date time indicated by the quote.'
)
class GooglePrivacyDlpV2ReplaceDictionaryConfig(BaseModel):
wordList: Optional[GooglePrivacyDlpV2WordList] = Field(
None,
description='A list of words to select from for random replacement. The [limits](https://cloud.google.com/dlp/limits) page contains details about the size limits of dictionaries.',
)
class GooglePrivacyDlpV2StorageConfig(BaseModel):
bigQueryOptions: Optional[GooglePrivacyDlpV2BigQueryOptions] = Field(
None, description='BigQuery options.'
)
cloudStorageOptions: Optional[GooglePrivacyDlpV2CloudStorageOptions] = Field(
None, description='Cloud Storage options.'
)
datastoreOptions: Optional[GooglePrivacyDlpV2DatastoreOptions] = Field(
None, description='Google Cloud Datastore options.'
)
hybridOptions: Optional[GooglePrivacyDlpV2HybridOptions] = Field(
None, description='Hybrid inspection options.'
)
timespanConfig: Optional[GooglePrivacyDlpV2TimespanConfig] = None
class GooglePrivacyDlpV2StoredInfoTypeConfig(BaseModel):
description: Optional[str] = Field(
None, description='Description of the StoredInfoType (max 256 characters).'
)
dictionary: Optional[GooglePrivacyDlpV2Dictionary] = Field(
None, description='Store dictionary-based CustomInfoType.'
)
displayName: Optional[str] = Field(
None, description='Display name of the StoredInfoType (max 256 characters).'
)
largeCustomDictionary: Optional[GooglePrivacyDlpV2LargeCustomDictionaryConfig] = (
Field(
None,
description='StoredInfoType where findings are defined by a dictionary of phrases.',
)
)
regex: Optional[GooglePrivacyDlpV2Regex] = Field(
None, description='Store regular expression-based StoredInfoType.'
)
class GooglePrivacyDlpV2StoredInfoTypeVersion(BaseModel):
config: Optional[GooglePrivacyDlpV2StoredInfoTypeConfig] = Field(
None, description='StoredInfoType configuration.'
)
createTime: Optional[str] = Field(
None,
description='Create timestamp of the version. Read-only, determined by the system when the version is created.',
)
errors: Optional[List[GooglePrivacyDlpV2Error]] = Field(
None,
description="Errors that occurred when creating this storedInfoType version, or anomalies detected in the storedInfoType data that render it unusable. Only the five most recent errors will be displayed, with the most recent error appearing first. For example, some of the data for stored custom dictionaries is put in the user's Cloud Storage bucket, and if this data is modified or deleted by the user or another system, the dictionary becomes invalid. If any errors occur, fix the problem indicated by the error message and use the UpdateStoredInfoType API method to create another version of the storedInfoType to continue using it, reusing the same `config` if it was not the source of the error.",
)
state: Optional[State1] = Field(
None,
description='Stored info type version state. Read-only, updated by the system during dictionary creation.',
)
stats: Optional[GooglePrivacyDlpV2StoredInfoTypeStats] = Field(
None, description='Statistics about this storedInfoType version.'
)
class GooglePrivacyDlpV2TaggedField(BaseModel):
customTag: Optional[str] = Field(
None,
description='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).',
)
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Required. Identifies the column.'
)
inferred: Optional[GoogleProtobufEmpty] = Field(
None,
description='If no semantic tag is indicated, we infer the statistical model from the distribution of values in the input data',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='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.',
)
class GooglePrivacyDlpV2TransformationResultStatus(BaseModel):
details: Optional[GoogleRpcStatus] = Field(
None, description='Detailed error codes and messages'
)
resultStatusType: Optional[ResultStatusType] = Field(
None,
description='Transformation result status type, this will be either SUCCESS, or it will be the reason for why the transformation was not completely successful.',
)
class GooglePrivacyDlpV2UpdateStoredInfoTypeRequest(BaseModel):
config: Optional[GooglePrivacyDlpV2StoredInfoTypeConfig] = Field(
None,
description='Updated configuration for the storedInfoType. If not provided, a new version of the storedInfoType will be created with the existing configuration.',
)
updateMask: Optional[str] = Field(
None, description='Mask to control which fields get updated.'
)
class GooglePrivacyDlpV2Value(BaseModel):
booleanValue: Optional[bool] = Field(None, description='boolean')
dateValue: Optional[GoogleTypeDate] = Field(None, description='date')
dayOfWeekValue: Optional[DayOfWeekValue] = Field(None, description='day of week')
floatValue: Optional[float] = Field(None, description='float')
integerValue: Optional[str] = Field(None, description='integer')
stringValue: Optional[str] = Field(None, description='string')
timeValue: Optional[GoogleTypeTimeOfDay] = Field(None, description='time of day')
timestampValue: Optional[str] = Field(None, description='timestamp')
class GooglePrivacyDlpV2ValueFrequency(BaseModel):
count: Optional[str] = Field(
None, description='How many times the value is contained in the field.'
)
value: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='A value contained in the field in question.'
)
class GooglePrivacyDlpV2Action(BaseModel):
deidentify: Optional[GooglePrivacyDlpV2Deidentify] = Field(
None, description='Create a de-identified copy of the input data.'
)
jobNotificationEmails: Optional[GooglePrivacyDlpV2JobNotificationEmails] = Field(
None,
description='Sends an email when the job completes. The email goes to IAM project owners and technical [Essential Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).',
)
pubSub: Optional[GooglePrivacyDlpV2PublishToPubSub] = Field(
None, description='Publish a notification to a Pub/Sub topic.'
)
publishFindingsToCloudDataCatalog: Optional[
GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog
] = Field(None, description='Publish findings to Cloud Datahub.')
publishSummaryToCscc: Optional[GooglePrivacyDlpV2PublishSummaryToCscc] = Field(
None, description='Publish summary to Cloud Security Command Center (Alpha).'
)
publishToStackdriver: Optional[GooglePrivacyDlpV2PublishToStackdriver] = Field(
None, description='Enable Stackdriver metric dlp.googleapis.com/finding_count.'
)
saveFindings: Optional[GooglePrivacyDlpV2SaveFindings] = Field(
None, description='Save resulting findings in a provided location.'
)
class GooglePrivacyDlpV2Bucket(BaseModel):
max: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='Upper bound of the range, exclusive; type must match min.'
)
min: Optional[GooglePrivacyDlpV2Value] = Field(
None,
description='Lower bound of the range, inclusive. Type should be the same as max if used.',
)
replacementValue: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='Required. Replacement value for this bucket.'
)
class GooglePrivacyDlpV2BucketingConfig(BaseModel):
buckets: Optional[List[GooglePrivacyDlpV2Bucket]] = Field(
None, description='Set of buckets. Ranges must be non-overlapping.'
)
class GooglePrivacyDlpV2CategoricalStatsHistogramBucket(BaseModel):
bucketSize: Optional[str] = Field(
None, description='Total number of values in this bucket.'
)
bucketValueCount: Optional[str] = Field(
None, description='Total number of distinct values in this bucket.'
)
bucketValues: Optional[List[GooglePrivacyDlpV2ValueFrequency]] = Field(
None,
description='Sample of value frequencies in this bucket. The total number of values returned per bucket is capped at 20.',
)
valueFrequencyLowerBound: Optional[str] = Field(
None,
description='Lower bound on the value frequency of the values in this bucket.',
)
valueFrequencyUpperBound: Optional[str] = Field(
None,
description='Upper bound on the value frequency of the values in this bucket.',
)
class GooglePrivacyDlpV2CategoricalStatsResult(BaseModel):
valueFrequencyHistogramBuckets: Optional[
List[GooglePrivacyDlpV2CategoricalStatsHistogramBucket]
] = Field(None, description='Histogram of value frequencies in the column.')
class GooglePrivacyDlpV2Condition(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='Required. Field within the record this condition is evaluated against.',
)
operator: Optional[Operator] = Field(
None,
description='Required. Operator used to compare the field or infoType to the value.',
)
value: Optional[GooglePrivacyDlpV2Value] = Field(
None,
description='Value to compare against. [Mandatory, except for `EXISTS` tests.]',
)
class GooglePrivacyDlpV2Conditions(BaseModel):
conditions: Optional[List[GooglePrivacyDlpV2Condition]] = Field(
None, description='A collection of conditions.'
)
class GooglePrivacyDlpV2CreateStoredInfoTypeRequest(BaseModel):
config: Optional[GooglePrivacyDlpV2StoredInfoTypeConfig] = Field(
None, description='Required. Configuration of the storedInfoType to create.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
storedInfoTypeId: Optional[str] = Field(
None,
description='The storedInfoType ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.',
)
class GooglePrivacyDlpV2CryptoDeterministicConfig(BaseModel):
context: Optional[GooglePrivacyDlpV2FieldId] = Field(
None,
description='A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but: 1. there is no record present when transforming a given value or 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and unstructured `ContentItem`s.',
)
cryptoKey: Optional[GooglePrivacyDlpV2CryptoKey] = Field(
None,
description='The key used by the encryption function. For deterministic encryption using AES-SIV, the provided key is internally expanded to 64 bytes prior to use.',
)
surrogateInfoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description="The custom info type to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom info type followed by the number of characters comprising the surrogate. The following scheme defines the format: {info type name}({surrogate character count}):{surrogate} For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom info type 'Surrogate'. This facilitates reversal of the surrogate when it occurs in free text. Note: For record transformations where the entire cell in a table is being transformed, surrogates are not mandatory. Surrogates are used to denote the location of the token and are necessary for re-identification in free form text. In order for inspection to work properly, the name of this info type must not occur naturally anywhere in your data; otherwise, inspection may either - reverse a surrogate that does not correspond to an actual identifier - be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE.",
)
class GooglePrivacyDlpV2CryptoHashConfig(BaseModel):
cryptoKey: Optional[GooglePrivacyDlpV2CryptoKey] = Field(
None, description='The key used by the hash function.'
)
class GooglePrivacyDlpV2DataProfileAction(BaseModel):
exportData: Optional[GooglePrivacyDlpV2Export] = Field(
None, description='Export data profiles into a provided location.'
)
pubSubNotification: Optional[GooglePrivacyDlpV2PubSubNotification] = Field(
None, description='Publish a message into the Pub/Sub topic.'
)
class GooglePrivacyDlpV2DataProfileJobConfig(BaseModel):
dataProfileActions: Optional[List[GooglePrivacyDlpV2DataProfileAction]] = Field(
None, description='Actions to execute at the completion of the job.'
)
inspectTemplates: Optional[List[str]] = Field(
None,
description='Detection logic for profile generation. Not all template features are used by profiles. FindingLimits, include_quote and exclude_info_types have no impact on data profiling. Multiple templates may be provided if there is data in multiple regions. At most one template must be specified per-region (including "global"). Each region is scanned using the applicable template. If no region-specific template is specified, but a "global" template is specified, it will be copied to that region and used instead. If no global or region-specific template is provided for a region with data, that region\'s data will not be scanned. For more information, see https://cloud.google.com/dlp/docs/data-profiles#data_residency.',
)
location: Optional[GooglePrivacyDlpV2DataProfileLocation] = Field(
None, description='The data to scan.'
)
projectId: Optional[str] = Field(
None,
description='The project that will run the scan. The DLP service account that exists within this project must have access to all resources that are profiled, and the Cloud DLP API must be enabled.',
)
class GooglePrivacyDlpV2DatastoreKey(BaseModel):
entityKey: Optional[GooglePrivacyDlpV2Key] = Field(
None, description='Datastore entity key.'
)
class GooglePrivacyDlpV2DeltaPresenceEstimationConfig(BaseModel):
auxiliaryTables: Optional[List[GooglePrivacyDlpV2StatisticalTable]] = Field(
None,
description='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.',
)
quasiIds: Optional[List[GooglePrivacyDlpV2QuasiId]] = Field(
None,
description='Required. Fields considered to be quasi-identifiers. No two fields can have the same tag.',
)
regionCode: Optional[str] = Field(
None,
description='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.',
)
class GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues(BaseModel):
estimatedProbability: Optional[float] = Field(
None,
description='The estimated probability that a given individual sharing these quasi-identifier values is in the dataset. This value, typically called δ, is the ratio between the number of records in the dataset with these quasi-identifier values, and the total number of individuals (inside *and* outside the dataset) with these quasi-identifier values. For example, if there are 15 individuals in the dataset who share the same quasi-identifier values, and an estimated 100 people in the entire population with these values, then δ is 0.15.',
)
quasiIdsValues: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None, description='The quasi-identifier values.'
)
class GooglePrivacyDlpV2DetectionRule(BaseModel):
hotwordRule: Optional[GooglePrivacyDlpV2HotwordRule] = Field(
None, description='Hotword-based detection rule.'
)
class GooglePrivacyDlpV2Expressions(BaseModel):
conditions: Optional[GooglePrivacyDlpV2Conditions] = Field(
None, description='Conditions to apply to the expression.'
)
logicalOperator: Optional[LogicalOperator] = Field(
None,
description='The operator to apply to the result of conditions. Default and currently only supported value is `AND`.',
)
class GooglePrivacyDlpV2FixedSizeBucketingConfig(BaseModel):
bucketSize: Optional[float] = Field(
None,
description='Required. Size of each bucket (except for minimum and maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.',
)
lowerBound: Optional[GooglePrivacyDlpV2Value] = Field(
None,
description='Required. Lower bound value of buckets. All values less than `lower_bound` are grouped together into a single bucket; for example if `lower_bound` = 10, then all values less than 10 are replaced with the value "-10".',
)
upperBound: Optional[GooglePrivacyDlpV2Value] = Field(
None,
description='Required. Upper bound value of buckets. All values greater than upper_bound are grouped together into a single bucket; for example if `upper_bound` = 89, then all values greater than 89 are replaced with the value "89+".',
)
class GooglePrivacyDlpV2KAnonymityEquivalenceClass(BaseModel):
equivalenceClassSize: Optional[str] = Field(
None,
description='Size of the equivalence class, for example number of rows with the above set of values.',
)
quasiIdsValues: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None,
description='Set of values defining the equivalence class. One value per quasi-identifier column in the original KAnonymity metric message. The order is always the same as the original request.',
)
class GooglePrivacyDlpV2KAnonymityHistogramBucket(BaseModel):
bucketSize: Optional[str] = Field(
None, description='Total number of equivalence classes in this bucket.'
)
bucketValueCount: Optional[str] = Field(
None, description='Total number of distinct equivalence classes in this bucket.'
)
bucketValues: Optional[List[GooglePrivacyDlpV2KAnonymityEquivalenceClass]] = Field(
None,
description='Sample of equivalence classes in this bucket. The total number of classes returned per bucket is capped at 20.',
)
equivalenceClassSizeLowerBound: Optional[str] = Field(
None,
description='Lower bound on the size of the equivalence classes in this bucket.',
)
equivalenceClassSizeUpperBound: Optional[str] = Field(
None,
description='Upper bound on the size of the equivalence classes in this bucket.',
)
class GooglePrivacyDlpV2KAnonymityResult(BaseModel):
equivalenceClassHistogramBuckets: Optional[
List[GooglePrivacyDlpV2KAnonymityHistogramBucket]
] = Field(None, description='Histogram of k-anonymity equivalence classes.')
class GooglePrivacyDlpV2KMapEstimationConfig(BaseModel):
auxiliaryTables: Optional[List[GooglePrivacyDlpV2AuxiliaryTable]] = Field(
None,
description='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.',
)
quasiIds: Optional[List[GooglePrivacyDlpV2TaggedField]] = Field(
None,
description='Required. Fields considered to be quasi-identifiers. No two columns can have the same tag.',
)
regionCode: Optional[str] = Field(
None,
description='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.',
)
class GooglePrivacyDlpV2KMapEstimationQuasiIdValues(BaseModel):
estimatedAnonymity: Optional[str] = Field(
None, description='The estimated anonymity for these quasi-identifier values.'
)
quasiIdsValues: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None, description='The quasi-identifier values.'
)
class GooglePrivacyDlpV2LDiversityEquivalenceClass(BaseModel):
equivalenceClassSize: Optional[str] = Field(
None, description='Size of the k-anonymity equivalence class.'
)
numDistinctSensitiveValues: Optional[str] = Field(
None,
description='Number of distinct sensitive values in this equivalence class.',
)
quasiIdsValues: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None,
description='Quasi-identifier values defining the k-anonymity equivalence class. The order is always the same as the original request.',
)
topSensitiveValues: Optional[List[GooglePrivacyDlpV2ValueFrequency]] = Field(
None, description='Estimated frequencies of top sensitive values.'
)
class GooglePrivacyDlpV2LDiversityHistogramBucket(BaseModel):
bucketSize: Optional[str] = Field(
None, description='Total number of equivalence classes in this bucket.'
)
bucketValueCount: Optional[str] = Field(
None, description='Total number of distinct equivalence classes in this bucket.'
)
bucketValues: Optional[List[GooglePrivacyDlpV2LDiversityEquivalenceClass]] = Field(
None,
description='Sample of equivalence classes in this bucket. The total number of classes returned per bucket is capped at 20.',
)
sensitiveValueFrequencyLowerBound: Optional[str] = Field(
None,
description='Lower bound on the sensitive value frequencies of the equivalence classes in this bucket.',
)
sensitiveValueFrequencyUpperBound: Optional[str] = Field(
None,
description='Upper bound on the sensitive value frequencies of the equivalence classes in this bucket.',
)
class GooglePrivacyDlpV2LDiversityResult(BaseModel):
sensitiveValueFrequencyHistogramBuckets: Optional[
List[GooglePrivacyDlpV2LDiversityHistogramBucket]
] = Field(
None,
description='Histogram of l-diversity equivalence class sensitive value frequencies.',
)
class GooglePrivacyDlpV2NumericalStatsResult(BaseModel):
maxValue: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='Maximum value appearing in the column.'
)
minValue: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='Minimum value appearing in the column.'
)
quantileValues: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None,
description='List of 99 values that partition the set of field values into 100 equal sized buckets.',
)
class GooglePrivacyDlpV2PrivacyMetric(BaseModel):
categoricalStatsConfig: Optional[GooglePrivacyDlpV2CategoricalStatsConfig] = Field(
None, description='Categorical stats'
)
deltaPresenceEstimationConfig: Optional[
GooglePrivacyDlpV2DeltaPresenceEstimationConfig
] = Field(None, description='delta-presence')
kAnonymityConfig: Optional[GooglePrivacyDlpV2KAnonymityConfig] = Field(
None, description='K-anonymity'
)
kMapEstimationConfig: Optional[GooglePrivacyDlpV2KMapEstimationConfig] = Field(
None, description='k-map'
)
lDiversityConfig: Optional[GooglePrivacyDlpV2LDiversityConfig] = Field(
None, description='l-diversity'
)
numericalStatsConfig: Optional[GooglePrivacyDlpV2NumericalStatsConfig] = Field(
None, description='Numerical stats'
)
class GooglePrivacyDlpV2RecordCondition(BaseModel):
expressions: Optional[GooglePrivacyDlpV2Expressions] = Field(
None, description='An expression.'
)
class GooglePrivacyDlpV2RecordKey(BaseModel):
bigQueryKey: Optional[GooglePrivacyDlpV2BigQueryKey] = None
datastoreKey: Optional[GooglePrivacyDlpV2DatastoreKey] = None
idValues: Optional[List[str]] = Field(
None,
description='Values of identifying columns in the given row. Order of values matches the order of `identifying_fields` specified in the scanning request.',
)
class GooglePrivacyDlpV2RecordLocation(BaseModel):
fieldId: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Field id of the field containing the finding.'
)
recordKey: Optional[GooglePrivacyDlpV2RecordKey] = Field(
None, description='Key of the finding.'
)
tableLocation: Optional[GooglePrivacyDlpV2TableLocation] = Field(
None, description='Location within a `ContentItem.Table`.'
)
class GooglePrivacyDlpV2RecordSuppression(BaseModel):
condition: Optional[GooglePrivacyDlpV2RecordCondition] = Field(
None,
description='A condition that when it evaluates to true will result in the record being evaluated to be suppressed from the transformed content.',
)
class GooglePrivacyDlpV2ReplaceValueConfig(BaseModel):
newValue: Optional[GooglePrivacyDlpV2Value] = Field(
None, description='Value to replace it with.'
)
class GooglePrivacyDlpV2RiskAnalysisJobConfig(BaseModel):
actions: Optional[List[GooglePrivacyDlpV2Action]] = Field(
None,
description='Actions to execute at the completion of the job. Are executed in the order provided.',
)
privacyMetric: Optional[GooglePrivacyDlpV2PrivacyMetric] = Field(
None, description='Privacy metric to compute.'
)
sourceTable: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Input dataset to compute metrics over.'
)
class GooglePrivacyDlpV2Row(BaseModel):
values: Optional[List[GooglePrivacyDlpV2Value]] = Field(
None, description='Individual cells.'
)
class GooglePrivacyDlpV2StoredInfoType(BaseModel):
currentVersion: Optional[GooglePrivacyDlpV2StoredInfoTypeVersion] = Field(
None, description='Current version of the stored info type.'
)
name: Optional[str] = Field(None, description='Resource name.')
pendingVersions: Optional[List[GooglePrivacyDlpV2StoredInfoTypeVersion]] = Field(
None,
description='Pending versions of the stored info type. Empty if no versions are pending.',
)
class GooglePrivacyDlpV2Table(BaseModel):
headers: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None, description='Headers of the table.'
)
rows: Optional[List[GooglePrivacyDlpV2Row]] = Field(
None, description='Rows of the table.'
)
class GooglePrivacyDlpV2TransformationDetails(BaseModel):
containerName: Optional[str] = Field(
None,
description='The top level name of the container where the transformation is located (this will be the source file name or table name).',
)
resourceName: Optional[str] = Field(
None, description='The name of the job that completed the transformation.'
)
statusDetails: Optional[GooglePrivacyDlpV2TransformationResultStatus] = Field(
None,
description='Status of the transformation, if transformation was not successful, this will specify what caused it to fail, otherwise it will show that the transformation was successful.',
)
transformation: Optional[List[GooglePrivacyDlpV2TransformationDescription]] = Field(
None,
description='Description of transformation. This would only contain more than one element if there were multiple matching transformations and which one to apply was ambiguous. Not set for states that contain no transformation, currently only state that contains no transformation is TransformationResultStateType.METADATA_UNRETRIEVABLE.',
)
transformationLocation: Optional[GooglePrivacyDlpV2TransformationLocation] = Field(
None,
description='The precise location of the transformed content in the original container.',
)
transformedBytes: Optional[str] = Field(
None,
description='The number of bytes that were transformed. If transformation was unsuccessful or did not take place because there was no content to transform, this will be zero.',
)
class GooglePrivacyDlpV2ContentItem(BaseModel):
byteItem: Optional[GooglePrivacyDlpV2ByteContentItem] = Field(
None,
description='Content data to inspect or redact. Replaces `type` and `data`.',
)
table: Optional[GooglePrivacyDlpV2Table] = Field(
None,
description='Structured content for inspection. See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to learn more.',
)
value: Optional[str] = Field(None, description='String data to inspect or redact.')
class GooglePrivacyDlpV2ContentLocation(BaseModel):
containerName: Optional[str] = Field(
None,
description='Name of the container where the finding is located. The top level name is the source file name or table name. Names of some common storage containers are formatted as follows: * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` * Cloud Storage files: `gs://{bucket}/{path}` * Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document).',
)
containerTimestamp: Optional[str] = Field(
None,
description="Finding container modification timestamp, if applicable. For Cloud Storage, this field contains the last file modification timestamp. For a BigQuery table, this field contains the last_modified_time property. For Datastore, this field isn't populated.",
)
containerVersion: Optional[str] = Field(
None,
description='Finding container version, if available ("generation" for Cloud Storage).',
)
documentLocation: Optional[GooglePrivacyDlpV2DocumentLocation] = Field(
None, description='Location data for document files.'
)
imageLocation: Optional[GooglePrivacyDlpV2ImageLocation] = Field(
None, description="Location within an image's pixels."
)
metadataLocation: Optional[GooglePrivacyDlpV2MetadataLocation] = Field(
None, description='Location within the metadata for inspected content.'
)
recordLocation: Optional[GooglePrivacyDlpV2RecordLocation] = Field(
None, description='Location within a row or record of a database table.'
)
class GooglePrivacyDlpV2CustomInfoType(BaseModel):
detectionRules: Optional[List[GooglePrivacyDlpV2DetectionRule]] = Field(
None,
description='Set of detection rules to apply to all findings of this CustomInfoType. Rules are applied in order that they are specified. Not supported for the `surrogate_type` CustomInfoType.',
)
dictionary: Optional[GooglePrivacyDlpV2Dictionary] = Field(
None, description='A list of phrases to detect as a CustomInfoType.'
)
exclusionType: Optional[ExclusionType] = Field(
None,
description='If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned. It still can be used for rules matching.',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='CustomInfoType can either be a new infoType, or an extension of built-in infoType, when the name matches one of existing infoTypes and that infoType is specified in `InspectContent.info_types` field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in `InspectContent.info_types` list then the name is treated as a custom info type.',
)
likelihood: Optional[Likelihood] = Field(
None,
description='Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Defaults to `VERY_LIKELY` if not specified.',
)
regex: Optional[GooglePrivacyDlpV2Regex] = Field(
None, description='Regular expression based CustomInfoType.'
)
storedType: Optional[GooglePrivacyDlpV2StoredType] = Field(
None,
description='Load an existing `StoredInfoType` resource for use in `InspectDataSource`. Not currently supported in `InspectContent`.',
)
surrogateType: Optional[GooglePrivacyDlpV2SurrogateType] = Field(
None,
description='Message for detecting output from deidentification transformations that support reversing.',
)
class GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket(BaseModel):
bucketSize: Optional[str] = Field(
None, description='Number of records within these probability bounds.'
)
bucketValueCount: Optional[str] = Field(
None,
description='Total number of distinct quasi-identifier tuple values in this bucket.',
)
bucketValues: Optional[
List[GooglePrivacyDlpV2DeltaPresenceEstimationQuasiIdValues]
] = Field(
None,
description='Sample of quasi-identifier tuple values in this bucket. The total number of classes returned per bucket is capped at 20.',
)
maxProbability: Optional[float] = Field(
None, description='Always greater than or equal to min_probability.'
)
minProbability: Optional[float] = Field(None, description='Between 0 and 1.')
class GooglePrivacyDlpV2DeltaPresenceEstimationResult(BaseModel):
deltaPresenceEstimationHistogram: Optional[
List[GooglePrivacyDlpV2DeltaPresenceEstimationHistogramBucket]
] = Field(
None,
description="The intervals [min_probability, max_probability) do not overlap. If a value doesn't correspond to any such interval, the associated frequency is zero. For example, the following records: {min_probability: 0, max_probability: 0.1, frequency: 17} {min_probability: 0.2, max_probability: 0.3, frequency: 42} {min_probability: 0.3, max_probability: 0.4, frequency: 99} mean that there are no record with an estimated probability in [0.1, 0.2) nor larger or equal to 0.4.",
)
class GooglePrivacyDlpV2HybridContentItem(BaseModel):
findingDetails: Optional[GooglePrivacyDlpV2HybridFindingDetails] = Field(
None,
description='Supplementary information that will be added to each finding.',
)
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None, description='The item to inspect.'
)
class GooglePrivacyDlpV2HybridInspectDlpJobRequest(BaseModel):
hybridItem: Optional[GooglePrivacyDlpV2HybridContentItem] = Field(
None, description='The item to inspect.'
)
class GooglePrivacyDlpV2HybridInspectJobTriggerRequest(BaseModel):
hybridItem: Optional[GooglePrivacyDlpV2HybridContentItem] = Field(
None, description='The item to inspect.'
)
class GooglePrivacyDlpV2InspectConfig(BaseModel):
contentOptions: Optional[List[ContentOption]] = Field(
None, description='Deprecated and unused.'
)
customInfoTypes: Optional[List[GooglePrivacyDlpV2CustomInfoType]] = Field(
None,
description='CustomInfoTypes provided by the user. See https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.',
)
excludeInfoTypes: Optional[bool] = Field(
None,
description='When true, excludes type information of the findings. This is not used for data profiling.',
)
includeQuote: Optional[bool] = Field(
None,
description='When true, a contextual quote from the data that triggered a finding is included in the response; see Finding.quote. This is not used for data profiling.',
)
infoTypes: Optional[List[GooglePrivacyDlpV2InfoType]] = Field(
None,
description='Restricts what info_types to look for. The values must correspond to InfoType values returned by ListInfoTypes or listed at https://cloud.google.com/dlp/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. If you need precise control and predictability as to what detectors are run you should specify specific InfoTypes listed in the reference, otherwise a default list will be used, which may change over time.',
)
limits: Optional[GooglePrivacyDlpV2FindingLimits] = Field(
None,
description="Configuration to control the number of findings returned. This is not used for data profiling. When redacting sensitive data from images, finding limits don't apply. They can cause unexpected or inconsistent results, where only some data is redacted. Don't include finding limits in RedactImage requests. Otherwise, Cloud DLP returns an error. When set within an InspectJobConfig, the specified maximum values aren't hard limits. If an inspection job reaches these limits, the job ends gradually, not abruptly. Therefore, the actual number of findings that Cloud DLP returns can be multiple times higher than these maximum values.",
)
minLikelihood: Optional[MinLikelihood] = Field(
None,
description='Only returns findings equal or above this threshold. The default is POSSIBLE. See https://cloud.google.com/dlp/docs/likelihood to learn more.',
)
ruleSet: Optional[List[GooglePrivacyDlpV2InspectionRuleSet]] = Field(
None,
description='Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end, other rules are executed in the order they are specified for each info type.',
)
class GooglePrivacyDlpV2InspectContentRequest(BaseModel):
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None,
description='Configuration for the inspector. What specified here will override the template referenced by the inspect_template_name argument.',
)
inspectTemplateName: Optional[str] = Field(
None,
description='Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.',
)
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None, description='The item to inspect.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
class GooglePrivacyDlpV2InspectJobConfig(BaseModel):
actions: Optional[List[GooglePrivacyDlpV2Action]] = Field(
None, description='Actions to execute at the completion of the job.'
)
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None, description='How and what to scan for.'
)
inspectTemplateName: Optional[str] = Field(
None,
description='If provided, will be used as the default for all values in InspectConfig. `inspect_config` will be merged into the values persisted as part of the template.',
)
storageConfig: Optional[GooglePrivacyDlpV2StorageConfig] = Field(
None, description='The data to scan.'
)
class GooglePrivacyDlpV2InspectTemplate(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The creation timestamp of an inspectTemplate.'
)
description: Optional[str] = Field(
None, description='Short description (max 256 chars).'
)
displayName: Optional[str] = Field(
None, description='Display name (max 256 chars).'
)
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None,
description='The core content of the template. Configuration of the scanning process.',
)
name: Optional[str] = Field(
None,
description='Output only. The template name. The template will have one of the following formats: `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;',
)
updateTime: Optional[str] = Field(
None,
description='Output only. The last update timestamp of an inspectTemplate.',
)
class GooglePrivacyDlpV2JobTrigger(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The creation timestamp of a triggeredJob.'
)
description: Optional[str] = Field(
None, description='User provided description (max 256 chars)'
)
displayName: Optional[str] = Field(None, description='Display name (max 100 chars)')
errors: Optional[List[GooglePrivacyDlpV2Error]] = Field(
None,
description='Output only. A stream of errors encountered when the trigger was activated. Repeated errors may result in the JobTrigger automatically being paused. Will return the last 100 errors. Whenever the JobTrigger is modified this list will be cleared.',
)
inspectJob: Optional[GooglePrivacyDlpV2InspectJobConfig] = Field(
None, description='For inspect jobs, a snapshot of the configuration.'
)
lastRunTime: Optional[str] = Field(
None,
description='Output only. The timestamp of the last time this trigger executed.',
)
name: Optional[str] = Field(
None,
description='Unique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example `projects/dlp-test-project/jobTriggers/53234423`.',
)
status: Optional[Status] = Field(
None, description='Required. A status for this trigger.'
)
triggers: Optional[List[GooglePrivacyDlpV2Trigger]] = Field(
None,
description="A list of triggers which will be OR'ed together. Only one in the list needs to trigger for a job to be started. The list may contain only a single Schedule trigger and must have at least one object.",
)
updateTime: Optional[str] = Field(
None, description='Output only. The last update timestamp of a triggeredJob.'
)
class GooglePrivacyDlpV2KMapEstimationHistogramBucket(BaseModel):
bucketSize: Optional[str] = Field(
None, description='Number of records within these anonymity bounds.'
)
bucketValueCount: Optional[str] = Field(
None,
description='Total number of distinct quasi-identifier tuple values in this bucket.',
)
bucketValues: Optional[List[GooglePrivacyDlpV2KMapEstimationQuasiIdValues]] = Field(
None,
description='Sample of quasi-identifier tuple values in this bucket. The total number of classes returned per bucket is capped at 20.',
)
maxAnonymity: Optional[str] = Field(
None, description='Always greater than or equal to min_anonymity.'
)
minAnonymity: Optional[str] = Field(None, description='Always positive.')
class GooglePrivacyDlpV2KMapEstimationResult(BaseModel):
kMapEstimationHistogram: Optional[
List[GooglePrivacyDlpV2KMapEstimationHistogramBucket]
] = Field(
None,
description="The intervals [min_anonymity, max_anonymity] do not overlap. If a value doesn't correspond to any such interval, the associated frequency is zero. For example, the following records: {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: 10, frequency: 99} mean that there are no record with an estimated anonymity of 4, 5, or larger than 10.",
)
class GooglePrivacyDlpV2ListInspectTemplatesResponse(BaseModel):
inspectTemplates: Optional[List[GooglePrivacyDlpV2InspectTemplate]] = Field(
None,
description='List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.',
)
nextPageToken: Optional[str] = Field(
None,
description='If the next page is available then the next page token to be used in following ListInspectTemplates request.',
)
class GooglePrivacyDlpV2ListJobTriggersResponse(BaseModel):
jobTriggers: Optional[List[GooglePrivacyDlpV2JobTrigger]] = Field(
None,
description='List of triggeredJobs, up to page_size in ListJobTriggersRequest.',
)
nextPageToken: Optional[str] = Field(
None,
description='If the next page is available then the next page token to be used in following ListJobTriggers request.',
)
class GooglePrivacyDlpV2ListStoredInfoTypesResponse(BaseModel):
nextPageToken: Optional[str] = Field(
None,
description='If the next page is available then the next page token to be used in following ListStoredInfoTypes request.',
)
storedInfoTypes: Optional[List[GooglePrivacyDlpV2StoredInfoType]] = Field(
None,
description='List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.',
)
class GooglePrivacyDlpV2Location(BaseModel):
byteRange: Optional[GooglePrivacyDlpV2Range] = Field(
None,
description="Zero-based byte offsets delimiting the finding. These are relative to the finding's containing element. Note that when the content is not textual, this references the UTF-8 encoded textual representation of the content. Omitted if content is an image.",
)
codepointRange: Optional[GooglePrivacyDlpV2Range] = Field(
None,
description="Unicode character offsets delimiting the finding. These are relative to the finding's containing element. Provided when the content is text.",
)
container: Optional[GooglePrivacyDlpV2Container] = Field(
None,
description='Information about the container where this finding occurred, if available.',
)
contentLocations: Optional[List[GooglePrivacyDlpV2ContentLocation]] = Field(
None,
description='List of nested objects pointing to the precise location of the finding within the file or record.',
)
class GooglePrivacyDlpV2PrimitiveTransformation(BaseModel):
bucketingConfig: Optional[GooglePrivacyDlpV2BucketingConfig] = Field(
None, description='Bucketing'
)
characterMaskConfig: Optional[GooglePrivacyDlpV2CharacterMaskConfig] = Field(
None, description='Mask'
)
cryptoDeterministicConfig: Optional[GooglePrivacyDlpV2CryptoDeterministicConfig] = (
Field(None, description='Deterministic Crypto')
)
cryptoHashConfig: Optional[GooglePrivacyDlpV2CryptoHashConfig] = Field(
None, description='Crypto'
)
cryptoReplaceFfxFpeConfig: Optional[GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig] = (
Field(None, description='Ffx-Fpe')
)
dateShiftConfig: Optional[GooglePrivacyDlpV2DateShiftConfig] = Field(
None, description='Date Shift'
)
fixedSizeBucketingConfig: Optional[GooglePrivacyDlpV2FixedSizeBucketingConfig] = (
Field(None, description='Fixed size bucketing')
)
redactConfig: Optional[GooglePrivacyDlpV2RedactConfig] = Field(
None, description='Redact'
)
replaceConfig: Optional[GooglePrivacyDlpV2ReplaceValueConfig] = Field(
None, description='Replace with a specified value.'
)
replaceDictionaryConfig: Optional[GooglePrivacyDlpV2ReplaceDictionaryConfig] = (
Field(
None,
description='Replace with a value randomly drawn (with replacement) from a dictionary.',
)
)
replaceWithInfoTypeConfig: Optional[GooglePrivacyDlpV2ReplaceWithInfoTypeConfig] = (
Field(None, description='Replace with infotype')
)
timePartConfig: Optional[GooglePrivacyDlpV2TimePartConfig] = Field(
None, description='Time extraction'
)
class GooglePrivacyDlpV2RedactImageRequest(BaseModel):
byteItem: Optional[GooglePrivacyDlpV2ByteContentItem] = Field(
None, description='The content must be PNG, JPEG, SVG or BMP.'
)
imageRedactionConfigs: Optional[List[GooglePrivacyDlpV2ImageRedactionConfig]] = (
Field(
None,
description='The configuration for specifying what content to redact from images.',
)
)
includeFindings: Optional[bool] = Field(
None,
description='Whether the response should include findings along with the redacted image.',
)
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None, description='Configuration for the inspector.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
class GooglePrivacyDlpV2RequestedOptions(BaseModel):
jobConfig: Optional[GooglePrivacyDlpV2InspectJobConfig] = Field(
None, description='Inspect config.'
)
snapshotInspectTemplate: Optional[GooglePrivacyDlpV2InspectTemplate] = Field(
None,
description='If run with an InspectTemplate, a snapshot of its state at the time of this run.',
)
class GooglePrivacyDlpV2RequestedRiskAnalysisOptions(BaseModel):
jobConfig: Optional[GooglePrivacyDlpV2RiskAnalysisJobConfig] = Field(
None, description='The job config for the risk job.'
)
class GooglePrivacyDlpV2UpdateInspectTemplateRequest(BaseModel):
inspectTemplate: Optional[GooglePrivacyDlpV2InspectTemplate] = Field(
None, description='New InspectTemplate value.'
)
updateMask: Optional[str] = Field(
None, description='Mask to control which fields get updated.'
)
class GooglePrivacyDlpV2UpdateJobTriggerRequest(BaseModel):
jobTrigger: Optional[GooglePrivacyDlpV2JobTrigger] = Field(
None, description='New JobTrigger value.'
)
updateMask: Optional[str] = Field(
None, description='Mask to control which fields get updated.'
)
class GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails(BaseModel):
categoricalStatsResult: Optional[GooglePrivacyDlpV2CategoricalStatsResult] = Field(
None, description='Categorical stats result'
)
deltaPresenceEstimationResult: Optional[
GooglePrivacyDlpV2DeltaPresenceEstimationResult
] = Field(None, description='Delta-presence result')
kAnonymityResult: Optional[GooglePrivacyDlpV2KAnonymityResult] = Field(
None, description='K-anonymity result'
)
kMapEstimationResult: Optional[GooglePrivacyDlpV2KMapEstimationResult] = Field(
None, description='K-map result'
)
lDiversityResult: Optional[GooglePrivacyDlpV2LDiversityResult] = Field(
None, description='L-divesity result'
)
numericalStatsResult: Optional[GooglePrivacyDlpV2NumericalStatsResult] = Field(
None, description='Numerical stats result'
)
requestedOptions: Optional[GooglePrivacyDlpV2RequestedRiskAnalysisOptions] = Field(
None, description='The configuration used for this job.'
)
requestedPrivacyMetric: Optional[GooglePrivacyDlpV2PrivacyMetric] = Field(
None, description='Privacy metric to compute.'
)
requestedSourceTable: Optional[GooglePrivacyDlpV2BigQueryTable] = Field(
None, description='Input dataset to compute metrics over.'
)
class GooglePrivacyDlpV2CreateDlpJobRequest(BaseModel):
inspectJob: Optional[GooglePrivacyDlpV2InspectJobConfig] = Field(
None, description='An inspection job scans a storage repository for InfoTypes.'
)
jobId: Optional[str] = Field(
None,
description='The job id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.',
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
riskJob: Optional[GooglePrivacyDlpV2RiskAnalysisJobConfig] = Field(
None,
description='A risk analysis job calculates re-identification risk metrics for a BigQuery table.',
)
class GooglePrivacyDlpV2CreateInspectTemplateRequest(BaseModel):
inspectTemplate: Optional[GooglePrivacyDlpV2InspectTemplate] = Field(
None, description='Required. The InspectTemplate to create.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
templateId: Optional[str] = Field(
None,
description='The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.',
)
class GooglePrivacyDlpV2CreateJobTriggerRequest(BaseModel):
jobTrigger: Optional[GooglePrivacyDlpV2JobTrigger] = Field(
None, description='Required. The JobTrigger to create.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
triggerId: Optional[str] = Field(
None,
description='The trigger id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.',
)
class GooglePrivacyDlpV2DataProfileConfigSnapshot(BaseModel):
dataProfileJob: Optional[GooglePrivacyDlpV2DataProfileJobConfig] = Field(
None, description='A copy of the configuration used to generate this profile.'
)
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None,
description='A copy of the inspection config used to generate this profile. This is a copy of the inspect_template specified in `DataProfileJobConfig`.',
)
class GooglePrivacyDlpV2Finding(BaseModel):
createTime: Optional[str] = Field(
None, description='Timestamp when finding was detected.'
)
findingId: Optional[str] = Field(None, description='The unique finding id.')
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='The type of content that might have been found. Provided if `excluded_types` is false.',
)
jobCreateTime: Optional[str] = Field(
None, description='Time the job started that produced this finding.'
)
jobName: Optional[str] = Field(None, description='The job that stored the finding.')
labels: Optional[Dict[str, str]] = Field(
None,
description='The labels associated with this `Finding`. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be associated with a given finding. Examples: * `"environment" : "production"` * `"pipeline" : "etl"`',
)
likelihood: Optional[Likelihood] = Field(
None,
description='Confidence of how likely it is that the `info_type` is correct.',
)
location: Optional[GooglePrivacyDlpV2Location] = Field(
None, description='Where the content was found.'
)
name: Optional[str] = Field(
None,
description='Resource name in format projects/{project}/locations/{location}/findings/{finding} Populated only when viewing persisted findings.',
)
quote: Optional[str] = Field(
None,
description='The content that was found. Even if the content is not textual, it may be converted to a textual representation here. Provided if `include_quote` is true and the finding is less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes in length, the quote may be omitted.',
)
quoteInfo: Optional[GooglePrivacyDlpV2QuoteInfo] = Field(
None,
description='Contains data parsed from quotes. Only populated if include_quote was set to true and a supported infoType was requested. Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME.',
)
resourceName: Optional[str] = Field(
None, description='The job that stored the finding.'
)
triggerName: Optional[str] = Field(
None, description='Job trigger name, if applicable, for this finding.'
)
class GooglePrivacyDlpV2InfoTypeTransformation(BaseModel):
infoTypes: Optional[List[GooglePrivacyDlpV2InfoType]] = Field(
None,
description='InfoTypes to apply the transformation to. An empty list will cause this transformation to apply to all findings that correspond to infoTypes that were requested in `InspectConfig`.',
)
primitiveTransformation: Optional[GooglePrivacyDlpV2PrimitiveTransformation] = (
Field(
None,
description='Required. Primitive transformation to apply to the infoType.',
)
)
class GooglePrivacyDlpV2InfoTypeTransformations(BaseModel):
transformations: Optional[List[GooglePrivacyDlpV2InfoTypeTransformation]] = Field(
None,
description='Required. Transformation for each infoType. Cannot specify more than one for a given infoType.',
)
class GooglePrivacyDlpV2InspectDataSourceDetails(BaseModel):
requestedOptions: Optional[GooglePrivacyDlpV2RequestedOptions] = Field(
None, description='The configuration used for this job.'
)
result: Optional[GooglePrivacyDlpV2Result] = Field(
None, description='A summary of the outcome of this inspection job.'
)
class GooglePrivacyDlpV2InspectResult(BaseModel):
findings: Optional[List[GooglePrivacyDlpV2Finding]] = Field(
None, description='List of findings for an item.'
)
findingsTruncated: Optional[bool] = Field(
None,
description='If true, then this item might have more findings than were returned, and the findings returned are an arbitrary subset of all findings. The findings list might be truncated because the input items were too large, or because the server reached the maximum amount of resources allowed for a single API call. For best results, divide the input into smaller batches.',
)
class GooglePrivacyDlpV2RedactImageResponse(BaseModel):
extractedText: Optional[str] = Field(
None,
description="If an image was being inspected and the InspectConfig's include_quote was set to true, then this field will include all text, if any, that was found in the image.",
)
inspectResult: Optional[GooglePrivacyDlpV2InspectResult] = Field(
None,
description='The findings. Populated when include_findings in the request is true.',
)
redactedImage: Optional[str] = Field(
None,
description='The redacted image. The type will be the same as the original image.',
)
class GooglePrivacyDlpV2TableDataProfile(BaseModel):
configSnapshot: Optional[GooglePrivacyDlpV2DataProfileConfigSnapshot] = Field(
None,
description='The snapshot of the configurations used to generate the profile.',
)
createTime: Optional[str] = Field(
None, description='The time at which the table was created.'
)
dataRiskLevel: Optional[GooglePrivacyDlpV2DataRiskLevel] = Field(
None, description='The data risk level of this table.'
)
datasetId: Optional[str] = Field(None, description='The BigQuery dataset ID.')
datasetLocation: Optional[str] = Field(
None,
description="The BigQuery location where the dataset's data is stored. See https://cloud.google.com/bigquery/docs/locations for supported locations.",
)
datasetProjectId: Optional[str] = Field(
None, description='The GCP project ID that owns the BigQuery dataset.'
)
encryptionStatus: Optional[EncryptionStatus] = Field(
None, description='How the table is encrypted.'
)
expirationTime: Optional[str] = Field(
None, description='Optional. The time when this table expires.'
)
failedColumnCount: Optional[str] = Field(
None,
description='The number of columns skipped in the table because of an error.',
)
fullResource: Optional[str] = Field(
None,
description='The resource name of the table. https://cloud.google.com/apis/design/resource_names#full_resource_name',
)
lastModifiedTime: Optional[str] = Field(
None, description='The time when this table was last modified'
)
name: Optional[str] = Field(None, description='The name of the profile.')
otherInfoTypes: Optional[List[GooglePrivacyDlpV2OtherInfoTypeSummary]] = Field(
None, description="Other infoTypes found in this table's data."
)
predictedInfoTypes: Optional[List[GooglePrivacyDlpV2InfoTypeSummary]] = Field(
None, description="The infoTypes predicted from this table's data."
)
profileLastGenerated: Optional[str] = Field(
None, description='The last time the profile was generated.'
)
profileStatus: Optional[GooglePrivacyDlpV2ProfileStatus] = Field(
None,
description='Success or error status from the most recent profile generation attempt. May be empty if the profile is still being generated.',
)
projectDataProfile: Optional[str] = Field(
None,
description='The resource name to the project data profile for this table.',
)
resourceLabels: Optional[Dict[str, str]] = Field(
None,
description='The labels applied to the resource at the time the profile was generated.',
)
resourceVisibility: Optional[ResourceVisibility] = Field(
None, description='How broadly a resource has been shared.'
)
rowCount: Optional[str] = Field(
None,
description='Number of rows in the table when the profile was generated. This will not be populated for BigLake tables.',
)
scannedColumnCount: Optional[str] = Field(
None, description='The number of columns profiled in the table.'
)
sensitivityScore: Optional[GooglePrivacyDlpV2SensitivityScore] = Field(
None, description='The sensitivity score of this table.'
)
state: Optional[State2] = Field(None, description='State of a profile.')
tableId: Optional[str] = Field(None, description='The BigQuery table ID.')
tableSizeBytes: Optional[str] = Field(
None, description='The size of the table when the profile was generated.'
)
class GooglePrivacyDlpV2DataProfilePubSubMessage(BaseModel):
event: Optional[Event] = Field(
None, description='The event that caused the Pub/Sub message to be sent.'
)
profile: Optional[GooglePrivacyDlpV2TableDataProfile] = Field(
None,
description='If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and `full_resource` will be populated.',
)
class GooglePrivacyDlpV2FieldTransformation(BaseModel):
condition: Optional[GooglePrivacyDlpV2RecordCondition] = Field(
None,
description='Only apply the transformation if the condition evaluates to true for the given `RecordCondition`. The conditions are allowed to reference fields that are not used in the actual transformation. Example Use Cases: - Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range. - Redact a field if the date of birth field is greater than 85.',
)
fields: Optional[List[GooglePrivacyDlpV2FieldId]] = Field(
None,
description='Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".',
)
infoTypeTransformations: Optional[GooglePrivacyDlpV2InfoTypeTransformations] = (
Field(
None,
description='Treat the contents of the field as free text, and selectively transform content that matches an `InfoType`.',
)
)
primitiveTransformation: Optional[GooglePrivacyDlpV2PrimitiveTransformation] = (
Field(None, description='Apply the transformation to the entire field.')
)
class GooglePrivacyDlpV2InspectContentResponse(BaseModel):
result: Optional[GooglePrivacyDlpV2InspectResult] = Field(
None, description='The findings.'
)
class GooglePrivacyDlpV2RecordTransformations(BaseModel):
fieldTransformations: Optional[List[GooglePrivacyDlpV2FieldTransformation]] = Field(
None,
description='Transform the record by applying various field transformations.',
)
recordSuppressions: Optional[List[GooglePrivacyDlpV2RecordSuppression]] = Field(
None,
description='Configuration defining which records get suppressed entirely. Records that match any suppression rule are omitted from the output.',
)
class GooglePrivacyDlpV2TransformationSummary(BaseModel):
field: Optional[GooglePrivacyDlpV2FieldId] = Field(
None, description='Set if the transformation was limited to a specific FieldId.'
)
fieldTransformations: Optional[List[GooglePrivacyDlpV2FieldTransformation]] = Field(
None,
description='The field transformation that was applied. If multiple field transformations are requested for a single field, this list will contain all of them; otherwise, only one is supplied.',
)
infoType: Optional[GooglePrivacyDlpV2InfoType] = Field(
None,
description='Set if the transformation was limited to a specific InfoType.',
)
recordSuppress: Optional[GooglePrivacyDlpV2RecordSuppression] = Field(
None, description='The specific suppression option these stats apply to.'
)
results: Optional[List[GooglePrivacyDlpV2SummaryResult]] = Field(
None,
description='Collection of all transformations that took place or had an error.',
)
transformation: Optional[GooglePrivacyDlpV2PrimitiveTransformation] = Field(
None, description='The specific transformation these stats apply to.'
)
transformedBytes: Optional[str] = Field(
None, description='Total size in bytes that were transformed in some way.'
)
class GooglePrivacyDlpV2DeidentifyConfig(BaseModel):
imageTransformations: Optional[GooglePrivacyDlpV2ImageTransformations] = Field(
None, description='Treat the dataset as an image and redact.'
)
infoTypeTransformations: Optional[GooglePrivacyDlpV2InfoTypeTransformations] = (
Field(
None,
description='Treat the dataset as free-form text and apply the same free text transformation everywhere.',
)
)
recordTransformations: Optional[GooglePrivacyDlpV2RecordTransformations] = Field(
None,
description='Treat the dataset as structured. Transformations can be applied to specific locations within structured datasets, such as transforming a column within a table.',
)
transformationErrorHandling: Optional[
GooglePrivacyDlpV2TransformationErrorHandling
] = Field(
None,
description='Mode for handling transformation errors. If left unspecified, the default mode is `TransformationErrorHandling.ThrowError`.',
)
class GooglePrivacyDlpV2DeidentifyContentRequest(BaseModel):
deidentifyConfig: Optional[GooglePrivacyDlpV2DeidentifyConfig] = Field(
None,
description='Configuration for the de-identification of the content item. Items specified here will override the template referenced by the deidentify_template_name argument.',
)
deidentifyTemplateName: Optional[str] = Field(
None,
description='Template to use. Any configuration directly specified in deidentify_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.',
)
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None,
description='Configuration for the inspector. Items specified here will override the template referenced by the inspect_template_name argument.',
)
inspectTemplateName: Optional[str] = Field(
None,
description='Template to use. Any configuration directly specified in inspect_config will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.',
)
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None,
description='The item to de-identify. Will be treated as text. This value must be of type Table if your deidentify_config is a RecordTransformations object.',
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
class GooglePrivacyDlpV2DeidentifyTemplate(BaseModel):
createTime: Optional[str] = Field(
None, description='Output only. The creation timestamp of an inspectTemplate.'
)
deidentifyConfig: Optional[GooglePrivacyDlpV2DeidentifyConfig] = Field(
None, description='The core content of the template.'
)
description: Optional[str] = Field(
None, description='Short description (max 256 chars).'
)
displayName: Optional[str] = Field(
None, description='Display name (max 256 chars).'
)
name: Optional[str] = Field(
None,
description='Output only. The template name. The template will have one of the following formats: `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`',
)
updateTime: Optional[str] = Field(
None,
description='Output only. The last update timestamp of an inspectTemplate.',
)
class GooglePrivacyDlpV2ListDeidentifyTemplatesResponse(BaseModel):
deidentifyTemplates: Optional[List[GooglePrivacyDlpV2DeidentifyTemplate]] = Field(
None,
description='List of deidentify templates, up to page_size in ListDeidentifyTemplatesRequest.',
)
nextPageToken: Optional[str] = Field(
None,
description='If the next page is available then the next page token to be used in following ListDeidentifyTemplates request.',
)
class GooglePrivacyDlpV2ReidentifyContentRequest(BaseModel):
inspectConfig: Optional[GooglePrivacyDlpV2InspectConfig] = Field(
None, description='Configuration for the inspector.'
)
inspectTemplateName: Optional[str] = Field(
None,
description='Template to use. Any configuration directly specified in `inspect_config` will override those set in the template. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.',
)
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None, description='The item to re-identify. Will be treated as text.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
reidentifyConfig: Optional[GooglePrivacyDlpV2DeidentifyConfig] = Field(
None,
description='Configuration for the re-identification of the content item. This field shares the same proto message type that is used for de-identification, however its usage here is for the reversal of the previous de-identification. Re-identification is performed by examining the transformations used to de-identify the items and executing the reverse. This requires that only reversible transformations be provided here. The reversible transformations are: - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig`',
)
reidentifyTemplateName: Optional[str] = Field(
None,
description='Template to use. References an instance of `DeidentifyTemplate`. Any configuration directly specified in `reidentify_config` or `inspect_config` will override those set in the template. The `DeidentifyTemplate` used must include only reversible transformations. Singular fields that are set in this request will replace their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged.',
)
class GooglePrivacyDlpV2RequestedDeidentifyOptions(BaseModel):
snapshotDeidentifyTemplate: Optional[GooglePrivacyDlpV2DeidentifyTemplate] = Field(
None,
description='Snapshot of the state of the DeidentifyTemplate from the Deidentify action at the time this job was run.',
)
snapshotImageRedactTemplate: Optional[GooglePrivacyDlpV2DeidentifyTemplate] = Field(
None,
description='Snapshot of the state of the image redact DeidentifyTemplate from the Deidentify action at the time this job was run.',
)
snapshotStructuredDeidentifyTemplate: Optional[
GooglePrivacyDlpV2DeidentifyTemplate
] = Field(
None,
description='Snapshot of the state of the structured DeidentifyTemplate from the Deidentify action at the time this job was run.',
)
class GooglePrivacyDlpV2TransformationOverview(BaseModel):
transformationSummaries: Optional[List[GooglePrivacyDlpV2TransformationSummary]] = (
Field(None, description='Transformations applied to the dataset.')
)
transformedBytes: Optional[str] = Field(
None, description='Total size in bytes that were transformed in some way.'
)
class GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest(BaseModel):
deidentifyTemplate: Optional[GooglePrivacyDlpV2DeidentifyTemplate] = Field(
None, description='New DeidentifyTemplate value.'
)
updateMask: Optional[str] = Field(
None, description='Mask to control which fields get updated.'
)
class GooglePrivacyDlpV2CreateDeidentifyTemplateRequest(BaseModel):
deidentifyTemplate: Optional[GooglePrivacyDlpV2DeidentifyTemplate] = Field(
None, description='Required. The DeidentifyTemplate to create.'
)
locationId: Optional[str] = Field(
None, description='Deprecated. This field has no effect.'
)
templateId: Optional[str] = Field(
None,
description='The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.',
)
class GooglePrivacyDlpV2DeidentifyContentResponse(BaseModel):
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None, description='The de-identified item.'
)
overview: Optional[GooglePrivacyDlpV2TransformationOverview] = Field(
None, description='An overview of the changes that were made on the `item`.'
)
class GooglePrivacyDlpV2DeidentifyDataSourceDetails(BaseModel):
deidentifyStats: Optional[GooglePrivacyDlpV2DeidentifyDataSourceStats] = Field(
None, description='Stats about de-identification.'
)
requestedOptions: Optional[GooglePrivacyDlpV2RequestedDeidentifyOptions] = Field(
None, description='De-identification config used for the request.'
)
class GooglePrivacyDlpV2ReidentifyContentResponse(BaseModel):
item: Optional[GooglePrivacyDlpV2ContentItem] = Field(
None, description='The re-identified item.'
)
overview: Optional[GooglePrivacyDlpV2TransformationOverview] = Field(
None, description='An overview of the changes that were made to the `item`.'
)
class GooglePrivacyDlpV2ActionDetails(BaseModel):
deidentifyDetails: Optional[GooglePrivacyDlpV2DeidentifyDataSourceDetails] = Field(
None, description='Outcome of a de-identification action.'
)
class GooglePrivacyDlpV2DlpJob(BaseModel):
actionDetails: Optional[List[GooglePrivacyDlpV2ActionDetails]] = Field(
None, description='Events that should occur after the job has completed.'
)
createTime: Optional[str] = Field(
None, description='Time when the job was created.'
)
endTime: Optional[str] = Field(None, description='Time when the job finished.')
errors: Optional[List[GooglePrivacyDlpV2Error]] = Field(
None, description='A stream of errors encountered running the job.'
)
inspectDetails: Optional[GooglePrivacyDlpV2InspectDataSourceDetails] = Field(
None, description='Results from inspecting a data source.'
)
jobTriggerName: Optional[str] = Field(
None,
description='If created by a job trigger, the resource name of the trigger that instantiated the job.',
)
name: Optional[str] = Field(None, description='The server-assigned name.')
riskDetails: Optional[GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails] = Field(
None, description='Results from analyzing risk of a data source.'
)
startTime: Optional[str] = Field(None, description='Time when the job started.')
state: Optional[State] = Field(None, description='State of a job.')
type: Optional[Type1] = Field(None, description='The type of job.')
class GooglePrivacyDlpV2ListDlpJobsResponse(BaseModel):
jobs: Optional[List[GooglePrivacyDlpV2DlpJob]] = Field(
None,
description='A list of DlpJobs that matches the specified filter in the request.',
)
nextPageToken: Optional[str] = Field(
None, description='The standard List next-page token.'
)