From 27bb91296c3a685f4e5edb470517d6c44ebd3801 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Fri, 9 Sep 2022 08:10:18 +0000
Subject: [PATCH] feat: add Deidentify action (#742)
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 471923438
Source-Link: https://github.com/googleapis/googleapis/commit/62995d04b95d4da6b691ca6090b394ec67becc8b
Source-Link: https://github.com/googleapis/googleapis-gen/commit/96ba1731c712a693995de75378948781af283739
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTZiYTE3MzFjNzEyYTY5Mzk5NWRlNzUzNzg5NDg3ODFhZjI4MzczOSJ9
fix: allow passing gax instance to client constructor
PiperOrigin-RevId: 470911839
Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e
Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9
feat: accept google-gax instance as a parameter
Please see the documentation of the client constructor for details.
PiperOrigin-RevId: 470332808
Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89
Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9
---
protos/google/privacy/dlp/v2/dlp.proto | 589 +-
protos/google/privacy/dlp/v2/storage.proto | 57 +-
protos/protos.d.ts | 3650 +++++--
protos/protos.js | 8671 ++++++++++++-----
protos/protos.json | 332 +-
.../dlp_service.list_deidentify_templates.js | 10 +-
.../generated/v2/dlp_service.list_dlp_jobs.js | 16 +-
.../v2/dlp_service.list_inspect_templates.js | 10 +-
.../v2/dlp_service.list_job_triggers.js | 8 +-
.../v2/dlp_service.list_stored_info_types.js | 8 +-
...nippet_metadata.google.privacy.dlp.v2.json | 10 +-
src/v2/dlp_service_client.ts | 367 +-
test/gapic_dlp_service_v2.ts | 194 +-
13 files changed, 10225 insertions(+), 3697 deletions(-)
diff --git a/protos/google/privacy/dlp/v2/dlp.proto b/protos/google/privacy/dlp/v2/dlp.proto
index 866a5748..4dc3a386 100644
--- a/protos/google/privacy/dlp/v2/dlp.proto
+++ b/protos/google/privacy/dlp/v2/dlp.proto
@@ -133,7 +133,7 @@ service DlpService {
};
}
- // Returns a list of the sensitive information types that the DLP API
+ // Returns a list of the sensitive information types that DLP API
// supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
// learn more.
rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) {
@@ -146,7 +146,7 @@ service DlpService {
option (google.api.method_signature) = "parent";
}
- // Creates an InspectTemplate for re-using frequently used configuration
+ // Creates an InspectTemplate for reusing frequently used configuration
// for inspecting content, images, and storage.
// See https://cloud.google.com/dlp/docs/creating-templates to learn more.
rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) {
@@ -245,7 +245,7 @@ service DlpService {
option (google.api.method_signature) = "name";
}
- // Creates a DeidentifyTemplate for re-using frequently used configuration
+ // Creates a DeidentifyTemplate for reusing frequently used configuration
// for de-identifying content, images, and storage.
// See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
// more.
@@ -505,7 +505,7 @@ service DlpService {
}
// Deletes a long-running DlpJob. This method indicates that the client is
- // no longer interested in the DlpJob result. The job will be cancelled if
+ // no longer interested in the DlpJob result. The job will be canceled if
// possible.
// See https://cloud.google.com/dlp/docs/inspecting-storage and
// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
@@ -660,7 +660,7 @@ service DlpService {
}
}
-// List of exclude infoTypes.
+// List of excluded infoTypes.
message ExcludeInfoTypes {
// InfoType list in ExclusionRule rule drops a finding when it overlaps or
// contained within with a finding of an infoType from this list. For
@@ -721,6 +721,12 @@ message InspectionRuleSet {
message InspectConfig {
// Configuration to control the number of findings returned for inspection.
// This is not used for de-identification or 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][google.privacy.dlp.v2.DlpService.RedactImage]
+ // requests. Otherwise, Cloud DLP returns an error.
message FindingLimits {
// Max findings configuration per infoType, per content item or long
// running DlpJob.
@@ -770,6 +776,12 @@ message InspectConfig {
// 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][google.privacy.dlp.v2.DlpService.RedactImage]
+ // requests. Otherwise, Cloud DLP returns an error.
FindingLimits limits = 3;
// When true, a contextual quote from the data that triggered a finding is
@@ -1006,7 +1018,7 @@ message ContentLocation {
// * Datastore namespace: {namespace}
//
// Nested names could be absent if the embedded object has no string
- // identifier (for an example an image contained within a document).
+ // identifier (for example, an image contained within a document).
string container_name = 1;
// Type of the container within the file with location of the finding.
@@ -1024,14 +1036,14 @@ message ContentLocation {
MetadataLocation metadata_location = 8;
}
- // Findings container modification timestamp, if applicable.
- // For Google Cloud Storage contains last file modification timestamp.
- // For BigQuery table contains last_modified_time property.
- // For Datastore - not populated.
+ // 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.
google.protobuf.Timestamp container_timestamp = 6;
- // Findings container version, if available
- // ("generation" for Google Cloud Storage).
+ // Finding container version, if available
+ // ("generation" for Cloud Storage).
string container_version = 7;
}
@@ -1086,7 +1098,7 @@ message TableLocation {
// Represents a container that may contain DLP findings.
// Examples of a container include a file, table, or database record.
message Container {
- // Container type, for example BigQuery or Google Cloud Storage.
+ // Container type, for example BigQuery or Cloud Storage.
string type = 1;
// Project where the finding was found.
@@ -1096,33 +1108,35 @@ message Container {
// A string representation of the full container name.
// Examples:
// - BigQuery: 'Project:DataSetId.TableId'
- // - Google Cloud Storage: 'gs://Bucket/folders/filename.txt'
+ // - Cloud Storage: 'gs://Bucket/folders/filename.txt'
string full_path = 3;
// The root of the container.
// Examples:
+ //
// - For BigQuery table `project_id:dataset_id.table_id`, the root is
// `dataset_id`
- // - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+ // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
// is `gs://bucket`
string root_path = 4;
// The rest of the path after the root.
// Examples:
+ //
// - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
// `table_id`
- // - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+ // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
// path is `folder/filename.txt`
string relative_path = 5;
- // Findings container modification timestamp, if applicable.
- // For Google Cloud Storage contains last file modification timestamp.
- // For BigQuery table contains last_modified_time property.
- // For Datastore - not populated.
+ // 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.
google.protobuf.Timestamp update_time = 6;
// Findings container version, if available
- // ("generation" for Google Cloud Storage).
+ // ("generation" for Cloud Storage).
string version = 7;
}
@@ -1242,7 +1256,7 @@ message RedactImageResponse {
InspectResult inspect_result = 3;
}
-// Request to de-identify a list of items.
+// Request to de-identify a ContentItem.
message DeidentifyContentRequest {
// Parent resource name.
//
@@ -1367,7 +1381,7 @@ message ReidentifyContentRequest {
string location_id = 7;
}
-// Results of re-identifying a item.
+// Results of re-identifying an item.
message ReidentifyContentResponse {
// The re-identified item.
ContentItem item = 1;
@@ -1434,7 +1448,7 @@ message OutputStorageConfig {
// `timestamp`.
BASIC_COLUMNS = 1;
- // Schema tailored to findings from scanning Google Cloud Storage.
+ // Schema tailored to findings from scanning Cloud Storage.
GCS_COLUMNS = 2;
// Schema tailored to findings from scanning Google Datastore.
@@ -1452,8 +1466,8 @@ message OutputStorageConfig {
// 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 timezone will be used for
- // generating the date details.
+ // 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.
@@ -1555,6 +1569,9 @@ message InfoTypeDescription {
// request.
string description = 4;
+ // A list of available versions for the infotype.
+ repeated VersionDescription versions = 9;
+
// The category of the infoType.
repeated InfoTypeCategory categories = 10;
}
@@ -1751,6 +1768,15 @@ message InfoTypeCategory {
}
}
+// Details about each available version for an infotype.
+message VersionDescription {
+ // Name of the version
+ string version = 1;
+
+ // Description of the version.
+ string description = 2;
+}
+
// Request for the list of infoTypes.
message ListInfoTypesRequest {
// The parent resource name.
@@ -2202,10 +2228,10 @@ message AnalyzeDataSourceRiskDetails {
repeated Value quasi_ids_values = 1;
// 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.
+ // 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.
@@ -2375,6 +2401,9 @@ message DeidentifyConfig {
// specific locations within structured datasets, such as transforming
// a column within a table.
RecordTransformations record_transformations = 2;
+
+ // Treat the dataset as an image and redact.
+ ImageTransformations image_transformations = 4;
}
// Mode for handling transformation errors. If left unspecified, the default
@@ -2382,6 +2411,49 @@ message DeidentifyConfig {
TransformationErrorHandling transformation_error_handling = 3;
}
+// A type of transformation that is applied over images.
+message ImageTransformations {
+ // Configuration for determining how redaction of images should occur.
+ message ImageTransformation {
+ // Apply transformation to the selected info_types.
+ message SelectedInfoTypes {
+ // Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+ // must be unique within the ImageTransformations message.
+ repeated InfoType info_types = 5 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Apply transformation to all findings.
+ message AllInfoTypes {
+
+ }
+
+ // Apply to all text.
+ message AllText {
+
+ }
+
+ oneof target {
+ // Apply transformation to the selected info_types.
+ SelectedInfoTypes selected_info_types = 4;
+
+ // Apply transformation to all findings not specified in other
+ // ImageTransformation's selected_info_types. Only one instance is allowed
+ // within the ImageTransformations message.
+ AllInfoTypes all_info_types = 5;
+
+ // Apply transformation to all text that doesn't match an infoType. Only
+ // one instance is allowed within the ImageTransformations message.
+ AllText all_text = 6;
+ }
+
+ // The color to use when redacting content from an image. If not
+ // specified, the default is black.
+ Color redaction_color = 3;
+ }
+
+ repeated ImageTransformation transforms = 2;
+}
+
// How to handle transformation errors during de-identification. A
// transformation error occurs when the requested transformation is incompatible
// with the data. For example, trying to de-identify an IP address using a
@@ -2558,7 +2630,7 @@ message CryptoDeterministicConfig {
// plaintext would be used as is for encryption.
//
// Note that case (1) is expected when an `InfoTypeTransformation` is
- // applied to both structured and non-structured `ContentItem`s.
+ // applied to both structured and unstructured `ContentItem`s.
FieldId context = 3;
}
@@ -2593,7 +2665,7 @@ message RedactConfig {
// Characters to skip when doing deidentification of a value. These will be left
// alone and skipped.
message CharsToIgnore {
- // Convenience enum for indication common characters to not transform.
+ // Convenience enum for indicating common characters to not transform.
enum CommonCharsToIgnore {
// Unused.
COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0;
@@ -2639,6 +2711,21 @@ message CharacterMaskConfig {
// 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-****-****-****`.
int32 number_to_mask = 2;
// Mask characters in reverse order. For example, if `masking_character` is
@@ -2732,7 +2819,7 @@ message BucketingConfig {
message CryptoReplaceFfxFpeConfig {
// These are commonly used subsets of the alphabet that the FFX mode
// natively supports. In the algorithm, the alphabet is selected using
- // the "radix". Therefore each corresponds to particular radix.
+ // the "radix". Therefore each corresponds to a particular radix.
enum FfxCommonNativeAlphabet {
// Unused.
FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0;
@@ -2765,7 +2852,7 @@ message CryptoReplaceFfxFpeConfig {
// a default tweak will be used.
//
// Note that case (1) is expected when an `InfoTypeTransformation` is
- // applied to both structured and non-structured `ContentItem`s.
+ // 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
@@ -3021,7 +3108,7 @@ message RecordCondition {
repeated Condition conditions = 1;
}
- // An expression, consisting or an operator and conditions.
+ // An expression, consisting of an operator and conditions.
message Expressions {
// Logical operators for conditional checks.
enum LogicalOperator {
@@ -3110,10 +3197,209 @@ message TransformationSummary {
int64 transformed_bytes = 7;
}
+// A flattened description of a `PrimitiveTransformation` or
+// `RecordSuppression`.
+message TransformationDescription {
+ // The transformation type.
+ TransformationType type = 1;
+
+ // 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.
+ string description = 2;
+
+ // 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)
+ string condition = 3;
+
+ // Set if the transformation was limited to a specific `InfoType`.
+ InfoType info_type = 4;
+}
+
+// Details about a single transformation. This object contains a description of
+// the transformation, information about whether the transformation was
+// successfully applied, and the precise location where the transformation
+// occurred. These details are stored in a user-specified BigQuery table.
+message TransformationDetails {
+ // The name of the job that completed the transformation.
+ string resource_name = 1;
+
+ // The top level name of the container where the transformation is located
+ // (this will be the source file name or table name).
+ string container_name = 2;
+
+ // 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.
+ repeated TransformationDescription transformation = 3;
+
+ // 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.
+ TransformationResultStatus status_details = 4;
+
+ // 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.
+ int64 transformed_bytes = 5;
+
+ // The precise location of the transformed content in the original container.
+ TransformationLocation transformation_location = 6;
+}
+
+// Specifies the location of a transformation.
+message TransformationLocation {
+ oneof location_type {
+ // 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).
+ string finding_id = 1;
+
+ // For record transformations, provide a field and container information.
+ RecordTransformation record_transformation = 2;
+ }
+
+ // Information about the functionality of the container where this finding
+ // occurred, if available.
+ TransformationContainerType container_type = 3;
+}
+
+message RecordTransformation {
+ // For record transformations, provide a field.
+ FieldId field_id = 1;
+
+ // Findings container modification timestamp, if applicable.
+ google.protobuf.Timestamp container_timestamp = 2;
+
+ // Container version, if available ("generation" for Cloud Storage).
+ string container_version = 3;
+}
+
+message TransformationResultStatus {
+ // Transformation result status type, this will be either SUCCESS, or it will
+ // be the reason for why the transformation was not completely successful.
+ TransformationResultStatusType result_status_type = 1;
+
+ // Detailed error codes and messages
+ google.rpc.Status details = 2;
+}
+
+// Enum of possible outcomes of transformations. SUCCESS if transformation and
+// storing of transformation was successful, otherwise, reason for not
+// transforming.
+enum TransformationResultStatusType {
+ STATE_TYPE_UNSPECIFIED = 0;
+
+ // This will be set when a finding could not be transformed (i.e. outside user
+ // set bucket range).
+ INVALID_TRANSFORM = 1;
+
+ // This will be set when a BigQuery transformation was successful but could
+ // not be stored back in BigQuery because the transformed row exceeds
+ // BigQuery's max row size.
+ BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2;
+
+ // This will be set when there is a finding in the custom metadata of a file,
+ // but at the write time of the transformed file, this key / value pair is
+ // unretrievable.
+ METADATA_UNRETRIEVABLE = 3;
+
+ // This will be set when the transformation and storing of it is successful.
+ SUCCESS = 4;
+}
+
+// Describes functionality of a given container in its original format.
+enum TransformationContainerType {
+ TRANSFORM_UNKNOWN_CONTAINER = 0;
+
+ TRANSFORM_BODY = 1;
+
+ TRANSFORM_METADATA = 2;
+
+ TRANSFORM_TABLE = 3;
+}
+
+// An enum of rules that can be used to transform a value. Can be a
+// record suppression, or one of the transformation rules specified under
+// `PrimitiveTransformation`.
+enum TransformationType {
+ // Unused
+ TRANSFORMATION_TYPE_UNSPECIFIED = 0;
+
+ // Record suppression
+ RECORD_SUPPRESSION = 1;
+
+ // Replace value
+ REPLACE_VALUE = 2;
+
+ // Replace value using a dictionary.
+ REPLACE_DICTIONARY = 15;
+
+ // Redact
+ REDACT = 3;
+
+ // Character mask
+ CHARACTER_MASK = 4;
+
+ // FFX-FPE
+ CRYPTO_REPLACE_FFX_FPE = 5;
+
+ // Fixed size bucketing
+ FIXED_SIZE_BUCKETING = 6;
+
+ // Bucketing
+ BUCKETING = 7;
+
+ // Replace with info type
+ REPLACE_WITH_INFO_TYPE = 8;
+
+ // Time part
+ TIME_PART = 9;
+
+ // Crypto hash
+ CRYPTO_HASH = 10;
+
+ // Date shift
+ DATE_SHIFT = 12;
+
+ // Deterministic crypto
+ CRYPTO_DETERMINISTIC_CONFIG = 13;
+
+ // Redact image
+ REDACT_IMAGE = 14;
+}
+
+// Config for storing transformation details.
+message TransformationDetailsStorageConfig {
+ // Location to store the transformation summary.
+ oneof type {
+ // 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.
+ BigQueryTable table = 1;
+ }
+}
+
// Schedule for inspect job triggers.
message Schedule {
oneof option {
- // With this option a job is started a regular periodic basis. For
+ // 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
@@ -3302,7 +3588,7 @@ message Action {
OutputStorageConfig output_config = 1;
}
- // Publish a message into given Pub/Sub topic when DlpJob has completed. The
+ // Publish a message into a given Pub/Sub topic when DlpJob has completed. The
// message contains a single field, `DlpJobName`, which is equal to the
// finished job's
// [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
@@ -3320,31 +3606,88 @@ message Action {
// This action is only available for projects which are parts of
// an organization and whitelisted for the alpha Cloud Security Command
// Center.
- // The action will publish count of finding instances and their info types.
- // The summary of findings will be persisted in CSCC and are governed by CSCC
- // service-specific policy, see https://cloud.google.com/terms/service-terms
- // Only a single instance of this action can be specified.
- // Compatible with: Inspect
+ // The action will publish the count of finding instances and their info
+ // types. The summary of findings will be persisted in CSCC and are governed
+ // by CSCC service-specific policy, see
+ // https://cloud.google.com/terms/service-terms Only a single instance of this
+ // action can be specified. Compatible with: Inspect
message PublishSummaryToCscc {
}
- // Publish findings of a DlpJob to Data Catalog. Labels summarizing the
- // results of the DlpJob will be applied to the entry for the resource scanned
- // in Data Catalog. Any labels previously written by another DlpJob will
- // be deleted. InfoType naming patterns are strictly enforced when using this
- // feature. Note that the findings will be persisted in Data Catalog
- // storage and are governed by Data Catalog service-specific policy, see
- // https://cloud.google.com/terms/service-terms
- // Only a single instance of this action can be specified and only allowed if
- // all resources being scanned are BigQuery tables.
+ // Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
+ // templates are applied to the resource that Cloud DLP scanned. Data
+ // Catalog tag templates are stored in the same project and region where the
+ // BigQuery table exists. For Cloud DLP to create and apply the tag template,
+ // the Cloud DLP service agent must have the
+ // `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
+ // template contains fields summarizing the results of the DlpJob. Any field
+ // values previously written by another DlpJob are deleted. [InfoType naming
+ // patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
+ // this feature.
+ //
+ // Findings are persisted in Data Catalog storage and are governed by
+ // service-specific policies for Data Catalog. For more information, see
+ // [Service Specific Terms](https://cloud.google.com/terms/service-terms).
+ //
+ // Only a single instance of this action can be specified. This action is
+ // allowed only if all resources being scanned are BigQuery tables.
// Compatible with: Inspect
message PublishFindingsToCloudDataCatalog {
}
- // Enable email notification to project owners and editors on jobs's
- // completion/failure.
+ // Create a de-identified copy of the requested table or files.
+ //
+ // A TransformationDetail will be created for each transformation.
+ //
+ // If any rows in BigQuery are skipped during de-identification
+ // (transformation errors or row size exceeds BigQuery insert API limits) they
+ // are placed in the failure output table. If the original row exceeds
+ // the BigQuery insert API limit it will be truncated when written to the
+ // failure output table. The failure output table can be set in the
+ // action.deidentify.output.big_query_output.deidentified_failure_output_table
+ // field, if no table is set, a table will be automatically created in the
+ // same project and dataset as the original table.
+ //
+ // Compatible with: Inspect
+ message Deidentify {
+ // User specified deidentify templates and configs for structured,
+ // unstructured, and image files.
+ TransformationConfig transformation_config = 7;
+
+ // 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][google.privacy.dlp.v2.TransformationDetails]
+ // message for more information about what is noted).
+ TransformationDetailsStorageConfig transformation_details_storage_config = 3;
+
+ oneof output {
+ // 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
+ string cloud_storage_output = 9 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // 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.
+ repeated FileType file_types_to_transform = 8;
+ }
+
+ // 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).
message JobNotificationEmails {
}
@@ -3361,7 +3704,7 @@ message Action {
// Save resulting findings in a provided location.
SaveFindings save_findings = 1;
- // Publish a notification to a pubsub topic.
+ // Publish a notification to a Pub/Sub topic.
PublishToPubSub pub_sub = 2;
// Publish summary to Cloud Security Command Center (Alpha).
@@ -3370,6 +3713,9 @@ message Action {
// Publish findings to Cloud Datahub.
PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5;
+ // Create a de-identified copy of the input data.
+ Deidentify deidentify = 7;
+
// Enable email notification for project owners and editors on job's
// completion/failure.
JobNotificationEmails job_notification_emails = 8;
@@ -3379,6 +3725,34 @@ message Action {
}
}
+// User specified templates and configs for how to deidentify structured,
+// unstructures, and image files. User must provide either a unstructured
+// deidentify template or at least one redact image config.
+message TransformationConfig {
+ // 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.
+ string deidentify_template = 1;
+
+ // 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.
+ string structured_deidentify_template = 2;
+
+ // 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.
+ string image_redact_template = 4;
+}
+
// Request message for CreateInspectTemplate.
message CreateInspectTemplateRequest {
// Required. Parent resource name.
@@ -3486,7 +3860,7 @@ message ListInspectTemplatesRequest {
// to `ListInspectTemplates`.
string page_token = 2;
- // Size of the page, can be limited by server. If zero server returns
+ // Size of the page, can be limited by the server. If zero server returns
// a page of max size 100.
int32 page_size = 3;
@@ -3499,10 +3873,10 @@ message ListInspectTemplatesRequest {
//
// Supported fields are:
//
- // - `create_time`: corresponds to time the template was created.
- // - `update_time`: corresponds to time the template was last updated.
- // - `name`: corresponds to template's name.
- // - `display_name`: corresponds to template's display name.
+ // - `create_time`: corresponds to the time the template was created.
+ // - `update_time`: corresponds to the time the template was last updated.
+ // - `name`: corresponds to the template's name.
+ // - `display_name`: corresponds to the template's display name.
string order_by = 4;
// Deprecated. This field has no effect.
@@ -3701,11 +4075,11 @@ message ListJobTriggersRequest {
//
// Supported fields are:
//
- // - `create_time`: corresponds to time the JobTrigger was created.
- // - `update_time`: corresponds to time the JobTrigger was last updated.
+ // - `create_time`: corresponds to the time the JobTrigger was created.
+ // - `update_time`: corresponds to the time the JobTrigger was last updated.
// - `last_run_time`: corresponds to the last time the JobTrigger ran.
- // - `name`: corresponds to JobTrigger's name.
- // - `display_name`: corresponds to JobTrigger's display name.
+ // - `name`: corresponds to the JobTrigger's name.
+ // - `display_name`: corresponds to the JobTrigger's display name.
// - `status`: corresponds to JobTrigger's status.
string order_by = 4;
@@ -3932,7 +4306,7 @@ message DlpJob {
// The job is no longer running.
DONE = 3;
- // The job was canceled before it could complete.
+ // The job was canceled before it could be completed.
CANCELED = 4;
// The job had an error and did not complete.
@@ -3940,7 +4314,7 @@ message DlpJob {
// The job is currently accepting findings via hybridInspect.
// A hybrid job in ACTIVE state may continue to have findings added to it
- // through calling of hybridInspect. After the job has finished no more
+ // through the calling of hybridInspect. After the job has finished no more
// calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
ACTIVE = 6;
}
@@ -4026,13 +4400,13 @@ message ListDlpJobsRequest {
// * Supported fields/values for inspect jobs:
// - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
// - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
- // - `trigger_name` - The resource name of the trigger that created job.
- // - 'end_time` - Corresponds to time the job finished.
- // - 'start_time` - Corresponds to time the job finished.
+ // - `trigger_name` - The name of the trigger that created the job.
+ // - 'end_time` - Corresponds to the time the job finished.
+ // - 'start_time` - Corresponds to the time the job finished.
// * Supported fields for risk analysis jobs:
// - `state` - RUNNING|CANCELED|FINISHED|FAILED
- // - 'end_time` - Corresponds to time the job finished.
- // - 'start_time` - Corresponds to time the job finished.
+ // - 'end_time` - Corresponds to the time the job finished.
+ // - 'start_time` - Corresponds to the time the job finished.
// * The operator must be `=` or `!=`.
//
// Examples:
@@ -4063,9 +4437,9 @@ message ListDlpJobsRequest {
//
// Supported fields are:
//
- // - `create_time`: corresponds to time the job was created.
- // - `end_time`: corresponds to time the job ended.
- // - `name`: corresponds to job's name.
+ // - `create_time`: corresponds to the time the job was created.
+ // - `end_time`: corresponds to the time the job ended.
+ // - `name`: corresponds to the job's name.
// - `state`: corresponds to `state`
string order_by = 6;
@@ -4222,7 +4596,7 @@ message ListDeidentifyTemplatesRequest {
// to `ListDeidentifyTemplates`.
string page_token = 2;
- // Size of the page, can be limited by server. If zero server returns
+ // Size of the page, can be limited by the server. If zero server returns
// a page of max size 100.
int32 page_size = 3;
@@ -4235,10 +4609,10 @@ message ListDeidentifyTemplatesRequest {
//
// Supported fields are:
//
- // - `create_time`: corresponds to time the template was created.
- // - `update_time`: corresponds to time the template was last updated.
- // - `name`: corresponds to template's name.
- // - `display_name`: corresponds to template's display name.
+ // - `create_time`: corresponds to the time the template was created.
+ // - `update_time`: corresponds to the time the template was last updated.
+ // - `name`: corresponds to the template's name.
+ // - `display_name`: corresponds to the template's display name.
string order_by = 4;
// Deprecated. This field has no effect.
@@ -4272,11 +4646,11 @@ message DeleteDeidentifyTemplateRequest {
// Configuration for a custom dictionary created from a data source of any size
// up to the maximum size defined in the
// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
-// dictionary creation are stored in the specified Google Cloud Storage
+// dictionary creation are stored in the specified Cloud Storage
// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
// that satisfy the size requirements.
message LargeCustomDictionaryConfig {
- // Location to store dictionary artifacts in Google Cloud Storage. These files
+ // 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.
@@ -4349,7 +4723,7 @@ message StoredInfoTypeVersion {
// appearing first.
//
// For example, some of the data for stored custom dictionaries is put in
- // the user's Google Cloud Storage bucket, and if this data is modified or
+ // 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
@@ -4472,10 +4846,6 @@ message ListStoredInfoTypesRequest {
// `projects/`PROJECT_ID`/locations/`LOCATION_ID
// + Projects scope, no location specified (defaults to global):
// `projects/`PROJECT_ID
- // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID
- // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID
//
// The following example `parent` string specifies a parent project with the
// identifier `example-project`, and specifies the `europe-west3` location
@@ -4493,7 +4863,7 @@ message ListStoredInfoTypesRequest {
// to `ListStoredInfoTypes`.
string page_token = 2;
- // Size of the page, can be limited by server. If zero server returns
+ // Size of the page, can be limited by the server. If zero server returns
// a page of max size 100.
int32 page_size = 3;
@@ -4506,7 +4876,7 @@ message ListStoredInfoTypesRequest {
//
// Supported fields are:
//
- // - `create_time`: corresponds to time the most recent version of the
+ // - `create_time`: corresponds to the time the most recent version of the
// resource was created.
// - `state`: corresponds to the state of the resource.
// - `name`: corresponds to resource name.
@@ -4750,33 +5120,7 @@ enum StoredInfoTypeState {
}
// Score is a summary of all elements in the data profile.
-// A higher number means more sensitive.
-message SensitivityScore {
- // Various score levels for resources.
- enum SensitivityScoreLevel {
- // Unused.
- SENSITIVITY_SCORE_UNSPECIFIED = 0;
-
- // No sensitive information detected. Limited access.
- SENSITIVITY_LOW = 10;
-
- // Medium risk - PII, potentially sensitive data, or fields with free-text
- // data that are at higher risk of having intermittent sensitive data.
- // Consider limiting access.
- SENSITIVITY_MODERATE = 20;
-
- // High risk – SPII may be present. Exfiltration of data may lead to user
- // data loss. Re-identification of users may be possible. Consider limiting
- // usage and or removing SPII.
- SENSITIVITY_HIGH = 30;
- }
-
- // The score applied to the resource.
- SensitivityScoreLevel score = 1;
-}
-
-// Score is a summary of all elements in the data profile.
-// A higher number means more risky.
+// A higher number means more risk.
message DataRiskLevel {
// Various score levels for resources.
enum DataRiskLevelScore {
@@ -4789,8 +5133,8 @@ message DataRiskLevel {
RISK_LOW = 10;
// Medium risk - Sensitive data may be present but additional access or fine
- // grain access restrictions appears to be present. Consider limiting
- // access even further or transforming data to mask.
+ // grain access restrictions appear to be present. Consider limiting
+ // access even further or transform data to mask.
RISK_MODERATE = 20;
// High risk – SPII may be present. Access controls may include public
@@ -4947,15 +5291,23 @@ enum EncryptionStatus {
message InfoTypeSummary {
// The infoType.
InfoType info_type = 1;
+
+ // Approximate percentage of non-null rows that contained data detected by
+ // this infotype.
+ int32 estimated_prevalence = 2;
}
// Infotype details for other infoTypes found within a column.
message OtherInfoTypeSummary {
// The other infoType.
InfoType info_type = 1;
+
+ // Approximate percentage of non-null rows that contained data detected by
+ // this infotype.
+ int32 estimated_prevalence = 2;
}
-// A condition for determining whether a PubSub should be triggered.
+// A condition for determining whether a Pub/Sub should be triggered.
message DataProfilePubSubCondition {
// Various score levels for resources.
enum ProfileScoreBucket {
@@ -5006,10 +5358,9 @@ message DataProfilePubSubCondition {
PubSubExpressions expressions = 1;
}
-// The message that will be published to a Pub/Sub topic.
+// Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
// To receive a message of protocol buffer schema type, convert the message data
// to an object of this proto class.
-// https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages
message DataProfilePubSubMessage {
// If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
// Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
diff --git a/protos/google/privacy/dlp/v2/storage.proto b/protos/google/privacy/dlp/v2/storage.proto
index a0002b33..7709f546 100644
--- a/protos/google/privacy/dlp/v2/storage.proto
+++ b/protos/google/privacy/dlp/v2/storage.proto
@@ -16,6 +16,7 @@ syntax = "proto3";
package google.privacy.dlp.v2;
+import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.Dlp.V2";
@@ -39,6 +40,32 @@ message InfoType {
string version = 2;
}
+// Score is a summary of all elements in the data profile.
+// A higher number means more sensitive.
+message SensitivityScore {
+ // Various score levels for resources.
+ enum SensitivityScoreLevel {
+ // Unused.
+ SENSITIVITY_SCORE_UNSPECIFIED = 0;
+
+ // No sensitive information detected. Limited access.
+ SENSITIVITY_LOW = 10;
+
+ // Medium risk - PII, potentially sensitive data, or fields with free-text
+ // data that are at higher risk of having intermittent sensitive data.
+ // Consider limiting access.
+ SENSITIVITY_MODERATE = 20;
+
+ // High risk – SPII may be present. Exfiltration of data may lead to user
+ // data loss. Re-identification of users may be possible. Consider limiting
+ // usage and or removing SPII.
+ SENSITIVITY_HIGH = 30;
+ }
+
+ // The score applied to the resource.
+ SensitivityScoreLevel score = 1;
+}
+
// Categorization of results based on how likely they are to represent a match,
// based on the number of elements they contain which imply a match.
enum Likelihood {
@@ -411,7 +438,7 @@ message CloudStorageRegexFileSet {
repeated string exclude_regex = 3;
}
-// Options defining a file or a set of files within a Google Cloud Storage
+// Options defining a file or a set of files within a Cloud Storage
// bucket.
message CloudStorageOptions {
// Set of files to scan.
@@ -547,7 +574,7 @@ message BigQueryOptions {
// Shared message indicating Cloud storage type.
message StorageConfig {
// Configuration of the timespan of the items to include in scanning.
- // Currently only supported when inspecting Google Cloud Storage and BigQuery.
+ // Currently only supported when inspecting Cloud Storage and BigQuery.
message TimespanConfig {
// Exclude files, tables, or rows older than this value.
// If not set, no lower time limit is applied.
@@ -560,7 +587,8 @@ message StorageConfig {
// Specification of the field containing the timestamp of scanned items.
// Used for data sources like Datastore and BigQuery.
//
- // For 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
@@ -569,17 +597,34 @@ message StorageConfig {
// Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
// `TIMESTAMP`, and `DATETIME`.
//
- // For Datastore:
+ // 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.
FieldId timestamp_field = 3;
// 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.
+ // time of the execution of the last run of the JobTrigger or the timespan
+ // end_time used in the last run of the JobTrigger.
bool enable_auto_population_of_timespan_config = 4;
}
@@ -587,7 +632,7 @@ message StorageConfig {
// Google Cloud Datastore options.
DatastoreOptions datastore_options = 2;
- // Google Cloud Storage options.
+ // Cloud Storage options.
CloudStorageOptions cloud_storage_options = 3;
// BigQuery options.
diff --git a/protos/protos.d.ts b/protos/protos.d.ts
index 2bc54814..c541686f 100644
--- a/protos/protos.d.ts
+++ b/protos/protos.d.ts
@@ -5281,6 +5281,9 @@ export namespace google {
/** InfoTypeDescription description */
description?: (string|null);
+ /** InfoTypeDescription versions */
+ versions?: (google.privacy.dlp.v2.IVersionDescription[]|null);
+
/** InfoTypeDescription categories */
categories?: (google.privacy.dlp.v2.IInfoTypeCategory[]|null);
}
@@ -5306,6 +5309,9 @@ export namespace google {
/** InfoTypeDescription description. */
public description: string;
+ /** InfoTypeDescription versions. */
+ public versions: google.privacy.dlp.v2.IVersionDescription[];
+
/** InfoTypeDescription categories. */
public categories: google.privacy.dlp.v2.IInfoTypeCategory[];
@@ -5567,6 +5573,109 @@ export namespace google {
}
}
+ /** Properties of a VersionDescription. */
+ interface IVersionDescription {
+
+ /** VersionDescription version */
+ version?: (string|null);
+
+ /** VersionDescription description */
+ description?: (string|null);
+ }
+
+ /** Represents a VersionDescription. */
+ class VersionDescription implements IVersionDescription {
+
+ /**
+ * Constructs a new VersionDescription.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.IVersionDescription);
+
+ /** VersionDescription version. */
+ public version: string;
+
+ /** VersionDescription description. */
+ public description: string;
+
+ /**
+ * Creates a new VersionDescription instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns VersionDescription instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.IVersionDescription): google.privacy.dlp.v2.VersionDescription;
+
+ /**
+ * Encodes the specified VersionDescription message. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages.
+ * @param message VersionDescription message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.IVersionDescription, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified VersionDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages.
+ * @param message VersionDescription message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.IVersionDescription, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a VersionDescription message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns VersionDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VersionDescription;
+
+ /**
+ * Decodes a VersionDescription message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns VersionDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VersionDescription;
+
+ /**
+ * Verifies a VersionDescription message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a VersionDescription message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns VersionDescription
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VersionDescription;
+
+ /**
+ * Creates a plain object from a VersionDescription message. Also converts values to other types if specified.
+ * @param message VersionDescription
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.VersionDescription, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this VersionDescription to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for VersionDescription
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
/** Properties of a ListInfoTypesRequest. */
interface IListInfoTypesRequest {
@@ -9763,6 +9872,9 @@ export namespace google {
/** DeidentifyConfig recordTransformations */
recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null);
+ /** DeidentifyConfig imageTransformations */
+ imageTransformations?: (google.privacy.dlp.v2.IImageTransformations|null);
+
/** DeidentifyConfig transformationErrorHandling */
transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null);
}
@@ -9782,11 +9894,14 @@ export namespace google {
/** DeidentifyConfig recordTransformations. */
public recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null);
+ /** DeidentifyConfig imageTransformations. */
+ public imageTransformations?: (google.privacy.dlp.v2.IImageTransformations|null);
+
/** DeidentifyConfig transformationErrorHandling. */
public transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null);
/** DeidentifyConfig transformation. */
- public transformation?: ("infoTypeTransformations"|"recordTransformations");
+ public transformation?: ("infoTypeTransformations"|"recordTransformations"|"imageTransformations");
/**
* Creates a new DeidentifyConfig instance using the specified properties.
@@ -9866,762 +9981,1262 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a TransformationErrorHandling. */
- interface ITransformationErrorHandling {
-
- /** TransformationErrorHandling throwError */
- throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null);
+ /** Properties of an ImageTransformations. */
+ interface IImageTransformations {
- /** TransformationErrorHandling leaveUntransformed */
- leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null);
+ /** ImageTransformations transforms */
+ transforms?: (google.privacy.dlp.v2.ImageTransformations.IImageTransformation[]|null);
}
- /** Represents a TransformationErrorHandling. */
- class TransformationErrorHandling implements ITransformationErrorHandling {
+ /** Represents an ImageTransformations. */
+ class ImageTransformations implements IImageTransformations {
/**
- * Constructs a new TransformationErrorHandling.
+ * Constructs a new ImageTransformations.
* @param [properties] Properties to set
*/
- constructor(properties?: google.privacy.dlp.v2.ITransformationErrorHandling);
-
- /** TransformationErrorHandling throwError. */
- public throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null);
-
- /** TransformationErrorHandling leaveUntransformed. */
- public leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null);
+ constructor(properties?: google.privacy.dlp.v2.IImageTransformations);
- /** TransformationErrorHandling mode. */
- public mode?: ("throwError"|"leaveUntransformed");
+ /** ImageTransformations transforms. */
+ public transforms: google.privacy.dlp.v2.ImageTransformations.IImageTransformation[];
/**
- * Creates a new TransformationErrorHandling instance using the specified properties.
+ * Creates a new ImageTransformations instance using the specified properties.
* @param [properties] Properties to set
- * @returns TransformationErrorHandling instance
+ * @returns ImageTransformations instance
*/
- public static create(properties?: google.privacy.dlp.v2.ITransformationErrorHandling): google.privacy.dlp.v2.TransformationErrorHandling;
+ public static create(properties?: google.privacy.dlp.v2.IImageTransformations): google.privacy.dlp.v2.ImageTransformations;
/**
- * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
- * @param message TransformationErrorHandling message or plain object to encode
+ * Encodes the specified ImageTransformations message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages.
+ * @param message ImageTransformations message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.IImageTransformations, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
- * @param message TransformationErrorHandling message or plain object to encode
+ * Encodes the specified ImageTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages.
+ * @param message ImageTransformations message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.IImageTransformations, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a TransformationErrorHandling message from the specified reader or buffer.
+ * Decodes an ImageTransformations message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns TransformationErrorHandling
+ * @returns ImageTransformations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations;
/**
- * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited.
+ * Decodes an ImageTransformations message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns TransformationErrorHandling
+ * @returns ImageTransformations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations;
/**
- * Verifies a TransformationErrorHandling message.
+ * Verifies an ImageTransformations message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types.
+ * Creates an ImageTransformations message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns TransformationErrorHandling
+ * @returns ImageTransformations
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations;
/**
- * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified.
- * @param message TransformationErrorHandling
+ * Creates a plain object from an ImageTransformations message. Also converts values to other types if specified.
+ * @param message ImageTransformations
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.ImageTransformations, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this TransformationErrorHandling to JSON.
+ * Converts this ImageTransformations to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for TransformationErrorHandling
+ * Gets the default type url for ImageTransformations
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace TransformationErrorHandling {
-
- /** Properties of a ThrowError. */
- interface IThrowError {
- }
-
- /** Represents a ThrowError. */
- class ThrowError implements IThrowError {
-
- /**
- * Constructs a new ThrowError.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError);
-
- /**
- * Creates a new ThrowError instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ThrowError instance
- */
- public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
+ namespace ImageTransformations {
- /**
- * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
- * @param message ThrowError message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** Properties of an ImageTransformation. */
+ interface IImageTransformation {
- /**
- * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
- * @param message ThrowError message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** ImageTransformation selectedInfoTypes */
+ selectedInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null);
- /**
- * Decodes a ThrowError message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ThrowError
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
+ /** ImageTransformation allInfoTypes */
+ allInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null);
- /**
- * Decodes a ThrowError message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ThrowError
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
+ /** ImageTransformation allText */
+ allText?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null);
- /**
- * Verifies a ThrowError message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /** ImageTransformation redactionColor */
+ redactionColor?: (google.privacy.dlp.v2.IColor|null);
+ }
- /**
- * Creates a ThrowError message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ThrowError
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
+ /** Represents an ImageTransformation. */
+ class ImageTransformation implements IImageTransformation {
/**
- * Creates a plain object from a ThrowError message. Also converts values to other types if specified.
- * @param message ThrowError
- * @param [options] Conversion options
- * @returns Plain object
+ * Constructs a new ImageTransformation.
+ * @param [properties] Properties to set
*/
- public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ constructor(properties?: google.privacy.dlp.v2.ImageTransformations.IImageTransformation);
- /**
- * Converts this ThrowError to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /** ImageTransformation selectedInfoTypes. */
+ public selectedInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null);
- /**
- * Gets the default type url for ThrowError
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /** ImageTransformation allInfoTypes. */
+ public allInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null);
- /** Properties of a LeaveUntransformed. */
- interface ILeaveUntransformed {
- }
+ /** ImageTransformation allText. */
+ public allText?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null);
- /** Represents a LeaveUntransformed. */
- class LeaveUntransformed implements ILeaveUntransformed {
+ /** ImageTransformation redactionColor. */
+ public redactionColor?: (google.privacy.dlp.v2.IColor|null);
- /**
- * Constructs a new LeaveUntransformed.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed);
+ /** ImageTransformation target. */
+ public target?: ("selectedInfoTypes"|"allInfoTypes"|"allText");
/**
- * Creates a new LeaveUntransformed instance using the specified properties.
+ * Creates a new ImageTransformation instance using the specified properties.
* @param [properties] Properties to set
- * @returns LeaveUntransformed instance
+ * @returns ImageTransformation instance
*/
- public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+ public static create(properties?: google.privacy.dlp.v2.ImageTransformations.IImageTransformation): google.privacy.dlp.v2.ImageTransformations.ImageTransformation;
/**
- * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
- * @param message LeaveUntransformed message or plain object to encode
+ * Encodes the specified ImageTransformation message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages.
+ * @param message ImageTransformation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ImageTransformations.IImageTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
- * @param message LeaveUntransformed message or plain object to encode
+ * Encodes the specified ImageTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages.
+ * @param message ImageTransformation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.IImageTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a LeaveUntransformed message from the specified reader or buffer.
+ * Decodes an ImageTransformation message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns LeaveUntransformed
+ * @returns ImageTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation;
/**
- * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited.
+ * Decodes an ImageTransformation message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns LeaveUntransformed
+ * @returns ImageTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation;
/**
- * Verifies a LeaveUntransformed message.
+ * Verifies an ImageTransformation message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types.
+ * Creates an ImageTransformation message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns LeaveUntransformed
+ * @returns ImageTransformation
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation;
/**
- * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified.
- * @param message LeaveUntransformed
+ * Creates a plain object from an ImageTransformation message. Also converts values to other types if specified.
+ * @param message ImageTransformation
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this LeaveUntransformed to JSON.
+ * Converts this ImageTransformation to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for LeaveUntransformed
+ * Gets the default type url for ImageTransformation
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- }
- /** Properties of a PrimitiveTransformation. */
- interface IPrimitiveTransformation {
-
- /** PrimitiveTransformation replaceConfig */
- replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null);
+ namespace ImageTransformation {
- /** PrimitiveTransformation redactConfig */
- redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null);
+ /** Properties of a SelectedInfoTypes. */
+ interface ISelectedInfoTypes {
- /** PrimitiveTransformation characterMaskConfig */
- characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null);
+ /** SelectedInfoTypes infoTypes */
+ infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null);
+ }
- /** PrimitiveTransformation cryptoReplaceFfxFpeConfig */
- cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null);
+ /** Represents a SelectedInfoTypes. */
+ class SelectedInfoTypes implements ISelectedInfoTypes {
- /** PrimitiveTransformation fixedSizeBucketingConfig */
- fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null);
+ /**
+ * Constructs a new SelectedInfoTypes.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes);
- /** PrimitiveTransformation bucketingConfig */
- bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null);
+ /** SelectedInfoTypes infoTypes. */
+ public infoTypes: google.privacy.dlp.v2.IInfoType[];
- /** PrimitiveTransformation replaceWithInfoTypeConfig */
- replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null);
+ /**
+ * Creates a new SelectedInfoTypes instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SelectedInfoTypes instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes;
- /** PrimitiveTransformation timePartConfig */
- timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null);
+ /**
+ * Encodes the specified SelectedInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages.
+ * @param message SelectedInfoTypes message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer;
- /** PrimitiveTransformation cryptoHashConfig */
- cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null);
+ /**
+ * Encodes the specified SelectedInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages.
+ * @param message SelectedInfoTypes message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer;
- /** PrimitiveTransformation dateShiftConfig */
- dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null);
+ /**
+ * Decodes a SelectedInfoTypes message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SelectedInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes;
- /** PrimitiveTransformation cryptoDeterministicConfig */
- cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null);
+ /**
+ * Decodes a SelectedInfoTypes message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SelectedInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes;
- /** PrimitiveTransformation replaceDictionaryConfig */
- replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null);
- }
+ /**
+ * Verifies a SelectedInfoTypes message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** Represents a PrimitiveTransformation. */
- class PrimitiveTransformation implements IPrimitiveTransformation {
+ /**
+ * Creates a SelectedInfoTypes message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SelectedInfoTypes
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes;
- /**
- * Constructs a new PrimitiveTransformation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.IPrimitiveTransformation);
+ /**
+ * Creates a plain object from a SelectedInfoTypes message. Also converts values to other types if specified.
+ * @param message SelectedInfoTypes
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /** PrimitiveTransformation replaceConfig. */
- public replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null);
+ /**
+ * Converts this SelectedInfoTypes to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** PrimitiveTransformation redactConfig. */
- public redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null);
+ /**
+ * Gets the default type url for SelectedInfoTypes
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** PrimitiveTransformation characterMaskConfig. */
- public characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null);
+ /** Properties of an AllInfoTypes. */
+ interface IAllInfoTypes {
+ }
- /** PrimitiveTransformation cryptoReplaceFfxFpeConfig. */
- public cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null);
+ /** Represents an AllInfoTypes. */
+ class AllInfoTypes implements IAllInfoTypes {
- /** PrimitiveTransformation fixedSizeBucketingConfig. */
- public fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null);
+ /**
+ * Constructs a new AllInfoTypes.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes);
- /** PrimitiveTransformation bucketingConfig. */
- public bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null);
+ /**
+ * Creates a new AllInfoTypes instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AllInfoTypes instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes;
- /** PrimitiveTransformation replaceWithInfoTypeConfig. */
- public replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null);
+ /**
+ * Encodes the specified AllInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages.
+ * @param message AllInfoTypes message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer;
- /** PrimitiveTransformation timePartConfig. */
- public timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null);
+ /**
+ * Encodes the specified AllInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages.
+ * @param message AllInfoTypes message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer;
- /** PrimitiveTransformation cryptoHashConfig. */
- public cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null);
+ /**
+ * Decodes an AllInfoTypes message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AllInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes;
- /** PrimitiveTransformation dateShiftConfig. */
- public dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null);
+ /**
+ * Decodes an AllInfoTypes message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AllInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes;
- /** PrimitiveTransformation cryptoDeterministicConfig. */
- public cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null);
+ /**
+ * Verifies an AllInfoTypes message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** PrimitiveTransformation replaceDictionaryConfig. */
- public replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null);
+ /**
+ * Creates an AllInfoTypes message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AllInfoTypes
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes;
- /** PrimitiveTransformation transformation. */
- public transformation?: ("replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig");
+ /**
+ * Creates a plain object from an AllInfoTypes message. Also converts values to other types if specified.
+ * @param message AllInfoTypes
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AllInfoTypes to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AllInfoTypes
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an AllText. */
+ interface IAllText {
+ }
+
+ /** Represents an AllText. */
+ class AllText implements IAllText {
+
+ /**
+ * Constructs a new AllText.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText);
+
+ /**
+ * Creates a new AllText instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns AllText instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText;
+
+ /**
+ * Encodes the specified AllText message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages.
+ * @param message AllText message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified AllText message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages.
+ * @param message AllText message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an AllText message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns AllText
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText;
+
+ /**
+ * Decodes an AllText message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns AllText
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText;
+
+ /**
+ * Verifies an AllText message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an AllText message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns AllText
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText;
+
+ /**
+ * Creates a plain object from an AllText message. Also converts values to other types if specified.
+ * @param message AllText
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this AllText to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for AllText
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+ }
+
+ /** Properties of a TransformationErrorHandling. */
+ interface ITransformationErrorHandling {
+
+ /** TransformationErrorHandling throwError */
+ throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null);
+
+ /** TransformationErrorHandling leaveUntransformed */
+ leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null);
+ }
+
+ /** Represents a TransformationErrorHandling. */
+ class TransformationErrorHandling implements ITransformationErrorHandling {
/**
- * Creates a new PrimitiveTransformation instance using the specified properties.
+ * Constructs a new TransformationErrorHandling.
* @param [properties] Properties to set
- * @returns PrimitiveTransformation instance
*/
- public static create(properties?: google.privacy.dlp.v2.IPrimitiveTransformation): google.privacy.dlp.v2.PrimitiveTransformation;
+ constructor(properties?: google.privacy.dlp.v2.ITransformationErrorHandling);
+
+ /** TransformationErrorHandling throwError. */
+ public throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null);
+
+ /** TransformationErrorHandling leaveUntransformed. */
+ public leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null);
+
+ /** TransformationErrorHandling mode. */
+ public mode?: ("throwError"|"leaveUntransformed");
/**
- * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
- * @param message PrimitiveTransformation message or plain object to encode
+ * Creates a new TransformationErrorHandling instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationErrorHandling instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationErrorHandling): google.privacy.dlp.v2.TransformationErrorHandling;
+
+ /**
+ * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
+ * @param message TransformationErrorHandling message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
- * @param message PrimitiveTransformation message or plain object to encode
+ * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
+ * @param message TransformationErrorHandling message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a PrimitiveTransformation message from the specified reader or buffer.
+ * Decodes a TransformationErrorHandling message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns PrimitiveTransformation
+ * @returns TransformationErrorHandling
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrimitiveTransformation;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling;
/**
- * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns PrimitiveTransformation
+ * @returns TransformationErrorHandling
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrimitiveTransformation;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling;
/**
- * Verifies a PrimitiveTransformation message.
+ * Verifies a TransformationErrorHandling message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns PrimitiveTransformation
+ * @returns TransformationErrorHandling
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrimitiveTransformation;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling;
/**
- * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified.
- * @param message PrimitiveTransformation
+ * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified.
+ * @param message TransformationErrorHandling
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.PrimitiveTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this PrimitiveTransformation to JSON.
+ * Converts this TransformationErrorHandling to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for PrimitiveTransformation
+ * Gets the default type url for TransformationErrorHandling
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a TimePartConfig. */
- interface ITimePartConfig {
-
- /** TimePartConfig partToExtract */
- partToExtract?: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart|null);
- }
-
- /** Represents a TimePartConfig. */
- class TimePartConfig implements ITimePartConfig {
+ namespace TransformationErrorHandling {
- /**
- * Constructs a new TimePartConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.ITimePartConfig);
+ /** Properties of a ThrowError. */
+ interface IThrowError {
+ }
- /** TimePartConfig partToExtract. */
- public partToExtract: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart);
+ /** Represents a ThrowError. */
+ class ThrowError implements IThrowError {
- /**
- * Creates a new TimePartConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TimePartConfig instance
- */
- public static create(properties?: google.privacy.dlp.v2.ITimePartConfig): google.privacy.dlp.v2.TimePartConfig;
+ /**
+ * Constructs a new ThrowError.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError);
- /**
- * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
- * @param message TimePartConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Creates a new ThrowError instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ThrowError instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
- /**
- * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
- * @param message TimePartConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * @param message ThrowError message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a TimePartConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TimePartConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TimePartConfig;
+ /**
+ * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * @param message ThrowError message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a TimePartConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TimePartConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TimePartConfig;
+ /**
+ * Decodes a ThrowError message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ThrowError
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
- /**
- * Verifies a TimePartConfig message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Decodes a ThrowError message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ThrowError
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
- /**
- * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TimePartConfig
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TimePartConfig;
+ /**
+ * Verifies a ThrowError message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified.
- * @param message TimePartConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.TimePartConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a ThrowError message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ThrowError
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError;
- /**
- * Converts this TimePartConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a plain object from a ThrowError message. Also converts values to other types if specified.
+ * @param message ThrowError
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Gets the default type url for TimePartConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Converts this ThrowError to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- namespace TimePartConfig {
+ /**
+ * Gets the default type url for ThrowError
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
- /** TimePart enum. */
- enum TimePart {
- TIME_PART_UNSPECIFIED = 0,
- YEAR = 1,
- MONTH = 2,
- DAY_OF_MONTH = 3,
- DAY_OF_WEEK = 4,
- WEEK_OF_YEAR = 5,
- HOUR_OF_DAY = 6
+ /** Properties of a LeaveUntransformed. */
+ interface ILeaveUntransformed {
}
- }
- /** Properties of a CryptoHashConfig. */
- interface ICryptoHashConfig {
+ /** Represents a LeaveUntransformed. */
+ class LeaveUntransformed implements ILeaveUntransformed {
- /** CryptoHashConfig cryptoKey */
- cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
- }
+ /**
+ * Constructs a new LeaveUntransformed.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed);
- /** Represents a CryptoHashConfig. */
- class CryptoHashConfig implements ICryptoHashConfig {
+ /**
+ * Creates a new LeaveUntransformed instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns LeaveUntransformed instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
- /**
- * Constructs a new CryptoHashConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.ICryptoHashConfig);
+ /**
+ * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
+ * @param message LeaveUntransformed message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer;
- /** CryptoHashConfig cryptoKey. */
- public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
+ /**
+ * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
+ * @param message LeaveUntransformed message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates a new CryptoHashConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CryptoHashConfig instance
- */
- public static create(properties?: google.privacy.dlp.v2.ICryptoHashConfig): google.privacy.dlp.v2.CryptoHashConfig;
+ /**
+ * Decodes a LeaveUntransformed message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns LeaveUntransformed
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
- /**
- * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
- * @param message CryptoHashConfig message or plain object to encode
+ /**
+ * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns LeaveUntransformed
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+
+ /**
+ * Verifies a LeaveUntransformed message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns LeaveUntransformed
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed;
+
+ /**
+ * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified.
+ * @param message LeaveUntransformed
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this LeaveUntransformed to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for LeaveUntransformed
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a PrimitiveTransformation. */
+ interface IPrimitiveTransformation {
+
+ /** PrimitiveTransformation replaceConfig */
+ replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null);
+
+ /** PrimitiveTransformation redactConfig */
+ redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null);
+
+ /** PrimitiveTransformation characterMaskConfig */
+ characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null);
+
+ /** PrimitiveTransformation cryptoReplaceFfxFpeConfig */
+ cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null);
+
+ /** PrimitiveTransformation fixedSizeBucketingConfig */
+ fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null);
+
+ /** PrimitiveTransformation bucketingConfig */
+ bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null);
+
+ /** PrimitiveTransformation replaceWithInfoTypeConfig */
+ replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null);
+
+ /** PrimitiveTransformation timePartConfig */
+ timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null);
+
+ /** PrimitiveTransformation cryptoHashConfig */
+ cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null);
+
+ /** PrimitiveTransformation dateShiftConfig */
+ dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null);
+
+ /** PrimitiveTransformation cryptoDeterministicConfig */
+ cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null);
+
+ /** PrimitiveTransformation replaceDictionaryConfig */
+ replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null);
+ }
+
+ /** Represents a PrimitiveTransformation. */
+ class PrimitiveTransformation implements IPrimitiveTransformation {
+
+ /**
+ * Constructs a new PrimitiveTransformation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.IPrimitiveTransformation);
+
+ /** PrimitiveTransformation replaceConfig. */
+ public replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null);
+
+ /** PrimitiveTransformation redactConfig. */
+ public redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null);
+
+ /** PrimitiveTransformation characterMaskConfig. */
+ public characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null);
+
+ /** PrimitiveTransformation cryptoReplaceFfxFpeConfig. */
+ public cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null);
+
+ /** PrimitiveTransformation fixedSizeBucketingConfig. */
+ public fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null);
+
+ /** PrimitiveTransformation bucketingConfig. */
+ public bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null);
+
+ /** PrimitiveTransformation replaceWithInfoTypeConfig. */
+ public replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null);
+
+ /** PrimitiveTransformation timePartConfig. */
+ public timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null);
+
+ /** PrimitiveTransformation cryptoHashConfig. */
+ public cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null);
+
+ /** PrimitiveTransformation dateShiftConfig. */
+ public dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null);
+
+ /** PrimitiveTransformation cryptoDeterministicConfig. */
+ public cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null);
+
+ /** PrimitiveTransformation replaceDictionaryConfig. */
+ public replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null);
+
+ /** PrimitiveTransformation transformation. */
+ public transformation?: ("replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig");
+
+ /**
+ * Creates a new PrimitiveTransformation instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PrimitiveTransformation instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.IPrimitiveTransformation): google.privacy.dlp.v2.PrimitiveTransformation;
+
+ /**
+ * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
+ * @param message PrimitiveTransformation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
- * @param message CryptoHashConfig message or plain object to encode
+ * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
+ * @param message PrimitiveTransformation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a CryptoHashConfig message from the specified reader or buffer.
+ * Decodes a PrimitiveTransformation message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns CryptoHashConfig
+ * @returns PrimitiveTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoHashConfig;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrimitiveTransformation;
/**
- * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited.
+ * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns CryptoHashConfig
+ * @returns PrimitiveTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoHashConfig;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrimitiveTransformation;
/**
- * Verifies a CryptoHashConfig message.
+ * Verifies a PrimitiveTransformation message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns CryptoHashConfig
+ * @returns PrimitiveTransformation
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoHashConfig;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrimitiveTransformation;
/**
- * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified.
- * @param message CryptoHashConfig
+ * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified.
+ * @param message PrimitiveTransformation
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.CryptoHashConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.PrimitiveTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this CryptoHashConfig to JSON.
+ * Converts this PrimitiveTransformation to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for CryptoHashConfig
+ * Gets the default type url for PrimitiveTransformation
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a CryptoDeterministicConfig. */
- interface ICryptoDeterministicConfig {
-
- /** CryptoDeterministicConfig cryptoKey */
- cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
-
- /** CryptoDeterministicConfig surrogateInfoType */
- surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null);
+ /** Properties of a TimePartConfig. */
+ interface ITimePartConfig {
- /** CryptoDeterministicConfig context */
- context?: (google.privacy.dlp.v2.IFieldId|null);
+ /** TimePartConfig partToExtract */
+ partToExtract?: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart|null);
}
- /** Represents a CryptoDeterministicConfig. */
- class CryptoDeterministicConfig implements ICryptoDeterministicConfig {
+ /** Represents a TimePartConfig. */
+ class TimePartConfig implements ITimePartConfig {
/**
- * Constructs a new CryptoDeterministicConfig.
+ * Constructs a new TimePartConfig.
* @param [properties] Properties to set
*/
- constructor(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig);
-
- /** CryptoDeterministicConfig cryptoKey. */
- public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
-
- /** CryptoDeterministicConfig surrogateInfoType. */
- public surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null);
+ constructor(properties?: google.privacy.dlp.v2.ITimePartConfig);
- /** CryptoDeterministicConfig context. */
- public context?: (google.privacy.dlp.v2.IFieldId|null);
+ /** TimePartConfig partToExtract. */
+ public partToExtract: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart);
/**
- * Creates a new CryptoDeterministicConfig instance using the specified properties.
+ * Creates a new TimePartConfig instance using the specified properties.
* @param [properties] Properties to set
- * @returns CryptoDeterministicConfig instance
+ * @returns TimePartConfig instance
*/
- public static create(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig): google.privacy.dlp.v2.CryptoDeterministicConfig;
+ public static create(properties?: google.privacy.dlp.v2.ITimePartConfig): google.privacy.dlp.v2.TimePartConfig;
/**
- * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
- * @param message CryptoDeterministicConfig message or plain object to encode
+ * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
+ * @param message TimePartConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
- * @param message CryptoDeterministicConfig message or plain object to encode
+ * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
+ * @param message TimePartConfig message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a CryptoDeterministicConfig message from the specified reader or buffer.
+ * Decodes a TimePartConfig message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns CryptoDeterministicConfig
+ * @returns TimePartConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoDeterministicConfig;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TimePartConfig;
/**
- * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited.
+ * Decodes a TimePartConfig message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns CryptoDeterministicConfig
+ * @returns TimePartConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoDeterministicConfig;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TimePartConfig;
/**
- * Verifies a CryptoDeterministicConfig message.
+ * Verifies a TimePartConfig message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns CryptoDeterministicConfig
+ * @returns TimePartConfig
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoDeterministicConfig;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TimePartConfig;
/**
- * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified.
- * @param message CryptoDeterministicConfig
- * @param [options] Conversion options
+ * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified.
+ * @param message TimePartConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TimePartConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TimePartConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TimePartConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace TimePartConfig {
+
+ /** TimePart enum. */
+ enum TimePart {
+ TIME_PART_UNSPECIFIED = 0,
+ YEAR = 1,
+ MONTH = 2,
+ DAY_OF_MONTH = 3,
+ DAY_OF_WEEK = 4,
+ WEEK_OF_YEAR = 5,
+ HOUR_OF_DAY = 6
+ }
+ }
+
+ /** Properties of a CryptoHashConfig. */
+ interface ICryptoHashConfig {
+
+ /** CryptoHashConfig cryptoKey */
+ cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
+ }
+
+ /** Represents a CryptoHashConfig. */
+ class CryptoHashConfig implements ICryptoHashConfig {
+
+ /**
+ * Constructs a new CryptoHashConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ICryptoHashConfig);
+
+ /** CryptoHashConfig cryptoKey. */
+ public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
+
+ /**
+ * Creates a new CryptoHashConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CryptoHashConfig instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ICryptoHashConfig): google.privacy.dlp.v2.CryptoHashConfig;
+
+ /**
+ * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
+ * @param message CryptoHashConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
+ * @param message CryptoHashConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CryptoHashConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CryptoHashConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoHashConfig;
+
+ /**
+ * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CryptoHashConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoHashConfig;
+
+ /**
+ * Verifies a CryptoHashConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CryptoHashConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoHashConfig;
+
+ /**
+ * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified.
+ * @param message CryptoHashConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.CryptoHashConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CryptoHashConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CryptoHashConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CryptoDeterministicConfig. */
+ interface ICryptoDeterministicConfig {
+
+ /** CryptoDeterministicConfig cryptoKey */
+ cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
+
+ /** CryptoDeterministicConfig surrogateInfoType */
+ surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** CryptoDeterministicConfig context */
+ context?: (google.privacy.dlp.v2.IFieldId|null);
+ }
+
+ /** Represents a CryptoDeterministicConfig. */
+ class CryptoDeterministicConfig implements ICryptoDeterministicConfig {
+
+ /**
+ * Constructs a new CryptoDeterministicConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig);
+
+ /** CryptoDeterministicConfig cryptoKey. */
+ public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null);
+
+ /** CryptoDeterministicConfig surrogateInfoType. */
+ public surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** CryptoDeterministicConfig context. */
+ public context?: (google.privacy.dlp.v2.IFieldId|null);
+
+ /**
+ * Creates a new CryptoDeterministicConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CryptoDeterministicConfig instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig): google.privacy.dlp.v2.CryptoDeterministicConfig;
+
+ /**
+ * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * @param message CryptoDeterministicConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * @param message CryptoDeterministicConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CryptoDeterministicConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CryptoDeterministicConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoDeterministicConfig;
+
+ /**
+ * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CryptoDeterministicConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoDeterministicConfig;
+
+ /**
+ * Verifies a CryptoDeterministicConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CryptoDeterministicConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoDeterministicConfig;
+
+ /**
+ * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified.
+ * @param message CryptoDeterministicConfig
+ * @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.privacy.dlp.v2.CryptoDeterministicConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
@@ -12696,845 +13311,1547 @@ export namespace google {
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RecordSuppression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages.
+ * @param message RecordSuppression message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RecordSuppression message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecordSuppression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordSuppression;
+
+ /**
+ * Decodes a RecordSuppression message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecordSuppression
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordSuppression;
+
+ /**
+ * Verifies a RecordSuppression message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RecordSuppression message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecordSuppression
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordSuppression;
+
+ /**
+ * Creates a plain object from a RecordSuppression message. Also converts values to other types if specified.
+ * @param message RecordSuppression
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordSuppression, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RecordSuppression to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecordSuppression
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RecordCondition. */
+ interface IRecordCondition {
+
+ /** RecordCondition expressions */
+ expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null);
+ }
+
+ /** Represents a RecordCondition. */
+ class RecordCondition implements IRecordCondition {
+
+ /**
+ * Constructs a new RecordCondition.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.IRecordCondition);
+
+ /** RecordCondition expressions. */
+ public expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null);
+
+ /**
+ * Creates a new RecordCondition instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RecordCondition instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.IRecordCondition): google.privacy.dlp.v2.RecordCondition;
+
+ /**
+ * Encodes the specified RecordCondition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages.
+ * @param message RecordCondition message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RecordCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages.
+ * @param message RecordCondition message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RecordCondition message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecordCondition
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition;
+
+ /**
+ * Decodes a RecordCondition message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecordCondition
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition;
+
+ /**
+ * Verifies a RecordCondition message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RecordCondition message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecordCondition
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition;
+
+ /**
+ * Creates a plain object from a RecordCondition message. Also converts values to other types if specified.
+ * @param message RecordCondition
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordCondition, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RecordCondition to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecordCondition
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace RecordCondition {
+
+ /** Properties of a Condition. */
+ interface ICondition {
+
+ /** Condition field */
+ field?: (google.privacy.dlp.v2.IFieldId|null);
+
+ /** Condition operator */
+ operator?: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator|null);
+
+ /** Condition value */
+ value?: (google.privacy.dlp.v2.IValue|null);
+ }
+
+ /** Represents a Condition. */
+ class Condition implements ICondition {
+
+ /**
+ * Constructs a new Condition.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.RecordCondition.ICondition);
+
+ /** Condition field. */
+ public field?: (google.privacy.dlp.v2.IFieldId|null);
+
+ /** Condition operator. */
+ public operator: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator);
+
+ /** Condition value. */
+ public value?: (google.privacy.dlp.v2.IValue|null);
+
+ /**
+ * Creates a new Condition instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Condition instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.RecordCondition.ICondition): google.privacy.dlp.v2.RecordCondition.Condition;
+
+ /**
+ * Encodes the specified Condition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages.
+ * @param message Condition message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages.
+ * @param message Condition message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Condition message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Condition
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Condition;
+
+ /**
+ * Decodes a Condition message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Condition
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Condition;
+
+ /**
+ * Verifies a Condition message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Condition message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Condition
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Condition;
+
+ /**
+ * Creates a plain object from a Condition message. Also converts values to other types if specified.
+ * @param message Condition
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordCondition.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Condition to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Condition
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Conditions. */
+ interface IConditions {
+
+ /** Conditions conditions */
+ conditions?: (google.privacy.dlp.v2.RecordCondition.ICondition[]|null);
+ }
+
+ /** Represents a Conditions. */
+ class Conditions implements IConditions {
+
+ /**
+ * Constructs a new Conditions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.RecordCondition.IConditions);
+
+ /** Conditions conditions. */
+ public conditions: google.privacy.dlp.v2.RecordCondition.ICondition[];
+
+ /**
+ * Creates a new Conditions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Conditions instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.RecordCondition.IConditions): google.privacy.dlp.v2.RecordCondition.Conditions;
+
+ /**
+ * Encodes the specified Conditions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages.
+ * @param message Conditions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Conditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages.
+ * @param message Conditions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Conditions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Conditions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Conditions;
+
+ /**
+ * Decodes a Conditions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Conditions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Conditions;
+
+ /**
+ * Verifies a Conditions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Conditions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Conditions
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Conditions;
+
+ /**
+ * Creates a plain object from a Conditions message. Also converts values to other types if specified.
+ * @param message Conditions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordCondition.Conditions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Conditions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Conditions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an Expressions. */
+ interface IExpressions {
+
+ /** Expressions logicalOperator */
+ logicalOperator?: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null);
+
+ /** Expressions conditions */
+ conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null);
+ }
+
+ /** Represents an Expressions. */
+ class Expressions implements IExpressions {
+
+ /**
+ * Constructs a new Expressions.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions);
+
+ /** Expressions logicalOperator. */
+ public logicalOperator: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator);
+
+ /** Expressions conditions. */
+ public conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null);
+
+ /** Expressions type. */
+ public type?: "conditions";
+
+ /**
+ * Creates a new Expressions instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Expressions instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions): google.privacy.dlp.v2.RecordCondition.Expressions;
+
+ /**
+ * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * @param message Expressions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * @param message Expressions message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an Expressions message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Expressions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Expressions;
+
+ /**
+ * Decodes an Expressions message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Expressions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Expressions;
+
+ /**
+ * Verifies an Expressions message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates an Expressions message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Expressions
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Expressions;
+
+ /**
+ * Creates a plain object from an Expressions message. Also converts values to other types if specified.
+ * @param message Expressions
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordCondition.Expressions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Expressions to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Expressions
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace Expressions {
+
+ /** LogicalOperator enum. */
+ enum LogicalOperator {
+ LOGICAL_OPERATOR_UNSPECIFIED = 0,
+ AND = 1
+ }
+ }
+ }
+
+ /** Properties of a TransformationOverview. */
+ interface ITransformationOverview {
+
+ /** TransformationOverview transformedBytes */
+ transformedBytes?: (number|Long|string|null);
+
+ /** TransformationOverview transformationSummaries */
+ transformationSummaries?: (google.privacy.dlp.v2.ITransformationSummary[]|null);
+ }
+
+ /** Represents a TransformationOverview. */
+ class TransformationOverview implements ITransformationOverview {
+
+ /**
+ * Constructs a new TransformationOverview.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ITransformationOverview);
+
+ /** TransformationOverview transformedBytes. */
+ public transformedBytes: (number|Long|string);
+
+ /** TransformationOverview transformationSummaries. */
+ public transformationSummaries: google.privacy.dlp.v2.ITransformationSummary[];
+
+ /**
+ * Creates a new TransformationOverview instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationOverview instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationOverview): google.privacy.dlp.v2.TransformationOverview;
+
+ /**
+ * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * @param message TransformationOverview message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified RecordSuppression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages.
- * @param message RecordSuppression message or plain object to encode
+ * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * @param message TransformationOverview message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a RecordSuppression message from the specified reader or buffer.
+ * Decodes a TransformationOverview message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns RecordSuppression
+ * @returns TransformationOverview
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordSuppression;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationOverview;
/**
- * Decodes a RecordSuppression message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationOverview message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns RecordSuppression
+ * @returns TransformationOverview
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordSuppression;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationOverview;
/**
- * Verifies a RecordSuppression message.
+ * Verifies a TransformationOverview message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a RecordSuppression message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns RecordSuppression
+ * @returns TransformationOverview
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordSuppression;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationOverview;
/**
- * Creates a plain object from a RecordSuppression message. Also converts values to other types if specified.
- * @param message RecordSuppression
+ * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified.
+ * @param message TransformationOverview
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.RecordSuppression, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationOverview, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this RecordSuppression to JSON.
+ * Converts this TransformationOverview to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for RecordSuppression
+ * Gets the default type url for TransformationOverview
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a RecordCondition. */
- interface IRecordCondition {
+ /** Properties of a TransformationSummary. */
+ interface ITransformationSummary {
- /** RecordCondition expressions */
- expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null);
+ /** TransformationSummary infoType */
+ infoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** TransformationSummary field */
+ field?: (google.privacy.dlp.v2.IFieldId|null);
+
+ /** TransformationSummary transformation */
+ transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null);
+
+ /** TransformationSummary fieldTransformations */
+ fieldTransformations?: (google.privacy.dlp.v2.IFieldTransformation[]|null);
+
+ /** TransformationSummary recordSuppress */
+ recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null);
+
+ /** TransformationSummary results */
+ results?: (google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]|null);
+
+ /** TransformationSummary transformedBytes */
+ transformedBytes?: (number|Long|string|null);
}
- /** Represents a RecordCondition. */
- class RecordCondition implements IRecordCondition {
+ /** Represents a TransformationSummary. */
+ class TransformationSummary implements ITransformationSummary {
/**
- * Constructs a new RecordCondition.
+ * Constructs a new TransformationSummary.
* @param [properties] Properties to set
*/
- constructor(properties?: google.privacy.dlp.v2.IRecordCondition);
+ constructor(properties?: google.privacy.dlp.v2.ITransformationSummary);
- /** RecordCondition expressions. */
- public expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null);
+ /** TransformationSummary infoType. */
+ public infoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** TransformationSummary field. */
+ public field?: (google.privacy.dlp.v2.IFieldId|null);
+
+ /** TransformationSummary transformation. */
+ public transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null);
+
+ /** TransformationSummary fieldTransformations. */
+ public fieldTransformations: google.privacy.dlp.v2.IFieldTransformation[];
+
+ /** TransformationSummary recordSuppress. */
+ public recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null);
+
+ /** TransformationSummary results. */
+ public results: google.privacy.dlp.v2.TransformationSummary.ISummaryResult[];
+
+ /** TransformationSummary transformedBytes. */
+ public transformedBytes: (number|Long|string);
/**
- * Creates a new RecordCondition instance using the specified properties.
+ * Creates a new TransformationSummary instance using the specified properties.
* @param [properties] Properties to set
- * @returns RecordCondition instance
+ * @returns TransformationSummary instance
*/
- public static create(properties?: google.privacy.dlp.v2.IRecordCondition): google.privacy.dlp.v2.RecordCondition;
+ public static create(properties?: google.privacy.dlp.v2.ITransformationSummary): google.privacy.dlp.v2.TransformationSummary;
/**
- * Encodes the specified RecordCondition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages.
- * @param message RecordCondition message or plain object to encode
+ * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * @param message TransformationSummary message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified RecordCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages.
- * @param message RecordCondition message or plain object to encode
+ * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * @param message TransformationSummary message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a RecordCondition message from the specified reader or buffer.
+ * Decodes a TransformationSummary message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns RecordCondition
+ * @returns TransformationSummary
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary;
/**
- * Decodes a RecordCondition message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationSummary message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns RecordCondition
+ * @returns TransformationSummary
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary;
/**
- * Verifies a RecordCondition message.
+ * Verifies a TransformationSummary message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a RecordCondition message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns RecordCondition
+ * @returns TransformationSummary
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary;
/**
- * Creates a plain object from a RecordCondition message. Also converts values to other types if specified.
- * @param message RecordCondition
+ * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified.
+ * @param message TransformationSummary
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.RecordCondition, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationSummary, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this RecordCondition to JSON.
+ * Converts this TransformationSummary to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for RecordCondition
+ * Gets the default type url for TransformationSummary
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace RecordCondition {
-
- /** Properties of a Condition. */
- interface ICondition {
-
- /** Condition field */
- field?: (google.privacy.dlp.v2.IFieldId|null);
-
- /** Condition operator */
- operator?: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator|null);
-
- /** Condition value */
- value?: (google.privacy.dlp.v2.IValue|null);
- }
-
- /** Represents a Condition. */
- class Condition implements ICondition {
-
- /**
- * Constructs a new Condition.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.RecordCondition.ICondition);
-
- /** Condition field. */
- public field?: (google.privacy.dlp.v2.IFieldId|null);
-
- /** Condition operator. */
- public operator: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator);
-
- /** Condition value. */
- public value?: (google.privacy.dlp.v2.IValue|null);
-
- /**
- * Creates a new Condition instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Condition instance
- */
- public static create(properties?: google.privacy.dlp.v2.RecordCondition.ICondition): google.privacy.dlp.v2.RecordCondition.Condition;
-
- /**
- * Encodes the specified Condition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages.
- * @param message Condition message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages.
- * @param message Condition message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Condition message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Condition
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Condition;
-
- /**
- * Decodes a Condition message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Condition
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Condition;
-
- /**
- * Verifies a Condition message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Condition message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Condition
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Condition;
-
- /**
- * Creates a plain object from a Condition message. Also converts values to other types if specified.
- * @param message Condition
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.RecordCondition.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Condition to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ namespace TransformationSummary {
- /**
- * Gets the default type url for Condition
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
+ /** TransformationResultCode enum. */
+ enum TransformationResultCode {
+ TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0,
+ SUCCESS = 1,
+ ERROR = 2
}
- /** Properties of a Conditions. */
- interface IConditions {
+ /** Properties of a SummaryResult. */
+ interface ISummaryResult {
- /** Conditions conditions */
- conditions?: (google.privacy.dlp.v2.RecordCondition.ICondition[]|null);
+ /** SummaryResult count */
+ count?: (number|Long|string|null);
+
+ /** SummaryResult code */
+ code?: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null);
+
+ /** SummaryResult details */
+ details?: (string|null);
}
- /** Represents a Conditions. */
- class Conditions implements IConditions {
+ /** Represents a SummaryResult. */
+ class SummaryResult implements ISummaryResult {
/**
- * Constructs a new Conditions.
+ * Constructs a new SummaryResult.
* @param [properties] Properties to set
*/
- constructor(properties?: google.privacy.dlp.v2.RecordCondition.IConditions);
+ constructor(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult);
- /** Conditions conditions. */
- public conditions: google.privacy.dlp.v2.RecordCondition.ICondition[];
+ /** SummaryResult count. */
+ public count: (number|Long|string);
+
+ /** SummaryResult code. */
+ public code: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode);
+
+ /** SummaryResult details. */
+ public details: string;
/**
- * Creates a new Conditions instance using the specified properties.
+ * Creates a new SummaryResult instance using the specified properties.
* @param [properties] Properties to set
- * @returns Conditions instance
+ * @returns SummaryResult instance
*/
- public static create(properties?: google.privacy.dlp.v2.RecordCondition.IConditions): google.privacy.dlp.v2.RecordCondition.Conditions;
+ public static create(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
/**
- * Encodes the specified Conditions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages.
- * @param message Conditions message or plain object to encode
+ * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
+ * @param message SummaryResult message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified Conditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages.
- * @param message Conditions message or plain object to encode
+ * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
+ * @param message SummaryResult message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a Conditions message from the specified reader or buffer.
+ * Decodes a SummaryResult message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns Conditions
+ * @returns SummaryResult
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Conditions;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
/**
- * Decodes a Conditions message from the specified reader or buffer, length delimited.
+ * Decodes a SummaryResult message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns Conditions
+ * @returns SummaryResult
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Conditions;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
/**
- * Verifies a Conditions message.
+ * Verifies a SummaryResult message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a Conditions message from a plain object. Also converts values to their respective internal types.
+ * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns Conditions
+ * @returns SummaryResult
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Conditions;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
/**
- * Creates a plain object from a Conditions message. Also converts values to other types if specified.
- * @param message Conditions
+ * Creates a plain object from a SummaryResult message. Also converts values to other types if specified.
+ * @param message SummaryResult
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.RecordCondition.Conditions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationSummary.SummaryResult, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this Conditions to JSON.
+ * Converts this SummaryResult to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for Conditions
+ * Gets the default type url for SummaryResult
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ }
- /** Properties of an Expressions. */
- interface IExpressions {
+ /** Properties of a TransformationDescription. */
+ interface ITransformationDescription {
- /** Expressions logicalOperator */
- logicalOperator?: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null);
+ /** TransformationDescription type */
+ type?: (google.privacy.dlp.v2.TransformationType|keyof typeof google.privacy.dlp.v2.TransformationType|null);
- /** Expressions conditions */
- conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null);
- }
+ /** TransformationDescription description */
+ description?: (string|null);
- /** Represents an Expressions. */
- class Expressions implements IExpressions {
+ /** TransformationDescription condition */
+ condition?: (string|null);
- /**
- * Constructs a new Expressions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions);
+ /** TransformationDescription infoType */
+ infoType?: (google.privacy.dlp.v2.IInfoType|null);
+ }
- /** Expressions logicalOperator. */
- public logicalOperator: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator);
+ /** Represents a TransformationDescription. */
+ class TransformationDescription implements ITransformationDescription {
- /** Expressions conditions. */
- public conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null);
+ /**
+ * Constructs a new TransformationDescription.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ITransformationDescription);
- /** Expressions type. */
- public type?: "conditions";
+ /** TransformationDescription type. */
+ public type: (google.privacy.dlp.v2.TransformationType|keyof typeof google.privacy.dlp.v2.TransformationType);
- /**
- * Creates a new Expressions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Expressions instance
- */
- public static create(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions): google.privacy.dlp.v2.RecordCondition.Expressions;
+ /** TransformationDescription description. */
+ public description: string;
- /**
- * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
- * @param message Expressions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** TransformationDescription condition. */
+ public condition: string;
- /**
- * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
- * @param message Expressions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer;
+ /** TransformationDescription infoType. */
+ public infoType?: (google.privacy.dlp.v2.IInfoType|null);
- /**
- * Decodes an Expressions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Expressions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Expressions;
+ /**
+ * Creates a new TransformationDescription instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationDescription instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationDescription): google.privacy.dlp.v2.TransformationDescription;
- /**
- * Decodes an Expressions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Expressions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Expressions;
+ /**
+ * Encodes the specified TransformationDescription message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages.
+ * @param message TransformationDescription message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ITransformationDescription, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Verifies an Expressions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Encodes the specified TransformationDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages.
+ * @param message TransformationDescription message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDescription, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Creates an Expressions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Expressions
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Expressions;
+ /**
+ * Decodes a TransformationDescription message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TransformationDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDescription;
+
+ /**
+ * Decodes a TransformationDescription message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TransformationDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDescription;
+
+ /**
+ * Verifies a TransformationDescription message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TransformationDescription message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TransformationDescription
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDescription;
+
+ /**
+ * Creates a plain object from a TransformationDescription message. Also converts values to other types if specified.
+ * @param message TransformationDescription
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationDescription, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TransformationDescription to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TransformationDescription
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TransformationDetails. */
+ interface ITransformationDetails {
+
+ /** TransformationDetails resourceName */
+ resourceName?: (string|null);
+
+ /** TransformationDetails containerName */
+ containerName?: (string|null);
+
+ /** TransformationDetails transformation */
+ transformation?: (google.privacy.dlp.v2.ITransformationDescription[]|null);
+
+ /** TransformationDetails statusDetails */
+ statusDetails?: (google.privacy.dlp.v2.ITransformationResultStatus|null);
+
+ /** TransformationDetails transformedBytes */
+ transformedBytes?: (number|Long|string|null);
+
+ /** TransformationDetails transformationLocation */
+ transformationLocation?: (google.privacy.dlp.v2.ITransformationLocation|null);
+ }
+
+ /** Represents a TransformationDetails. */
+ class TransformationDetails implements ITransformationDetails {
+
+ /**
+ * Constructs a new TransformationDetails.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ITransformationDetails);
+
+ /** TransformationDetails resourceName. */
+ public resourceName: string;
+
+ /** TransformationDetails containerName. */
+ public containerName: string;
+
+ /** TransformationDetails transformation. */
+ public transformation: google.privacy.dlp.v2.ITransformationDescription[];
+
+ /** TransformationDetails statusDetails. */
+ public statusDetails?: (google.privacy.dlp.v2.ITransformationResultStatus|null);
+
+ /** TransformationDetails transformedBytes. */
+ public transformedBytes: (number|Long|string);
+
+ /** TransformationDetails transformationLocation. */
+ public transformationLocation?: (google.privacy.dlp.v2.ITransformationLocation|null);
+
+ /**
+ * Creates a new TransformationDetails instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationDetails instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationDetails): google.privacy.dlp.v2.TransformationDetails;
+
+ /**
+ * Encodes the specified TransformationDetails message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages.
+ * @param message TransformationDetails message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ITransformationDetails, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TransformationDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages.
+ * @param message TransformationDetails message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDetails, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TransformationDetails message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TransformationDetails
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDetails;
+
+ /**
+ * Decodes a TransformationDetails message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TransformationDetails
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDetails;
- /**
- * Creates a plain object from an Expressions message. Also converts values to other types if specified.
- * @param message Expressions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.RecordCondition.Expressions, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Verifies a TransformationDetails message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Converts this Expressions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a TransformationDetails message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TransformationDetails
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDetails;
- /**
- * Gets the default type url for Expressions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Creates a plain object from a TransformationDetails message. Also converts values to other types if specified.
+ * @param message TransformationDetails
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any };
- namespace Expressions {
+ /**
+ * Converts this TransformationDetails to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /** LogicalOperator enum. */
- enum LogicalOperator {
- LOGICAL_OPERATOR_UNSPECIFIED = 0,
- AND = 1
- }
- }
+ /**
+ * Gets the default type url for TransformationDetails
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a TransformationOverview. */
- interface ITransformationOverview {
+ /** Properties of a TransformationLocation. */
+ interface ITransformationLocation {
- /** TransformationOverview transformedBytes */
- transformedBytes?: (number|Long|string|null);
+ /** TransformationLocation findingId */
+ findingId?: (string|null);
- /** TransformationOverview transformationSummaries */
- transformationSummaries?: (google.privacy.dlp.v2.ITransformationSummary[]|null);
+ /** TransformationLocation recordTransformation */
+ recordTransformation?: (google.privacy.dlp.v2.IRecordTransformation|null);
+
+ /** TransformationLocation containerType */
+ containerType?: (google.privacy.dlp.v2.TransformationContainerType|keyof typeof google.privacy.dlp.v2.TransformationContainerType|null);
}
- /** Represents a TransformationOverview. */
- class TransformationOverview implements ITransformationOverview {
+ /** Represents a TransformationLocation. */
+ class TransformationLocation implements ITransformationLocation {
/**
- * Constructs a new TransformationOverview.
+ * Constructs a new TransformationLocation.
* @param [properties] Properties to set
*/
- constructor(properties?: google.privacy.dlp.v2.ITransformationOverview);
+ constructor(properties?: google.privacy.dlp.v2.ITransformationLocation);
- /** TransformationOverview transformedBytes. */
- public transformedBytes: (number|Long|string);
+ /** TransformationLocation findingId. */
+ public findingId?: (string|null);
- /** TransformationOverview transformationSummaries. */
- public transformationSummaries: google.privacy.dlp.v2.ITransformationSummary[];
+ /** TransformationLocation recordTransformation. */
+ public recordTransformation?: (google.privacy.dlp.v2.IRecordTransformation|null);
+
+ /** TransformationLocation containerType. */
+ public containerType: (google.privacy.dlp.v2.TransformationContainerType|keyof typeof google.privacy.dlp.v2.TransformationContainerType);
+
+ /** TransformationLocation locationType. */
+ public locationType?: ("findingId"|"recordTransformation");
/**
- * Creates a new TransformationOverview instance using the specified properties.
+ * Creates a new TransformationLocation instance using the specified properties.
* @param [properties] Properties to set
- * @returns TransformationOverview instance
+ * @returns TransformationLocation instance
*/
- public static create(properties?: google.privacy.dlp.v2.ITransformationOverview): google.privacy.dlp.v2.TransformationOverview;
+ public static create(properties?: google.privacy.dlp.v2.ITransformationLocation): google.privacy.dlp.v2.TransformationLocation;
/**
- * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
- * @param message TransformationOverview message or plain object to encode
+ * Encodes the specified TransformationLocation message. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages.
+ * @param message TransformationLocation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ITransformationLocation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
- * @param message TransformationOverview message or plain object to encode
+ * Encodes the specified TransformationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages.
+ * @param message TransformationLocation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationLocation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a TransformationOverview message from the specified reader or buffer.
+ * Decodes a TransformationLocation message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns TransformationOverview
+ * @returns TransformationLocation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationOverview;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationLocation;
/**
- * Decodes a TransformationOverview message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationLocation message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns TransformationOverview
+ * @returns TransformationLocation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationOverview;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationLocation;
/**
- * Verifies a TransformationOverview message.
+ * Verifies a TransformationLocation message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationLocation message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns TransformationOverview
+ * @returns TransformationLocation
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationOverview;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationLocation;
/**
- * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified.
- * @param message TransformationOverview
+ * Creates a plain object from a TransformationLocation message. Also converts values to other types if specified.
+ * @param message TransformationLocation
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.TransformationOverview, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this TransformationOverview to JSON.
+ * Converts this TransformationLocation to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for TransformationOverview
+ * Gets the default type url for TransformationLocation
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- /** Properties of a TransformationSummary. */
- interface ITransformationSummary {
+ /** Properties of a RecordTransformation. */
+ interface IRecordTransformation {
- /** TransformationSummary infoType */
- infoType?: (google.privacy.dlp.v2.IInfoType|null);
+ /** RecordTransformation fieldId */
+ fieldId?: (google.privacy.dlp.v2.IFieldId|null);
- /** TransformationSummary field */
- field?: (google.privacy.dlp.v2.IFieldId|null);
+ /** RecordTransformation containerTimestamp */
+ containerTimestamp?: (google.protobuf.ITimestamp|null);
- /** TransformationSummary transformation */
- transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null);
+ /** RecordTransformation containerVersion */
+ containerVersion?: (string|null);
+ }
- /** TransformationSummary fieldTransformations */
- fieldTransformations?: (google.privacy.dlp.v2.IFieldTransformation[]|null);
+ /** Represents a RecordTransformation. */
+ class RecordTransformation implements IRecordTransformation {
- /** TransformationSummary recordSuppress */
- recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null);
+ /**
+ * Constructs a new RecordTransformation.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.IRecordTransformation);
- /** TransformationSummary results */
- results?: (google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]|null);
+ /** RecordTransformation fieldId. */
+ public fieldId?: (google.privacy.dlp.v2.IFieldId|null);
- /** TransformationSummary transformedBytes */
- transformedBytes?: (number|Long|string|null);
- }
+ /** RecordTransformation containerTimestamp. */
+ public containerTimestamp?: (google.protobuf.ITimestamp|null);
- /** Represents a TransformationSummary. */
- class TransformationSummary implements ITransformationSummary {
+ /** RecordTransformation containerVersion. */
+ public containerVersion: string;
/**
- * Constructs a new TransformationSummary.
+ * Creates a new RecordTransformation instance using the specified properties.
* @param [properties] Properties to set
+ * @returns RecordTransformation instance
*/
- constructor(properties?: google.privacy.dlp.v2.ITransformationSummary);
+ public static create(properties?: google.privacy.dlp.v2.IRecordTransformation): google.privacy.dlp.v2.RecordTransformation;
- /** TransformationSummary infoType. */
- public infoType?: (google.privacy.dlp.v2.IInfoType|null);
+ /**
+ * Encodes the specified RecordTransformation message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages.
+ * @param message RecordTransformation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.IRecordTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
- /** TransformationSummary field. */
- public field?: (google.privacy.dlp.v2.IFieldId|null);
+ /**
+ * Encodes the specified RecordTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages.
+ * @param message RecordTransformation message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.IRecordTransformation, writer?: $protobuf.Writer): $protobuf.Writer;
- /** TransformationSummary transformation. */
- public transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null);
+ /**
+ * Decodes a RecordTransformation message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecordTransformation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordTransformation;
- /** TransformationSummary fieldTransformations. */
- public fieldTransformations: google.privacy.dlp.v2.IFieldTransformation[];
+ /**
+ * Decodes a RecordTransformation message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecordTransformation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordTransformation;
- /** TransformationSummary recordSuppress. */
- public recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null);
+ /**
+ * Verifies a RecordTransformation message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /** TransformationSummary results. */
- public results: google.privacy.dlp.v2.TransformationSummary.ISummaryResult[];
+ /**
+ * Creates a RecordTransformation message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecordTransformation
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordTransformation;
- /** TransformationSummary transformedBytes. */
- public transformedBytes: (number|Long|string);
+ /**
+ * Creates a plain object from a RecordTransformation message. Also converts values to other types if specified.
+ * @param message RecordTransformation
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.RecordTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Creates a new TransformationSummary instance using the specified properties.
+ * Converts this RecordTransformation to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecordTransformation
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TransformationResultStatus. */
+ interface ITransformationResultStatus {
+
+ /** TransformationResultStatus resultStatusType */
+ resultStatusType?: (google.privacy.dlp.v2.TransformationResultStatusType|keyof typeof google.privacy.dlp.v2.TransformationResultStatusType|null);
+
+ /** TransformationResultStatus details */
+ details?: (google.rpc.IStatus|null);
+ }
+
+ /** Represents a TransformationResultStatus. */
+ class TransformationResultStatus implements ITransformationResultStatus {
+
+ /**
+ * Constructs a new TransformationResultStatus.
* @param [properties] Properties to set
- * @returns TransformationSummary instance
*/
- public static create(properties?: google.privacy.dlp.v2.ITransformationSummary): google.privacy.dlp.v2.TransformationSummary;
+ constructor(properties?: google.privacy.dlp.v2.ITransformationResultStatus);
+
+ /** TransformationResultStatus resultStatusType. */
+ public resultStatusType: (google.privacy.dlp.v2.TransformationResultStatusType|keyof typeof google.privacy.dlp.v2.TransformationResultStatusType);
+
+ /** TransformationResultStatus details. */
+ public details?: (google.rpc.IStatus|null);
/**
- * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
- * @param message TransformationSummary message or plain object to encode
+ * Creates a new TransformationResultStatus instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationResultStatus instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationResultStatus): google.privacy.dlp.v2.TransformationResultStatus;
+
+ /**
+ * Encodes the specified TransformationResultStatus message. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages.
+ * @param message TransformationResultStatus message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encode(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encode(message: google.privacy.dlp.v2.ITransformationResultStatus, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
- * @param message TransformationSummary message or plain object to encode
+ * Encodes the specified TransformationResultStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages.
+ * @param message TransformationResultStatus message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
- public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer;
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationResultStatus, writer?: $protobuf.Writer): $protobuf.Writer;
/**
- * Decodes a TransformationSummary message from the specified reader or buffer.
+ * Decodes a TransformationResultStatus message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
- * @returns TransformationSummary
+ * @returns TransformationResultStatus
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary;
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationResultStatus;
/**
- * Decodes a TransformationSummary message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationResultStatus message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
- * @returns TransformationSummary
+ * @returns TransformationResultStatus
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary;
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationResultStatus;
/**
- * Verifies a TransformationSummary message.
+ * Verifies a TransformationResultStatus message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
- * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationResultStatus message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
- * @returns TransformationSummary
+ * @returns TransformationResultStatus
*/
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary;
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationResultStatus;
/**
- * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified.
- * @param message TransformationSummary
+ * Creates a plain object from a TransformationResultStatus message. Also converts values to other types if specified.
+ * @param message TransformationResultStatus
* @param [options] Conversion options
* @returns Plain object
*/
- public static toObject(message: google.privacy.dlp.v2.TransformationSummary, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ public static toObject(message: google.privacy.dlp.v2.TransformationResultStatus, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
- * Converts this TransformationSummary to JSON.
+ * Converts this TransformationResultStatus to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
- * Gets the default type url for TransformationSummary
+ * Gets the default type url for TransformationResultStatus
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
- namespace TransformationSummary {
-
- /** TransformationResultCode enum. */
- enum TransformationResultCode {
- TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0,
- SUCCESS = 1,
- ERROR = 2
- }
-
- /** Properties of a SummaryResult. */
- interface ISummaryResult {
-
- /** SummaryResult count */
- count?: (number|Long|string|null);
-
- /** SummaryResult code */
- code?: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null);
-
- /** SummaryResult details */
- details?: (string|null);
- }
-
- /** Represents a SummaryResult. */
- class SummaryResult implements ISummaryResult {
+ /** TransformationResultStatusType enum. */
+ enum TransformationResultStatusType {
+ STATE_TYPE_UNSPECIFIED = 0,
+ INVALID_TRANSFORM = 1,
+ BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2,
+ METADATA_UNRETRIEVABLE = 3,
+ SUCCESS = 4
+ }
+
+ /** TransformationContainerType enum. */
+ enum TransformationContainerType {
+ TRANSFORM_UNKNOWN_CONTAINER = 0,
+ TRANSFORM_BODY = 1,
+ TRANSFORM_METADATA = 2,
+ TRANSFORM_TABLE = 3
+ }
+
+ /** TransformationType enum. */
+ enum TransformationType {
+ TRANSFORMATION_TYPE_UNSPECIFIED = 0,
+ RECORD_SUPPRESSION = 1,
+ REPLACE_VALUE = 2,
+ REPLACE_DICTIONARY = 15,
+ REDACT = 3,
+ CHARACTER_MASK = 4,
+ CRYPTO_REPLACE_FFX_FPE = 5,
+ FIXED_SIZE_BUCKETING = 6,
+ BUCKETING = 7,
+ REPLACE_WITH_INFO_TYPE = 8,
+ TIME_PART = 9,
+ CRYPTO_HASH = 10,
+ DATE_SHIFT = 12,
+ CRYPTO_DETERMINISTIC_CONFIG = 13,
+ REDACT_IMAGE = 14
+ }
+
+ /** Properties of a TransformationDetailsStorageConfig. */
+ interface ITransformationDetailsStorageConfig {
+
+ /** TransformationDetailsStorageConfig table */
+ table?: (google.privacy.dlp.v2.IBigQueryTable|null);
+ }
- /**
- * Constructs a new SummaryResult.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult);
+ /** Represents a TransformationDetailsStorageConfig. */
+ class TransformationDetailsStorageConfig implements ITransformationDetailsStorageConfig {
- /** SummaryResult count. */
- public count: (number|Long|string);
+ /**
+ * Constructs a new TransformationDetailsStorageConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ITransformationDetailsStorageConfig);
- /** SummaryResult code. */
- public code: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode);
+ /** TransformationDetailsStorageConfig table. */
+ public table?: (google.privacy.dlp.v2.IBigQueryTable|null);
- /** SummaryResult details. */
- public details: string;
+ /** TransformationDetailsStorageConfig type. */
+ public type?: "table";
- /**
- * Creates a new SummaryResult instance using the specified properties.
- * @param [properties] Properties to set
- * @returns SummaryResult instance
- */
- public static create(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
+ /**
+ * Creates a new TransformationDetailsStorageConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationDetailsStorageConfig instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationDetailsStorageConfig): google.privacy.dlp.v2.TransformationDetailsStorageConfig;
- /**
- * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
- * @param message SummaryResult message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified TransformationDetailsStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages.
+ * @param message TransformationDetailsStorageConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ITransformationDetailsStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
- * @param message SummaryResult message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer;
+ /**
+ * Encodes the specified TransformationDetailsStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages.
+ * @param message TransformationDetailsStorageConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDetailsStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer;
- /**
- * Decodes a SummaryResult message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns SummaryResult
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
+ /**
+ * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TransformationDetailsStorageConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDetailsStorageConfig;
- /**
- * Decodes a SummaryResult message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns SummaryResult
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
+ /**
+ * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TransformationDetailsStorageConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDetailsStorageConfig;
- /**
- * Verifies a SummaryResult message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
+ /**
+ * Verifies a TransformationDetailsStorageConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
- /**
- * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns SummaryResult
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary.SummaryResult;
+ /**
+ * Creates a TransformationDetailsStorageConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TransformationDetailsStorageConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDetailsStorageConfig;
- /**
- * Creates a plain object from a SummaryResult message. Also converts values to other types if specified.
- * @param message SummaryResult
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.TransformationSummary.SummaryResult, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a plain object from a TransformationDetailsStorageConfig message. Also converts values to other types if specified.
+ * @param message TransformationDetailsStorageConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationDetailsStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Converts this SummaryResult to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Converts this TransformationDetailsStorageConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
- /**
- * Gets the default type url for SummaryResult
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Gets the default type url for TransformationDetailsStorageConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a Schedule. */
@@ -14371,6 +15688,9 @@ export namespace google {
/** Action publishFindingsToCloudDataCatalog */
publishFindingsToCloudDataCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null);
+ /** Action deidentify */
+ deidentify?: (google.privacy.dlp.v2.Action.IDeidentify|null);
+
/** Action jobNotificationEmails */
jobNotificationEmails?: (google.privacy.dlp.v2.Action.IJobNotificationEmails|null);
@@ -14399,6 +15719,9 @@ export namespace google {
/** Action publishFindingsToCloudDataCatalog. */
public publishFindingsToCloudDataCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null);
+ /** Action deidentify. */
+ public deidentify?: (google.privacy.dlp.v2.Action.IDeidentify|null);
+
/** Action jobNotificationEmails. */
public jobNotificationEmails?: (google.privacy.dlp.v2.Action.IJobNotificationEmails|null);
@@ -14406,7 +15729,7 @@ export namespace google {
public publishToStackdriver?: (google.privacy.dlp.v2.Action.IPublishToStackdriver|null);
/** Action action. */
- public action?: ("saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"jobNotificationEmails"|"publishToStackdriver");
+ public action?: ("saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"deidentify"|"jobNotificationEmails"|"publishToStackdriver");
/**
* Creates a new Action instance using the specified properties.
@@ -14864,6 +16187,124 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ /** Properties of a Deidentify. */
+ interface IDeidentify {
+
+ /** Deidentify transformationConfig */
+ transformationConfig?: (google.privacy.dlp.v2.ITransformationConfig|null);
+
+ /** Deidentify transformationDetailsStorageConfig */
+ transformationDetailsStorageConfig?: (google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null);
+
+ /** Deidentify cloudStorageOutput */
+ cloudStorageOutput?: (string|null);
+
+ /** Deidentify fileTypesToTransform */
+ fileTypesToTransform?: (google.privacy.dlp.v2.FileType[]|null);
+ }
+
+ /** Represents a Deidentify. */
+ class Deidentify implements IDeidentify {
+
+ /**
+ * Constructs a new Deidentify.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.Action.IDeidentify);
+
+ /** Deidentify transformationConfig. */
+ public transformationConfig?: (google.privacy.dlp.v2.ITransformationConfig|null);
+
+ /** Deidentify transformationDetailsStorageConfig. */
+ public transformationDetailsStorageConfig?: (google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null);
+
+ /** Deidentify cloudStorageOutput. */
+ public cloudStorageOutput?: (string|null);
+
+ /** Deidentify fileTypesToTransform. */
+ public fileTypesToTransform: google.privacy.dlp.v2.FileType[];
+
+ /** Deidentify output. */
+ public output?: "cloudStorageOutput";
+
+ /**
+ * Creates a new Deidentify instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Deidentify instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.Action.IDeidentify): google.privacy.dlp.v2.Action.Deidentify;
+
+ /**
+ * Encodes the specified Deidentify message. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages.
+ * @param message Deidentify message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.Action.IDeidentify, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Deidentify message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages.
+ * @param message Deidentify message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.Action.IDeidentify, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Deidentify message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Deidentify
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.Deidentify;
+
+ /**
+ * Decodes a Deidentify message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Deidentify
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.Deidentify;
+
+ /**
+ * Verifies a Deidentify message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Deidentify message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Deidentify
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.Deidentify;
+
+ /**
+ * Creates a plain object from a Deidentify message. Also converts values to other types if specified.
+ * @param message Deidentify
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.Action.Deidentify, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Deidentify to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Deidentify
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
/** Properties of a JobNotificationEmails. */
interface IJobNotificationEmails {
}
@@ -15024,27 +16465,136 @@ export namespace google {
*/
public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishToStackdriver;
- /**
- * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified.
- * @param message PublishToStackdriver
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.Action.PublishToStackdriver, options?: $protobuf.IConversionOptions): { [k: string]: any };
+ /**
+ * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified.
+ * @param message PublishToStackdriver
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.Action.PublishToStackdriver, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PublishToStackdriver to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PublishToStackdriver
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of a TransformationConfig. */
+ interface ITransformationConfig {
+
+ /** TransformationConfig deidentifyTemplate */
+ deidentifyTemplate?: (string|null);
+
+ /** TransformationConfig structuredDeidentifyTemplate */
+ structuredDeidentifyTemplate?: (string|null);
+
+ /** TransformationConfig imageRedactTemplate */
+ imageRedactTemplate?: (string|null);
+ }
+
+ /** Represents a TransformationConfig. */
+ class TransformationConfig implements ITransformationConfig {
+
+ /**
+ * Constructs a new TransformationConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ITransformationConfig);
+
+ /** TransformationConfig deidentifyTemplate. */
+ public deidentifyTemplate: string;
+
+ /** TransformationConfig structuredDeidentifyTemplate. */
+ public structuredDeidentifyTemplate: string;
+
+ /** TransformationConfig imageRedactTemplate. */
+ public imageRedactTemplate: string;
+
+ /**
+ * Creates a new TransformationConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransformationConfig instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ITransformationConfig): google.privacy.dlp.v2.TransformationConfig;
+
+ /**
+ * Encodes the specified TransformationConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages.
+ * @param message TransformationConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ITransformationConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TransformationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages.
+ * @param message TransformationConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TransformationConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TransformationConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationConfig;
+
+ /**
+ * Decodes a TransformationConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TransformationConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationConfig;
+
+ /**
+ * Verifies a TransformationConfig message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TransformationConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TransformationConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationConfig;
- /**
- * Converts this PublishToStackdriver to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
+ /**
+ * Creates a plain object from a TransformationConfig message. Also converts values to other types if specified.
+ * @param message TransformationConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.TransformationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
- /**
- * Gets the default type url for PublishToStackdriver
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
+ /**
+ * Converts this TransformationConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TransformationConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a CreateInspectTemplateRequest. */
@@ -20556,114 +22106,6 @@ export namespace google {
INVALID = 4
}
- /** Properties of a SensitivityScore. */
- interface ISensitivityScore {
-
- /** SensitivityScore score */
- score?: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null);
- }
-
- /** Represents a SensitivityScore. */
- class SensitivityScore implements ISensitivityScore {
-
- /**
- * Constructs a new SensitivityScore.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.privacy.dlp.v2.ISensitivityScore);
-
- /** SensitivityScore score. */
- public score: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel);
-
- /**
- * Creates a new SensitivityScore instance using the specified properties.
- * @param [properties] Properties to set
- * @returns SensitivityScore instance
- */
- public static create(properties?: google.privacy.dlp.v2.ISensitivityScore): google.privacy.dlp.v2.SensitivityScore;
-
- /**
- * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
- * @param message SensitivityScore message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
- * @param message SensitivityScore message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a SensitivityScore message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns SensitivityScore
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SensitivityScore;
-
- /**
- * Decodes a SensitivityScore message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns SensitivityScore
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SensitivityScore;
-
- /**
- * Verifies a SensitivityScore message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns SensitivityScore
- */
- public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SensitivityScore;
-
- /**
- * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified.
- * @param message SensitivityScore
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.privacy.dlp.v2.SensitivityScore, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this SensitivityScore to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for SensitivityScore
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace SensitivityScore {
-
- /** SensitivityScoreLevel enum. */
- enum SensitivityScoreLevel {
- SENSITIVITY_SCORE_UNSPECIFIED = 0,
- SENSITIVITY_LOW = 10,
- SENSITIVITY_MODERATE = 20,
- SENSITIVITY_HIGH = 30
- }
- }
-
/** Properties of a DataRiskLevel. */
interface IDataRiskLevel {
@@ -21248,6 +22690,9 @@ export namespace google {
/** InfoTypeSummary infoType */
infoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** InfoTypeSummary estimatedPrevalence */
+ estimatedPrevalence?: (number|null);
}
/** Represents an InfoTypeSummary. */
@@ -21262,6 +22707,9 @@ export namespace google {
/** InfoTypeSummary infoType. */
public infoType?: (google.privacy.dlp.v2.IInfoType|null);
+ /** InfoTypeSummary estimatedPrevalence. */
+ public estimatedPrevalence: number;
+
/**
* Creates a new InfoTypeSummary instance using the specified properties.
* @param [properties] Properties to set
@@ -21345,6 +22793,9 @@ export namespace google {
/** OtherInfoTypeSummary infoType */
infoType?: (google.privacy.dlp.v2.IInfoType|null);
+
+ /** OtherInfoTypeSummary estimatedPrevalence */
+ estimatedPrevalence?: (number|null);
}
/** Represents an OtherInfoTypeSummary. */
@@ -21359,6 +22810,9 @@ export namespace google {
/** OtherInfoTypeSummary infoType. */
public infoType?: (google.privacy.dlp.v2.IInfoType|null);
+ /** OtherInfoTypeSummary estimatedPrevalence. */
+ public estimatedPrevalence: number;
+
/**
* Creates a new OtherInfoTypeSummary instance using the specified properties.
* @param [properties] Properties to set
@@ -21969,6 +23423,114 @@ export namespace google {
public static getTypeUrl(typeUrlPrefix?: string): string;
}
+ /** Properties of a SensitivityScore. */
+ interface ISensitivityScore {
+
+ /** SensitivityScore score */
+ score?: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null);
+ }
+
+ /** Represents a SensitivityScore. */
+ class SensitivityScore implements ISensitivityScore {
+
+ /**
+ * Constructs a new SensitivityScore.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.privacy.dlp.v2.ISensitivityScore);
+
+ /** SensitivityScore score. */
+ public score: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel);
+
+ /**
+ * Creates a new SensitivityScore instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SensitivityScore instance
+ */
+ public static create(properties?: google.privacy.dlp.v2.ISensitivityScore): google.privacy.dlp.v2.SensitivityScore;
+
+ /**
+ * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
+ * @param message SensitivityScore message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
+ * @param message SensitivityScore message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SensitivityScore message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SensitivityScore
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SensitivityScore;
+
+ /**
+ * Decodes a SensitivityScore message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SensitivityScore
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SensitivityScore;
+
+ /**
+ * Verifies a SensitivityScore message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SensitivityScore
+ */
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SensitivityScore;
+
+ /**
+ * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified.
+ * @param message SensitivityScore
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.privacy.dlp.v2.SensitivityScore, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SensitivityScore to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SensitivityScore
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace SensitivityScore {
+
+ /** SensitivityScoreLevel enum. */
+ enum SensitivityScoreLevel {
+ SENSITIVITY_SCORE_UNSPECIFIED = 0,
+ SENSITIVITY_LOW = 10,
+ SENSITIVITY_MODERATE = 20,
+ SENSITIVITY_HIGH = 30
+ }
+ }
+
/** Likelihood enum. */
enum Likelihood {
LIKELIHOOD_UNSPECIFIED = 0,
diff --git a/protos/protos.js b/protos/protos.js
index 4265a866..b4d3e2b1 100644
--- a/protos/protos.js
+++ b/protos/protos.js
@@ -12782,6 +12782,7 @@
* @property {string|null} [displayName] InfoTypeDescription displayName
* @property {Array.|null} [supportedBy] InfoTypeDescription supportedBy
* @property {string|null} [description] InfoTypeDescription description
+ * @property {Array.|null} [versions] InfoTypeDescription versions
* @property {Array.|null} [categories] InfoTypeDescription categories
*/
@@ -12795,6 +12796,7 @@
*/
function InfoTypeDescription(properties) {
this.supportedBy = [];
+ this.versions = [];
this.categories = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -12834,6 +12836,14 @@
*/
InfoTypeDescription.prototype.description = "";
+ /**
+ * InfoTypeDescription versions.
+ * @member {Array.} versions
+ * @memberof google.privacy.dlp.v2.InfoTypeDescription
+ * @instance
+ */
+ InfoTypeDescription.prototype.versions = $util.emptyArray;
+
/**
* InfoTypeDescription categories.
* @member {Array.} categories
@@ -12878,6 +12888,9 @@
}
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
+ if (message.versions != null && message.versions.length)
+ for (var i = 0; i < message.versions.length; ++i)
+ $root.google.privacy.dlp.v2.VersionDescription.encode(message.versions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
if (message.categories != null && message.categories.length)
for (var i = 0; i < message.categories.length; ++i)
$root.google.privacy.dlp.v2.InfoTypeCategory.encode(message.categories[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
@@ -12938,6 +12951,12 @@
message.description = reader.string();
break;
}
+ case 9: {
+ if (!(message.versions && message.versions.length))
+ message.versions = [];
+ message.versions.push($root.google.privacy.dlp.v2.VersionDescription.decode(reader, reader.uint32()));
+ break;
+ }
case 10: {
if (!(message.categories && message.categories.length))
message.categories = [];
@@ -13001,6 +13020,15 @@
if (message.description != null && message.hasOwnProperty("description"))
if (!$util.isString(message.description))
return "description: string expected";
+ if (message.versions != null && message.hasOwnProperty("versions")) {
+ if (!Array.isArray(message.versions))
+ return "versions: array expected";
+ for (var i = 0; i < message.versions.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.VersionDescription.verify(message.versions[i]);
+ if (error)
+ return "versions." + error;
+ }
+ }
if (message.categories != null && message.hasOwnProperty("categories")) {
if (!Array.isArray(message.categories))
return "categories: array expected";
@@ -13052,6 +13080,16 @@
}
if (object.description != null)
message.description = String(object.description);
+ if (object.versions) {
+ if (!Array.isArray(object.versions))
+ throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.versions: array expected");
+ message.versions = [];
+ for (var i = 0; i < object.versions.length; ++i) {
+ if (typeof object.versions[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.versions: object expected");
+ message.versions[i] = $root.google.privacy.dlp.v2.VersionDescription.fromObject(object.versions[i]);
+ }
+ }
if (object.categories) {
if (!Array.isArray(object.categories))
throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.categories: array expected");
@@ -13080,6 +13118,7 @@
var object = {};
if (options.arrays || options.defaults) {
object.supportedBy = [];
+ object.versions = [];
object.categories = [];
}
if (options.defaults) {
@@ -13098,6 +13137,11 @@
}
if (message.description != null && message.hasOwnProperty("description"))
object.description = message.description;
+ if (message.versions && message.versions.length) {
+ object.versions = [];
+ for (var j = 0; j < message.versions.length; ++j)
+ object.versions[j] = $root.google.privacy.dlp.v2.VersionDescription.toObject(message.versions[j], options);
+ }
if (message.categories && message.categories.length) {
object.categories = [];
for (var j = 0; j < message.categories.length; ++j)
@@ -13824,6 +13868,233 @@
return InfoTypeCategory;
})();
+ v2.VersionDescription = (function() {
+
+ /**
+ * Properties of a VersionDescription.
+ * @memberof google.privacy.dlp.v2
+ * @interface IVersionDescription
+ * @property {string|null} [version] VersionDescription version
+ * @property {string|null} [description] VersionDescription description
+ */
+
+ /**
+ * Constructs a new VersionDescription.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a VersionDescription.
+ * @implements IVersionDescription
+ * @constructor
+ * @param {google.privacy.dlp.v2.IVersionDescription=} [properties] Properties to set
+ */
+ function VersionDescription(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * VersionDescription version.
+ * @member {string} version
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @instance
+ */
+ VersionDescription.prototype.version = "";
+
+ /**
+ * VersionDescription description.
+ * @member {string} description
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @instance
+ */
+ VersionDescription.prototype.description = "";
+
+ /**
+ * Creates a new VersionDescription instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {google.privacy.dlp.v2.IVersionDescription=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription instance
+ */
+ VersionDescription.create = function create(properties) {
+ return new VersionDescription(properties);
+ };
+
+ /**
+ * Encodes the specified VersionDescription message. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {google.privacy.dlp.v2.IVersionDescription} message VersionDescription message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ VersionDescription.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.version != null && Object.hasOwnProperty.call(message, "version"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.version);
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified VersionDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {google.privacy.dlp.v2.IVersionDescription} message VersionDescription message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ VersionDescription.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a VersionDescription message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ VersionDescription.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VersionDescription();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.version = reader.string();
+ break;
+ }
+ case 2: {
+ message.description = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a VersionDescription message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ VersionDescription.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a VersionDescription message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ VersionDescription.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.version != null && message.hasOwnProperty("version"))
+ if (!$util.isString(message.version))
+ return "version: string expected";
+ if (message.description != null && message.hasOwnProperty("description"))
+ if (!$util.isString(message.description))
+ return "description: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a VersionDescription message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription
+ */
+ VersionDescription.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.VersionDescription)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.VersionDescription();
+ if (object.version != null)
+ message.version = String(object.version);
+ if (object.description != null)
+ message.description = String(object.description);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a VersionDescription message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {google.privacy.dlp.v2.VersionDescription} message VersionDescription
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ VersionDescription.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.version = "";
+ object.description = "";
+ }
+ if (message.version != null && message.hasOwnProperty("version"))
+ object.version = message.version;
+ if (message.description != null && message.hasOwnProperty("description"))
+ object.description = message.description;
+ return object;
+ };
+
+ /**
+ * Converts this VersionDescription to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ VersionDescription.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for VersionDescription
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.VersionDescription
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ VersionDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.VersionDescription";
+ };
+
+ return VersionDescription;
+ })();
+
v2.ListInfoTypesRequest = (function() {
/**
@@ -24748,6 +25019,7 @@
* @interface IDeidentifyConfig
* @property {google.privacy.dlp.v2.IInfoTypeTransformations|null} [infoTypeTransformations] DeidentifyConfig infoTypeTransformations
* @property {google.privacy.dlp.v2.IRecordTransformations|null} [recordTransformations] DeidentifyConfig recordTransformations
+ * @property {google.privacy.dlp.v2.IImageTransformations|null} [imageTransformations] DeidentifyConfig imageTransformations
* @property {google.privacy.dlp.v2.ITransformationErrorHandling|null} [transformationErrorHandling] DeidentifyConfig transformationErrorHandling
*/
@@ -24782,6 +25054,14 @@
*/
DeidentifyConfig.prototype.recordTransformations = null;
+ /**
+ * DeidentifyConfig imageTransformations.
+ * @member {google.privacy.dlp.v2.IImageTransformations|null|undefined} imageTransformations
+ * @memberof google.privacy.dlp.v2.DeidentifyConfig
+ * @instance
+ */
+ DeidentifyConfig.prototype.imageTransformations = null;
+
/**
* DeidentifyConfig transformationErrorHandling.
* @member {google.privacy.dlp.v2.ITransformationErrorHandling|null|undefined} transformationErrorHandling
@@ -24795,12 +25075,12 @@
/**
* DeidentifyConfig transformation.
- * @member {"infoTypeTransformations"|"recordTransformations"|undefined} transformation
+ * @member {"infoTypeTransformations"|"recordTransformations"|"imageTransformations"|undefined} transformation
* @memberof google.privacy.dlp.v2.DeidentifyConfig
* @instance
*/
Object.defineProperty(DeidentifyConfig.prototype, "transformation", {
- get: $util.oneOfGetter($oneOfFields = ["infoTypeTransformations", "recordTransformations"]),
+ get: $util.oneOfGetter($oneOfFields = ["infoTypeTransformations", "recordTransformations", "imageTransformations"]),
set: $util.oneOfSetter($oneOfFields)
});
@@ -24834,6 +25114,8 @@
$root.google.privacy.dlp.v2.RecordTransformations.encode(message.recordTransformations, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
if (message.transformationErrorHandling != null && Object.hasOwnProperty.call(message, "transformationErrorHandling"))
$root.google.privacy.dlp.v2.TransformationErrorHandling.encode(message.transformationErrorHandling, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.imageTransformations != null && Object.hasOwnProperty.call(message, "imageTransformations"))
+ $root.google.privacy.dlp.v2.ImageTransformations.encode(message.imageTransformations, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
return writer;
};
@@ -24876,6 +25158,10 @@
message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.decode(reader, reader.uint32());
break;
}
+ case 4: {
+ message.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.decode(reader, reader.uint32());
+ break;
+ }
case 3: {
message.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.decode(reader, reader.uint32());
break;
@@ -24934,6 +25220,16 @@
return "recordTransformations." + error;
}
}
+ if (message.imageTransformations != null && message.hasOwnProperty("imageTransformations")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ImageTransformations.verify(message.imageTransformations);
+ if (error)
+ return "imageTransformations." + error;
+ }
+ }
if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) {
var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.verify(message.transformationErrorHandling);
if (error)
@@ -24964,6 +25260,11 @@
throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.recordTransformations: object expected");
message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.fromObject(object.recordTransformations);
}
+ if (object.imageTransformations != null) {
+ if (typeof object.imageTransformations !== "object")
+ throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.imageTransformations: object expected");
+ message.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.fromObject(object.imageTransformations);
+ }
if (object.transformationErrorHandling != null) {
if (typeof object.transformationErrorHandling !== "object")
throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.transformationErrorHandling: object expected");
@@ -24999,6 +25300,11 @@
}
if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling"))
object.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.toObject(message.transformationErrorHandling, options);
+ if (message.imageTransformations != null && message.hasOwnProperty("imageTransformations")) {
+ object.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.toObject(message.imageTransformations, options);
+ if (options.oneofs)
+ object.transformation = "imageTransformations";
+ }
return object;
};
@@ -25031,25 +25337,25 @@
return DeidentifyConfig;
})();
- v2.TransformationErrorHandling = (function() {
+ v2.ImageTransformations = (function() {
/**
- * Properties of a TransformationErrorHandling.
+ * Properties of an ImageTransformations.
* @memberof google.privacy.dlp.v2
- * @interface ITransformationErrorHandling
- * @property {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null} [throwError] TransformationErrorHandling throwError
- * @property {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null} [leaveUntransformed] TransformationErrorHandling leaveUntransformed
+ * @interface IImageTransformations
+ * @property {Array.|null} [transforms] ImageTransformations transforms
*/
/**
- * Constructs a new TransformationErrorHandling.
+ * Constructs a new ImageTransformations.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a TransformationErrorHandling.
- * @implements ITransformationErrorHandling
+ * @classdesc Represents an ImageTransformations.
+ * @implements IImageTransformations
* @constructor
- * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.IImageTransformations=} [properties] Properties to set
*/
- function TransformationErrorHandling(properties) {
+ function ImageTransformations(properties) {
+ this.transforms = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -25057,103 +25363,78 @@
}
/**
- * TransformationErrorHandling throwError.
- * @member {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null|undefined} throwError
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @instance
- */
- TransformationErrorHandling.prototype.throwError = null;
-
- /**
- * TransformationErrorHandling leaveUntransformed.
- * @member {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null|undefined} leaveUntransformed
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @instance
- */
- TransformationErrorHandling.prototype.leaveUntransformed = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * TransformationErrorHandling mode.
- * @member {"throwError"|"leaveUntransformed"|undefined} mode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * ImageTransformations transforms.
+ * @member {Array.} transforms
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @instance
*/
- Object.defineProperty(TransformationErrorHandling.prototype, "mode", {
- get: $util.oneOfGetter($oneOfFields = ["throwError", "leaveUntransformed"]),
- set: $util.oneOfSetter($oneOfFields)
- });
+ ImageTransformations.prototype.transforms = $util.emptyArray;
/**
- * Creates a new TransformationErrorHandling instance using the specified properties.
+ * Creates a new ImageTransformations instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
- * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling instance
+ * @param {google.privacy.dlp.v2.IImageTransformations=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations instance
*/
- TransformationErrorHandling.create = function create(properties) {
- return new TransformationErrorHandling(properties);
+ ImageTransformations.create = function create(properties) {
+ return new ImageTransformations(properties);
};
/**
- * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
+ * Encodes the specified ImageTransformations message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
- * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode
+ * @param {google.privacy.dlp.v2.IImageTransformations} message ImageTransformations message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationErrorHandling.encode = function encode(message, writer) {
+ ImageTransformations.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.throwError != null && Object.hasOwnProperty.call(message, "throwError"))
- $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.encode(message.throwError, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.leaveUntransformed != null && Object.hasOwnProperty.call(message, "leaveUntransformed"))
- $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.encode(message.leaveUntransformed, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.transforms != null && message.transforms.length)
+ for (var i = 0; i < message.transforms.length; ++i)
+ $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.encode(message.transforms[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
+ * Encodes the specified ImageTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
- * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode
+ * @param {google.privacy.dlp.v2.IImageTransformations} message ImageTransformations message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationErrorHandling.encodeDelimited = function encodeDelimited(message, writer) {
+ ImageTransformations.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a TransformationErrorHandling message from the specified reader or buffer.
+ * Decodes an ImageTransformations message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
+ * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationErrorHandling.decode = function decode(reader, length) {
+ ImageTransformations.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
- case 1: {
- message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.decode(reader, reader.uint32());
- break;
- }
case 2: {
- message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.decode(reader, reader.uint32());
+ if (!(message.transforms && message.transforms.length))
+ message.transforms = [];
+ message.transforms.push($root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.decode(reader, reader.uint32()));
break;
}
default:
@@ -25165,148 +25446,139 @@
};
/**
- * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited.
+ * Decodes an ImageTransformations message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
+ * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationErrorHandling.decodeDelimited = function decodeDelimited(reader) {
+ ImageTransformations.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a TransformationErrorHandling message.
+ * Verifies an ImageTransformations message.
* @function verify
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- TransformationErrorHandling.verify = function verify(message) {
+ ImageTransformations.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- var properties = {};
- if (message.throwError != null && message.hasOwnProperty("throwError")) {
- properties.mode = 1;
- {
- var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify(message.throwError);
- if (error)
- return "throwError." + error;
- }
- }
- if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) {
- if (properties.mode === 1)
- return "mode: multiple values";
- properties.mode = 1;
- {
- var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify(message.leaveUntransformed);
+ if (message.transforms != null && message.hasOwnProperty("transforms")) {
+ if (!Array.isArray(message.transforms))
+ return "transforms: array expected";
+ for (var i = 0; i < message.transforms.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify(message.transforms[i]);
if (error)
- return "leaveUntransformed." + error;
+ return "transforms." + error;
}
}
return null;
};
/**
- * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types.
+ * Creates an ImageTransformations message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
+ * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations
*/
- TransformationErrorHandling.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling)
+ ImageTransformations.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations)
return object;
- var message = new $root.google.privacy.dlp.v2.TransformationErrorHandling();
- if (object.throwError != null) {
- if (typeof object.throwError !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.throwError: object expected");
- message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.fromObject(object.throwError);
- }
- if (object.leaveUntransformed != null) {
- if (typeof object.leaveUntransformed !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.leaveUntransformed: object expected");
- message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.fromObject(object.leaveUntransformed);
+ var message = new $root.google.privacy.dlp.v2.ImageTransformations();
+ if (object.transforms) {
+ if (!Array.isArray(object.transforms))
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.transforms: array expected");
+ message.transforms = [];
+ for (var i = 0; i < object.transforms.length; ++i) {
+ if (typeof object.transforms[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.transforms: object expected");
+ message.transforms[i] = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.fromObject(object.transforms[i]);
+ }
}
return message;
};
/**
- * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified.
+ * Creates a plain object from an ImageTransformations message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling} message TransformationErrorHandling
+ * @param {google.privacy.dlp.v2.ImageTransformations} message ImageTransformations
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- TransformationErrorHandling.toObject = function toObject(message, options) {
+ ImageTransformations.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (message.throwError != null && message.hasOwnProperty("throwError")) {
- object.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.toObject(message.throwError, options);
- if (options.oneofs)
- object.mode = "throwError";
- }
- if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) {
- object.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.toObject(message.leaveUntransformed, options);
- if (options.oneofs)
- object.mode = "leaveUntransformed";
+ if (options.arrays || options.defaults)
+ object.transforms = [];
+ if (message.transforms && message.transforms.length) {
+ object.transforms = [];
+ for (var j = 0; j < message.transforms.length; ++j)
+ object.transforms[j] = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.toObject(message.transforms[j], options);
}
return object;
};
/**
- * Converts this TransformationErrorHandling to JSON.
+ * Converts this ImageTransformations to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @instance
* @returns {Object.} JSON object
*/
- TransformationErrorHandling.prototype.toJSON = function toJSON() {
+ ImageTransformations.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for TransformationErrorHandling
+ * Gets the default type url for ImageTransformations
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @memberof google.privacy.dlp.v2.ImageTransformations
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- TransformationErrorHandling.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ ImageTransformations.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations";
};
- TransformationErrorHandling.ThrowError = (function() {
+ ImageTransformations.ImageTransformation = (function() {
/**
- * Properties of a ThrowError.
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @interface IThrowError
+ * Properties of an ImageTransformation.
+ * @memberof google.privacy.dlp.v2.ImageTransformations
+ * @interface IImageTransformation
+ * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null} [selectedInfoTypes] ImageTransformation selectedInfoTypes
+ * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null} [allInfoTypes] ImageTransformation allInfoTypes
+ * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null} [allText] ImageTransformation allText
+ * @property {google.privacy.dlp.v2.IColor|null} [redactionColor] ImageTransformation redactionColor
*/
/**
- * Constructs a new ThrowError.
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @classdesc Represents a ThrowError.
- * @implements IThrowError
+ * Constructs a new ImageTransformation.
+ * @memberof google.privacy.dlp.v2.ImageTransformations
+ * @classdesc Represents an ImageTransformation.
+ * @implements IImageTransformation
* @constructor
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation=} [properties] Properties to set
*/
- function ThrowError(properties) {
+ function ImageTransformation(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -25314,63 +25586,133 @@
}
/**
- * Creates a new ThrowError instance using the specified properties.
+ * ImageTransformation selectedInfoTypes.
+ * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null|undefined} selectedInfoTypes
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @instance
+ */
+ ImageTransformation.prototype.selectedInfoTypes = null;
+
+ /**
+ * ImageTransformation allInfoTypes.
+ * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null|undefined} allInfoTypes
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @instance
+ */
+ ImageTransformation.prototype.allInfoTypes = null;
+
+ /**
+ * ImageTransformation allText.
+ * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null|undefined} allText
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @instance
+ */
+ ImageTransformation.prototype.allText = null;
+
+ /**
+ * ImageTransformation redactionColor.
+ * @member {google.privacy.dlp.v2.IColor|null|undefined} redactionColor
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @instance
+ */
+ ImageTransformation.prototype.redactionColor = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * ImageTransformation target.
+ * @member {"selectedInfoTypes"|"allInfoTypes"|"allText"|undefined} target
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @instance
+ */
+ Object.defineProperty(ImageTransformation.prototype, "target", {
+ get: $util.oneOfGetter($oneOfFields = ["selectedInfoTypes", "allInfoTypes", "allText"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new ImageTransformation instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError instance
+ * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation instance
*/
- ThrowError.create = function create(properties) {
- return new ThrowError(properties);
+ ImageTransformation.create = function create(properties) {
+ return new ImageTransformation(properties);
};
/**
- * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * Encodes the specified ImageTransformation message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode
+ * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation} message ImageTransformation message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ThrowError.encode = function encode(message, writer) {
+ ImageTransformation.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
+ if (message.redactionColor != null && Object.hasOwnProperty.call(message, "redactionColor"))
+ $root.google.privacy.dlp.v2.Color.encode(message.redactionColor, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.selectedInfoTypes != null && Object.hasOwnProperty.call(message, "selectedInfoTypes"))
+ $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.encode(message.selectedInfoTypes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.allInfoTypes != null && Object.hasOwnProperty.call(message, "allInfoTypes"))
+ $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.encode(message.allInfoTypes, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.allText != null && Object.hasOwnProperty.call(message, "allText"))
+ $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.encode(message.allText, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * Encodes the specified ImageTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode
+ * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation} message ImageTransformation message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ThrowError.encodeDelimited = function encodeDelimited(message, writer) {
+ ImageTransformation.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a ThrowError message from the specified reader or buffer.
+ * Decodes an ImageTransformation message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ThrowError.decode = function decode(reader, length) {
+ ImageTransformation.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
+ case 4: {
+ message.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.redactionColor = $root.google.privacy.dlp.v2.Color.decode(reader, reader.uint32());
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -25380,298 +25722,764 @@
};
/**
- * Decodes a ThrowError message from the specified reader or buffer, length delimited.
+ * Decodes an ImageTransformation message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ThrowError.decodeDelimited = function decodeDelimited(reader) {
+ ImageTransformation.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a ThrowError message.
+ * Verifies an ImageTransformation message.
* @function verify
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- ThrowError.verify = function verify(message) {
+ ImageTransformation.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
+ var properties = {};
+ if (message.selectedInfoTypes != null && message.hasOwnProperty("selectedInfoTypes")) {
+ properties.target = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify(message.selectedInfoTypes);
+ if (error)
+ return "selectedInfoTypes." + error;
+ }
+ }
+ if (message.allInfoTypes != null && message.hasOwnProperty("allInfoTypes")) {
+ if (properties.target === 1)
+ return "target: multiple values";
+ properties.target = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify(message.allInfoTypes);
+ if (error)
+ return "allInfoTypes." + error;
+ }
+ }
+ if (message.allText != null && message.hasOwnProperty("allText")) {
+ if (properties.target === 1)
+ return "target: multiple values";
+ properties.target = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify(message.allText);
+ if (error)
+ return "allText." + error;
+ }
+ }
+ if (message.redactionColor != null && message.hasOwnProperty("redactionColor")) {
+ var error = $root.google.privacy.dlp.v2.Color.verify(message.redactionColor);
+ if (error)
+ return "redactionColor." + error;
+ }
return null;
};
/**
- * Creates a ThrowError message from a plain object. Also converts values to their respective internal types.
+ * Creates an ImageTransformation message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation
*/
- ThrowError.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)
+ ImageTransformation.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation)
return object;
- return new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError();
+ var message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation();
+ if (object.selectedInfoTypes != null) {
+ if (typeof object.selectedInfoTypes !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.selectedInfoTypes: object expected");
+ message.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.fromObject(object.selectedInfoTypes);
+ }
+ if (object.allInfoTypes != null) {
+ if (typeof object.allInfoTypes !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.allInfoTypes: object expected");
+ message.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.fromObject(object.allInfoTypes);
+ }
+ if (object.allText != null) {
+ if (typeof object.allText !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.allText: object expected");
+ message.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.fromObject(object.allText);
+ }
+ if (object.redactionColor != null) {
+ if (typeof object.redactionColor !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.redactionColor: object expected");
+ message.redactionColor = $root.google.privacy.dlp.v2.Color.fromObject(object.redactionColor);
+ }
+ return message;
};
/**
- * Creates a plain object from a ThrowError message. Also converts values to other types if specified.
+ * Creates a plain object from an ImageTransformation message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} message ThrowError
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} message ImageTransformation
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- ThrowError.toObject = function toObject() {
- return {};
+ ImageTransformation.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.redactionColor = null;
+ if (message.redactionColor != null && message.hasOwnProperty("redactionColor"))
+ object.redactionColor = $root.google.privacy.dlp.v2.Color.toObject(message.redactionColor, options);
+ if (message.selectedInfoTypes != null && message.hasOwnProperty("selectedInfoTypes")) {
+ object.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.toObject(message.selectedInfoTypes, options);
+ if (options.oneofs)
+ object.target = "selectedInfoTypes";
+ }
+ if (message.allInfoTypes != null && message.hasOwnProperty("allInfoTypes")) {
+ object.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.toObject(message.allInfoTypes, options);
+ if (options.oneofs)
+ object.target = "allInfoTypes";
+ }
+ if (message.allText != null && message.hasOwnProperty("allText")) {
+ object.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.toObject(message.allText, options);
+ if (options.oneofs)
+ object.target = "allText";
+ }
+ return object;
};
/**
- * Converts this ThrowError to JSON.
+ * Converts this ImageTransformation to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @instance
* @returns {Object.} JSON object
*/
- ThrowError.prototype.toJSON = function toJSON() {
+ ImageTransformation.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for ThrowError
+ * Gets the default type url for ImageTransformation
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- ThrowError.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ ImageTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.ThrowError";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation";
};
- return ThrowError;
- })();
+ ImageTransformation.SelectedInfoTypes = (function() {
- TransformationErrorHandling.LeaveUntransformed = (function() {
+ /**
+ * Properties of a SelectedInfoTypes.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @interface ISelectedInfoTypes
+ * @property {Array.|null} [infoTypes] SelectedInfoTypes infoTypes
+ */
- /**
- * Properties of a LeaveUntransformed.
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @interface ILeaveUntransformed
- */
+ /**
+ * Constructs a new SelectedInfoTypes.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @classdesc Represents a SelectedInfoTypes.
+ * @implements ISelectedInfoTypes
+ * @constructor
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes=} [properties] Properties to set
+ */
+ function SelectedInfoTypes(properties) {
+ this.infoTypes = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Constructs a new LeaveUntransformed.
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling
- * @classdesc Represents a LeaveUntransformed.
- * @implements ILeaveUntransformed
- * @constructor
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set
- */
- function LeaveUntransformed(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * SelectedInfoTypes infoTypes.
+ * @member {Array.} infoTypes
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @instance
+ */
+ SelectedInfoTypes.prototype.infoTypes = $util.emptyArray;
- /**
- * Creates a new LeaveUntransformed instance using the specified properties.
- * @function create
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed instance
- */
- LeaveUntransformed.create = function create(properties) {
- return new LeaveUntransformed(properties);
- };
+ /**
+ * Creates a new SelectedInfoTypes instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes instance
+ */
+ SelectedInfoTypes.create = function create(properties) {
+ return new SelectedInfoTypes(properties);
+ };
- /**
- * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
- * @function encode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- LeaveUntransformed.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- return writer;
- };
+ /**
+ * Encodes the specified SelectedInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes} message SelectedInfoTypes message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SelectedInfoTypes.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.infoTypes != null && message.infoTypes.length)
+ for (var i = 0; i < message.infoTypes.length; ++i)
+ $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ return writer;
+ };
- /**
- * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- LeaveUntransformed.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * Encodes the specified SelectedInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes} message SelectedInfoTypes message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SelectedInfoTypes.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Decodes a LeaveUntransformed message from the specified reader or buffer.
- * @function decode
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- LeaveUntransformed.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- default:
- reader.skipType(tag & 7);
- break;
+ /**
+ * Decodes a SelectedInfoTypes message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SelectedInfoTypes.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 5: {
+ if (!(message.infoTypes && message.infoTypes.length))
+ message.infoTypes = [];
+ message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
}
- }
- return message;
- };
+ return message;
+ };
- /**
- * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- LeaveUntransformed.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Decodes a SelectedInfoTypes message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SelectedInfoTypes.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
- /**
- * Verifies a LeaveUntransformed message.
- * @function verify
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- LeaveUntransformed.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- return null;
- };
+ /**
+ * Verifies a SelectedInfoTypes message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ SelectedInfoTypes.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) {
+ if (!Array.isArray(message.infoTypes))
+ return "infoTypes: array expected";
+ for (var i = 0; i < message.infoTypes.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i]);
+ if (error)
+ return "infoTypes." + error;
+ }
+ }
+ return null;
+ };
- /**
- * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
- */
- LeaveUntransformed.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)
+ /**
+ * Creates a SelectedInfoTypes message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes
+ */
+ SelectedInfoTypes.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes();
+ if (object.infoTypes) {
+ if (!Array.isArray(object.infoTypes))
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.infoTypes: array expected");
+ message.infoTypes = [];
+ for (var i = 0; i < object.infoTypes.length; ++i) {
+ if (typeof object.infoTypes[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.infoTypes: object expected");
+ message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a SelectedInfoTypes message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} message SelectedInfoTypes
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ SelectedInfoTypes.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.infoTypes = [];
+ if (message.infoTypes && message.infoTypes.length) {
+ object.infoTypes = [];
+ for (var j = 0; j < message.infoTypes.length; ++j)
+ object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options);
+ }
return object;
- return new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed();
- };
+ };
- /**
- * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} message LeaveUntransformed
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- LeaveUntransformed.toObject = function toObject() {
- return {};
- };
+ /**
+ * Converts this SelectedInfoTypes to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SelectedInfoTypes.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- /**
- * Converts this LeaveUntransformed to JSON.
- * @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @instance
- * @returns {Object.} JSON object
- */
- LeaveUntransformed.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Gets the default type url for SelectedInfoTypes
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SelectedInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes";
+ };
- /**
- * Gets the default type url for LeaveUntransformed
- * @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- LeaveUntransformed.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
+ return SelectedInfoTypes;
+ })();
+
+ ImageTransformation.AllInfoTypes = (function() {
+
+ /**
+ * Properties of an AllInfoTypes.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @interface IAllInfoTypes
+ */
+
+ /**
+ * Constructs a new AllInfoTypes.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @classdesc Represents an AllInfoTypes.
+ * @implements IAllInfoTypes
+ * @constructor
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes=} [properties] Properties to set
+ */
+ function AllInfoTypes(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed";
- };
- return LeaveUntransformed;
+ /**
+ * Creates a new AllInfoTypes instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes instance
+ */
+ AllInfoTypes.create = function create(properties) {
+ return new AllInfoTypes(properties);
+ };
+
+ /**
+ * Encodes the specified AllInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes} message AllInfoTypes message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AllInfoTypes.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AllInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes} message AllInfoTypes message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AllInfoTypes.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AllInfoTypes message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AllInfoTypes.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AllInfoTypes message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AllInfoTypes.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AllInfoTypes message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AllInfoTypes.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates an AllInfoTypes message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes
+ */
+ AllInfoTypes.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)
+ return object;
+ return new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes();
+ };
+
+ /**
+ * Creates a plain object from an AllInfoTypes message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} message AllInfoTypes
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AllInfoTypes.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this AllInfoTypes to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AllInfoTypes.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AllInfoTypes
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AllInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes";
+ };
+
+ return AllInfoTypes;
+ })();
+
+ ImageTransformation.AllText = (function() {
+
+ /**
+ * Properties of an AllText.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @interface IAllText
+ */
+
+ /**
+ * Constructs a new AllText.
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+ * @classdesc Represents an AllText.
+ * @implements IAllText
+ * @constructor
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText=} [properties] Properties to set
+ */
+ function AllText(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Creates a new AllText instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText instance
+ */
+ AllText.create = function create(properties) {
+ return new AllText(properties);
+ };
+
+ /**
+ * Encodes the specified AllText message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText} message AllText message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AllText.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified AllText message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText} message AllText message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ AllText.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an AllText message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AllText.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an AllText message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ AllText.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an AllText message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ AllText.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates an AllText message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText
+ */
+ AllText.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)
+ return object;
+ return new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText();
+ };
+
+ /**
+ * Creates a plain object from an AllText message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} message AllText
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ AllText.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this AllText to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ AllText.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for AllText
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ AllText.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText";
+ };
+
+ return AllText;
+ })();
+
+ return ImageTransformation;
})();
- return TransformationErrorHandling;
+ return ImageTransformations;
})();
- v2.PrimitiveTransformation = (function() {
+ v2.TransformationErrorHandling = (function() {
/**
- * Properties of a PrimitiveTransformation.
+ * Properties of a TransformationErrorHandling.
* @memberof google.privacy.dlp.v2
- * @interface IPrimitiveTransformation
- * @property {google.privacy.dlp.v2.IReplaceValueConfig|null} [replaceConfig] PrimitiveTransformation replaceConfig
- * @property {google.privacy.dlp.v2.IRedactConfig|null} [redactConfig] PrimitiveTransformation redactConfig
- * @property {google.privacy.dlp.v2.ICharacterMaskConfig|null} [characterMaskConfig] PrimitiveTransformation characterMaskConfig
- * @property {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null} [cryptoReplaceFfxFpeConfig] PrimitiveTransformation cryptoReplaceFfxFpeConfig
- * @property {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null} [fixedSizeBucketingConfig] PrimitiveTransformation fixedSizeBucketingConfig
- * @property {google.privacy.dlp.v2.IBucketingConfig|null} [bucketingConfig] PrimitiveTransformation bucketingConfig
- * @property {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null} [replaceWithInfoTypeConfig] PrimitiveTransformation replaceWithInfoTypeConfig
- * @property {google.privacy.dlp.v2.ITimePartConfig|null} [timePartConfig] PrimitiveTransformation timePartConfig
- * @property {google.privacy.dlp.v2.ICryptoHashConfig|null} [cryptoHashConfig] PrimitiveTransformation cryptoHashConfig
- * @property {google.privacy.dlp.v2.IDateShiftConfig|null} [dateShiftConfig] PrimitiveTransformation dateShiftConfig
- * @property {google.privacy.dlp.v2.ICryptoDeterministicConfig|null} [cryptoDeterministicConfig] PrimitiveTransformation cryptoDeterministicConfig
- * @property {google.privacy.dlp.v2.IReplaceDictionaryConfig|null} [replaceDictionaryConfig] PrimitiveTransformation replaceDictionaryConfig
+ * @interface ITransformationErrorHandling
+ * @property {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null} [throwError] TransformationErrorHandling throwError
+ * @property {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null} [leaveUntransformed] TransformationErrorHandling leaveUntransformed
*/
/**
- * Constructs a new PrimitiveTransformation.
+ * Constructs a new TransformationErrorHandling.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a PrimitiveTransformation.
- * @implements IPrimitiveTransformation
+ * @classdesc Represents a TransformationErrorHandling.
+ * @implements ITransformationErrorHandling
* @constructor
- * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set
*/
- function PrimitiveTransformation(properties) {
+ function TransformationErrorHandling(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -25679,243 +26487,103 @@
}
/**
- * PrimitiveTransformation replaceConfig.
- * @member {google.privacy.dlp.v2.IReplaceValueConfig|null|undefined} replaceConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * TransformationErrorHandling throwError.
+ * @member {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null|undefined} throwError
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @instance
*/
- PrimitiveTransformation.prototype.replaceConfig = null;
+ TransformationErrorHandling.prototype.throwError = null;
/**
- * PrimitiveTransformation redactConfig.
- * @member {google.privacy.dlp.v2.IRedactConfig|null|undefined} redactConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.redactConfig = null;
-
- /**
- * PrimitiveTransformation characterMaskConfig.
- * @member {google.privacy.dlp.v2.ICharacterMaskConfig|null|undefined} characterMaskConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.characterMaskConfig = null;
-
- /**
- * PrimitiveTransformation cryptoReplaceFfxFpeConfig.
- * @member {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null|undefined} cryptoReplaceFfxFpeConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.cryptoReplaceFfxFpeConfig = null;
-
- /**
- * PrimitiveTransformation fixedSizeBucketingConfig.
- * @member {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null|undefined} fixedSizeBucketingConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.fixedSizeBucketingConfig = null;
-
- /**
- * PrimitiveTransformation bucketingConfig.
- * @member {google.privacy.dlp.v2.IBucketingConfig|null|undefined} bucketingConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.bucketingConfig = null;
-
- /**
- * PrimitiveTransformation replaceWithInfoTypeConfig.
- * @member {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null|undefined} replaceWithInfoTypeConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.replaceWithInfoTypeConfig = null;
-
- /**
- * PrimitiveTransformation timePartConfig.
- * @member {google.privacy.dlp.v2.ITimePartConfig|null|undefined} timePartConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.timePartConfig = null;
-
- /**
- * PrimitiveTransformation cryptoHashConfig.
- * @member {google.privacy.dlp.v2.ICryptoHashConfig|null|undefined} cryptoHashConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.cryptoHashConfig = null;
-
- /**
- * PrimitiveTransformation dateShiftConfig.
- * @member {google.privacy.dlp.v2.IDateShiftConfig|null|undefined} dateShiftConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.dateShiftConfig = null;
-
- /**
- * PrimitiveTransformation cryptoDeterministicConfig.
- * @member {google.privacy.dlp.v2.ICryptoDeterministicConfig|null|undefined} cryptoDeterministicConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
- * @instance
- */
- PrimitiveTransformation.prototype.cryptoDeterministicConfig = null;
-
- /**
- * PrimitiveTransformation replaceDictionaryConfig.
- * @member {google.privacy.dlp.v2.IReplaceDictionaryConfig|null|undefined} replaceDictionaryConfig
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * TransformationErrorHandling leaveUntransformed.
+ * @member {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null|undefined} leaveUntransformed
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @instance
*/
- PrimitiveTransformation.prototype.replaceDictionaryConfig = null;
+ TransformationErrorHandling.prototype.leaveUntransformed = null;
// OneOf field names bound to virtual getters and setters
var $oneOfFields;
/**
- * PrimitiveTransformation transformation.
- * @member {"replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig"|undefined} transformation
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * TransformationErrorHandling mode.
+ * @member {"throwError"|"leaveUntransformed"|undefined} mode
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @instance
*/
- Object.defineProperty(PrimitiveTransformation.prototype, "transformation", {
- get: $util.oneOfGetter($oneOfFields = ["replaceConfig", "redactConfig", "characterMaskConfig", "cryptoReplaceFfxFpeConfig", "fixedSizeBucketingConfig", "bucketingConfig", "replaceWithInfoTypeConfig", "timePartConfig", "cryptoHashConfig", "dateShiftConfig", "cryptoDeterministicConfig", "replaceDictionaryConfig"]),
+ Object.defineProperty(TransformationErrorHandling.prototype, "mode", {
+ get: $util.oneOfGetter($oneOfFields = ["throwError", "leaveUntransformed"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
- * Creates a new PrimitiveTransformation instance using the specified properties.
+ * Creates a new TransformationErrorHandling instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
- * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation instance
+ * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling instance
*/
- PrimitiveTransformation.create = function create(properties) {
- return new PrimitiveTransformation(properties);
+ TransformationErrorHandling.create = function create(properties) {
+ return new TransformationErrorHandling(properties);
};
/**
- * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
+ * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
- * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- PrimitiveTransformation.encode = function encode(message, writer) {
+ TransformationErrorHandling.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.replaceConfig != null && Object.hasOwnProperty.call(message, "replaceConfig"))
- $root.google.privacy.dlp.v2.ReplaceValueConfig.encode(message.replaceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.redactConfig != null && Object.hasOwnProperty.call(message, "redactConfig"))
- $root.google.privacy.dlp.v2.RedactConfig.encode(message.redactConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.characterMaskConfig != null && Object.hasOwnProperty.call(message, "characterMaskConfig"))
- $root.google.privacy.dlp.v2.CharacterMaskConfig.encode(message.characterMaskConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.cryptoReplaceFfxFpeConfig != null && Object.hasOwnProperty.call(message, "cryptoReplaceFfxFpeConfig"))
- $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.encode(message.cryptoReplaceFfxFpeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.fixedSizeBucketingConfig != null && Object.hasOwnProperty.call(message, "fixedSizeBucketingConfig"))
- $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.encode(message.fixedSizeBucketingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.bucketingConfig != null && Object.hasOwnProperty.call(message, "bucketingConfig"))
- $root.google.privacy.dlp.v2.BucketingConfig.encode(message.bucketingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.replaceWithInfoTypeConfig != null && Object.hasOwnProperty.call(message, "replaceWithInfoTypeConfig"))
- $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.encode(message.replaceWithInfoTypeConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.timePartConfig != null && Object.hasOwnProperty.call(message, "timePartConfig"))
- $root.google.privacy.dlp.v2.TimePartConfig.encode(message.timePartConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- if (message.cryptoHashConfig != null && Object.hasOwnProperty.call(message, "cryptoHashConfig"))
- $root.google.privacy.dlp.v2.CryptoHashConfig.encode(message.cryptoHashConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.dateShiftConfig != null && Object.hasOwnProperty.call(message, "dateShiftConfig"))
- $root.google.privacy.dlp.v2.DateShiftConfig.encode(message.dateShiftConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
- if (message.cryptoDeterministicConfig != null && Object.hasOwnProperty.call(message, "cryptoDeterministicConfig"))
- $root.google.privacy.dlp.v2.CryptoDeterministicConfig.encode(message.cryptoDeterministicConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
- if (message.replaceDictionaryConfig != null && Object.hasOwnProperty.call(message, "replaceDictionaryConfig"))
- $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.encode(message.replaceDictionaryConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
+ if (message.throwError != null && Object.hasOwnProperty.call(message, "throwError"))
+ $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.encode(message.throwError, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.leaveUntransformed != null && Object.hasOwnProperty.call(message, "leaveUntransformed"))
+ $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.encode(message.leaveUntransformed, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
+ * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
- * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- PrimitiveTransformation.encodeDelimited = function encodeDelimited(message, writer) {
+ TransformationErrorHandling.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a PrimitiveTransformation message from the specified reader or buffer.
+ * Decodes a TransformationErrorHandling message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- PrimitiveTransformation.decode = function decode(reader, length) {
+ TransformationErrorHandling.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrimitiveTransformation();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.decode(reader, reader.uint32());
+ message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.decode(reader, reader.uint32());
break;
}
case 2: {
- message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.decode(reader, reader.uint32());
- break;
- }
- case 6: {
- message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.decode(reader, reader.uint32());
- break;
- }
- case 7: {
- message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.decode(reader, reader.uint32());
- break;
- }
- case 8: {
- message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.decode(reader, reader.uint32());
- break;
- }
- case 9: {
- message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.decode(reader, reader.uint32());
- break;
- }
- case 11: {
- message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.decode(reader, reader.uint32());
- break;
- }
- case 12: {
- message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.decode(reader, reader.uint32());
- break;
- }
- case 13: {
- message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.decode(reader, reader.uint32());
+ message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.decode(reader, reader.uint32());
break;
}
default:
@@ -25927,352 +26595,513 @@
};
/**
- * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- PrimitiveTransformation.decodeDelimited = function decodeDelimited(reader) {
+ TransformationErrorHandling.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a PrimitiveTransformation message.
+ * Verifies a TransformationErrorHandling message.
* @function verify
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- PrimitiveTransformation.verify = function verify(message) {
+ TransformationErrorHandling.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
var properties = {};
- if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) {
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.ReplaceValueConfig.verify(message.replaceConfig);
- if (error)
- return "replaceConfig." + error;
- }
- }
- if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.RedactConfig.verify(message.redactConfig);
- if (error)
- return "redactConfig." + error;
- }
- }
- if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.CharacterMaskConfig.verify(message.characterMaskConfig);
- if (error)
- return "characterMaskConfig." + error;
- }
- }
- if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify(message.cryptoReplaceFfxFpeConfig);
- if (error)
- return "cryptoReplaceFfxFpeConfig." + error;
- }
- }
- if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.verify(message.fixedSizeBucketingConfig);
- if (error)
- return "fixedSizeBucketingConfig." + error;
- }
- }
- if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.BucketingConfig.verify(message.bucketingConfig);
- if (error)
- return "bucketingConfig." + error;
- }
- }
- if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify(message.replaceWithInfoTypeConfig);
- if (error)
- return "replaceWithInfoTypeConfig." + error;
- }
- }
- if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.TimePartConfig.verify(message.timePartConfig);
- if (error)
- return "timePartConfig." + error;
- }
- }
- if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.CryptoHashConfig.verify(message.cryptoHashConfig);
- if (error)
- return "cryptoHashConfig." + error;
- }
- }
- if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
- {
- var error = $root.google.privacy.dlp.v2.DateShiftConfig.verify(message.dateShiftConfig);
- if (error)
- return "dateShiftConfig." + error;
- }
- }
- if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
+ if (message.throwError != null && message.hasOwnProperty("throwError")) {
+ properties.mode = 1;
{
- var error = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.verify(message.cryptoDeterministicConfig);
+ var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify(message.throwError);
if (error)
- return "cryptoDeterministicConfig." + error;
+ return "throwError." + error;
}
}
- if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) {
- if (properties.transformation === 1)
- return "transformation: multiple values";
- properties.transformation = 1;
+ if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) {
+ if (properties.mode === 1)
+ return "mode: multiple values";
+ properties.mode = 1;
{
- var error = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.verify(message.replaceDictionaryConfig);
+ var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify(message.leaveUntransformed);
if (error)
- return "replaceDictionaryConfig." + error;
+ return "leaveUntransformed." + error;
}
}
return null;
};
/**
- * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling
*/
- PrimitiveTransformation.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.PrimitiveTransformation)
+ TransformationErrorHandling.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling)
return object;
- var message = new $root.google.privacy.dlp.v2.PrimitiveTransformation();
- if (object.replaceConfig != null) {
- if (typeof object.replaceConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceConfig: object expected");
- message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.fromObject(object.replaceConfig);
- }
- if (object.redactConfig != null) {
- if (typeof object.redactConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.redactConfig: object expected");
- message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.fromObject(object.redactConfig);
- }
- if (object.characterMaskConfig != null) {
- if (typeof object.characterMaskConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.characterMaskConfig: object expected");
- message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.fromObject(object.characterMaskConfig);
- }
- if (object.cryptoReplaceFfxFpeConfig != null) {
- if (typeof object.cryptoReplaceFfxFpeConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoReplaceFfxFpeConfig: object expected");
- message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.fromObject(object.cryptoReplaceFfxFpeConfig);
- }
- if (object.fixedSizeBucketingConfig != null) {
- if (typeof object.fixedSizeBucketingConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.fixedSizeBucketingConfig: object expected");
- message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.fromObject(object.fixedSizeBucketingConfig);
- }
- if (object.bucketingConfig != null) {
- if (typeof object.bucketingConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.bucketingConfig: object expected");
- message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.fromObject(object.bucketingConfig);
- }
- if (object.replaceWithInfoTypeConfig != null) {
- if (typeof object.replaceWithInfoTypeConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceWithInfoTypeConfig: object expected");
- message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.fromObject(object.replaceWithInfoTypeConfig);
- }
- if (object.timePartConfig != null) {
- if (typeof object.timePartConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.timePartConfig: object expected");
- message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.fromObject(object.timePartConfig);
- }
- if (object.cryptoHashConfig != null) {
- if (typeof object.cryptoHashConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoHashConfig: object expected");
- message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.fromObject(object.cryptoHashConfig);
- }
- if (object.dateShiftConfig != null) {
- if (typeof object.dateShiftConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.dateShiftConfig: object expected");
- message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.fromObject(object.dateShiftConfig);
- }
- if (object.cryptoDeterministicConfig != null) {
- if (typeof object.cryptoDeterministicConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoDeterministicConfig: object expected");
- message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.fromObject(object.cryptoDeterministicConfig);
+ var message = new $root.google.privacy.dlp.v2.TransformationErrorHandling();
+ if (object.throwError != null) {
+ if (typeof object.throwError !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.throwError: object expected");
+ message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.fromObject(object.throwError);
}
- if (object.replaceDictionaryConfig != null) {
- if (typeof object.replaceDictionaryConfig !== "object")
- throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceDictionaryConfig: object expected");
- message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.fromObject(object.replaceDictionaryConfig);
+ if (object.leaveUntransformed != null) {
+ if (typeof object.leaveUntransformed !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.leaveUntransformed: object expected");
+ message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.fromObject(object.leaveUntransformed);
}
return message;
};
/**
- * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified.
+ * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
- * @param {google.privacy.dlp.v2.PrimitiveTransformation} message PrimitiveTransformation
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling} message TransformationErrorHandling
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- PrimitiveTransformation.toObject = function toObject(message, options) {
+ TransformationErrorHandling.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) {
- object.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.toObject(message.replaceConfig, options);
- if (options.oneofs)
- object.transformation = "replaceConfig";
- }
- if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) {
- object.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.toObject(message.redactConfig, options);
- if (options.oneofs)
- object.transformation = "redactConfig";
- }
- if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) {
- object.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.toObject(message.characterMaskConfig, options);
- if (options.oneofs)
- object.transformation = "characterMaskConfig";
- }
- if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) {
- object.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.toObject(message.cryptoReplaceFfxFpeConfig, options);
- if (options.oneofs)
- object.transformation = "cryptoReplaceFfxFpeConfig";
- }
- if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) {
- object.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.toObject(message.fixedSizeBucketingConfig, options);
- if (options.oneofs)
- object.transformation = "fixedSizeBucketingConfig";
- }
- if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) {
- object.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.toObject(message.bucketingConfig, options);
- if (options.oneofs)
- object.transformation = "bucketingConfig";
- }
- if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) {
- object.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.toObject(message.replaceWithInfoTypeConfig, options);
- if (options.oneofs)
- object.transformation = "replaceWithInfoTypeConfig";
- }
- if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) {
- object.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.toObject(message.timePartConfig, options);
- if (options.oneofs)
- object.transformation = "timePartConfig";
- }
- if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) {
- object.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.toObject(message.cryptoHashConfig, options);
- if (options.oneofs)
- object.transformation = "cryptoHashConfig";
- }
- if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) {
- object.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.toObject(message.dateShiftConfig, options);
- if (options.oneofs)
- object.transformation = "dateShiftConfig";
- }
- if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) {
- object.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.toObject(message.cryptoDeterministicConfig, options);
+ if (message.throwError != null && message.hasOwnProperty("throwError")) {
+ object.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.toObject(message.throwError, options);
if (options.oneofs)
- object.transformation = "cryptoDeterministicConfig";
+ object.mode = "throwError";
}
- if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) {
- object.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.toObject(message.replaceDictionaryConfig, options);
+ if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) {
+ object.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.toObject(message.leaveUntransformed, options);
if (options.oneofs)
- object.transformation = "replaceDictionaryConfig";
+ object.mode = "leaveUntransformed";
}
return object;
};
/**
- * Converts this PrimitiveTransformation to JSON.
+ * Converts this TransformationErrorHandling to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @instance
* @returns {Object.} JSON object
*/
- PrimitiveTransformation.prototype.toJSON = function toJSON() {
+ TransformationErrorHandling.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for PrimitiveTransformation
+ * Gets the default type url for TransformationErrorHandling
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- PrimitiveTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ TransformationErrorHandling.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.PrimitiveTransformation";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling";
};
- return PrimitiveTransformation;
- })();
+ TransformationErrorHandling.ThrowError = (function() {
- v2.TimePartConfig = (function() {
+ /**
+ * Properties of a ThrowError.
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @interface IThrowError
+ */
- /**
- * Properties of a TimePartConfig.
+ /**
+ * Constructs a new ThrowError.
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @classdesc Represents a ThrowError.
+ * @implements IThrowError
+ * @constructor
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set
+ */
+ function ThrowError(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Creates a new ThrowError instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError instance
+ */
+ ThrowError.create = function create(properties) {
+ return new ThrowError(properties);
+ };
+
+ /**
+ * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ThrowError.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ThrowError.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ThrowError message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ThrowError.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ThrowError message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ThrowError.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ThrowError message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ThrowError.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates a ThrowError message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError
+ */
+ ThrowError.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)
+ return object;
+ return new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError();
+ };
+
+ /**
+ * Creates a plain object from a ThrowError message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} message ThrowError
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ThrowError.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this ThrowError to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ThrowError.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ThrowError
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ThrowError.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.ThrowError";
+ };
+
+ return ThrowError;
+ })();
+
+ TransformationErrorHandling.LeaveUntransformed = (function() {
+
+ /**
+ * Properties of a LeaveUntransformed.
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @interface ILeaveUntransformed
+ */
+
+ /**
+ * Constructs a new LeaveUntransformed.
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling
+ * @classdesc Represents a LeaveUntransformed.
+ * @implements ILeaveUntransformed
+ * @constructor
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set
+ */
+ function LeaveUntransformed(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Creates a new LeaveUntransformed instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed instance
+ */
+ LeaveUntransformed.create = function create(properties) {
+ return new LeaveUntransformed(properties);
+ };
+
+ /**
+ * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LeaveUntransformed.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ LeaveUntransformed.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a LeaveUntransformed message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LeaveUntransformed.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ LeaveUntransformed.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a LeaveUntransformed message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ LeaveUntransformed.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ return null;
+ };
+
+ /**
+ * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed
+ */
+ LeaveUntransformed.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)
+ return object;
+ return new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed();
+ };
+
+ /**
+ * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} message LeaveUntransformed
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ LeaveUntransformed.toObject = function toObject() {
+ return {};
+ };
+
+ /**
+ * Converts this LeaveUntransformed to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ LeaveUntransformed.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for LeaveUntransformed
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ LeaveUntransformed.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed";
+ };
+
+ return LeaveUntransformed;
+ })();
+
+ return TransformationErrorHandling;
+ })();
+
+ v2.PrimitiveTransformation = (function() {
+
+ /**
+ * Properties of a PrimitiveTransformation.
* @memberof google.privacy.dlp.v2
- * @interface ITimePartConfig
- * @property {google.privacy.dlp.v2.TimePartConfig.TimePart|null} [partToExtract] TimePartConfig partToExtract
+ * @interface IPrimitiveTransformation
+ * @property {google.privacy.dlp.v2.IReplaceValueConfig|null} [replaceConfig] PrimitiveTransformation replaceConfig
+ * @property {google.privacy.dlp.v2.IRedactConfig|null} [redactConfig] PrimitiveTransformation redactConfig
+ * @property {google.privacy.dlp.v2.ICharacterMaskConfig|null} [characterMaskConfig] PrimitiveTransformation characterMaskConfig
+ * @property {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null} [cryptoReplaceFfxFpeConfig] PrimitiveTransformation cryptoReplaceFfxFpeConfig
+ * @property {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null} [fixedSizeBucketingConfig] PrimitiveTransformation fixedSizeBucketingConfig
+ * @property {google.privacy.dlp.v2.IBucketingConfig|null} [bucketingConfig] PrimitiveTransformation bucketingConfig
+ * @property {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null} [replaceWithInfoTypeConfig] PrimitiveTransformation replaceWithInfoTypeConfig
+ * @property {google.privacy.dlp.v2.ITimePartConfig|null} [timePartConfig] PrimitiveTransformation timePartConfig
+ * @property {google.privacy.dlp.v2.ICryptoHashConfig|null} [cryptoHashConfig] PrimitiveTransformation cryptoHashConfig
+ * @property {google.privacy.dlp.v2.IDateShiftConfig|null} [dateShiftConfig] PrimitiveTransformation dateShiftConfig
+ * @property {google.privacy.dlp.v2.ICryptoDeterministicConfig|null} [cryptoDeterministicConfig] PrimitiveTransformation cryptoDeterministicConfig
+ * @property {google.privacy.dlp.v2.IReplaceDictionaryConfig|null} [replaceDictionaryConfig] PrimitiveTransformation replaceDictionaryConfig
*/
/**
- * Constructs a new TimePartConfig.
+ * Constructs a new PrimitiveTransformation.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a TimePartConfig.
- * @implements ITimePartConfig
+ * @classdesc Represents a PrimitiveTransformation.
+ * @implements IPrimitiveTransformation
* @constructor
- * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set
*/
- function TimePartConfig(properties) {
+ function PrimitiveTransformation(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -26280,340 +27109,243 @@
}
/**
- * TimePartConfig partToExtract.
- * @member {google.privacy.dlp.v2.TimePartConfig.TimePart} partToExtract
- * @memberof google.privacy.dlp.v2.TimePartConfig
+ * PrimitiveTransformation replaceConfig.
+ * @member {google.privacy.dlp.v2.IReplaceValueConfig|null|undefined} replaceConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @instance
*/
- TimePartConfig.prototype.partToExtract = 0;
+ PrimitiveTransformation.prototype.replaceConfig = null;
/**
- * Creates a new TimePartConfig instance using the specified properties.
- * @function create
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig instance
+ * PrimitiveTransformation redactConfig.
+ * @member {google.privacy.dlp.v2.IRedactConfig|null|undefined} redactConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.create = function create(properties) {
- return new TimePartConfig(properties);
- };
+ PrimitiveTransformation.prototype.redactConfig = null;
/**
- * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
- * @function encode
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
+ * PrimitiveTransformation characterMaskConfig.
+ * @member {google.privacy.dlp.v2.ICharacterMaskConfig|null|undefined} characterMaskConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.partToExtract != null && Object.hasOwnProperty.call(message, "partToExtract"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partToExtract);
- return writer;
- };
+ PrimitiveTransformation.prototype.characterMaskConfig = null;
/**
- * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
+ * PrimitiveTransformation cryptoReplaceFfxFpeConfig.
+ * @member {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null|undefined} cryptoReplaceFfxFpeConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ PrimitiveTransformation.prototype.cryptoReplaceFfxFpeConfig = null;
/**
- * Decodes a TimePartConfig message from the specified reader or buffer.
- * @function decode
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ * PrimitiveTransformation fixedSizeBucketingConfig.
+ * @member {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null|undefined} fixedSizeBucketingConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TimePartConfig();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.partToExtract = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ PrimitiveTransformation.prototype.fixedSizeBucketingConfig = null;
/**
- * Decodes a TimePartConfig message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ * PrimitiveTransformation bucketingConfig.
+ * @member {google.privacy.dlp.v2.IBucketingConfig|null|undefined} bucketingConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ PrimitiveTransformation.prototype.bucketingConfig = null;
/**
- * Verifies a TimePartConfig message.
- * @function verify
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ * PrimitiveTransformation replaceWithInfoTypeConfig.
+ * @member {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null|undefined} replaceWithInfoTypeConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.partToExtract != null && message.hasOwnProperty("partToExtract"))
- switch (message.partToExtract) {
- default:
- return "partToExtract: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- break;
- }
- return null;
- };
+ PrimitiveTransformation.prototype.replaceWithInfoTypeConfig = null;
/**
- * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
- */
- TimePartConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TimePartConfig)
- return object;
- var message = new $root.google.privacy.dlp.v2.TimePartConfig();
- switch (object.partToExtract) {
- case "TIME_PART_UNSPECIFIED":
- case 0:
- message.partToExtract = 0;
- break;
- case "YEAR":
- case 1:
- message.partToExtract = 1;
- break;
- case "MONTH":
- case 2:
- message.partToExtract = 2;
- break;
- case "DAY_OF_MONTH":
- case 3:
- message.partToExtract = 3;
- break;
- case "DAY_OF_WEEK":
- case 4:
- message.partToExtract = 4;
- break;
- case "WEEK_OF_YEAR":
- case 5:
- message.partToExtract = 5;
- break;
- case "HOUR_OF_DAY":
- case 6:
- message.partToExtract = 6;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {google.privacy.dlp.v2.TimePartConfig} message TimePartConfig
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
+ * PrimitiveTransformation timePartConfig.
+ * @member {google.privacy.dlp.v2.ITimePartConfig|null|undefined} timePartConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.partToExtract = options.enums === String ? "TIME_PART_UNSPECIFIED" : 0;
- if (message.partToExtract != null && message.hasOwnProperty("partToExtract"))
- object.partToExtract = options.enums === String ? $root.google.privacy.dlp.v2.TimePartConfig.TimePart[message.partToExtract] : message.partToExtract;
- return object;
- };
+ PrimitiveTransformation.prototype.timePartConfig = null;
/**
- * Converts this TimePartConfig to JSON.
- * @function toJSON
- * @memberof google.privacy.dlp.v2.TimePartConfig
+ * PrimitiveTransformation cryptoHashConfig.
+ * @member {google.privacy.dlp.v2.ICryptoHashConfig|null|undefined} cryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @instance
- * @returns {Object.} JSON object
*/
- TimePartConfig.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ PrimitiveTransformation.prototype.cryptoHashConfig = null;
/**
- * Gets the default type url for TimePartConfig
- * @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TimePartConfig
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
+ * PrimitiveTransformation dateShiftConfig.
+ * @member {google.privacy.dlp.v2.IDateShiftConfig|null|undefined} dateShiftConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.privacy.dlp.v2.TimePartConfig";
- };
+ PrimitiveTransformation.prototype.dateShiftConfig = null;
/**
- * TimePart enum.
- * @name google.privacy.dlp.v2.TimePartConfig.TimePart
- * @enum {number}
- * @property {number} TIME_PART_UNSPECIFIED=0 TIME_PART_UNSPECIFIED value
- * @property {number} YEAR=1 YEAR value
- * @property {number} MONTH=2 MONTH value
- * @property {number} DAY_OF_MONTH=3 DAY_OF_MONTH value
- * @property {number} DAY_OF_WEEK=4 DAY_OF_WEEK value
- * @property {number} WEEK_OF_YEAR=5 WEEK_OF_YEAR value
- * @property {number} HOUR_OF_DAY=6 HOUR_OF_DAY value
+ * PrimitiveTransformation cryptoDeterministicConfig.
+ * @member {google.privacy.dlp.v2.ICryptoDeterministicConfig|null|undefined} cryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
- TimePartConfig.TimePart = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "TIME_PART_UNSPECIFIED"] = 0;
- values[valuesById[1] = "YEAR"] = 1;
- values[valuesById[2] = "MONTH"] = 2;
- values[valuesById[3] = "DAY_OF_MONTH"] = 3;
- values[valuesById[4] = "DAY_OF_WEEK"] = 4;
- values[valuesById[5] = "WEEK_OF_YEAR"] = 5;
- values[valuesById[6] = "HOUR_OF_DAY"] = 6;
- return values;
- })();
-
- return TimePartConfig;
- })();
-
- v2.CryptoHashConfig = (function() {
+ PrimitiveTransformation.prototype.cryptoDeterministicConfig = null;
/**
- * Properties of a CryptoHashConfig.
- * @memberof google.privacy.dlp.v2
- * @interface ICryptoHashConfig
- * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoHashConfig cryptoKey
+ * PrimitiveTransformation replaceDictionaryConfig.
+ * @member {google.privacy.dlp.v2.IReplaceDictionaryConfig|null|undefined} replaceDictionaryConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
*/
+ PrimitiveTransformation.prototype.replaceDictionaryConfig = null;
- /**
- * Constructs a new CryptoHashConfig.
- * @memberof google.privacy.dlp.v2
- * @classdesc Represents a CryptoHashConfig.
- * @implements ICryptoHashConfig
- * @constructor
- * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set
- */
- function CryptoHashConfig(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
/**
- * CryptoHashConfig cryptoKey.
- * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * PrimitiveTransformation transformation.
+ * @member {"replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig"|undefined} transformation
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @instance
*/
- CryptoHashConfig.prototype.cryptoKey = null;
+ Object.defineProperty(PrimitiveTransformation.prototype, "transformation", {
+ get: $util.oneOfGetter($oneOfFields = ["replaceConfig", "redactConfig", "characterMaskConfig", "cryptoReplaceFfxFpeConfig", "fixedSizeBucketingConfig", "bucketingConfig", "replaceWithInfoTypeConfig", "timePartConfig", "cryptoHashConfig", "dateShiftConfig", "cryptoDeterministicConfig", "replaceDictionaryConfig"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
/**
- * Creates a new CryptoHashConfig instance using the specified properties.
+ * Creates a new PrimitiveTransformation instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
- * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig instance
+ * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation instance
*/
- CryptoHashConfig.create = function create(properties) {
- return new CryptoHashConfig(properties);
+ PrimitiveTransformation.create = function create(properties) {
+ return new PrimitiveTransformation(properties);
};
/**
- * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
+ * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
- * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- CryptoHashConfig.encode = function encode(message, writer) {
+ PrimitiveTransformation.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
- $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.replaceConfig != null && Object.hasOwnProperty.call(message, "replaceConfig"))
+ $root.google.privacy.dlp.v2.ReplaceValueConfig.encode(message.replaceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.redactConfig != null && Object.hasOwnProperty.call(message, "redactConfig"))
+ $root.google.privacy.dlp.v2.RedactConfig.encode(message.redactConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.characterMaskConfig != null && Object.hasOwnProperty.call(message, "characterMaskConfig"))
+ $root.google.privacy.dlp.v2.CharacterMaskConfig.encode(message.characterMaskConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.cryptoReplaceFfxFpeConfig != null && Object.hasOwnProperty.call(message, "cryptoReplaceFfxFpeConfig"))
+ $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.encode(message.cryptoReplaceFfxFpeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.fixedSizeBucketingConfig != null && Object.hasOwnProperty.call(message, "fixedSizeBucketingConfig"))
+ $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.encode(message.fixedSizeBucketingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.bucketingConfig != null && Object.hasOwnProperty.call(message, "bucketingConfig"))
+ $root.google.privacy.dlp.v2.BucketingConfig.encode(message.bucketingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.replaceWithInfoTypeConfig != null && Object.hasOwnProperty.call(message, "replaceWithInfoTypeConfig"))
+ $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.encode(message.replaceWithInfoTypeConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.timePartConfig != null && Object.hasOwnProperty.call(message, "timePartConfig"))
+ $root.google.privacy.dlp.v2.TimePartConfig.encode(message.timePartConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
+ if (message.cryptoHashConfig != null && Object.hasOwnProperty.call(message, "cryptoHashConfig"))
+ $root.google.privacy.dlp.v2.CryptoHashConfig.encode(message.cryptoHashConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
+ if (message.dateShiftConfig != null && Object.hasOwnProperty.call(message, "dateShiftConfig"))
+ $root.google.privacy.dlp.v2.DateShiftConfig.encode(message.dateShiftConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.cryptoDeterministicConfig != null && Object.hasOwnProperty.call(message, "cryptoDeterministicConfig"))
+ $root.google.privacy.dlp.v2.CryptoDeterministicConfig.encode(message.cryptoDeterministicConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
+ if (message.replaceDictionaryConfig != null && Object.hasOwnProperty.call(message, "replaceDictionaryConfig"))
+ $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.encode(message.replaceDictionaryConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
+ * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
- * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- CryptoHashConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ PrimitiveTransformation.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a CryptoHashConfig message from the specified reader or buffer.
+ * Decodes a PrimitiveTransformation message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
+ * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- CryptoHashConfig.decode = function decode(reader, length) {
+ PrimitiveTransformation.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoHashConfig();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrimitiveTransformation();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32());
+ message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 7: {
+ message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 11: {
+ message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 12: {
+ message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 13: {
+ message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.decode(reader, reader.uint32());
break;
}
default:
@@ -26625,129 +27357,352 @@
};
/**
- * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited.
+ * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
+ * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- CryptoHashConfig.decodeDelimited = function decodeDelimited(reader) {
+ PrimitiveTransformation.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a CryptoHashConfig message.
+ * Verifies a PrimitiveTransformation message.
* @function verify
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- CryptoHashConfig.verify = function verify(message) {
+ PrimitiveTransformation.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
- var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey);
- if (error)
- return "cryptoKey." + error;
+ var properties = {};
+ if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) {
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ReplaceValueConfig.verify(message.replaceConfig);
+ if (error)
+ return "replaceConfig." + error;
+ }
+ }
+ if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.RedactConfig.verify(message.redactConfig);
+ if (error)
+ return "redactConfig." + error;
+ }
+ }
+ if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.CharacterMaskConfig.verify(message.characterMaskConfig);
+ if (error)
+ return "characterMaskConfig." + error;
+ }
+ }
+ if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify(message.cryptoReplaceFfxFpeConfig);
+ if (error)
+ return "cryptoReplaceFfxFpeConfig." + error;
+ }
+ }
+ if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.verify(message.fixedSizeBucketingConfig);
+ if (error)
+ return "fixedSizeBucketingConfig." + error;
+ }
+ }
+ if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.BucketingConfig.verify(message.bucketingConfig);
+ if (error)
+ return "bucketingConfig." + error;
+ }
+ }
+ if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify(message.replaceWithInfoTypeConfig);
+ if (error)
+ return "replaceWithInfoTypeConfig." + error;
+ }
+ }
+ if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.TimePartConfig.verify(message.timePartConfig);
+ if (error)
+ return "timePartConfig." + error;
+ }
+ }
+ if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.CryptoHashConfig.verify(message.cryptoHashConfig);
+ if (error)
+ return "cryptoHashConfig." + error;
+ }
+ }
+ if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.DateShiftConfig.verify(message.dateShiftConfig);
+ if (error)
+ return "dateShiftConfig." + error;
+ }
+ }
+ if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.verify(message.cryptoDeterministicConfig);
+ if (error)
+ return "cryptoDeterministicConfig." + error;
+ }
+ }
+ if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) {
+ if (properties.transformation === 1)
+ return "transformation: multiple values";
+ properties.transformation = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.verify(message.replaceDictionaryConfig);
+ if (error)
+ return "replaceDictionaryConfig." + error;
+ }
}
return null;
};
/**
- * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
+ * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation
*/
- CryptoHashConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.CryptoHashConfig)
+ PrimitiveTransformation.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.PrimitiveTransformation)
return object;
- var message = new $root.google.privacy.dlp.v2.CryptoHashConfig();
- if (object.cryptoKey != null) {
- if (typeof object.cryptoKey !== "object")
- throw TypeError(".google.privacy.dlp.v2.CryptoHashConfig.cryptoKey: object expected");
- message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey);
+ var message = new $root.google.privacy.dlp.v2.PrimitiveTransformation();
+ if (object.replaceConfig != null) {
+ if (typeof object.replaceConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceConfig: object expected");
+ message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.fromObject(object.replaceConfig);
+ }
+ if (object.redactConfig != null) {
+ if (typeof object.redactConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.redactConfig: object expected");
+ message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.fromObject(object.redactConfig);
+ }
+ if (object.characterMaskConfig != null) {
+ if (typeof object.characterMaskConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.characterMaskConfig: object expected");
+ message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.fromObject(object.characterMaskConfig);
+ }
+ if (object.cryptoReplaceFfxFpeConfig != null) {
+ if (typeof object.cryptoReplaceFfxFpeConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoReplaceFfxFpeConfig: object expected");
+ message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.fromObject(object.cryptoReplaceFfxFpeConfig);
+ }
+ if (object.fixedSizeBucketingConfig != null) {
+ if (typeof object.fixedSizeBucketingConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.fixedSizeBucketingConfig: object expected");
+ message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.fromObject(object.fixedSizeBucketingConfig);
+ }
+ if (object.bucketingConfig != null) {
+ if (typeof object.bucketingConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.bucketingConfig: object expected");
+ message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.fromObject(object.bucketingConfig);
+ }
+ if (object.replaceWithInfoTypeConfig != null) {
+ if (typeof object.replaceWithInfoTypeConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceWithInfoTypeConfig: object expected");
+ message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.fromObject(object.replaceWithInfoTypeConfig);
+ }
+ if (object.timePartConfig != null) {
+ if (typeof object.timePartConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.timePartConfig: object expected");
+ message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.fromObject(object.timePartConfig);
+ }
+ if (object.cryptoHashConfig != null) {
+ if (typeof object.cryptoHashConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoHashConfig: object expected");
+ message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.fromObject(object.cryptoHashConfig);
+ }
+ if (object.dateShiftConfig != null) {
+ if (typeof object.dateShiftConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.dateShiftConfig: object expected");
+ message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.fromObject(object.dateShiftConfig);
+ }
+ if (object.cryptoDeterministicConfig != null) {
+ if (typeof object.cryptoDeterministicConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoDeterministicConfig: object expected");
+ message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.fromObject(object.cryptoDeterministicConfig);
+ }
+ if (object.replaceDictionaryConfig != null) {
+ if (typeof object.replaceDictionaryConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceDictionaryConfig: object expected");
+ message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.fromObject(object.replaceDictionaryConfig);
}
return message;
};
/**
- * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified.
+ * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
* @static
- * @param {google.privacy.dlp.v2.CryptoHashConfig} message CryptoHashConfig
+ * @param {google.privacy.dlp.v2.PrimitiveTransformation} message PrimitiveTransformation
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- CryptoHashConfig.toObject = function toObject(message, options) {
+ PrimitiveTransformation.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.defaults)
- object.cryptoKey = null;
- if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
- object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options);
- return object;
- };
-
- /**
- * Converts this CryptoHashConfig to JSON.
- * @function toJSON
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
- * @instance
- * @returns {Object.} JSON object
- */
- CryptoHashConfig.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for CryptoHashConfig
- * @function getTypeUrl
- * @memberof google.privacy.dlp.v2.CryptoHashConfig
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) {
+ object.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.toObject(message.replaceConfig, options);
+ if (options.oneofs)
+ object.transformation = "replaceConfig";
+ }
+ if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) {
+ object.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.toObject(message.redactConfig, options);
+ if (options.oneofs)
+ object.transformation = "redactConfig";
+ }
+ if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) {
+ object.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.toObject(message.characterMaskConfig, options);
+ if (options.oneofs)
+ object.transformation = "characterMaskConfig";
+ }
+ if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) {
+ object.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.toObject(message.cryptoReplaceFfxFpeConfig, options);
+ if (options.oneofs)
+ object.transformation = "cryptoReplaceFfxFpeConfig";
+ }
+ if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) {
+ object.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.toObject(message.fixedSizeBucketingConfig, options);
+ if (options.oneofs)
+ object.transformation = "fixedSizeBucketingConfig";
+ }
+ if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) {
+ object.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.toObject(message.bucketingConfig, options);
+ if (options.oneofs)
+ object.transformation = "bucketingConfig";
+ }
+ if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) {
+ object.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.toObject(message.replaceWithInfoTypeConfig, options);
+ if (options.oneofs)
+ object.transformation = "replaceWithInfoTypeConfig";
+ }
+ if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) {
+ object.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.toObject(message.timePartConfig, options);
+ if (options.oneofs)
+ object.transformation = "timePartConfig";
+ }
+ if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) {
+ object.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.toObject(message.cryptoHashConfig, options);
+ if (options.oneofs)
+ object.transformation = "cryptoHashConfig";
+ }
+ if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) {
+ object.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.toObject(message.dateShiftConfig, options);
+ if (options.oneofs)
+ object.transformation = "dateShiftConfig";
+ }
+ if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) {
+ object.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.toObject(message.cryptoDeterministicConfig, options);
+ if (options.oneofs)
+ object.transformation = "cryptoDeterministicConfig";
+ }
+ if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) {
+ object.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.toObject(message.replaceDictionaryConfig, options);
+ if (options.oneofs)
+ object.transformation = "replaceDictionaryConfig";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this PrimitiveTransformation to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PrimitiveTransformation.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PrimitiveTransformation
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.PrimitiveTransformation
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- CryptoHashConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ PrimitiveTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoHashConfig";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.PrimitiveTransformation";
};
- return CryptoHashConfig;
+ return PrimitiveTransformation;
})();
- v2.CryptoDeterministicConfig = (function() {
+ v2.TimePartConfig = (function() {
/**
- * Properties of a CryptoDeterministicConfig.
+ * Properties of a TimePartConfig.
* @memberof google.privacy.dlp.v2
- * @interface ICryptoDeterministicConfig
- * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoDeterministicConfig cryptoKey
- * @property {google.privacy.dlp.v2.IInfoType|null} [surrogateInfoType] CryptoDeterministicConfig surrogateInfoType
- * @property {google.privacy.dlp.v2.IFieldId|null} [context] CryptoDeterministicConfig context
+ * @interface ITimePartConfig
+ * @property {google.privacy.dlp.v2.TimePartConfig.TimePart|null} [partToExtract] TimePartConfig partToExtract
*/
/**
- * Constructs a new CryptoDeterministicConfig.
+ * Constructs a new TimePartConfig.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a CryptoDeterministicConfig.
- * @implements ICryptoDeterministicConfig
+ * @classdesc Represents a TimePartConfig.
+ * @implements ITimePartConfig
* @constructor
- * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set
*/
- function CryptoDeterministicConfig(properties) {
+ function TimePartConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -26755,103 +27710,75 @@
}
/**
- * CryptoDeterministicConfig cryptoKey.
- * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
- * @instance
- */
- CryptoDeterministicConfig.prototype.cryptoKey = null;
-
- /**
- * CryptoDeterministicConfig surrogateInfoType.
- * @member {google.privacy.dlp.v2.IInfoType|null|undefined} surrogateInfoType
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
- * @instance
- */
- CryptoDeterministicConfig.prototype.surrogateInfoType = null;
-
- /**
- * CryptoDeterministicConfig context.
- * @member {google.privacy.dlp.v2.IFieldId|null|undefined} context
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * TimePartConfig partToExtract.
+ * @member {google.privacy.dlp.v2.TimePartConfig.TimePart} partToExtract
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @instance
*/
- CryptoDeterministicConfig.prototype.context = null;
+ TimePartConfig.prototype.partToExtract = 0;
/**
- * Creates a new CryptoDeterministicConfig instance using the specified properties.
+ * Creates a new TimePartConfig instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
- * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig instance
+ * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig instance
*/
- CryptoDeterministicConfig.create = function create(properties) {
- return new CryptoDeterministicConfig(properties);
+ TimePartConfig.create = function create(properties) {
+ return new TimePartConfig(properties);
};
/**
- * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
- * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- CryptoDeterministicConfig.encode = function encode(message, writer) {
+ TimePartConfig.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
- $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.surrogateInfoType != null && Object.hasOwnProperty.call(message, "surrogateInfoType"))
- $root.google.privacy.dlp.v2.InfoType.encode(message.surrogateInfoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.context != null && Object.hasOwnProperty.call(message, "context"))
- $root.google.privacy.dlp.v2.FieldId.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.partToExtract != null && Object.hasOwnProperty.call(message, "partToExtract"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partToExtract);
return writer;
};
/**
- * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
- * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- CryptoDeterministicConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ TimePartConfig.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a CryptoDeterministicConfig message from the specified reader or buffer.
+ * Decodes a TimePartConfig message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- CryptoDeterministicConfig.decode = function decode(reader, length) {
+ TimePartConfig.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TimePartConfig();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.context = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32());
+ message.partToExtract = reader.int32();
break;
}
default:
@@ -26863,154 +27790,184 @@
};
/**
- * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited.
+ * Decodes a TimePartConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- CryptoDeterministicConfig.decodeDelimited = function decodeDelimited(reader) {
+ TimePartConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a CryptoDeterministicConfig message.
+ * Verifies a TimePartConfig message.
* @function verify
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- CryptoDeterministicConfig.verify = function verify(message) {
+ TimePartConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
- var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey);
- if (error)
- return "cryptoKey." + error;
- }
- if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) {
- var error = $root.google.privacy.dlp.v2.InfoType.verify(message.surrogateInfoType);
- if (error)
- return "surrogateInfoType." + error;
- }
- if (message.context != null && message.hasOwnProperty("context")) {
- var error = $root.google.privacy.dlp.v2.FieldId.verify(message.context);
- if (error)
- return "context." + error;
- }
+ if (message.partToExtract != null && message.hasOwnProperty("partToExtract"))
+ switch (message.partToExtract) {
+ default:
+ return "partToExtract: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ break;
+ }
return null;
};
/**
- * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig
*/
- CryptoDeterministicConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.CryptoDeterministicConfig)
+ TimePartConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TimePartConfig)
return object;
- var message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig();
- if (object.cryptoKey != null) {
- if (typeof object.cryptoKey !== "object")
- throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.cryptoKey: object expected");
- message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey);
- }
- if (object.surrogateInfoType != null) {
- if (typeof object.surrogateInfoType !== "object")
- throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.surrogateInfoType: object expected");
- message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.surrogateInfoType);
- }
- if (object.context != null) {
- if (typeof object.context !== "object")
- throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.context: object expected");
- message.context = $root.google.privacy.dlp.v2.FieldId.fromObject(object.context);
+ var message = new $root.google.privacy.dlp.v2.TimePartConfig();
+ switch (object.partToExtract) {
+ case "TIME_PART_UNSPECIFIED":
+ case 0:
+ message.partToExtract = 0;
+ break;
+ case "YEAR":
+ case 1:
+ message.partToExtract = 1;
+ break;
+ case "MONTH":
+ case 2:
+ message.partToExtract = 2;
+ break;
+ case "DAY_OF_MONTH":
+ case 3:
+ message.partToExtract = 3;
+ break;
+ case "DAY_OF_WEEK":
+ case 4:
+ message.partToExtract = 4;
+ break;
+ case "WEEK_OF_YEAR":
+ case 5:
+ message.partToExtract = 5;
+ break;
+ case "HOUR_OF_DAY":
+ case 6:
+ message.partToExtract = 6;
+ break;
}
return message;
};
/**
- * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified.
+ * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
- * @param {google.privacy.dlp.v2.CryptoDeterministicConfig} message CryptoDeterministicConfig
+ * @param {google.privacy.dlp.v2.TimePartConfig} message TimePartConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- CryptoDeterministicConfig.toObject = function toObject(message, options) {
+ TimePartConfig.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.defaults) {
- object.cryptoKey = null;
- object.surrogateInfoType = null;
- object.context = null;
- }
- if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
- object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options);
- if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType"))
- object.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.surrogateInfoType, options);
- if (message.context != null && message.hasOwnProperty("context"))
- object.context = $root.google.privacy.dlp.v2.FieldId.toObject(message.context, options);
+ if (options.defaults)
+ object.partToExtract = options.enums === String ? "TIME_PART_UNSPECIFIED" : 0;
+ if (message.partToExtract != null && message.hasOwnProperty("partToExtract"))
+ object.partToExtract = options.enums === String ? $root.google.privacy.dlp.v2.TimePartConfig.TimePart[message.partToExtract] : message.partToExtract;
return object;
};
/**
- * Converts this CryptoDeterministicConfig to JSON.
+ * Converts this TimePartConfig to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @instance
* @returns {Object.} JSON object
*/
- CryptoDeterministicConfig.prototype.toJSON = function toJSON() {
+ TimePartConfig.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for CryptoDeterministicConfig
+ * Gets the default type url for TimePartConfig
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @memberof google.privacy.dlp.v2.TimePartConfig
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- CryptoDeterministicConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ TimePartConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoDeterministicConfig";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TimePartConfig";
};
- return CryptoDeterministicConfig;
+ /**
+ * TimePart enum.
+ * @name google.privacy.dlp.v2.TimePartConfig.TimePart
+ * @enum {number}
+ * @property {number} TIME_PART_UNSPECIFIED=0 TIME_PART_UNSPECIFIED value
+ * @property {number} YEAR=1 YEAR value
+ * @property {number} MONTH=2 MONTH value
+ * @property {number} DAY_OF_MONTH=3 DAY_OF_MONTH value
+ * @property {number} DAY_OF_WEEK=4 DAY_OF_WEEK value
+ * @property {number} WEEK_OF_YEAR=5 WEEK_OF_YEAR value
+ * @property {number} HOUR_OF_DAY=6 HOUR_OF_DAY value
+ */
+ TimePartConfig.TimePart = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "TIME_PART_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "YEAR"] = 1;
+ values[valuesById[2] = "MONTH"] = 2;
+ values[valuesById[3] = "DAY_OF_MONTH"] = 3;
+ values[valuesById[4] = "DAY_OF_WEEK"] = 4;
+ values[valuesById[5] = "WEEK_OF_YEAR"] = 5;
+ values[valuesById[6] = "HOUR_OF_DAY"] = 6;
+ return values;
+ })();
+
+ return TimePartConfig;
})();
- v2.ReplaceValueConfig = (function() {
+ v2.CryptoHashConfig = (function() {
/**
- * Properties of a ReplaceValueConfig.
+ * Properties of a CryptoHashConfig.
* @memberof google.privacy.dlp.v2
- * @interface IReplaceValueConfig
- * @property {google.privacy.dlp.v2.IValue|null} [newValue] ReplaceValueConfig newValue
+ * @interface ICryptoHashConfig
+ * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoHashConfig cryptoKey
*/
/**
- * Constructs a new ReplaceValueConfig.
+ * Constructs a new CryptoHashConfig.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a ReplaceValueConfig.
- * @implements IReplaceValueConfig
+ * @classdesc Represents a CryptoHashConfig.
+ * @implements ICryptoHashConfig
* @constructor
- * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set
*/
- function ReplaceValueConfig(properties) {
+ function CryptoHashConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -27018,75 +27975,75 @@
}
/**
- * ReplaceValueConfig newValue.
- * @member {google.privacy.dlp.v2.IValue|null|undefined} newValue
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * CryptoHashConfig cryptoKey.
+ * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @instance
*/
- ReplaceValueConfig.prototype.newValue = null;
+ CryptoHashConfig.prototype.cryptoKey = null;
/**
- * Creates a new ReplaceValueConfig instance using the specified properties.
+ * Creates a new CryptoHashConfig instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
- * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig instance
+ * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig instance
*/
- ReplaceValueConfig.create = function create(properties) {
- return new ReplaceValueConfig(properties);
+ CryptoHashConfig.create = function create(properties) {
+ return new CryptoHashConfig(properties);
};
/**
- * Encodes the specified ReplaceValueConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages.
+ * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
- * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ReplaceValueConfig.encode = function encode(message, writer) {
+ CryptoHashConfig.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue"))
- $root.google.privacy.dlp.v2.Value.encode(message.newValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
+ $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified ReplaceValueConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages.
+ * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
- * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode
+ * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- ReplaceValueConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ CryptoHashConfig.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a ReplaceValueConfig message from the specified reader or buffer.
+ * Decodes a CryptoHashConfig message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ReplaceValueConfig.decode = function decode(reader, length) {
+ CryptoHashConfig.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReplaceValueConfig();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoHashConfig();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.newValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32());
+ message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32());
break;
}
default:
@@ -27098,127 +28055,129 @@
};
/**
- * Decodes a ReplaceValueConfig message from the specified reader or buffer, length delimited.
+ * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- ReplaceValueConfig.decodeDelimited = function decodeDelimited(reader) {
+ CryptoHashConfig.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a ReplaceValueConfig message.
+ * Verifies a CryptoHashConfig message.
* @function verify
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- ReplaceValueConfig.verify = function verify(message) {
+ CryptoHashConfig.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.newValue != null && message.hasOwnProperty("newValue")) {
- var error = $root.google.privacy.dlp.v2.Value.verify(message.newValue);
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
+ var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey);
if (error)
- return "newValue." + error;
+ return "cryptoKey." + error;
}
return null;
};
/**
- * Creates a ReplaceValueConfig message from a plain object. Also converts values to their respective internal types.
+ * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig
*/
- ReplaceValueConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.ReplaceValueConfig)
+ CryptoHashConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.CryptoHashConfig)
return object;
- var message = new $root.google.privacy.dlp.v2.ReplaceValueConfig();
- if (object.newValue != null) {
- if (typeof object.newValue !== "object")
- throw TypeError(".google.privacy.dlp.v2.ReplaceValueConfig.newValue: object expected");
- message.newValue = $root.google.privacy.dlp.v2.Value.fromObject(object.newValue);
+ var message = new $root.google.privacy.dlp.v2.CryptoHashConfig();
+ if (object.cryptoKey != null) {
+ if (typeof object.cryptoKey !== "object")
+ throw TypeError(".google.privacy.dlp.v2.CryptoHashConfig.cryptoKey: object expected");
+ message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey);
}
return message;
};
/**
- * Creates a plain object from a ReplaceValueConfig message. Also converts values to other types if specified.
+ * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
- * @param {google.privacy.dlp.v2.ReplaceValueConfig} message ReplaceValueConfig
+ * @param {google.privacy.dlp.v2.CryptoHashConfig} message CryptoHashConfig
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- ReplaceValueConfig.toObject = function toObject(message, options) {
+ CryptoHashConfig.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
- object.newValue = null;
- if (message.newValue != null && message.hasOwnProperty("newValue"))
- object.newValue = $root.google.privacy.dlp.v2.Value.toObject(message.newValue, options);
+ object.cryptoKey = null;
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
+ object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options);
return object;
};
/**
- * Converts this ReplaceValueConfig to JSON.
+ * Converts this CryptoHashConfig to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @instance
* @returns {Object.} JSON object
*/
- ReplaceValueConfig.prototype.toJSON = function toJSON() {
+ CryptoHashConfig.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for ReplaceValueConfig
+ * Gets the default type url for CryptoHashConfig
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @memberof google.privacy.dlp.v2.CryptoHashConfig
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- ReplaceValueConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ CryptoHashConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.ReplaceValueConfig";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoHashConfig";
};
- return ReplaceValueConfig;
+ return CryptoHashConfig;
})();
- v2.ReplaceDictionaryConfig = (function() {
+ v2.CryptoDeterministicConfig = (function() {
/**
- * Properties of a ReplaceDictionaryConfig.
+ * Properties of a CryptoDeterministicConfig.
* @memberof google.privacy.dlp.v2
- * @interface IReplaceDictionaryConfig
- * @property {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null} [wordList] ReplaceDictionaryConfig wordList
+ * @interface ICryptoDeterministicConfig
+ * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoDeterministicConfig cryptoKey
+ * @property {google.privacy.dlp.v2.IInfoType|null} [surrogateInfoType] CryptoDeterministicConfig surrogateInfoType
+ * @property {google.privacy.dlp.v2.IFieldId|null} [context] CryptoDeterministicConfig context
*/
/**
- * Constructs a new ReplaceDictionaryConfig.
+ * Constructs a new CryptoDeterministicConfig.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a ReplaceDictionaryConfig.
- * @implements IReplaceDictionaryConfig
+ * @classdesc Represents a CryptoDeterministicConfig.
+ * @implements ICryptoDeterministicConfig
* @constructor
- * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set
*/
- function ReplaceDictionaryConfig(properties) {
+ function CryptoDeterministicConfig(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -27226,9 +28185,480 @@
}
/**
- * ReplaceDictionaryConfig wordList.
- * @member {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null|undefined} wordList
- * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig
+ * CryptoDeterministicConfig cryptoKey.
+ * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @instance
+ */
+ CryptoDeterministicConfig.prototype.cryptoKey = null;
+
+ /**
+ * CryptoDeterministicConfig surrogateInfoType.
+ * @member {google.privacy.dlp.v2.IInfoType|null|undefined} surrogateInfoType
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @instance
+ */
+ CryptoDeterministicConfig.prototype.surrogateInfoType = null;
+
+ /**
+ * CryptoDeterministicConfig context.
+ * @member {google.privacy.dlp.v2.IFieldId|null|undefined} context
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @instance
+ */
+ CryptoDeterministicConfig.prototype.context = null;
+
+ /**
+ * Creates a new CryptoDeterministicConfig instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig instance
+ */
+ CryptoDeterministicConfig.create = function create(properties) {
+ return new CryptoDeterministicConfig(properties);
+ };
+
+ /**
+ * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoDeterministicConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey"))
+ $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.surrogateInfoType != null && Object.hasOwnProperty.call(message, "surrogateInfoType"))
+ $root.google.privacy.dlp.v2.InfoType.encode(message.surrogateInfoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.context != null && Object.hasOwnProperty.call(message, "context"))
+ $root.google.privacy.dlp.v2.FieldId.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CryptoDeterministicConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CryptoDeterministicConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoDeterministicConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.context = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CryptoDeterministicConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CryptoDeterministicConfig message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CryptoDeterministicConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) {
+ var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey);
+ if (error)
+ return "cryptoKey." + error;
+ }
+ if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) {
+ var error = $root.google.privacy.dlp.v2.InfoType.verify(message.surrogateInfoType);
+ if (error)
+ return "surrogateInfoType." + error;
+ }
+ if (message.context != null && message.hasOwnProperty("context")) {
+ var error = $root.google.privacy.dlp.v2.FieldId.verify(message.context);
+ if (error)
+ return "context." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig
+ */
+ CryptoDeterministicConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.CryptoDeterministicConfig)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig();
+ if (object.cryptoKey != null) {
+ if (typeof object.cryptoKey !== "object")
+ throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.cryptoKey: object expected");
+ message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey);
+ }
+ if (object.surrogateInfoType != null) {
+ if (typeof object.surrogateInfoType !== "object")
+ throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.surrogateInfoType: object expected");
+ message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.surrogateInfoType);
+ }
+ if (object.context != null) {
+ if (typeof object.context !== "object")
+ throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.context: object expected");
+ message.context = $root.google.privacy.dlp.v2.FieldId.fromObject(object.context);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {google.privacy.dlp.v2.CryptoDeterministicConfig} message CryptoDeterministicConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CryptoDeterministicConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.cryptoKey = null;
+ object.surrogateInfoType = null;
+ object.context = null;
+ }
+ if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey"))
+ object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options);
+ if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType"))
+ object.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.surrogateInfoType, options);
+ if (message.context != null && message.hasOwnProperty("context"))
+ object.context = $root.google.privacy.dlp.v2.FieldId.toObject(message.context, options);
+ return object;
+ };
+
+ /**
+ * Converts this CryptoDeterministicConfig to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CryptoDeterministicConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CryptoDeterministicConfig
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CryptoDeterministicConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoDeterministicConfig";
+ };
+
+ return CryptoDeterministicConfig;
+ })();
+
+ v2.ReplaceValueConfig = (function() {
+
+ /**
+ * Properties of a ReplaceValueConfig.
+ * @memberof google.privacy.dlp.v2
+ * @interface IReplaceValueConfig
+ * @property {google.privacy.dlp.v2.IValue|null} [newValue] ReplaceValueConfig newValue
+ */
+
+ /**
+ * Constructs a new ReplaceValueConfig.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a ReplaceValueConfig.
+ * @implements IReplaceValueConfig
+ * @constructor
+ * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set
+ */
+ function ReplaceValueConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ReplaceValueConfig newValue.
+ * @member {google.privacy.dlp.v2.IValue|null|undefined} newValue
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @instance
+ */
+ ReplaceValueConfig.prototype.newValue = null;
+
+ /**
+ * Creates a new ReplaceValueConfig instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig instance
+ */
+ ReplaceValueConfig.create = function create(properties) {
+ return new ReplaceValueConfig(properties);
+ };
+
+ /**
+ * Encodes the specified ReplaceValueConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ReplaceValueConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue"))
+ $root.google.privacy.dlp.v2.Value.encode(message.newValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ReplaceValueConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ReplaceValueConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ReplaceValueConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ReplaceValueConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReplaceValueConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.newValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ReplaceValueConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ReplaceValueConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ReplaceValueConfig message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ReplaceValueConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.newValue != null && message.hasOwnProperty("newValue")) {
+ var error = $root.google.privacy.dlp.v2.Value.verify(message.newValue);
+ if (error)
+ return "newValue." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a ReplaceValueConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig
+ */
+ ReplaceValueConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.ReplaceValueConfig)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.ReplaceValueConfig();
+ if (object.newValue != null) {
+ if (typeof object.newValue !== "object")
+ throw TypeError(".google.privacy.dlp.v2.ReplaceValueConfig.newValue: object expected");
+ message.newValue = $root.google.privacy.dlp.v2.Value.fromObject(object.newValue);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ReplaceValueConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ReplaceValueConfig} message ReplaceValueConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ReplaceValueConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.newValue = null;
+ if (message.newValue != null && message.hasOwnProperty("newValue"))
+ object.newValue = $root.google.privacy.dlp.v2.Value.toObject(message.newValue, options);
+ return object;
+ };
+
+ /**
+ * Converts this ReplaceValueConfig to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ReplaceValueConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ReplaceValueConfig
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.ReplaceValueConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ReplaceValueConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.ReplaceValueConfig";
+ };
+
+ return ReplaceValueConfig;
+ })();
+
+ v2.ReplaceDictionaryConfig = (function() {
+
+ /**
+ * Properties of a ReplaceDictionaryConfig.
+ * @memberof google.privacy.dlp.v2
+ * @interface IReplaceDictionaryConfig
+ * @property {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null} [wordList] ReplaceDictionaryConfig wordList
+ */
+
+ /**
+ * Constructs a new ReplaceDictionaryConfig.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a ReplaceDictionaryConfig.
+ * @implements IReplaceDictionaryConfig
+ * @constructor
+ * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig=} [properties] Properties to set
+ */
+ function ReplaceDictionaryConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * ReplaceDictionaryConfig wordList.
+ * @member {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null|undefined} wordList
+ * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig
* @instance
*/
ReplaceDictionaryConfig.prototype.wordList = null;
@@ -32810,28 +34240,1005 @@
return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Conditions";
};
- return Conditions;
+ return Conditions;
+ })();
+
+ RecordCondition.Expressions = (function() {
+
+ /**
+ * Properties of an Expressions.
+ * @memberof google.privacy.dlp.v2.RecordCondition
+ * @interface IExpressions
+ * @property {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null} [logicalOperator] Expressions logicalOperator
+ * @property {google.privacy.dlp.v2.RecordCondition.IConditions|null} [conditions] Expressions conditions
+ */
+
+ /**
+ * Constructs a new Expressions.
+ * @memberof google.privacy.dlp.v2.RecordCondition
+ * @classdesc Represents an Expressions.
+ * @implements IExpressions
+ * @constructor
+ * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set
+ */
+ function Expressions(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Expressions logicalOperator.
+ * @member {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator} logicalOperator
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @instance
+ */
+ Expressions.prototype.logicalOperator = 0;
+
+ /**
+ * Expressions conditions.
+ * @member {google.privacy.dlp.v2.RecordCondition.IConditions|null|undefined} conditions
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @instance
+ */
+ Expressions.prototype.conditions = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * Expressions type.
+ * @member {"conditions"|undefined} type
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @instance
+ */
+ Object.defineProperty(Expressions.prototype, "type", {
+ get: $util.oneOfGetter($oneOfFields = ["conditions"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new Expressions instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions instance
+ */
+ Expressions.create = function create(properties) {
+ return new Expressions(properties);
+ };
+
+ /**
+ * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Expressions.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.logicalOperator != null && Object.hasOwnProperty.call(message, "logicalOperator"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logicalOperator);
+ if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions"))
+ $root.google.privacy.dlp.v2.RecordCondition.Conditions.encode(message.conditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Expressions.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an Expressions message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Expressions.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.logicalOperator = reader.int32();
+ break;
+ }
+ case 3: {
+ message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an Expressions message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Expressions.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an Expressions message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Expressions.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator"))
+ switch (message.logicalOperator) {
+ default:
+ return "logicalOperator: enum value expected";
+ case 0:
+ case 1:
+ break;
+ }
+ if (message.conditions != null && message.hasOwnProperty("conditions")) {
+ properties.type = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.RecordCondition.Conditions.verify(message.conditions);
+ if (error)
+ return "conditions." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an Expressions message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ */
+ Expressions.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.RecordCondition.Expressions)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions();
+ switch (object.logicalOperator) {
+ case "LOGICAL_OPERATOR_UNSPECIFIED":
+ case 0:
+ message.logicalOperator = 0;
+ break;
+ case "AND":
+ case 1:
+ message.logicalOperator = 1;
+ break;
+ }
+ if (object.conditions != null) {
+ if (typeof object.conditions !== "object")
+ throw TypeError(".google.privacy.dlp.v2.RecordCondition.Expressions.conditions: object expected");
+ message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.fromObject(object.conditions);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an Expressions message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {google.privacy.dlp.v2.RecordCondition.Expressions} message Expressions
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Expressions.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.logicalOperator = options.enums === String ? "LOGICAL_OPERATOR_UNSPECIFIED" : 0;
+ if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator"))
+ object.logicalOperator = options.enums === String ? $root.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator[message.logicalOperator] : message.logicalOperator;
+ if (message.conditions != null && message.hasOwnProperty("conditions")) {
+ object.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.toObject(message.conditions, options);
+ if (options.oneofs)
+ object.type = "conditions";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this Expressions to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Expressions.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Expressions
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Expressions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Expressions";
+ };
+
+ /**
+ * LogicalOperator enum.
+ * @name google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator
+ * @enum {number}
+ * @property {number} LOGICAL_OPERATOR_UNSPECIFIED=0 LOGICAL_OPERATOR_UNSPECIFIED value
+ * @property {number} AND=1 AND value
+ */
+ Expressions.LogicalOperator = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "LOGICAL_OPERATOR_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "AND"] = 1;
+ return values;
+ })();
+
+ return Expressions;
+ })();
+
+ return RecordCondition;
+ })();
+
+ v2.TransformationOverview = (function() {
+
+ /**
+ * Properties of a TransformationOverview.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationOverview
+ * @property {number|Long|null} [transformedBytes] TransformationOverview transformedBytes
+ * @property {Array.|null} [transformationSummaries] TransformationOverview transformationSummaries
+ */
+
+ /**
+ * Constructs a new TransformationOverview.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationOverview.
+ * @implements ITransformationOverview
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set
+ */
+ function TransformationOverview(properties) {
+ this.transformationSummaries = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TransformationOverview transformedBytes.
+ * @member {number|Long} transformedBytes
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @instance
+ */
+ TransformationOverview.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * TransformationOverview transformationSummaries.
+ * @member {Array.} transformationSummaries
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @instance
+ */
+ TransformationOverview.prototype.transformationSummaries = $util.emptyArray;
+
+ /**
+ * Creates a new TransformationOverview instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview instance
+ */
+ TransformationOverview.create = function create(properties) {
+ return new TransformationOverview(properties);
+ };
+
+ /**
+ * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationOverview.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.transformedBytes);
+ if (message.transformationSummaries != null && message.transformationSummaries.length)
+ for (var i = 0; i < message.transformationSummaries.length; ++i)
+ $root.google.privacy.dlp.v2.TransformationSummary.encode(message.transformationSummaries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationOverview.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransformationOverview message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationOverview.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationOverview();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.transformedBytes = reader.int64();
+ break;
+ }
+ case 3: {
+ if (!(message.transformationSummaries && message.transformationSummaries.length))
+ message.transformationSummaries = [];
+ message.transformationSummaries.push($root.google.privacy.dlp.v2.TransformationSummary.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransformationOverview message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationOverview.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationOverview message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationOverview.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
+ if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high)))
+ return "transformedBytes: integer|Long expected";
+ if (message.transformationSummaries != null && message.hasOwnProperty("transformationSummaries")) {
+ if (!Array.isArray(message.transformationSummaries))
+ return "transformationSummaries: array expected";
+ for (var i = 0; i < message.transformationSummaries.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.TransformationSummary.verify(message.transformationSummaries[i]);
+ if (error)
+ return "transformationSummaries." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ */
+ TransformationOverview.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationOverview)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.TransformationOverview();
+ if (object.transformedBytes != null)
+ if ($util.Long)
+ (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false;
+ else if (typeof object.transformedBytes === "string")
+ message.transformedBytes = parseInt(object.transformedBytes, 10);
+ else if (typeof object.transformedBytes === "number")
+ message.transformedBytes = object.transformedBytes;
+ else if (typeof object.transformedBytes === "object")
+ message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber();
+ if (object.transformationSummaries) {
+ if (!Array.isArray(object.transformationSummaries))
+ throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: array expected");
+ message.transformationSummaries = [];
+ for (var i = 0; i < object.transformationSummaries.length; ++i) {
+ if (typeof object.transformationSummaries[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: object expected");
+ message.transformationSummaries[i] = $root.google.privacy.dlp.v2.TransformationSummary.fromObject(object.transformationSummaries[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationOverview} message TransformationOverview
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationOverview.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.transformationSummaries = [];
+ if (options.defaults)
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.transformedBytes = options.longs === String ? "0" : 0;
+ if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
+ if (typeof message.transformedBytes === "number")
+ object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes;
+ else
+ object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes;
+ if (message.transformationSummaries && message.transformationSummaries.length) {
+ object.transformationSummaries = [];
+ for (var j = 0; j < message.transformationSummaries.length; ++j)
+ object.transformationSummaries[j] = $root.google.privacy.dlp.v2.TransformationSummary.toObject(message.transformationSummaries[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this TransformationOverview to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationOverview.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransformationOverview
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationOverview.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationOverview";
+ };
+
+ return TransformationOverview;
+ })();
+
+ v2.TransformationSummary = (function() {
+
+ /**
+ * Properties of a TransformationSummary.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationSummary
+ * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TransformationSummary infoType
+ * @property {google.privacy.dlp.v2.IFieldId|null} [field] TransformationSummary field
+ * @property {google.privacy.dlp.v2.IPrimitiveTransformation|null} [transformation] TransformationSummary transformation
+ * @property {Array.|null} [fieldTransformations] TransformationSummary fieldTransformations
+ * @property {google.privacy.dlp.v2.IRecordSuppression|null} [recordSuppress] TransformationSummary recordSuppress
+ * @property {Array.|null} [results] TransformationSummary results
+ * @property {number|Long|null} [transformedBytes] TransformationSummary transformedBytes
+ */
+
+ /**
+ * Constructs a new TransformationSummary.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationSummary.
+ * @implements ITransformationSummary
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set
+ */
+ function TransformationSummary(properties) {
+ this.fieldTransformations = [];
+ this.results = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TransformationSummary infoType.
+ * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.infoType = null;
+
+ /**
+ * TransformationSummary field.
+ * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.field = null;
+
+ /**
+ * TransformationSummary transformation.
+ * @member {google.privacy.dlp.v2.IPrimitiveTransformation|null|undefined} transformation
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.transformation = null;
+
+ /**
+ * TransformationSummary fieldTransformations.
+ * @member {Array.} fieldTransformations
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.fieldTransformations = $util.emptyArray;
+
+ /**
+ * TransformationSummary recordSuppress.
+ * @member {google.privacy.dlp.v2.IRecordSuppression|null|undefined} recordSuppress
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.recordSuppress = null;
+
+ /**
+ * TransformationSummary results.
+ * @member {Array.} results
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.results = $util.emptyArray;
+
+ /**
+ * TransformationSummary transformedBytes.
+ * @member {number|Long} transformedBytes
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ */
+ TransformationSummary.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * Creates a new TransformationSummary instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary instance
+ */
+ TransformationSummary.create = function create(properties) {
+ return new TransformationSummary(properties);
+ };
+
+ /**
+ * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationSummary.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType"))
+ $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.field != null && Object.hasOwnProperty.call(message, "field"))
+ $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.transformation != null && Object.hasOwnProperty.call(message, "transformation"))
+ $root.google.privacy.dlp.v2.PrimitiveTransformation.encode(message.transformation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.results != null && message.results.length)
+ for (var i = 0; i < message.results.length; ++i)
+ $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.encode(message.results[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.fieldTransformations != null && message.fieldTransformations.length)
+ for (var i = 0; i < message.fieldTransformations.length; ++i)
+ $root.google.privacy.dlp.v2.FieldTransformation.encode(message.fieldTransformations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.recordSuppress != null && Object.hasOwnProperty.call(message, "recordSuppress"))
+ $root.google.privacy.dlp.v2.RecordSuppression.encode(message.recordSuppress, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
+ if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes"))
+ writer.uint32(/* id 7, wireType 0 =*/56).int64(message.transformedBytes);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationSummary.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransformationSummary message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationSummary.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ if (!(message.fieldTransformations && message.fieldTransformations.length))
+ message.fieldTransformations = [];
+ message.fieldTransformations.push($root.google.privacy.dlp.v2.FieldTransformation.decode(reader, reader.uint32()));
+ break;
+ }
+ case 6: {
+ message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ if (!(message.results && message.results.length))
+ message.results = [];
+ message.results.push($root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.decode(reader, reader.uint32()));
+ break;
+ }
+ case 7: {
+ message.transformedBytes = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransformationSummary message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationSummary.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationSummary message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationSummary.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.infoType != null && message.hasOwnProperty("infoType")) {
+ var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType);
+ if (error)
+ return "infoType." + error;
+ }
+ if (message.field != null && message.hasOwnProperty("field")) {
+ var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field);
+ if (error)
+ return "field." + error;
+ }
+ if (message.transformation != null && message.hasOwnProperty("transformation")) {
+ var error = $root.google.privacy.dlp.v2.PrimitiveTransformation.verify(message.transformation);
+ if (error)
+ return "transformation." + error;
+ }
+ if (message.fieldTransformations != null && message.hasOwnProperty("fieldTransformations")) {
+ if (!Array.isArray(message.fieldTransformations))
+ return "fieldTransformations: array expected";
+ for (var i = 0; i < message.fieldTransformations.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.FieldTransformation.verify(message.fieldTransformations[i]);
+ if (error)
+ return "fieldTransformations." + error;
+ }
+ }
+ if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress")) {
+ var error = $root.google.privacy.dlp.v2.RecordSuppression.verify(message.recordSuppress);
+ if (error)
+ return "recordSuppress." + error;
+ }
+ if (message.results != null && message.hasOwnProperty("results")) {
+ if (!Array.isArray(message.results))
+ return "results: array expected";
+ for (var i = 0; i < message.results.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify(message.results[i]);
+ if (error)
+ return "results." + error;
+ }
+ }
+ if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
+ if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high)))
+ return "transformedBytes: integer|Long expected";
+ return null;
+ };
+
+ /**
+ * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ */
+ TransformationSummary.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.TransformationSummary();
+ if (object.infoType != null) {
+ if (typeof object.infoType !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.infoType: object expected");
+ message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType);
+ }
+ if (object.field != null) {
+ if (typeof object.field !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.field: object expected");
+ message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field);
+ }
+ if (object.transformation != null) {
+ if (typeof object.transformation !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.transformation: object expected");
+ message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.fromObject(object.transformation);
+ }
+ if (object.fieldTransformations) {
+ if (!Array.isArray(object.fieldTransformations))
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: array expected");
+ message.fieldTransformations = [];
+ for (var i = 0; i < object.fieldTransformations.length; ++i) {
+ if (typeof object.fieldTransformations[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: object expected");
+ message.fieldTransformations[i] = $root.google.privacy.dlp.v2.FieldTransformation.fromObject(object.fieldTransformations[i]);
+ }
+ }
+ if (object.recordSuppress != null) {
+ if (typeof object.recordSuppress !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.recordSuppress: object expected");
+ message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.fromObject(object.recordSuppress);
+ }
+ if (object.results) {
+ if (!Array.isArray(object.results))
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: array expected");
+ message.results = [];
+ for (var i = 0; i < object.results.length; ++i) {
+ if (typeof object.results[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: object expected");
+ message.results[i] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.fromObject(object.results[i]);
+ }
+ }
+ if (object.transformedBytes != null)
+ if ($util.Long)
+ (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false;
+ else if (typeof object.transformedBytes === "string")
+ message.transformedBytes = parseInt(object.transformedBytes, 10);
+ else if (typeof object.transformedBytes === "number")
+ message.transformedBytes = object.transformedBytes;
+ else if (typeof object.transformedBytes === "object")
+ message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationSummary} message TransformationSummary
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationSummary.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.results = [];
+ object.fieldTransformations = [];
+ }
+ if (options.defaults) {
+ object.infoType = null;
+ object.field = null;
+ object.transformation = null;
+ object.recordSuppress = null;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.transformedBytes = options.longs === String ? "0" : 0;
+ }
+ if (message.infoType != null && message.hasOwnProperty("infoType"))
+ object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options);
+ if (message.field != null && message.hasOwnProperty("field"))
+ object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options);
+ if (message.transformation != null && message.hasOwnProperty("transformation"))
+ object.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.toObject(message.transformation, options);
+ if (message.results && message.results.length) {
+ object.results = [];
+ for (var j = 0; j < message.results.length; ++j)
+ object.results[j] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.toObject(message.results[j], options);
+ }
+ if (message.fieldTransformations && message.fieldTransformations.length) {
+ object.fieldTransformations = [];
+ for (var j = 0; j < message.fieldTransformations.length; ++j)
+ object.fieldTransformations[j] = $root.google.privacy.dlp.v2.FieldTransformation.toObject(message.fieldTransformations[j], options);
+ }
+ if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress"))
+ object.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.toObject(message.recordSuppress, options);
+ if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
+ if (typeof message.transformedBytes === "number")
+ object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes;
+ else
+ object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes;
+ return object;
+ };
+
+ /**
+ * Converts this TransformationSummary to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationSummary.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransformationSummary
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary";
+ };
+
+ /**
+ * TransformationResultCode enum.
+ * @name google.privacy.dlp.v2.TransformationSummary.TransformationResultCode
+ * @enum {number}
+ * @property {number} TRANSFORMATION_RESULT_CODE_UNSPECIFIED=0 TRANSFORMATION_RESULT_CODE_UNSPECIFIED value
+ * @property {number} SUCCESS=1 SUCCESS value
+ * @property {number} ERROR=2 ERROR value
+ */
+ TransformationSummary.TransformationResultCode = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "SUCCESS"] = 1;
+ values[valuesById[2] = "ERROR"] = 2;
+ return values;
})();
- RecordCondition.Expressions = (function() {
+ TransformationSummary.SummaryResult = (function() {
/**
- * Properties of an Expressions.
- * @memberof google.privacy.dlp.v2.RecordCondition
- * @interface IExpressions
- * @property {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null} [logicalOperator] Expressions logicalOperator
- * @property {google.privacy.dlp.v2.RecordCondition.IConditions|null} [conditions] Expressions conditions
+ * Properties of a SummaryResult.
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @interface ISummaryResult
+ * @property {number|Long|null} [count] SummaryResult count
+ * @property {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null} [code] SummaryResult code
+ * @property {string|null} [details] SummaryResult details
*/
/**
- * Constructs a new Expressions.
- * @memberof google.privacy.dlp.v2.RecordCondition
- * @classdesc Represents an Expressions.
- * @implements IExpressions
+ * Constructs a new SummaryResult.
+ * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @classdesc Represents a SummaryResult.
+ * @implements ISummaryResult
* @constructor
- * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set
*/
- function Expressions(properties) {
+ function SummaryResult(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -32839,103 +35246,103 @@
}
/**
- * Expressions logicalOperator.
- * @member {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator} logicalOperator
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * SummaryResult count.
+ * @member {number|Long} count
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @instance
*/
- Expressions.prototype.logicalOperator = 0;
+ SummaryResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
- * Expressions conditions.
- * @member {google.privacy.dlp.v2.RecordCondition.IConditions|null|undefined} conditions
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * SummaryResult code.
+ * @member {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode} code
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @instance
*/
- Expressions.prototype.conditions = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
+ SummaryResult.prototype.code = 0;
/**
- * Expressions type.
- * @member {"conditions"|undefined} type
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * SummaryResult details.
+ * @member {string} details
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @instance
*/
- Object.defineProperty(Expressions.prototype, "type", {
- get: $util.oneOfGetter($oneOfFields = ["conditions"]),
- set: $util.oneOfSetter($oneOfFields)
- });
+ SummaryResult.prototype.details = "";
/**
- * Creates a new Expressions instance using the specified properties.
+ * Creates a new SummaryResult instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
- * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions instance
+ * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult instance
*/
- Expressions.create = function create(properties) {
- return new Expressions(properties);
+ SummaryResult.create = function create(properties) {
+ return new SummaryResult(properties);
};
/**
- * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
- * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode
+ * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Expressions.encode = function encode(message, writer) {
+ SummaryResult.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.logicalOperator != null && Object.hasOwnProperty.call(message, "logicalOperator"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logicalOperator);
- if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions"))
- $root.google.privacy.dlp.v2.RecordCondition.Conditions.encode(message.conditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.count != null && Object.hasOwnProperty.call(message, "count"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count);
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.code);
+ if (message.details != null && Object.hasOwnProperty.call(message, "details"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.details);
return writer;
};
/**
- * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages.
+ * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
- * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode
+ * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- Expressions.encodeDelimited = function encodeDelimited(message, writer) {
+ SummaryResult.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes an Expressions message from the specified reader or buffer.
+ * Decodes a SummaryResult message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Expressions.decode = function decode(reader, length) {
+ SummaryResult.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.logicalOperator = reader.int32();
+ message.count = reader.int64();
+ break;
+ }
+ case 2: {
+ message.code = reader.int32();
break;
}
case 3: {
- message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.decode(reader, reader.uint32());
+ message.details = reader.string();
break;
}
default:
@@ -32947,173 +35354,536 @@
};
/**
- * Decodes an Expressions message from the specified reader or buffer, length delimited.
+ * Decodes a SummaryResult message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- Expressions.decodeDelimited = function decodeDelimited(reader) {
+ SummaryResult.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies an Expressions message.
+ * Verifies a SummaryResult message.
* @function verify
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- Expressions.verify = function verify(message) {
+ SummaryResult.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- var properties = {};
- if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator"))
- switch (message.logicalOperator) {
+ if (message.count != null && message.hasOwnProperty("count"))
+ if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))
+ return "count: integer|Long expected";
+ if (message.code != null && message.hasOwnProperty("code"))
+ switch (message.code) {
default:
- return "logicalOperator: enum value expected";
+ return "code: enum value expected";
case 0:
case 1:
+ case 2:
break;
}
- if (message.conditions != null && message.hasOwnProperty("conditions")) {
- properties.type = 1;
- {
- var error = $root.google.privacy.dlp.v2.RecordCondition.Conditions.verify(message.conditions);
- if (error)
- return "conditions." + error;
- }
- }
+ if (message.details != null && message.hasOwnProperty("details"))
+ if (!$util.isString(message.details))
+ return "details: string expected";
return null;
};
/**
- * Creates an Expressions message from a plain object. Also converts values to their respective internal types.
+ * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions
+ * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
*/
- Expressions.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.RecordCondition.Expressions)
+ SummaryResult.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult)
return object;
- var message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions();
- switch (object.logicalOperator) {
- case "LOGICAL_OPERATOR_UNSPECIFIED":
+ var message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult();
+ if (object.count != null)
+ if ($util.Long)
+ (message.count = $util.Long.fromValue(object.count)).unsigned = false;
+ else if (typeof object.count === "string")
+ message.count = parseInt(object.count, 10);
+ else if (typeof object.count === "number")
+ message.count = object.count;
+ else if (typeof object.count === "object")
+ message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();
+ switch (object.code) {
+ case "TRANSFORMATION_RESULT_CODE_UNSPECIFIED":
case 0:
- message.logicalOperator = 0;
+ message.code = 0;
break;
- case "AND":
+ case "SUCCESS":
case 1:
- message.logicalOperator = 1;
+ message.code = 1;
+ break;
+ case "ERROR":
+ case 2:
+ message.code = 2;
break;
}
- if (object.conditions != null) {
- if (typeof object.conditions !== "object")
- throw TypeError(".google.privacy.dlp.v2.RecordCondition.Expressions.conditions: object expected");
- message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.fromObject(object.conditions);
- }
+ if (object.details != null)
+ message.details = String(object.details);
return message;
};
/**
- * Creates a plain object from an Expressions message. Also converts values to other types if specified.
+ * Creates a plain object from a SummaryResult message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
- * @param {google.privacy.dlp.v2.RecordCondition.Expressions} message Expressions
+ * @param {google.privacy.dlp.v2.TransformationSummary.SummaryResult} message SummaryResult
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- Expressions.toObject = function toObject(message, options) {
+ SummaryResult.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.defaults)
- object.logicalOperator = options.enums === String ? "LOGICAL_OPERATOR_UNSPECIFIED" : 0;
- if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator"))
- object.logicalOperator = options.enums === String ? $root.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator[message.logicalOperator] : message.logicalOperator;
- if (message.conditions != null && message.hasOwnProperty("conditions")) {
- object.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.toObject(message.conditions, options);
- if (options.oneofs)
- object.type = "conditions";
+ if (options.defaults) {
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.count = options.longs === String ? "0" : 0;
+ object.code = options.enums === String ? "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" : 0;
+ object.details = "";
}
+ if (message.count != null && message.hasOwnProperty("count"))
+ if (typeof message.count === "number")
+ object.count = options.longs === String ? String(message.count) : message.count;
+ else
+ object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
+ if (message.code != null && message.hasOwnProperty("code"))
+ object.code = options.enums === String ? $root.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode[message.code] : message.code;
+ if (message.details != null && message.hasOwnProperty("details"))
+ object.details = message.details;
return object;
};
/**
- * Converts this Expressions to JSON.
+ * Converts this SummaryResult to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @instance
* @returns {Object.} JSON object
*/
- Expressions.prototype.toJSON = function toJSON() {
+ SummaryResult.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for Expressions
+ * Gets the default type url for SummaryResult
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.RecordCondition.Expressions
+ * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- Expressions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ SummaryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Expressions";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary.SummaryResult";
};
- /**
- * LogicalOperator enum.
- * @name google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator
- * @enum {number}
- * @property {number} LOGICAL_OPERATOR_UNSPECIFIED=0 LOGICAL_OPERATOR_UNSPECIFIED value
- * @property {number} AND=1 AND value
- */
- Expressions.LogicalOperator = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "LOGICAL_OPERATOR_UNSPECIFIED"] = 0;
- values[valuesById[1] = "AND"] = 1;
- return values;
- })();
+ return SummaryResult;
+ })();
+
+ return TransformationSummary;
+ })();
+
+ v2.TransformationDescription = (function() {
+
+ /**
+ * Properties of a TransformationDescription.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationDescription
+ * @property {google.privacy.dlp.v2.TransformationType|null} [type] TransformationDescription type
+ * @property {string|null} [description] TransformationDescription description
+ * @property {string|null} [condition] TransformationDescription condition
+ * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TransformationDescription infoType
+ */
+
+ /**
+ * Constructs a new TransformationDescription.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationDescription.
+ * @implements ITransformationDescription
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationDescription=} [properties] Properties to set
+ */
+ function TransformationDescription(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TransformationDescription type.
+ * @member {google.privacy.dlp.v2.TransformationType} type
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @instance
+ */
+ TransformationDescription.prototype.type = 0;
+
+ /**
+ * TransformationDescription description.
+ * @member {string} description
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @instance
+ */
+ TransformationDescription.prototype.description = "";
+
+ /**
+ * TransformationDescription condition.
+ * @member {string} condition
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @instance
+ */
+ TransformationDescription.prototype.condition = "";
+
+ /**
+ * TransformationDescription infoType.
+ * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @instance
+ */
+ TransformationDescription.prototype.infoType = null;
+
+ /**
+ * Creates a new TransformationDescription instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDescription=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription instance
+ */
+ TransformationDescription.create = function create(properties) {
+ return new TransformationDescription(properties);
+ };
+
+ /**
+ * Encodes the specified TransformationDescription message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDescription} message TransformationDescription message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationDescription.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
+ if (message.condition != null && Object.hasOwnProperty.call(message, "condition"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.condition);
+ if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType"))
+ $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransformationDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDescription} message TransformationDescription message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationDescription.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransformationDescription message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationDescription.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDescription();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.type = reader.int32();
+ break;
+ }
+ case 2: {
+ message.description = reader.string();
+ break;
+ }
+ case 3: {
+ message.condition = reader.string();
+ break;
+ }
+ case 4: {
+ message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransformationDescription message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationDescription.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationDescription message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationDescription.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.type != null && message.hasOwnProperty("type"))
+ switch (message.type) {
+ default:
+ return "type: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 15:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 12:
+ case 13:
+ case 14:
+ break;
+ }
+ if (message.description != null && message.hasOwnProperty("description"))
+ if (!$util.isString(message.description))
+ return "description: string expected";
+ if (message.condition != null && message.hasOwnProperty("condition"))
+ if (!$util.isString(message.condition))
+ return "condition: string expected";
+ if (message.infoType != null && message.hasOwnProperty("infoType")) {
+ var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType);
+ if (error)
+ return "infoType." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TransformationDescription message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription
+ */
+ TransformationDescription.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationDescription)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.TransformationDescription();
+ switch (object.type) {
+ case "TRANSFORMATION_TYPE_UNSPECIFIED":
+ case 0:
+ message.type = 0;
+ break;
+ case "RECORD_SUPPRESSION":
+ case 1:
+ message.type = 1;
+ break;
+ case "REPLACE_VALUE":
+ case 2:
+ message.type = 2;
+ break;
+ case "REPLACE_DICTIONARY":
+ case 15:
+ message.type = 15;
+ break;
+ case "REDACT":
+ case 3:
+ message.type = 3;
+ break;
+ case "CHARACTER_MASK":
+ case 4:
+ message.type = 4;
+ break;
+ case "CRYPTO_REPLACE_FFX_FPE":
+ case 5:
+ message.type = 5;
+ break;
+ case "FIXED_SIZE_BUCKETING":
+ case 6:
+ message.type = 6;
+ break;
+ case "BUCKETING":
+ case 7:
+ message.type = 7;
+ break;
+ case "REPLACE_WITH_INFO_TYPE":
+ case 8:
+ message.type = 8;
+ break;
+ case "TIME_PART":
+ case 9:
+ message.type = 9;
+ break;
+ case "CRYPTO_HASH":
+ case 10:
+ message.type = 10;
+ break;
+ case "DATE_SHIFT":
+ case 12:
+ message.type = 12;
+ break;
+ case "CRYPTO_DETERMINISTIC_CONFIG":
+ case 13:
+ message.type = 13;
+ break;
+ case "REDACT_IMAGE":
+ case 14:
+ message.type = 14;
+ break;
+ }
+ if (object.description != null)
+ message.description = String(object.description);
+ if (object.condition != null)
+ message.condition = String(object.condition);
+ if (object.infoType != null) {
+ if (typeof object.infoType !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationDescription.infoType: object expected");
+ message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationDescription message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationDescription} message TransformationDescription
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationDescription.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.type = options.enums === String ? "TRANSFORMATION_TYPE_UNSPECIFIED" : 0;
+ object.description = "";
+ object.condition = "";
+ object.infoType = null;
+ }
+ if (message.type != null && message.hasOwnProperty("type"))
+ object.type = options.enums === String ? $root.google.privacy.dlp.v2.TransformationType[message.type] : message.type;
+ if (message.description != null && message.hasOwnProperty("description"))
+ object.description = message.description;
+ if (message.condition != null && message.hasOwnProperty("condition"))
+ object.condition = message.condition;
+ if (message.infoType != null && message.hasOwnProperty("infoType"))
+ object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options);
+ return object;
+ };
+
+ /**
+ * Converts this TransformationDescription to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationDescription.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- return Expressions;
- })();
+ /**
+ * Gets the default type url for TransformationDescription
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationDescription
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDescription";
+ };
- return RecordCondition;
+ return TransformationDescription;
})();
- v2.TransformationOverview = (function() {
+ v2.TransformationDetails = (function() {
/**
- * Properties of a TransformationOverview.
+ * Properties of a TransformationDetails.
* @memberof google.privacy.dlp.v2
- * @interface ITransformationOverview
- * @property {number|Long|null} [transformedBytes] TransformationOverview transformedBytes
- * @property {Array.|null} [transformationSummaries] TransformationOverview transformationSummaries
+ * @interface ITransformationDetails
+ * @property {string|null} [resourceName] TransformationDetails resourceName
+ * @property {string|null} [containerName] TransformationDetails containerName
+ * @property {Array.|null} [transformation] TransformationDetails transformation
+ * @property {google.privacy.dlp.v2.ITransformationResultStatus|null} [statusDetails] TransformationDetails statusDetails
+ * @property {number|Long|null} [transformedBytes] TransformationDetails transformedBytes
+ * @property {google.privacy.dlp.v2.ITransformationLocation|null} [transformationLocation] TransformationDetails transformationLocation
*/
/**
- * Constructs a new TransformationOverview.
+ * Constructs a new TransformationDetails.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a TransformationOverview.
- * @implements ITransformationOverview
+ * @classdesc Represents a TransformationDetails.
+ * @implements ITransformationDetails
* @constructor
- * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ITransformationDetails=} [properties] Properties to set
*/
- function TransformationOverview(properties) {
- this.transformationSummaries = [];
+ function TransformationDetails(properties) {
+ this.transformation = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -33121,92 +35891,148 @@
}
/**
- * TransformationOverview transformedBytes.
+ * TransformationDetails resourceName.
+ * @member {string} resourceName
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @instance
+ */
+ TransformationDetails.prototype.resourceName = "";
+
+ /**
+ * TransformationDetails containerName.
+ * @member {string} containerName
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @instance
+ */
+ TransformationDetails.prototype.containerName = "";
+
+ /**
+ * TransformationDetails transformation.
+ * @member {Array.} transformation
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @instance
+ */
+ TransformationDetails.prototype.transformation = $util.emptyArray;
+
+ /**
+ * TransformationDetails statusDetails.
+ * @member {google.privacy.dlp.v2.ITransformationResultStatus|null|undefined} statusDetails
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @instance
+ */
+ TransformationDetails.prototype.statusDetails = null;
+
+ /**
+ * TransformationDetails transformedBytes.
* @member {number|Long} transformedBytes
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @instance
*/
- TransformationOverview.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+ TransformationDetails.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
- * TransformationOverview transformationSummaries.
- * @member {Array.} transformationSummaries
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * TransformationDetails transformationLocation.
+ * @member {google.privacy.dlp.v2.ITransformationLocation|null|undefined} transformationLocation
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @instance
*/
- TransformationOverview.prototype.transformationSummaries = $util.emptyArray;
+ TransformationDetails.prototype.transformationLocation = null;
/**
- * Creates a new TransformationOverview instance using the specified properties.
+ * Creates a new TransformationDetails instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
- * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview instance
+ * @param {google.privacy.dlp.v2.ITransformationDetails=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails instance
*/
- TransformationOverview.create = function create(properties) {
- return new TransformationOverview(properties);
+ TransformationDetails.create = function create(properties) {
+ return new TransformationDetails(properties);
};
/**
- * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * Encodes the specified TransformationDetails message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
- * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationDetails} message TransformationDetails message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationOverview.encode = function encode(message, writer) {
+ TransformationDetails.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
+ if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName);
+ if (message.containerName != null && Object.hasOwnProperty.call(message, "containerName"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.containerName);
+ if (message.transformation != null && message.transformation.length)
+ for (var i = 0; i < message.transformation.length; ++i)
+ $root.google.privacy.dlp.v2.TransformationDescription.encode(message.transformation[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.statusDetails != null && Object.hasOwnProperty.call(message, "statusDetails"))
+ $root.google.privacy.dlp.v2.TransformationResultStatus.encode(message.statusDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.transformedBytes);
- if (message.transformationSummaries != null && message.transformationSummaries.length)
- for (var i = 0; i < message.transformationSummaries.length; ++i)
- $root.google.privacy.dlp.v2.TransformationSummary.encode(message.transformationSummaries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transformedBytes);
+ if (message.transformationLocation != null && Object.hasOwnProperty.call(message, "transformationLocation"))
+ $root.google.privacy.dlp.v2.TransformationLocation.encode(message.transformationLocation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages.
+ * Encodes the specified TransformationDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
- * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationDetails} message TransformationDetails message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationOverview.encodeDelimited = function encodeDelimited(message, writer) {
+ TransformationDetails.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a TransformationOverview message from the specified reader or buffer.
+ * Decodes a TransformationDetails message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationOverview.decode = function decode(reader, length) {
+ TransformationDetails.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationOverview();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDetails();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
+ case 1: {
+ message.resourceName = reader.string();
+ break;
+ }
case 2: {
- message.transformedBytes = reader.int64();
+ message.containerName = reader.string();
break;
}
case 3: {
- if (!(message.transformationSummaries && message.transformationSummaries.length))
- message.transformationSummaries = [];
- message.transformationSummaries.push($root.google.privacy.dlp.v2.TransformationSummary.decode(reader, reader.uint32()));
+ if (!(message.transformation && message.transformation.length))
+ message.transformation = [];
+ message.transformation.push($root.google.privacy.dlp.v2.TransformationDescription.decode(reader, reader.uint32()));
+ break;
+ }
+ case 4: {
+ message.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.transformedBytes = reader.int64();
+ break;
+ }
+ case 6: {
+ message.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.decode(reader, reader.uint32());
break;
}
default:
@@ -33218,59 +36044,94 @@
};
/**
- * Decodes a TransformationOverview message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationDetails message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationOverview.decodeDelimited = function decodeDelimited(reader) {
+ TransformationDetails.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a TransformationOverview message.
+ * Verifies a TransformationDetails message.
* @function verify
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- TransformationOverview.verify = function verify(message) {
+ TransformationDetails.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
+ if (message.resourceName != null && message.hasOwnProperty("resourceName"))
+ if (!$util.isString(message.resourceName))
+ return "resourceName: string expected";
+ if (message.containerName != null && message.hasOwnProperty("containerName"))
+ if (!$util.isString(message.containerName))
+ return "containerName: string expected";
+ if (message.transformation != null && message.hasOwnProperty("transformation")) {
+ if (!Array.isArray(message.transformation))
+ return "transformation: array expected";
+ for (var i = 0; i < message.transformation.length; ++i) {
+ var error = $root.google.privacy.dlp.v2.TransformationDescription.verify(message.transformation[i]);
+ if (error)
+ return "transformation." + error;
+ }
+ }
+ if (message.statusDetails != null && message.hasOwnProperty("statusDetails")) {
+ var error = $root.google.privacy.dlp.v2.TransformationResultStatus.verify(message.statusDetails);
+ if (error)
+ return "statusDetails." + error;
+ }
if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high)))
return "transformedBytes: integer|Long expected";
- if (message.transformationSummaries != null && message.hasOwnProperty("transformationSummaries")) {
- if (!Array.isArray(message.transformationSummaries))
- return "transformationSummaries: array expected";
- for (var i = 0; i < message.transformationSummaries.length; ++i) {
- var error = $root.google.privacy.dlp.v2.TransformationSummary.verify(message.transformationSummaries[i]);
- if (error)
- return "transformationSummaries." + error;
- }
+ if (message.transformationLocation != null && message.hasOwnProperty("transformationLocation")) {
+ var error = $root.google.privacy.dlp.v2.TransformationLocation.verify(message.transformationLocation);
+ if (error)
+ return "transformationLocation." + error;
}
return null;
};
/**
- * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationDetails message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.TransformationDetails
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview
+ * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails
*/
- TransformationOverview.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationOverview)
+ TransformationDetails.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationDetails)
return object;
- var message = new $root.google.privacy.dlp.v2.TransformationOverview();
+ var message = new $root.google.privacy.dlp.v2.TransformationDetails();
+ if (object.resourceName != null)
+ message.resourceName = String(object.resourceName);
+ if (object.containerName != null)
+ message.containerName = String(object.containerName);
+ if (object.transformation) {
+ if (!Array.isArray(object.transformation))
+ throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformation: array expected");
+ message.transformation = [];
+ for (var i = 0; i < object.transformation.length; ++i) {
+ if (typeof object.transformation[i] !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformation: object expected");
+ message.transformation[i] = $root.google.privacy.dlp.v2.TransformationDescription.fromObject(object.transformation[i]);
+ }
+ }
+ if (object.statusDetails != null) {
+ if (typeof object.statusDetails !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationDetails.statusDetails: object expected");
+ message.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.fromObject(object.statusDetails);
+ }
if (object.transformedBytes != null)
if ($util.Long)
(message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false;
@@ -33280,108 +36141,672 @@
message.transformedBytes = object.transformedBytes;
else if (typeof object.transformedBytes === "object")
message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber();
- if (object.transformationSummaries) {
- if (!Array.isArray(object.transformationSummaries))
- throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: array expected");
- message.transformationSummaries = [];
- for (var i = 0; i < object.transformationSummaries.length; ++i) {
- if (typeof object.transformationSummaries[i] !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: object expected");
- message.transformationSummaries[i] = $root.google.privacy.dlp.v2.TransformationSummary.fromObject(object.transformationSummaries[i]);
+ if (object.transformationLocation != null) {
+ if (typeof object.transformationLocation !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformationLocation: object expected");
+ message.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.fromObject(object.transformationLocation);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationDetails message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationDetails} message TransformationDetails
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationDetails.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.transformation = [];
+ if (options.defaults) {
+ object.resourceName = "";
+ object.containerName = "";
+ object.statusDetails = null;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.transformedBytes = options.longs === String ? "0" : 0;
+ object.transformationLocation = null;
+ }
+ if (message.resourceName != null && message.hasOwnProperty("resourceName"))
+ object.resourceName = message.resourceName;
+ if (message.containerName != null && message.hasOwnProperty("containerName"))
+ object.containerName = message.containerName;
+ if (message.transformation && message.transformation.length) {
+ object.transformation = [];
+ for (var j = 0; j < message.transformation.length; ++j)
+ object.transformation[j] = $root.google.privacy.dlp.v2.TransformationDescription.toObject(message.transformation[j], options);
+ }
+ if (message.statusDetails != null && message.hasOwnProperty("statusDetails"))
+ object.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.toObject(message.statusDetails, options);
+ if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
+ if (typeof message.transformedBytes === "number")
+ object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes;
+ else
+ object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes;
+ if (message.transformationLocation != null && message.hasOwnProperty("transformationLocation"))
+ object.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.toObject(message.transformationLocation, options);
+ return object;
+ };
+
+ /**
+ * Converts this TransformationDetails to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationDetails.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransformationDetails
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationDetails
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDetails";
+ };
+
+ return TransformationDetails;
+ })();
+
+ v2.TransformationLocation = (function() {
+
+ /**
+ * Properties of a TransformationLocation.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationLocation
+ * @property {string|null} [findingId] TransformationLocation findingId
+ * @property {google.privacy.dlp.v2.IRecordTransformation|null} [recordTransformation] TransformationLocation recordTransformation
+ * @property {google.privacy.dlp.v2.TransformationContainerType|null} [containerType] TransformationLocation containerType
+ */
+
+ /**
+ * Constructs a new TransformationLocation.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationLocation.
+ * @implements ITransformationLocation
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationLocation=} [properties] Properties to set
+ */
+ function TransformationLocation(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TransformationLocation findingId.
+ * @member {string|null|undefined} findingId
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @instance
+ */
+ TransformationLocation.prototype.findingId = null;
+
+ /**
+ * TransformationLocation recordTransformation.
+ * @member {google.privacy.dlp.v2.IRecordTransformation|null|undefined} recordTransformation
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @instance
+ */
+ TransformationLocation.prototype.recordTransformation = null;
+
+ /**
+ * TransformationLocation containerType.
+ * @member {google.privacy.dlp.v2.TransformationContainerType} containerType
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @instance
+ */
+ TransformationLocation.prototype.containerType = 0;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * TransformationLocation locationType.
+ * @member {"findingId"|"recordTransformation"|undefined} locationType
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @instance
+ */
+ Object.defineProperty(TransformationLocation.prototype, "locationType", {
+ get: $util.oneOfGetter($oneOfFields = ["findingId", "recordTransformation"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new TransformationLocation instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationLocation=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation instance
+ */
+ TransformationLocation.create = function create(properties) {
+ return new TransformationLocation(properties);
+ };
+
+ /**
+ * Encodes the specified TransformationLocation message. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationLocation} message TransformationLocation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationLocation.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.findingId);
+ if (message.recordTransformation != null && Object.hasOwnProperty.call(message, "recordTransformation"))
+ $root.google.privacy.dlp.v2.RecordTransformation.encode(message.recordTransformation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.containerType != null && Object.hasOwnProperty.call(message, "containerType"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.containerType);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransformationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationLocation} message TransformationLocation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationLocation.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransformationLocation message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationLocation.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationLocation();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.findingId = reader.string();
+ break;
+ }
+ case 2: {
+ message.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.containerType = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransformationLocation message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationLocation.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationLocation message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationLocation.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.findingId != null && message.hasOwnProperty("findingId")) {
+ properties.locationType = 1;
+ if (!$util.isString(message.findingId))
+ return "findingId: string expected";
+ }
+ if (message.recordTransformation != null && message.hasOwnProperty("recordTransformation")) {
+ if (properties.locationType === 1)
+ return "locationType: multiple values";
+ properties.locationType = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.RecordTransformation.verify(message.recordTransformation);
+ if (error)
+ return "recordTransformation." + error;
+ }
+ }
+ if (message.containerType != null && message.hasOwnProperty("containerType"))
+ switch (message.containerType) {
+ default:
+ return "containerType: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TransformationLocation message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation
+ */
+ TransformationLocation.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationLocation)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.TransformationLocation();
+ if (object.findingId != null)
+ message.findingId = String(object.findingId);
+ if (object.recordTransformation != null) {
+ if (typeof object.recordTransformation !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationLocation.recordTransformation: object expected");
+ message.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.fromObject(object.recordTransformation);
+ }
+ switch (object.containerType) {
+ case "TRANSFORM_UNKNOWN_CONTAINER":
+ case 0:
+ message.containerType = 0;
+ break;
+ case "TRANSFORM_BODY":
+ case 1:
+ message.containerType = 1;
+ break;
+ case "TRANSFORM_METADATA":
+ case 2:
+ message.containerType = 2;
+ break;
+ case "TRANSFORM_TABLE":
+ case 3:
+ message.containerType = 3;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationLocation message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationLocation} message TransformationLocation
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationLocation.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.containerType = options.enums === String ? "TRANSFORM_UNKNOWN_CONTAINER" : 0;
+ if (message.findingId != null && message.hasOwnProperty("findingId")) {
+ object.findingId = message.findingId;
+ if (options.oneofs)
+ object.locationType = "findingId";
+ }
+ if (message.recordTransformation != null && message.hasOwnProperty("recordTransformation")) {
+ object.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.toObject(message.recordTransformation, options);
+ if (options.oneofs)
+ object.locationType = "recordTransformation";
+ }
+ if (message.containerType != null && message.hasOwnProperty("containerType"))
+ object.containerType = options.enums === String ? $root.google.privacy.dlp.v2.TransformationContainerType[message.containerType] : message.containerType;
+ return object;
+ };
+
+ /**
+ * Converts this TransformationLocation to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationLocation.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransformationLocation
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationLocation
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationLocation";
+ };
+
+ return TransformationLocation;
+ })();
+
+ v2.RecordTransformation = (function() {
+
+ /**
+ * Properties of a RecordTransformation.
+ * @memberof google.privacy.dlp.v2
+ * @interface IRecordTransformation
+ * @property {google.privacy.dlp.v2.IFieldId|null} [fieldId] RecordTransformation fieldId
+ * @property {google.protobuf.ITimestamp|null} [containerTimestamp] RecordTransformation containerTimestamp
+ * @property {string|null} [containerVersion] RecordTransformation containerVersion
+ */
+
+ /**
+ * Constructs a new RecordTransformation.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a RecordTransformation.
+ * @implements IRecordTransformation
+ * @constructor
+ * @param {google.privacy.dlp.v2.IRecordTransformation=} [properties] Properties to set
+ */
+ function RecordTransformation(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * RecordTransformation fieldId.
+ * @member {google.privacy.dlp.v2.IFieldId|null|undefined} fieldId
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @instance
+ */
+ RecordTransformation.prototype.fieldId = null;
+
+ /**
+ * RecordTransformation containerTimestamp.
+ * @member {google.protobuf.ITimestamp|null|undefined} containerTimestamp
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @instance
+ */
+ RecordTransformation.prototype.containerTimestamp = null;
+
+ /**
+ * RecordTransformation containerVersion.
+ * @member {string} containerVersion
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @instance
+ */
+ RecordTransformation.prototype.containerVersion = "";
+
+ /**
+ * Creates a new RecordTransformation instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {google.privacy.dlp.v2.IRecordTransformation=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation instance
+ */
+ RecordTransformation.create = function create(properties) {
+ return new RecordTransformation(properties);
+ };
+
+ /**
+ * Encodes the specified RecordTransformation message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {google.privacy.dlp.v2.IRecordTransformation} message RecordTransformation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecordTransformation.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.fieldId != null && Object.hasOwnProperty.call(message, "fieldId"))
+ $root.google.privacy.dlp.v2.FieldId.encode(message.fieldId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.containerTimestamp != null && Object.hasOwnProperty.call(message, "containerTimestamp"))
+ $root.google.protobuf.Timestamp.encode(message.containerTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.containerVersion != null && Object.hasOwnProperty.call(message, "containerVersion"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.containerVersion);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RecordTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {google.privacy.dlp.v2.IRecordTransformation} message RecordTransformation message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecordTransformation.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RecordTransformation message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecordTransformation.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordTransformation();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.fieldId = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.containerTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.containerVersion = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
}
}
return message;
};
/**
- * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified.
+ * Decodes a RecordTransformation message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecordTransformation.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RecordTransformation message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RecordTransformation.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.fieldId != null && message.hasOwnProperty("fieldId")) {
+ var error = $root.google.privacy.dlp.v2.FieldId.verify(message.fieldId);
+ if (error)
+ return "fieldId." + error;
+ }
+ if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.containerTimestamp);
+ if (error)
+ return "containerTimestamp." + error;
+ }
+ if (message.containerVersion != null && message.hasOwnProperty("containerVersion"))
+ if (!$util.isString(message.containerVersion))
+ return "containerVersion: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a RecordTransformation message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.RecordTransformation
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation
+ */
+ RecordTransformation.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.RecordTransformation)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.RecordTransformation();
+ if (object.fieldId != null) {
+ if (typeof object.fieldId !== "object")
+ throw TypeError(".google.privacy.dlp.v2.RecordTransformation.fieldId: object expected");
+ message.fieldId = $root.google.privacy.dlp.v2.FieldId.fromObject(object.fieldId);
+ }
+ if (object.containerTimestamp != null) {
+ if (typeof object.containerTimestamp !== "object")
+ throw TypeError(".google.privacy.dlp.v2.RecordTransformation.containerTimestamp: object expected");
+ message.containerTimestamp = $root.google.protobuf.Timestamp.fromObject(object.containerTimestamp);
+ }
+ if (object.containerVersion != null)
+ message.containerVersion = String(object.containerVersion);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RecordTransformation message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.RecordTransformation
* @static
- * @param {google.privacy.dlp.v2.TransformationOverview} message TransformationOverview
+ * @param {google.privacy.dlp.v2.RecordTransformation} message RecordTransformation
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- TransformationOverview.toObject = function toObject(message, options) {
+ RecordTransformation.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.arrays || options.defaults)
- object.transformationSummaries = [];
- if (options.defaults)
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.transformedBytes = options.longs === String ? "0" : 0;
- if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
- if (typeof message.transformedBytes === "number")
- object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes;
- else
- object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes;
- if (message.transformationSummaries && message.transformationSummaries.length) {
- object.transformationSummaries = [];
- for (var j = 0; j < message.transformationSummaries.length; ++j)
- object.transformationSummaries[j] = $root.google.privacy.dlp.v2.TransformationSummary.toObject(message.transformationSummaries[j], options);
+ if (options.defaults) {
+ object.fieldId = null;
+ object.containerTimestamp = null;
+ object.containerVersion = "";
}
+ if (message.fieldId != null && message.hasOwnProperty("fieldId"))
+ object.fieldId = $root.google.privacy.dlp.v2.FieldId.toObject(message.fieldId, options);
+ if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp"))
+ object.containerTimestamp = $root.google.protobuf.Timestamp.toObject(message.containerTimestamp, options);
+ if (message.containerVersion != null && message.hasOwnProperty("containerVersion"))
+ object.containerVersion = message.containerVersion;
return object;
};
/**
- * Converts this TransformationOverview to JSON.
+ * Converts this RecordTransformation to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.RecordTransformation
* @instance
* @returns {Object.} JSON object
*/
- TransformationOverview.prototype.toJSON = function toJSON() {
+ RecordTransformation.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for TransformationOverview
+ * Gets the default type url for RecordTransformation
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationOverview
+ * @memberof google.privacy.dlp.v2.RecordTransformation
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- TransformationOverview.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ RecordTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationOverview";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.RecordTransformation";
};
- return TransformationOverview;
+ return RecordTransformation;
})();
- v2.TransformationSummary = (function() {
+ v2.TransformationResultStatus = (function() {
/**
- * Properties of a TransformationSummary.
+ * Properties of a TransformationResultStatus.
* @memberof google.privacy.dlp.v2
- * @interface ITransformationSummary
- * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TransformationSummary infoType
- * @property {google.privacy.dlp.v2.IFieldId|null} [field] TransformationSummary field
- * @property {google.privacy.dlp.v2.IPrimitiveTransformation|null} [transformation] TransformationSummary transformation
- * @property {Array.|null} [fieldTransformations] TransformationSummary fieldTransformations
- * @property {google.privacy.dlp.v2.IRecordSuppression|null} [recordSuppress] TransformationSummary recordSuppress
- * @property {Array.|null} [results] TransformationSummary results
- * @property {number|Long|null} [transformedBytes] TransformationSummary transformedBytes
+ * @interface ITransformationResultStatus
+ * @property {google.privacy.dlp.v2.TransformationResultStatusType|null} [resultStatusType] TransformationResultStatus resultStatusType
+ * @property {google.rpc.IStatus|null} [details] TransformationResultStatus details
*/
/**
- * Constructs a new TransformationSummary.
+ * Constructs a new TransformationResultStatus.
* @memberof google.privacy.dlp.v2
- * @classdesc Represents a TransformationSummary.
- * @implements ITransformationSummary
+ * @classdesc Represents a TransformationResultStatus.
+ * @implements ITransformationResultStatus
* @constructor
- * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set
+ * @param {google.privacy.dlp.v2.ITransformationResultStatus=} [properties] Properties to set
*/
- function TransformationSummary(properties) {
- this.fieldTransformations = [];
- this.results = [];
+ function TransformationResultStatus(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
@@ -33389,165 +36814,89 @@
}
/**
- * TransformationSummary infoType.
- * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @instance
- */
- TransformationSummary.prototype.infoType = null;
-
- /**
- * TransformationSummary field.
- * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @instance
- */
- TransformationSummary.prototype.field = null;
-
- /**
- * TransformationSummary transformation.
- * @member {google.privacy.dlp.v2.IPrimitiveTransformation|null|undefined} transformation
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @instance
- */
- TransformationSummary.prototype.transformation = null;
-
- /**
- * TransformationSummary fieldTransformations.
- * @member {Array.} fieldTransformations
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @instance
- */
- TransformationSummary.prototype.fieldTransformations = $util.emptyArray;
-
- /**
- * TransformationSummary recordSuppress.
- * @member {google.privacy.dlp.v2.IRecordSuppression|null|undefined} recordSuppress
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @instance
- */
- TransformationSummary.prototype.recordSuppress = null;
-
- /**
- * TransformationSummary results.
- * @member {Array.} results
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * TransformationResultStatus resultStatusType.
+ * @member {google.privacy.dlp.v2.TransformationResultStatusType} resultStatusType
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @instance
*/
- TransformationSummary.prototype.results = $util.emptyArray;
+ TransformationResultStatus.prototype.resultStatusType = 0;
/**
- * TransformationSummary transformedBytes.
- * @member {number|Long} transformedBytes
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * TransformationResultStatus details.
+ * @member {google.rpc.IStatus|null|undefined} details
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @instance
*/
- TransformationSummary.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+ TransformationResultStatus.prototype.details = null;
/**
- * Creates a new TransformationSummary instance using the specified properties.
+ * Creates a new TransformationResultStatus instance using the specified properties.
* @function create
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
- * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary instance
+ * @param {google.privacy.dlp.v2.ITransformationResultStatus=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus instance
*/
- TransformationSummary.create = function create(properties) {
- return new TransformationSummary(properties);
+ TransformationResultStatus.create = function create(properties) {
+ return new TransformationResultStatus(properties);
};
/**
- * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * Encodes the specified TransformationResultStatus message. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages.
* @function encode
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
- * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationResultStatus} message TransformationResultStatus message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationSummary.encode = function encode(message, writer) {
+ TransformationResultStatus.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
- if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType"))
- $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.field != null && Object.hasOwnProperty.call(message, "field"))
- $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.transformation != null && Object.hasOwnProperty.call(message, "transformation"))
- $root.google.privacy.dlp.v2.PrimitiveTransformation.encode(message.transformation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.results != null && message.results.length)
- for (var i = 0; i < message.results.length; ++i)
- $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.encode(message.results[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.fieldTransformations != null && message.fieldTransformations.length)
- for (var i = 0; i < message.fieldTransformations.length; ++i)
- $root.google.privacy.dlp.v2.FieldTransformation.encode(message.fieldTransformations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.recordSuppress != null && Object.hasOwnProperty.call(message, "recordSuppress"))
- $root.google.privacy.dlp.v2.RecordSuppression.encode(message.recordSuppress, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes"))
- writer.uint32(/* id 7, wireType 0 =*/56).int64(message.transformedBytes);
+ if (message.resultStatusType != null && Object.hasOwnProperty.call(message, "resultStatusType"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resultStatusType);
+ if (message.details != null && Object.hasOwnProperty.call(message, "details"))
+ $root.google.rpc.Status.encode(message.details, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
return writer;
};
/**
- * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages.
+ * Encodes the specified TransformationResultStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages.
* @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
- * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode
+ * @param {google.privacy.dlp.v2.ITransformationResultStatus} message TransformationResultStatus message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
- TransformationSummary.encodeDelimited = function encodeDelimited(message, writer) {
+ TransformationResultStatus.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
- * Decodes a TransformationSummary message from the specified reader or buffer.
+ * Decodes a TransformationResultStatus message from the specified reader or buffer.
* @function decode
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationSummary.decode = function decode(reader, length) {
+ TransformationResultStatus.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary();
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationResultStatus();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
- message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
+ message.resultStatusType = reader.int32();
break;
}
case 2: {
- message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- if (!(message.fieldTransformations && message.fieldTransformations.length))
- message.fieldTransformations = [];
- message.fieldTransformations.push($root.google.privacy.dlp.v2.FieldTransformation.decode(reader, reader.uint32()));
- break;
- }
- case 6: {
- message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- if (!(message.results && message.results.length))
- message.results = [];
- message.results.push($root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.decode(reader, reader.uint32()));
- break;
- }
- case 7: {
- message.transformedBytes = reader.int64();
+ message.details = $root.google.rpc.Status.decode(reader, reader.uint32());
break;
}
default:
@@ -33559,519 +36908,449 @@
};
/**
- * Decodes a TransformationSummary message from the specified reader or buffer, length delimited.
+ * Decodes a TransformationResultStatus message from the specified reader or buffer, length delimited.
* @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
- TransformationSummary.decodeDelimited = function decodeDelimited(reader) {
+ TransformationResultStatus.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
- * Verifies a TransformationSummary message.
+ * Verifies a TransformationResultStatus message.
* @function verify
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
* @param {Object.} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
- TransformationSummary.verify = function verify(message) {
+ TransformationResultStatus.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
- if (message.infoType != null && message.hasOwnProperty("infoType")) {
- var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType);
- if (error)
- return "infoType." + error;
- }
- if (message.field != null && message.hasOwnProperty("field")) {
- var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field);
- if (error)
- return "field." + error;
- }
- if (message.transformation != null && message.hasOwnProperty("transformation")) {
- var error = $root.google.privacy.dlp.v2.PrimitiveTransformation.verify(message.transformation);
- if (error)
- return "transformation." + error;
- }
- if (message.fieldTransformations != null && message.hasOwnProperty("fieldTransformations")) {
- if (!Array.isArray(message.fieldTransformations))
- return "fieldTransformations: array expected";
- for (var i = 0; i < message.fieldTransformations.length; ++i) {
- var error = $root.google.privacy.dlp.v2.FieldTransformation.verify(message.fieldTransformations[i]);
- if (error)
- return "fieldTransformations." + error;
+ if (message.resultStatusType != null && message.hasOwnProperty("resultStatusType"))
+ switch (message.resultStatusType) {
+ default:
+ return "resultStatusType: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ break;
}
- }
- if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress")) {
- var error = $root.google.privacy.dlp.v2.RecordSuppression.verify(message.recordSuppress);
+ if (message.details != null && message.hasOwnProperty("details")) {
+ var error = $root.google.rpc.Status.verify(message.details);
if (error)
- return "recordSuppress." + error;
- }
- if (message.results != null && message.hasOwnProperty("results")) {
- if (!Array.isArray(message.results))
- return "results: array expected";
- for (var i = 0; i < message.results.length; ++i) {
- var error = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify(message.results[i]);
- if (error)
- return "results." + error;
- }
+ return "details." + error;
}
- if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
- if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high)))
- return "transformedBytes: integer|Long expected";
return null;
};
/**
- * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types.
+ * Creates a TransformationResultStatus message from a plain object. Also converts values to their respective internal types.
* @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
* @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary
+ * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus
*/
- TransformationSummary.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary)
+ TransformationResultStatus.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationResultStatus)
return object;
- var message = new $root.google.privacy.dlp.v2.TransformationSummary();
- if (object.infoType != null) {
- if (typeof object.infoType !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.infoType: object expected");
- message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType);
- }
- if (object.field != null) {
- if (typeof object.field !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.field: object expected");
- message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field);
- }
- if (object.transformation != null) {
- if (typeof object.transformation !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.transformation: object expected");
- message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.fromObject(object.transformation);
- }
- if (object.fieldTransformations) {
- if (!Array.isArray(object.fieldTransformations))
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: array expected");
- message.fieldTransformations = [];
- for (var i = 0; i < object.fieldTransformations.length; ++i) {
- if (typeof object.fieldTransformations[i] !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: object expected");
- message.fieldTransformations[i] = $root.google.privacy.dlp.v2.FieldTransformation.fromObject(object.fieldTransformations[i]);
- }
- }
- if (object.recordSuppress != null) {
- if (typeof object.recordSuppress !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.recordSuppress: object expected");
- message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.fromObject(object.recordSuppress);
+ var message = new $root.google.privacy.dlp.v2.TransformationResultStatus();
+ switch (object.resultStatusType) {
+ case "STATE_TYPE_UNSPECIFIED":
+ case 0:
+ message.resultStatusType = 0;
+ break;
+ case "INVALID_TRANSFORM":
+ case 1:
+ message.resultStatusType = 1;
+ break;
+ case "BIGQUERY_MAX_ROW_SIZE_EXCEEDED":
+ case 2:
+ message.resultStatusType = 2;
+ break;
+ case "METADATA_UNRETRIEVABLE":
+ case 3:
+ message.resultStatusType = 3;
+ break;
+ case "SUCCESS":
+ case 4:
+ message.resultStatusType = 4;
+ break;
}
- if (object.results) {
- if (!Array.isArray(object.results))
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: array expected");
- message.results = [];
- for (var i = 0; i < object.results.length; ++i) {
- if (typeof object.results[i] !== "object")
- throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: object expected");
- message.results[i] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.fromObject(object.results[i]);
- }
+ if (object.details != null) {
+ if (typeof object.details !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationResultStatus.details: object expected");
+ message.details = $root.google.rpc.Status.fromObject(object.details);
}
- if (object.transformedBytes != null)
- if ($util.Long)
- (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false;
- else if (typeof object.transformedBytes === "string")
- message.transformedBytes = parseInt(object.transformedBytes, 10);
- else if (typeof object.transformedBytes === "number")
- message.transformedBytes = object.transformedBytes;
- else if (typeof object.transformedBytes === "object")
- message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber();
return message;
};
/**
- * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified.
+ * Creates a plain object from a TransformationResultStatus message. Also converts values to other types if specified.
* @function toObject
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
- * @param {google.privacy.dlp.v2.TransformationSummary} message TransformationSummary
+ * @param {google.privacy.dlp.v2.TransformationResultStatus} message TransformationResultStatus
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.} Plain object
*/
- TransformationSummary.toObject = function toObject(message, options) {
+ TransformationResultStatus.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
- if (options.arrays || options.defaults) {
- object.results = [];
- object.fieldTransformations = [];
- }
if (options.defaults) {
- object.infoType = null;
- object.field = null;
- object.transformation = null;
- object.recordSuppress = null;
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.transformedBytes = options.longs === String ? "0" : 0;
- }
- if (message.infoType != null && message.hasOwnProperty("infoType"))
- object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options);
- if (message.field != null && message.hasOwnProperty("field"))
- object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options);
- if (message.transformation != null && message.hasOwnProperty("transformation"))
- object.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.toObject(message.transformation, options);
- if (message.results && message.results.length) {
- object.results = [];
- for (var j = 0; j < message.results.length; ++j)
- object.results[j] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.toObject(message.results[j], options);
- }
- if (message.fieldTransformations && message.fieldTransformations.length) {
- object.fieldTransformations = [];
- for (var j = 0; j < message.fieldTransformations.length; ++j)
- object.fieldTransformations[j] = $root.google.privacy.dlp.v2.FieldTransformation.toObject(message.fieldTransformations[j], options);
+ object.resultStatusType = options.enums === String ? "STATE_TYPE_UNSPECIFIED" : 0;
+ object.details = null;
}
- if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress"))
- object.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.toObject(message.recordSuppress, options);
- if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes"))
- if (typeof message.transformedBytes === "number")
- object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes;
- else
- object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes;
+ if (message.resultStatusType != null && message.hasOwnProperty("resultStatusType"))
+ object.resultStatusType = options.enums === String ? $root.google.privacy.dlp.v2.TransformationResultStatusType[message.resultStatusType] : message.resultStatusType;
+ if (message.details != null && message.hasOwnProperty("details"))
+ object.details = $root.google.rpc.Status.toObject(message.details, options);
return object;
};
/**
- * Converts this TransformationSummary to JSON.
+ * Converts this TransformationResultStatus to JSON.
* @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @instance
* @returns {Object.} JSON object
*/
- TransformationSummary.prototype.toJSON = function toJSON() {
+ TransformationResultStatus.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
- * Gets the default type url for TransformationSummary
+ * Gets the default type url for TransformationResultStatus
* @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationSummary
+ * @memberof google.privacy.dlp.v2.TransformationResultStatus
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
- TransformationSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ TransformationResultStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary";
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationResultStatus";
};
- /**
- * TransformationResultCode enum.
- * @name google.privacy.dlp.v2.TransformationSummary.TransformationResultCode
- * @enum {number}
- * @property {number} TRANSFORMATION_RESULT_CODE_UNSPECIFIED=0 TRANSFORMATION_RESULT_CODE_UNSPECIFIED value
- * @property {number} SUCCESS=1 SUCCESS value
- * @property {number} ERROR=2 ERROR value
- */
- TransformationSummary.TransformationResultCode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "SUCCESS"] = 1;
- values[valuesById[2] = "ERROR"] = 2;
- return values;
- })();
+ return TransformationResultStatus;
+ })();
- TransformationSummary.SummaryResult = (function() {
+ /**
+ * TransformationResultStatusType enum.
+ * @name google.privacy.dlp.v2.TransformationResultStatusType
+ * @enum {number}
+ * @property {number} STATE_TYPE_UNSPECIFIED=0 STATE_TYPE_UNSPECIFIED value
+ * @property {number} INVALID_TRANSFORM=1 INVALID_TRANSFORM value
+ * @property {number} BIGQUERY_MAX_ROW_SIZE_EXCEEDED=2 BIGQUERY_MAX_ROW_SIZE_EXCEEDED value
+ * @property {number} METADATA_UNRETRIEVABLE=3 METADATA_UNRETRIEVABLE value
+ * @property {number} SUCCESS=4 SUCCESS value
+ */
+ v2.TransformationResultStatusType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "STATE_TYPE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "INVALID_TRANSFORM"] = 1;
+ values[valuesById[2] = "BIGQUERY_MAX_ROW_SIZE_EXCEEDED"] = 2;
+ values[valuesById[3] = "METADATA_UNRETRIEVABLE"] = 3;
+ values[valuesById[4] = "SUCCESS"] = 4;
+ return values;
+ })();
- /**
- * Properties of a SummaryResult.
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @interface ISummaryResult
- * @property {number|Long|null} [count] SummaryResult count
- * @property {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null} [code] SummaryResult code
- * @property {string|null} [details] SummaryResult details
- */
+ /**
+ * TransformationContainerType enum.
+ * @name google.privacy.dlp.v2.TransformationContainerType
+ * @enum {number}
+ * @property {number} TRANSFORM_UNKNOWN_CONTAINER=0 TRANSFORM_UNKNOWN_CONTAINER value
+ * @property {number} TRANSFORM_BODY=1 TRANSFORM_BODY value
+ * @property {number} TRANSFORM_METADATA=2 TRANSFORM_METADATA value
+ * @property {number} TRANSFORM_TABLE=3 TRANSFORM_TABLE value
+ */
+ v2.TransformationContainerType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "TRANSFORM_UNKNOWN_CONTAINER"] = 0;
+ values[valuesById[1] = "TRANSFORM_BODY"] = 1;
+ values[valuesById[2] = "TRANSFORM_METADATA"] = 2;
+ values[valuesById[3] = "TRANSFORM_TABLE"] = 3;
+ return values;
+ })();
- /**
- * Constructs a new SummaryResult.
- * @memberof google.privacy.dlp.v2.TransformationSummary
- * @classdesc Represents a SummaryResult.
- * @implements ISummaryResult
- * @constructor
- * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set
- */
- function SummaryResult(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
+ /**
+ * TransformationType enum.
+ * @name google.privacy.dlp.v2.TransformationType
+ * @enum {number}
+ * @property {number} TRANSFORMATION_TYPE_UNSPECIFIED=0 TRANSFORMATION_TYPE_UNSPECIFIED value
+ * @property {number} RECORD_SUPPRESSION=1 RECORD_SUPPRESSION value
+ * @property {number} REPLACE_VALUE=2 REPLACE_VALUE value
+ * @property {number} REPLACE_DICTIONARY=15 REPLACE_DICTIONARY value
+ * @property {number} REDACT=3 REDACT value
+ * @property {number} CHARACTER_MASK=4 CHARACTER_MASK value
+ * @property {number} CRYPTO_REPLACE_FFX_FPE=5 CRYPTO_REPLACE_FFX_FPE value
+ * @property {number} FIXED_SIZE_BUCKETING=6 FIXED_SIZE_BUCKETING value
+ * @property {number} BUCKETING=7 BUCKETING value
+ * @property {number} REPLACE_WITH_INFO_TYPE=8 REPLACE_WITH_INFO_TYPE value
+ * @property {number} TIME_PART=9 TIME_PART value
+ * @property {number} CRYPTO_HASH=10 CRYPTO_HASH value
+ * @property {number} DATE_SHIFT=12 DATE_SHIFT value
+ * @property {number} CRYPTO_DETERMINISTIC_CONFIG=13 CRYPTO_DETERMINISTIC_CONFIG value
+ * @property {number} REDACT_IMAGE=14 REDACT_IMAGE value
+ */
+ v2.TransformationType = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "TRANSFORMATION_TYPE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "RECORD_SUPPRESSION"] = 1;
+ values[valuesById[2] = "REPLACE_VALUE"] = 2;
+ values[valuesById[15] = "REPLACE_DICTIONARY"] = 15;
+ values[valuesById[3] = "REDACT"] = 3;
+ values[valuesById[4] = "CHARACTER_MASK"] = 4;
+ values[valuesById[5] = "CRYPTO_REPLACE_FFX_FPE"] = 5;
+ values[valuesById[6] = "FIXED_SIZE_BUCKETING"] = 6;
+ values[valuesById[7] = "BUCKETING"] = 7;
+ values[valuesById[8] = "REPLACE_WITH_INFO_TYPE"] = 8;
+ values[valuesById[9] = "TIME_PART"] = 9;
+ values[valuesById[10] = "CRYPTO_HASH"] = 10;
+ values[valuesById[12] = "DATE_SHIFT"] = 12;
+ values[valuesById[13] = "CRYPTO_DETERMINISTIC_CONFIG"] = 13;
+ values[valuesById[14] = "REDACT_IMAGE"] = 14;
+ return values;
+ })();
- /**
- * SummaryResult count.
- * @member {number|Long} count
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @instance
- */
- SummaryResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+ v2.TransformationDetailsStorageConfig = (function() {
- /**
- * SummaryResult code.
- * @member {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode} code
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @instance
- */
- SummaryResult.prototype.code = 0;
+ /**
+ * Properties of a TransformationDetailsStorageConfig.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationDetailsStorageConfig
+ * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] TransformationDetailsStorageConfig table
+ */
- /**
- * SummaryResult details.
- * @member {string} details
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @instance
- */
- SummaryResult.prototype.details = "";
+ /**
+ * Constructs a new TransformationDetailsStorageConfig.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationDetailsStorageConfig.
+ * @implements ITransformationDetailsStorageConfig
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig=} [properties] Properties to set
+ */
+ function TransformationDetailsStorageConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
- /**
- * Creates a new SummaryResult instance using the specified properties.
- * @function create
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult instance
- */
- SummaryResult.create = function create(properties) {
- return new SummaryResult(properties);
- };
+ /**
+ * TransformationDetailsStorageConfig table.
+ * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @instance
+ */
+ TransformationDetailsStorageConfig.prototype.table = null;
- /**
- * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
- * @function encode
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SummaryResult.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.count != null && Object.hasOwnProperty.call(message, "count"))
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count);
- if (message.code != null && Object.hasOwnProperty.call(message, "code"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.code);
- if (message.details != null && Object.hasOwnProperty.call(message, "details"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.details);
- return writer;
- };
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
- /**
- * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SummaryResult.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
+ /**
+ * TransformationDetailsStorageConfig type.
+ * @member {"table"|undefined} type
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @instance
+ */
+ Object.defineProperty(TransformationDetailsStorageConfig.prototype, "type", {
+ get: $util.oneOfGetter($oneOfFields = ["table"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new TransformationDetailsStorageConfig instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig instance
+ */
+ TransformationDetailsStorageConfig.create = function create(properties) {
+ return new TransformationDetailsStorageConfig(properties);
+ };
- /**
- * Decodes a SummaryResult message from the specified reader or buffer.
- * @function decode
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SummaryResult.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.count = reader.int64();
- break;
- }
- case 2: {
- message.code = reader.int32();
- break;
- }
- case 3: {
- message.details = reader.string();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
+ /**
+ * Encodes the specified TransformationDetailsStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig} message TransformationDetailsStorageConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationDetailsStorageConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.table != null && Object.hasOwnProperty.call(message, "table"))
+ $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
- /**
- * Decodes a SummaryResult message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SummaryResult.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
+ /**
+ * Encodes the specified TransformationDetailsStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig} message TransformationDetailsStorageConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationDetailsStorageConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
- /**
- * Verifies a SummaryResult message.
- * @function verify
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- SummaryResult.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.count != null && message.hasOwnProperty("count"))
- if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))
- return "count: integer|Long expected";
- if (message.code != null && message.hasOwnProperty("code"))
- switch (message.code) {
- default:
- return "code: enum value expected";
- case 0:
- case 1:
- case 2:
+ /**
+ * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationDetailsStorageConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32());
break;
}
- if (message.details != null && message.hasOwnProperty("details"))
- if (!$util.isString(message.details))
- return "details: string expected";
- return null;
- };
-
- /**
- * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult
- */
- SummaryResult.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult)
- return object;
- var message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult();
- if (object.count != null)
- if ($util.Long)
- (message.count = $util.Long.fromValue(object.count)).unsigned = false;
- else if (typeof object.count === "string")
- message.count = parseInt(object.count, 10);
- else if (typeof object.count === "number")
- message.count = object.count;
- else if (typeof object.count === "object")
- message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();
- switch (object.code) {
- case "TRANSFORMATION_RESULT_CODE_UNSPECIFIED":
- case 0:
- message.code = 0;
- break;
- case "SUCCESS":
- case 1:
- message.code = 1;
- break;
- case "ERROR":
- case 2:
- message.code = 2;
+ default:
+ reader.skipType(tag & 7);
break;
}
- if (object.details != null)
- message.details = String(object.details);
- return message;
- };
+ }
+ return message;
+ };
- /**
- * Creates a plain object from a SummaryResult message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {google.privacy.dlp.v2.TransformationSummary.SummaryResult} message SummaryResult
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- SummaryResult.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.count = options.longs === String ? "0" : 0;
- object.code = options.enums === String ? "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" : 0;
- object.details = "";
+ /**
+ * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationDetailsStorageConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationDetailsStorageConfig message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationDetailsStorageConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.table != null && message.hasOwnProperty("table")) {
+ properties.type = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table);
+ if (error)
+ return "table." + error;
}
- if (message.count != null && message.hasOwnProperty("count"))
- if (typeof message.count === "number")
- object.count = options.longs === String ? String(message.count) : message.count;
- else
- object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
- if (message.code != null && message.hasOwnProperty("code"))
- object.code = options.enums === String ? $root.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode[message.code] : message.code;
- if (message.details != null && message.hasOwnProperty("details"))
- object.details = message.details;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TransformationDetailsStorageConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig
+ */
+ TransformationDetailsStorageConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig)
return object;
- };
+ var message = new $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig();
+ if (object.table != null) {
+ if (typeof object.table !== "object")
+ throw TypeError(".google.privacy.dlp.v2.TransformationDetailsStorageConfig.table: object expected");
+ message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table);
+ }
+ return message;
+ };
- /**
- * Converts this SummaryResult to JSON.
- * @function toJSON
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @instance
- * @returns {Object.} JSON object
- */
- SummaryResult.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
+ /**
+ * Creates a plain object from a TransformationDetailsStorageConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationDetailsStorageConfig} message TransformationDetailsStorageConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationDetailsStorageConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (message.table != null && message.hasOwnProperty("table")) {
+ object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options);
+ if (options.oneofs)
+ object.type = "table";
+ }
+ return object;
+ };
- /**
- * Gets the default type url for SummaryResult
- * @function getTypeUrl
- * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- SummaryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary.SummaryResult";
- };
+ /**
+ * Converts this TransformationDetailsStorageConfig to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationDetailsStorageConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
- return SummaryResult;
- })();
+ /**
+ * Gets the default type url for TransformationDetailsStorageConfig
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationDetailsStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDetailsStorageConfig";
+ };
- return TransformationSummary;
+ return TransformationDetailsStorageConfig;
})();
v2.Schedule = (function() {
@@ -36205,6 +39484,7 @@
* @property {google.privacy.dlp.v2.Action.IPublishToPubSub|null} [pubSub] Action pubSub
* @property {google.privacy.dlp.v2.Action.IPublishSummaryToCscc|null} [publishSummaryToCscc] Action publishSummaryToCscc
* @property {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null} [publishFindingsToCloudDataCatalog] Action publishFindingsToCloudDataCatalog
+ * @property {google.privacy.dlp.v2.Action.IDeidentify|null} [deidentify] Action deidentify
* @property {google.privacy.dlp.v2.Action.IJobNotificationEmails|null} [jobNotificationEmails] Action jobNotificationEmails
* @property {google.privacy.dlp.v2.Action.IPublishToStackdriver|null} [publishToStackdriver] Action publishToStackdriver
*/
@@ -36256,6 +39536,14 @@
*/
Action.prototype.publishFindingsToCloudDataCatalog = null;
+ /**
+ * Action deidentify.
+ * @member {google.privacy.dlp.v2.Action.IDeidentify|null|undefined} deidentify
+ * @memberof google.privacy.dlp.v2.Action
+ * @instance
+ */
+ Action.prototype.deidentify = null;
+
/**
* Action jobNotificationEmails.
* @member {google.privacy.dlp.v2.Action.IJobNotificationEmails|null|undefined} jobNotificationEmails
@@ -36277,12 +39565,12 @@
/**
* Action action.
- * @member {"saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"jobNotificationEmails"|"publishToStackdriver"|undefined} action
+ * @member {"saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"deidentify"|"jobNotificationEmails"|"publishToStackdriver"|undefined} action
* @memberof google.privacy.dlp.v2.Action
* @instance
*/
Object.defineProperty(Action.prototype, "action", {
- get: $util.oneOfGetter($oneOfFields = ["saveFindings", "pubSub", "publishSummaryToCscc", "publishFindingsToCloudDataCatalog", "jobNotificationEmails", "publishToStackdriver"]),
+ get: $util.oneOfGetter($oneOfFields = ["saveFindings", "pubSub", "publishSummaryToCscc", "publishFindingsToCloudDataCatalog", "deidentify", "jobNotificationEmails", "publishToStackdriver"]),
set: $util.oneOfSetter($oneOfFields)
});
@@ -36318,6 +39606,8 @@
$root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.encode(message.publishSummaryToCscc, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
if (message.publishFindingsToCloudDataCatalog != null && Object.hasOwnProperty.call(message, "publishFindingsToCloudDataCatalog"))
$root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.encode(message.publishFindingsToCloudDataCatalog, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.deidentify != null && Object.hasOwnProperty.call(message, "deidentify"))
+ $root.google.privacy.dlp.v2.Action.Deidentify.encode(message.deidentify, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
if (message.jobNotificationEmails != null && Object.hasOwnProperty.call(message, "jobNotificationEmails"))
$root.google.privacy.dlp.v2.Action.JobNotificationEmails.encode(message.jobNotificationEmails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
if (message.publishToStackdriver != null && Object.hasOwnProperty.call(message, "publishToStackdriver"))
@@ -36372,6 +39662,10 @@
message.publishFindingsToCloudDataCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.decode(reader, reader.uint32());
break;
}
+ case 7: {
+ message.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.decode(reader, reader.uint32());
+ break;
+ }
case 8: {
message.jobNotificationEmails = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.decode(reader, reader.uint32());
break;
@@ -36454,6 +39748,16 @@
return "publishFindingsToCloudDataCatalog." + error;
}
}
+ if (message.deidentify != null && message.hasOwnProperty("deidentify")) {
+ if (properties.action === 1)
+ return "action: multiple values";
+ properties.action = 1;
+ {
+ var error = $root.google.privacy.dlp.v2.Action.Deidentify.verify(message.deidentify);
+ if (error)
+ return "deidentify." + error;
+ }
+ }
if (message.jobNotificationEmails != null && message.hasOwnProperty("jobNotificationEmails")) {
if (properties.action === 1)
return "action: multiple values";
@@ -36509,6 +39813,11 @@
throw TypeError(".google.privacy.dlp.v2.Action.publishFindingsToCloudDataCatalog: object expected");
message.publishFindingsToCloudDataCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.fromObject(object.publishFindingsToCloudDataCatalog);
}
+ if (object.deidentify != null) {
+ if (typeof object.deidentify !== "object")
+ throw TypeError(".google.privacy.dlp.v2.Action.deidentify: object expected");
+ message.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.fromObject(object.deidentify);
+ }
if (object.jobNotificationEmails != null) {
if (typeof object.jobNotificationEmails !== "object")
throw TypeError(".google.privacy.dlp.v2.Action.jobNotificationEmails: object expected");
@@ -36555,6 +39864,11 @@
if (options.oneofs)
object.action = "publishFindingsToCloudDataCatalog";
}
+ if (message.deidentify != null && message.hasOwnProperty("deidentify")) {
+ object.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.toObject(message.deidentify, options);
+ if (options.oneofs)
+ object.action = "deidentify";
+ }
if (message.jobNotificationEmails != null && message.hasOwnProperty("jobNotificationEmails")) {
object.jobNotificationEmails = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.toObject(message.jobNotificationEmails, options);
if (options.oneofs)
@@ -37355,6 +40669,393 @@
return PublishFindingsToCloudDataCatalog;
})();
+ Action.Deidentify = (function() {
+
+ /**
+ * Properties of a Deidentify.
+ * @memberof google.privacy.dlp.v2.Action
+ * @interface IDeidentify
+ * @property {google.privacy.dlp.v2.ITransformationConfig|null} [transformationConfig] Deidentify transformationConfig
+ * @property {google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null} [transformationDetailsStorageConfig] Deidentify transformationDetailsStorageConfig
+ * @property {string|null} [cloudStorageOutput] Deidentify cloudStorageOutput
+ * @property {Array.|null} [fileTypesToTransform] Deidentify fileTypesToTransform
+ */
+
+ /**
+ * Constructs a new Deidentify.
+ * @memberof google.privacy.dlp.v2.Action
+ * @classdesc Represents a Deidentify.
+ * @implements IDeidentify
+ * @constructor
+ * @param {google.privacy.dlp.v2.Action.IDeidentify=} [properties] Properties to set
+ */
+ function Deidentify(properties) {
+ this.fileTypesToTransform = [];
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * Deidentify transformationConfig.
+ * @member {google.privacy.dlp.v2.ITransformationConfig|null|undefined} transformationConfig
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ */
+ Deidentify.prototype.transformationConfig = null;
+
+ /**
+ * Deidentify transformationDetailsStorageConfig.
+ * @member {google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null|undefined} transformationDetailsStorageConfig
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ */
+ Deidentify.prototype.transformationDetailsStorageConfig = null;
+
+ /**
+ * Deidentify cloudStorageOutput.
+ * @member {string|null|undefined} cloudStorageOutput
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ */
+ Deidentify.prototype.cloudStorageOutput = null;
+
+ /**
+ * Deidentify fileTypesToTransform.
+ * @member {Array.} fileTypesToTransform
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ */
+ Deidentify.prototype.fileTypesToTransform = $util.emptyArray;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * Deidentify output.
+ * @member {"cloudStorageOutput"|undefined} output
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ */
+ Object.defineProperty(Deidentify.prototype, "output", {
+ get: $util.oneOfGetter($oneOfFields = ["cloudStorageOutput"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new Deidentify instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {google.privacy.dlp.v2.Action.IDeidentify=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify instance
+ */
+ Deidentify.create = function create(properties) {
+ return new Deidentify(properties);
+ };
+
+ /**
+ * Encodes the specified Deidentify message. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {google.privacy.dlp.v2.Action.IDeidentify} message Deidentify message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Deidentify.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.transformationDetailsStorageConfig != null && Object.hasOwnProperty.call(message, "transformationDetailsStorageConfig"))
+ $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.encode(message.transformationDetailsStorageConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.transformationConfig != null && Object.hasOwnProperty.call(message, "transformationConfig"))
+ $root.google.privacy.dlp.v2.TransformationConfig.encode(message.transformationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.fileTypesToTransform != null && message.fileTypesToTransform.length) {
+ writer.uint32(/* id 8, wireType 2 =*/66).fork();
+ for (var i = 0; i < message.fileTypesToTransform.length; ++i)
+ writer.int32(message.fileTypesToTransform[i]);
+ writer.ldelim();
+ }
+ if (message.cloudStorageOutput != null && Object.hasOwnProperty.call(message, "cloudStorageOutput"))
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudStorageOutput);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Deidentify message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {google.privacy.dlp.v2.Action.IDeidentify} message Deidentify message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Deidentify.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Deidentify message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Deidentify.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.Deidentify();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 7: {
+ message.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 9: {
+ message.cloudStorageOutput = reader.string();
+ break;
+ }
+ case 8: {
+ if (!(message.fileTypesToTransform && message.fileTypesToTransform.length))
+ message.fileTypesToTransform = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.fileTypesToTransform.push(reader.int32());
+ } else
+ message.fileTypesToTransform.push(reader.int32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Deidentify message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Deidentify.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Deidentify message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Deidentify.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.transformationConfig != null && message.hasOwnProperty("transformationConfig")) {
+ var error = $root.google.privacy.dlp.v2.TransformationConfig.verify(message.transformationConfig);
+ if (error)
+ return "transformationConfig." + error;
+ }
+ if (message.transformationDetailsStorageConfig != null && message.hasOwnProperty("transformationDetailsStorageConfig")) {
+ var error = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify(message.transformationDetailsStorageConfig);
+ if (error)
+ return "transformationDetailsStorageConfig." + error;
+ }
+ if (message.cloudStorageOutput != null && message.hasOwnProperty("cloudStorageOutput")) {
+ properties.output = 1;
+ if (!$util.isString(message.cloudStorageOutput))
+ return "cloudStorageOutput: string expected";
+ }
+ if (message.fileTypesToTransform != null && message.hasOwnProperty("fileTypesToTransform")) {
+ if (!Array.isArray(message.fileTypesToTransform))
+ return "fileTypesToTransform: array expected";
+ for (var i = 0; i < message.fileTypesToTransform.length; ++i)
+ switch (message.fileTypesToTransform[i]) {
+ default:
+ return "fileTypesToTransform: enum value[] expected";
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 11:
+ case 12:
+ break;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a Deidentify message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify
+ */
+ Deidentify.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.Action.Deidentify)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.Action.Deidentify();
+ if (object.transformationConfig != null) {
+ if (typeof object.transformationConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.transformationConfig: object expected");
+ message.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.fromObject(object.transformationConfig);
+ }
+ if (object.transformationDetailsStorageConfig != null) {
+ if (typeof object.transformationDetailsStorageConfig !== "object")
+ throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.transformationDetailsStorageConfig: object expected");
+ message.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.fromObject(object.transformationDetailsStorageConfig);
+ }
+ if (object.cloudStorageOutput != null)
+ message.cloudStorageOutput = String(object.cloudStorageOutput);
+ if (object.fileTypesToTransform) {
+ if (!Array.isArray(object.fileTypesToTransform))
+ throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.fileTypesToTransform: array expected");
+ message.fileTypesToTransform = [];
+ for (var i = 0; i < object.fileTypesToTransform.length; ++i)
+ switch (object.fileTypesToTransform[i]) {
+ default:
+ case "FILE_TYPE_UNSPECIFIED":
+ case 0:
+ message.fileTypesToTransform[i] = 0;
+ break;
+ case "BINARY_FILE":
+ case 1:
+ message.fileTypesToTransform[i] = 1;
+ break;
+ case "TEXT_FILE":
+ case 2:
+ message.fileTypesToTransform[i] = 2;
+ break;
+ case "IMAGE":
+ case 3:
+ message.fileTypesToTransform[i] = 3;
+ break;
+ case "WORD":
+ case 5:
+ message.fileTypesToTransform[i] = 5;
+ break;
+ case "PDF":
+ case 6:
+ message.fileTypesToTransform[i] = 6;
+ break;
+ case "AVRO":
+ case 7:
+ message.fileTypesToTransform[i] = 7;
+ break;
+ case "CSV":
+ case 8:
+ message.fileTypesToTransform[i] = 8;
+ break;
+ case "TSV":
+ case 9:
+ message.fileTypesToTransform[i] = 9;
+ break;
+ case "POWERPOINT":
+ case 11:
+ message.fileTypesToTransform[i] = 11;
+ break;
+ case "EXCEL":
+ case 12:
+ message.fileTypesToTransform[i] = 12;
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Deidentify message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {google.privacy.dlp.v2.Action.Deidentify} message Deidentify
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Deidentify.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.fileTypesToTransform = [];
+ if (options.defaults) {
+ object.transformationDetailsStorageConfig = null;
+ object.transformationConfig = null;
+ }
+ if (message.transformationDetailsStorageConfig != null && message.hasOwnProperty("transformationDetailsStorageConfig"))
+ object.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.toObject(message.transformationDetailsStorageConfig, options);
+ if (message.transformationConfig != null && message.hasOwnProperty("transformationConfig"))
+ object.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.toObject(message.transformationConfig, options);
+ if (message.fileTypesToTransform && message.fileTypesToTransform.length) {
+ object.fileTypesToTransform = [];
+ for (var j = 0; j < message.fileTypesToTransform.length; ++j)
+ object.fileTypesToTransform[j] = options.enums === String ? $root.google.privacy.dlp.v2.FileType[message.fileTypesToTransform[j]] : message.fileTypesToTransform[j];
+ }
+ if (message.cloudStorageOutput != null && message.hasOwnProperty("cloudStorageOutput")) {
+ object.cloudStorageOutput = message.cloudStorageOutput;
+ if (options.oneofs)
+ object.output = "cloudStorageOutput";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this Deidentify to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Deidentify.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Deidentify
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.Action.Deidentify
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Deidentify.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.Action.Deidentify";
+ };
+
+ return Deidentify;
+ })();
+
Action.JobNotificationEmails = (function() {
/**
@@ -37708,6 +41409,256 @@
return Action;
})();
+ v2.TransformationConfig = (function() {
+
+ /**
+ * Properties of a TransformationConfig.
+ * @memberof google.privacy.dlp.v2
+ * @interface ITransformationConfig
+ * @property {string|null} [deidentifyTemplate] TransformationConfig deidentifyTemplate
+ * @property {string|null} [structuredDeidentifyTemplate] TransformationConfig structuredDeidentifyTemplate
+ * @property {string|null} [imageRedactTemplate] TransformationConfig imageRedactTemplate
+ */
+
+ /**
+ * Constructs a new TransformationConfig.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a TransformationConfig.
+ * @implements ITransformationConfig
+ * @constructor
+ * @param {google.privacy.dlp.v2.ITransformationConfig=} [properties] Properties to set
+ */
+ function TransformationConfig(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * TransformationConfig deidentifyTemplate.
+ * @member {string} deidentifyTemplate
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @instance
+ */
+ TransformationConfig.prototype.deidentifyTemplate = "";
+
+ /**
+ * TransformationConfig structuredDeidentifyTemplate.
+ * @member {string} structuredDeidentifyTemplate
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @instance
+ */
+ TransformationConfig.prototype.structuredDeidentifyTemplate = "";
+
+ /**
+ * TransformationConfig imageRedactTemplate.
+ * @member {string} imageRedactTemplate
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @instance
+ */
+ TransformationConfig.prototype.imageRedactTemplate = "";
+
+ /**
+ * Creates a new TransformationConfig instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationConfig=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig instance
+ */
+ TransformationConfig.create = function create(properties) {
+ return new TransformationConfig(properties);
+ };
+
+ /**
+ * Encodes the specified TransformationConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationConfig} message TransformationConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.deidentifyTemplate);
+ if (message.structuredDeidentifyTemplate != null && Object.hasOwnProperty.call(message, "structuredDeidentifyTemplate"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.structuredDeidentifyTemplate);
+ if (message.imageRedactTemplate != null && Object.hasOwnProperty.call(message, "imageRedactTemplate"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.imageRedactTemplate);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransformationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {google.privacy.dlp.v2.ITransformationConfig} message TransformationConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransformationConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransformationConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationConfig.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.deidentifyTemplate = reader.string();
+ break;
+ }
+ case 2: {
+ message.structuredDeidentifyTemplate = reader.string();
+ break;
+ }
+ case 4: {
+ message.imageRedactTemplate = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransformationConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransformationConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransformationConfig message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransformationConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate"))
+ if (!$util.isString(message.deidentifyTemplate))
+ return "deidentifyTemplate: string expected";
+ if (message.structuredDeidentifyTemplate != null && message.hasOwnProperty("structuredDeidentifyTemplate"))
+ if (!$util.isString(message.structuredDeidentifyTemplate))
+ return "structuredDeidentifyTemplate: string expected";
+ if (message.imageRedactTemplate != null && message.hasOwnProperty("imageRedactTemplate"))
+ if (!$util.isString(message.imageRedactTemplate))
+ return "imageRedactTemplate: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a TransformationConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig
+ */
+ TransformationConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.TransformationConfig)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.TransformationConfig();
+ if (object.deidentifyTemplate != null)
+ message.deidentifyTemplate = String(object.deidentifyTemplate);
+ if (object.structuredDeidentifyTemplate != null)
+ message.structuredDeidentifyTemplate = String(object.structuredDeidentifyTemplate);
+ if (object.imageRedactTemplate != null)
+ message.imageRedactTemplate = String(object.imageRedactTemplate);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransformationConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {google.privacy.dlp.v2.TransformationConfig} message TransformationConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransformationConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.deidentifyTemplate = "";
+ object.structuredDeidentifyTemplate = "";
+ object.imageRedactTemplate = "";
+ }
+ if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate"))
+ object.deidentifyTemplate = message.deidentifyTemplate;
+ if (message.structuredDeidentifyTemplate != null && message.hasOwnProperty("structuredDeidentifyTemplate"))
+ object.structuredDeidentifyTemplate = message.structuredDeidentifyTemplate;
+ if (message.imageRedactTemplate != null && message.hasOwnProperty("imageRedactTemplate"))
+ object.imageRedactTemplate = message.imageRedactTemplate;
+ return object;
+ };
+
+ /**
+ * Converts this TransformationConfig to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransformationConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransformationConfig
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.TransformationConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransformationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationConfig";
+ };
+
+ return TransformationConfig;
+ })();
+
v2.CreateInspectTemplateRequest = (function() {
/**
@@ -51057,250 +55008,6 @@
return values;
})();
- v2.SensitivityScore = (function() {
-
- /**
- * Properties of a SensitivityScore.
- * @memberof google.privacy.dlp.v2
- * @interface ISensitivityScore
- * @property {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null} [score] SensitivityScore score
- */
-
- /**
- * Constructs a new SensitivityScore.
- * @memberof google.privacy.dlp.v2
- * @classdesc Represents a SensitivityScore.
- * @implements ISensitivityScore
- * @constructor
- * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set
- */
- function SensitivityScore(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * SensitivityScore score.
- * @member {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel} score
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @instance
- */
- SensitivityScore.prototype.score = 0;
-
- /**
- * Creates a new SensitivityScore instance using the specified properties.
- * @function create
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set
- * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore instance
- */
- SensitivityScore.create = function create(properties) {
- return new SensitivityScore(properties);
- };
-
- /**
- * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
- * @function encode
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SensitivityScore.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.score != null && Object.hasOwnProperty.call(message, "score"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.score);
- return writer;
- };
-
- /**
- * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SensitivityScore.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a SensitivityScore message from the specified reader or buffer.
- * @function decode
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SensitivityScore.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SensitivityScore();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.score = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a SensitivityScore message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SensitivityScore.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a SensitivityScore message.
- * @function verify
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- SensitivityScore.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.score != null && message.hasOwnProperty("score"))
- switch (message.score) {
- default:
- return "score: enum value expected";
- case 0:
- case 10:
- case 20:
- case 30:
- break;
- }
- return null;
- };
-
- /**
- * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {Object.} object Plain object
- * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
- */
- SensitivityScore.fromObject = function fromObject(object) {
- if (object instanceof $root.google.privacy.dlp.v2.SensitivityScore)
- return object;
- var message = new $root.google.privacy.dlp.v2.SensitivityScore();
- switch (object.score) {
- case "SENSITIVITY_SCORE_UNSPECIFIED":
- case 0:
- message.score = 0;
- break;
- case "SENSITIVITY_LOW":
- case 10:
- message.score = 10;
- break;
- case "SENSITIVITY_MODERATE":
- case 20:
- message.score = 20;
- break;
- case "SENSITIVITY_HIGH":
- case 30:
- message.score = 30;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {google.privacy.dlp.v2.SensitivityScore} message SensitivityScore
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- SensitivityScore.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.score = options.enums === String ? "SENSITIVITY_SCORE_UNSPECIFIED" : 0;
- if (message.score != null && message.hasOwnProperty("score"))
- object.score = options.enums === String ? $root.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel[message.score] : message.score;
- return object;
- };
-
- /**
- * Converts this SensitivityScore to JSON.
- * @function toJSON
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @instance
- * @returns {Object.} JSON object
- */
- SensitivityScore.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for SensitivityScore
- * @function getTypeUrl
- * @memberof google.privacy.dlp.v2.SensitivityScore
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- SensitivityScore.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.privacy.dlp.v2.SensitivityScore";
- };
-
- /**
- * SensitivityScoreLevel enum.
- * @name google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel
- * @enum {number}
- * @property {number} SENSITIVITY_SCORE_UNSPECIFIED=0 SENSITIVITY_SCORE_UNSPECIFIED value
- * @property {number} SENSITIVITY_LOW=10 SENSITIVITY_LOW value
- * @property {number} SENSITIVITY_MODERATE=20 SENSITIVITY_MODERATE value
- * @property {number} SENSITIVITY_HIGH=30 SENSITIVITY_HIGH value
- */
- SensitivityScore.SensitivityScoreLevel = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "SENSITIVITY_SCORE_UNSPECIFIED"] = 0;
- values[valuesById[10] = "SENSITIVITY_LOW"] = 10;
- values[valuesById[20] = "SENSITIVITY_MODERATE"] = 20;
- values[valuesById[30] = "SENSITIVITY_HIGH"] = 30;
- return values;
- })();
-
- return SensitivityScore;
- })();
-
v2.DataRiskLevel = (function() {
/**
@@ -53060,6 +56767,7 @@
* @memberof google.privacy.dlp.v2
* @interface IInfoTypeSummary
* @property {google.privacy.dlp.v2.IInfoType|null} [infoType] InfoTypeSummary infoType
+ * @property {number|null} [estimatedPrevalence] InfoTypeSummary estimatedPrevalence
*/
/**
@@ -53085,6 +56793,14 @@
*/
InfoTypeSummary.prototype.infoType = null;
+ /**
+ * InfoTypeSummary estimatedPrevalence.
+ * @member {number} estimatedPrevalence
+ * @memberof google.privacy.dlp.v2.InfoTypeSummary
+ * @instance
+ */
+ InfoTypeSummary.prototype.estimatedPrevalence = 0;
+
/**
* Creates a new InfoTypeSummary instance using the specified properties.
* @function create
@@ -53111,6 +56827,8 @@
writer = $Writer.create();
if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType"))
$root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.estimatedPrevalence != null && Object.hasOwnProperty.call(message, "estimatedPrevalence"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.estimatedPrevalence);
return writer;
};
@@ -53149,6 +56867,10 @@
message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
break;
}
+ case 2: {
+ message.estimatedPrevalence = reader.int32();
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -53189,6 +56911,9 @@
if (error)
return "infoType." + error;
}
+ if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence"))
+ if (!$util.isInteger(message.estimatedPrevalence))
+ return "estimatedPrevalence: integer expected";
return null;
};
@@ -53209,6 +56934,8 @@
throw TypeError(".google.privacy.dlp.v2.InfoTypeSummary.infoType: object expected");
message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType);
}
+ if (object.estimatedPrevalence != null)
+ message.estimatedPrevalence = object.estimatedPrevalence | 0;
return message;
};
@@ -53225,10 +56952,14 @@
if (!options)
options = {};
var object = {};
- if (options.defaults)
+ if (options.defaults) {
object.infoType = null;
+ object.estimatedPrevalence = 0;
+ }
if (message.infoType != null && message.hasOwnProperty("infoType"))
object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options);
+ if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence"))
+ object.estimatedPrevalence = message.estimatedPrevalence;
return object;
};
@@ -53268,6 +56999,7 @@
* @memberof google.privacy.dlp.v2
* @interface IOtherInfoTypeSummary
* @property {google.privacy.dlp.v2.IInfoType|null} [infoType] OtherInfoTypeSummary infoType
+ * @property {number|null} [estimatedPrevalence] OtherInfoTypeSummary estimatedPrevalence
*/
/**
@@ -53293,6 +57025,14 @@
*/
OtherInfoTypeSummary.prototype.infoType = null;
+ /**
+ * OtherInfoTypeSummary estimatedPrevalence.
+ * @member {number} estimatedPrevalence
+ * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary
+ * @instance
+ */
+ OtherInfoTypeSummary.prototype.estimatedPrevalence = 0;
+
/**
* Creates a new OtherInfoTypeSummary instance using the specified properties.
* @function create
@@ -53319,6 +57059,8 @@
writer = $Writer.create();
if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType"))
$root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.estimatedPrevalence != null && Object.hasOwnProperty.call(message, "estimatedPrevalence"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.estimatedPrevalence);
return writer;
};
@@ -53357,6 +57099,10 @@
message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32());
break;
}
+ case 2: {
+ message.estimatedPrevalence = reader.int32();
+ break;
+ }
default:
reader.skipType(tag & 7);
break;
@@ -53397,6 +57143,9 @@
if (error)
return "infoType." + error;
}
+ if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence"))
+ if (!$util.isInteger(message.estimatedPrevalence))
+ return "estimatedPrevalence: integer expected";
return null;
};
@@ -53417,6 +57166,8 @@
throw TypeError(".google.privacy.dlp.v2.OtherInfoTypeSummary.infoType: object expected");
message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType);
}
+ if (object.estimatedPrevalence != null)
+ message.estimatedPrevalence = object.estimatedPrevalence | 0;
return message;
};
@@ -53433,10 +57184,14 @@
if (!options)
options = {};
var object = {};
- if (options.defaults)
+ if (options.defaults) {
object.infoType = null;
+ object.estimatedPrevalence = 0;
+ }
if (message.infoType != null && message.hasOwnProperty("infoType"))
object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options);
+ if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence"))
+ object.estimatedPrevalence = message.estimatedPrevalence;
return object;
};
@@ -54748,6 +58503,250 @@
return InfoType;
})();
+ v2.SensitivityScore = (function() {
+
+ /**
+ * Properties of a SensitivityScore.
+ * @memberof google.privacy.dlp.v2
+ * @interface ISensitivityScore
+ * @property {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null} [score] SensitivityScore score
+ */
+
+ /**
+ * Constructs a new SensitivityScore.
+ * @memberof google.privacy.dlp.v2
+ * @classdesc Represents a SensitivityScore.
+ * @implements ISensitivityScore
+ * @constructor
+ * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set
+ */
+ function SensitivityScore(properties) {
+ if (properties)
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
+ if (properties[keys[i]] != null)
+ this[keys[i]] = properties[keys[i]];
+ }
+
+ /**
+ * SensitivityScore score.
+ * @member {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel} score
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @instance
+ */
+ SensitivityScore.prototype.score = 0;
+
+ /**
+ * Creates a new SensitivityScore instance using the specified properties.
+ * @function create
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set
+ * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore instance
+ */
+ SensitivityScore.create = function create(properties) {
+ return new SensitivityScore(properties);
+ };
+
+ /**
+ * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
+ * @function encode
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SensitivityScore.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.score != null && Object.hasOwnProperty.call(message, "score"))
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.score);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SensitivityScore.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a SensitivityScore message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SensitivityScore.decode = function decode(reader, length) {
+ if (!(reader instanceof $Reader))
+ reader = $Reader.create(reader);
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SensitivityScore();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.score = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a SensitivityScore message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SensitivityScore.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a SensitivityScore message.
+ * @function verify
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ SensitivityScore.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.score != null && message.hasOwnProperty("score"))
+ switch (message.score) {
+ default:
+ return "score: enum value expected";
+ case 0:
+ case 10:
+ case 20:
+ case 30:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore
+ */
+ SensitivityScore.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.privacy.dlp.v2.SensitivityScore)
+ return object;
+ var message = new $root.google.privacy.dlp.v2.SensitivityScore();
+ switch (object.score) {
+ case "SENSITIVITY_SCORE_UNSPECIFIED":
+ case 0:
+ message.score = 0;
+ break;
+ case "SENSITIVITY_LOW":
+ case 10:
+ message.score = 10;
+ break;
+ case "SENSITIVITY_MODERATE":
+ case 20:
+ message.score = 20;
+ break;
+ case "SENSITIVITY_HIGH":
+ case 30:
+ message.score = 30;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {google.privacy.dlp.v2.SensitivityScore} message SensitivityScore
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ SensitivityScore.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.score = options.enums === String ? "SENSITIVITY_SCORE_UNSPECIFIED" : 0;
+ if (message.score != null && message.hasOwnProperty("score"))
+ object.score = options.enums === String ? $root.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel[message.score] : message.score;
+ return object;
+ };
+
+ /**
+ * Converts this SensitivityScore to JSON.
+ * @function toJSON
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SensitivityScore.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for SensitivityScore
+ * @function getTypeUrl
+ * @memberof google.privacy.dlp.v2.SensitivityScore
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SensitivityScore.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.privacy.dlp.v2.SensitivityScore";
+ };
+
+ /**
+ * SensitivityScoreLevel enum.
+ * @name google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel
+ * @enum {number}
+ * @property {number} SENSITIVITY_SCORE_UNSPECIFIED=0 SENSITIVITY_SCORE_UNSPECIFIED value
+ * @property {number} SENSITIVITY_LOW=10 SENSITIVITY_LOW value
+ * @property {number} SENSITIVITY_MODERATE=20 SENSITIVITY_MODERATE value
+ * @property {number} SENSITIVITY_HIGH=30 SENSITIVITY_HIGH value
+ */
+ SensitivityScore.SensitivityScoreLevel = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "SENSITIVITY_SCORE_UNSPECIFIED"] = 0;
+ values[valuesById[10] = "SENSITIVITY_LOW"] = 10;
+ values[valuesById[20] = "SENSITIVITY_MODERATE"] = 20;
+ values[valuesById[30] = "SENSITIVITY_HIGH"] = 30;
+ return values;
+ })();
+
+ return SensitivityScore;
+ })();
+
/**
* Likelihood enum.
* @name google.privacy.dlp.v2.Likelihood
diff --git a/protos/protos.json b/protos/protos.json
index 01de0bcb..67a6eb7a 100644
--- a/protos/protos.json
+++ b/protos/protos.json
@@ -1818,6 +1818,11 @@
"type": "string",
"id": 4
},
+ "versions": {
+ "rule": "repeated",
+ "type": "VersionDescription",
+ "id": 9
+ },
"categories": {
"rule": "repeated",
"type": "InfoTypeCategory",
@@ -1917,6 +1922,18 @@
}
}
},
+ "VersionDescription": {
+ "fields": {
+ "version": {
+ "type": "string",
+ "id": 1
+ },
+ "description": {
+ "type": "string",
+ "id": 2
+ }
+ }
+ },
"ListInfoTypesRequest": {
"fields": {
"parent": {
@@ -2667,7 +2684,8 @@
"transformation": {
"oneof": [
"infoTypeTransformations",
- "recordTransformations"
+ "recordTransformations",
+ "imageTransformations"
]
}
},
@@ -2680,12 +2698,76 @@
"type": "RecordTransformations",
"id": 2
},
+ "imageTransformations": {
+ "type": "ImageTransformations",
+ "id": 4
+ },
"transformationErrorHandling": {
"type": "TransformationErrorHandling",
"id": 3
}
}
},
+ "ImageTransformations": {
+ "fields": {
+ "transforms": {
+ "rule": "repeated",
+ "type": "ImageTransformation",
+ "id": 2
+ }
+ },
+ "nested": {
+ "ImageTransformation": {
+ "oneofs": {
+ "target": {
+ "oneof": [
+ "selectedInfoTypes",
+ "allInfoTypes",
+ "allText"
+ ]
+ }
+ },
+ "fields": {
+ "selectedInfoTypes": {
+ "type": "SelectedInfoTypes",
+ "id": 4
+ },
+ "allInfoTypes": {
+ "type": "AllInfoTypes",
+ "id": 5
+ },
+ "allText": {
+ "type": "AllText",
+ "id": 6
+ },
+ "redactionColor": {
+ "type": "Color",
+ "id": 3
+ }
+ },
+ "nested": {
+ "SelectedInfoTypes": {
+ "fields": {
+ "infoTypes": {
+ "rule": "repeated",
+ "type": "InfoType",
+ "id": 5,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED"
+ }
+ }
+ }
+ },
+ "AllInfoTypes": {
+ "fields": {}
+ },
+ "AllText": {
+ "fields": {}
+ }
+ }
+ }
+ }
+ },
"TransformationErrorHandling": {
"oneofs": {
"mode": {
@@ -3339,6 +3421,158 @@
}
}
},
+ "TransformationDescription": {
+ "fields": {
+ "type": {
+ "type": "TransformationType",
+ "id": 1
+ },
+ "description": {
+ "type": "string",
+ "id": 2
+ },
+ "condition": {
+ "type": "string",
+ "id": 3
+ },
+ "infoType": {
+ "type": "InfoType",
+ "id": 4
+ }
+ }
+ },
+ "TransformationDetails": {
+ "fields": {
+ "resourceName": {
+ "type": "string",
+ "id": 1
+ },
+ "containerName": {
+ "type": "string",
+ "id": 2
+ },
+ "transformation": {
+ "rule": "repeated",
+ "type": "TransformationDescription",
+ "id": 3
+ },
+ "statusDetails": {
+ "type": "TransformationResultStatus",
+ "id": 4
+ },
+ "transformedBytes": {
+ "type": "int64",
+ "id": 5
+ },
+ "transformationLocation": {
+ "type": "TransformationLocation",
+ "id": 6
+ }
+ }
+ },
+ "TransformationLocation": {
+ "oneofs": {
+ "locationType": {
+ "oneof": [
+ "findingId",
+ "recordTransformation"
+ ]
+ }
+ },
+ "fields": {
+ "findingId": {
+ "type": "string",
+ "id": 1
+ },
+ "recordTransformation": {
+ "type": "RecordTransformation",
+ "id": 2
+ },
+ "containerType": {
+ "type": "TransformationContainerType",
+ "id": 3
+ }
+ }
+ },
+ "RecordTransformation": {
+ "fields": {
+ "fieldId": {
+ "type": "FieldId",
+ "id": 1
+ },
+ "containerTimestamp": {
+ "type": "google.protobuf.Timestamp",
+ "id": 2
+ },
+ "containerVersion": {
+ "type": "string",
+ "id": 3
+ }
+ }
+ },
+ "TransformationResultStatus": {
+ "fields": {
+ "resultStatusType": {
+ "type": "TransformationResultStatusType",
+ "id": 1
+ },
+ "details": {
+ "type": "google.rpc.Status",
+ "id": 2
+ }
+ }
+ },
+ "TransformationResultStatusType": {
+ "values": {
+ "STATE_TYPE_UNSPECIFIED": 0,
+ "INVALID_TRANSFORM": 1,
+ "BIGQUERY_MAX_ROW_SIZE_EXCEEDED": 2,
+ "METADATA_UNRETRIEVABLE": 3,
+ "SUCCESS": 4
+ }
+ },
+ "TransformationContainerType": {
+ "values": {
+ "TRANSFORM_UNKNOWN_CONTAINER": 0,
+ "TRANSFORM_BODY": 1,
+ "TRANSFORM_METADATA": 2,
+ "TRANSFORM_TABLE": 3
+ }
+ },
+ "TransformationType": {
+ "values": {
+ "TRANSFORMATION_TYPE_UNSPECIFIED": 0,
+ "RECORD_SUPPRESSION": 1,
+ "REPLACE_VALUE": 2,
+ "REPLACE_DICTIONARY": 15,
+ "REDACT": 3,
+ "CHARACTER_MASK": 4,
+ "CRYPTO_REPLACE_FFX_FPE": 5,
+ "FIXED_SIZE_BUCKETING": 6,
+ "BUCKETING": 7,
+ "REPLACE_WITH_INFO_TYPE": 8,
+ "TIME_PART": 9,
+ "CRYPTO_HASH": 10,
+ "DATE_SHIFT": 12,
+ "CRYPTO_DETERMINISTIC_CONFIG": 13,
+ "REDACT_IMAGE": 14
+ }
+ },
+ "TransformationDetailsStorageConfig": {
+ "oneofs": {
+ "type": {
+ "oneof": [
+ "table"
+ ]
+ }
+ },
+ "fields": {
+ "table": {
+ "type": "BigQueryTable",
+ "id": 1
+ }
+ }
+ },
"Schedule": {
"oneofs": {
"option": {
@@ -3562,6 +3796,7 @@
"pubSub",
"publishSummaryToCscc",
"publishFindingsToCloudDataCatalog",
+ "deidentify",
"jobNotificationEmails",
"publishToStackdriver"
]
@@ -3584,6 +3819,10 @@
"type": "PublishFindingsToCloudDataCatalog",
"id": 5
},
+ "deidentify": {
+ "type": "Deidentify",
+ "id": 7
+ },
"jobNotificationEmails": {
"type": "JobNotificationEmails",
"id": 8
@@ -3616,6 +3855,37 @@
"PublishFindingsToCloudDataCatalog": {
"fields": {}
},
+ "Deidentify": {
+ "oneofs": {
+ "output": {
+ "oneof": [
+ "cloudStorageOutput"
+ ]
+ }
+ },
+ "fields": {
+ "transformationConfig": {
+ "type": "TransformationConfig",
+ "id": 7
+ },
+ "transformationDetailsStorageConfig": {
+ "type": "TransformationDetailsStorageConfig",
+ "id": 3
+ },
+ "cloudStorageOutput": {
+ "type": "string",
+ "id": 9,
+ "options": {
+ "(google.api.field_behavior)": "REQUIRED"
+ }
+ },
+ "fileTypesToTransform": {
+ "rule": "repeated",
+ "type": "FileType",
+ "id": 8
+ }
+ }
+ },
"JobNotificationEmails": {
"fields": {}
},
@@ -3624,6 +3894,22 @@
}
}
},
+ "TransformationConfig": {
+ "fields": {
+ "deidentifyTemplate": {
+ "type": "string",
+ "id": 1
+ },
+ "structuredDeidentifyTemplate": {
+ "type": "string",
+ "id": 2
+ },
+ "imageRedactTemplate": {
+ "type": "string",
+ "id": 4
+ }
+ }
+ },
"CreateInspectTemplateRequest": {
"fields": {
"parent": {
@@ -4680,24 +4966,6 @@
"INVALID": 4
}
},
- "SensitivityScore": {
- "fields": {
- "score": {
- "type": "SensitivityScoreLevel",
- "id": 1
- }
- },
- "nested": {
- "SensitivityScoreLevel": {
- "values": {
- "SENSITIVITY_SCORE_UNSPECIFIED": 0,
- "SENSITIVITY_LOW": 10,
- "SENSITIVITY_MODERATE": 20,
- "SENSITIVITY_HIGH": 30
- }
- }
- }
- },
"DataRiskLevel": {
"fields": {
"score": {
@@ -4875,6 +5143,10 @@
"infoType": {
"type": "InfoType",
"id": 1
+ },
+ "estimatedPrevalence": {
+ "type": "int32",
+ "id": 2
}
}
},
@@ -4883,6 +5155,10 @@
"infoType": {
"type": "InfoType",
"id": 1
+ },
+ "estimatedPrevalence": {
+ "type": "int32",
+ "id": 2
}
}
},
@@ -4969,6 +5245,24 @@
}
}
},
+ "SensitivityScore": {
+ "fields": {
+ "score": {
+ "type": "SensitivityScoreLevel",
+ "id": 1
+ }
+ },
+ "nested": {
+ "SensitivityScoreLevel": {
+ "values": {
+ "SENSITIVITY_SCORE_UNSPECIFIED": 0,
+ "SENSITIVITY_LOW": 10,
+ "SENSITIVITY_MODERATE": 20,
+ "SENSITIVITY_HIGH": 30
+ }
+ }
+ }
+ },
"Likelihood": {
"values": {
"LIKELIHOOD_UNSPECIFIED": 0,
diff --git a/samples/generated/v2/dlp_service.list_deidentify_templates.js b/samples/generated/v2/dlp_service.list_deidentify_templates.js
index 131b783d..1f01dd03 100644
--- a/samples/generated/v2/dlp_service.list_deidentify_templates.js
+++ b/samples/generated/v2/dlp_service.list_deidentify_templates.js
@@ -53,7 +53,7 @@ function main(parent) {
*/
// const pageToken = 'abc123'
/**
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
*/
// const pageSize = 1234
@@ -64,10 +64,10 @@ function main(parent) {
* insignificant.
* Example: `name asc,update_time, create_time desc`
* Supported fields are:
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
*/
// const orderBy = 'abc123'
diff --git a/samples/generated/v2/dlp_service.list_dlp_jobs.js b/samples/generated/v2/dlp_service.list_dlp_jobs.js
index 0c2d9bf9..289cd195 100644
--- a/samples/generated/v2/dlp_service.list_dlp_jobs.js
+++ b/samples/generated/v2/dlp_service.list_dlp_jobs.js
@@ -53,13 +53,13 @@ function main(parent) {
* * Supported fields/values for inspect jobs:
* - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
* - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
- * - `trigger_name` - The resource name of the trigger that created job.
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - `trigger_name` - The name of the trigger that created the job.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * Supported fields for risk analysis jobs:
* - `state` - RUNNING|CANCELED|FINISHED|FAILED
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * The operator must be `=` or `!=`.
* Examples:
* * inspected_storage = cloud_storage AND state = done
@@ -88,9 +88,9 @@ function main(parent) {
* insignificant.
* Example: `name asc, end_time asc, create_time desc`
* Supported fields are:
- * - `create_time`: corresponds to time the job was created.
- * - `end_time`: corresponds to time the job ended.
- * - `name`: corresponds to job's name.
+ * - `create_time`: corresponds to the time the job was created.
+ * - `end_time`: corresponds to the time the job ended.
+ * - `name`: corresponds to the job's name.
* - `state`: corresponds to `state`
*/
// const orderBy = 'abc123'
diff --git a/samples/generated/v2/dlp_service.list_inspect_templates.js b/samples/generated/v2/dlp_service.list_inspect_templates.js
index fc878b30..821b6b6d 100644
--- a/samples/generated/v2/dlp_service.list_inspect_templates.js
+++ b/samples/generated/v2/dlp_service.list_inspect_templates.js
@@ -53,7 +53,7 @@ function main(parent) {
*/
// const pageToken = 'abc123'
/**
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
*/
// const pageSize = 1234
@@ -64,10 +64,10 @@ function main(parent) {
* insignificant.
* Example: `name asc,update_time, create_time desc`
* Supported fields are:
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
*/
// const orderBy = 'abc123'
diff --git a/samples/generated/v2/dlp_service.list_job_triggers.js b/samples/generated/v2/dlp_service.list_job_triggers.js
index 1108ed49..87edaa69 100644
--- a/samples/generated/v2/dlp_service.list_job_triggers.js
+++ b/samples/generated/v2/dlp_service.list_job_triggers.js
@@ -60,11 +60,11 @@ function main(parent) {
* insignificant.
* Example: `name asc,update_time, create_time desc`
* Supported fields are:
- * - `create_time`: corresponds to time the JobTrigger was created.
- * - `update_time`: corresponds to time the JobTrigger was last updated.
+ * - `create_time`: corresponds to the time the JobTrigger was created.
+ * - `update_time`: corresponds to the time the JobTrigger was last updated.
* - `last_run_time`: corresponds to the last time the JobTrigger ran.
- * - `name`: corresponds to JobTrigger's name.
- * - `display_name`: corresponds to JobTrigger's display name.
+ * - `name`: corresponds to the JobTrigger's name.
+ * - `display_name`: corresponds to the JobTrigger's display name.
* - `status`: corresponds to JobTrigger's status.
*/
// const orderBy = 'abc123'
diff --git a/samples/generated/v2/dlp_service.list_stored_info_types.js b/samples/generated/v2/dlp_service.list_stored_info_types.js
index 076de1b0..9b8d1458 100644
--- a/samples/generated/v2/dlp_service.list_stored_info_types.js
+++ b/samples/generated/v2/dlp_service.list_stored_info_types.js
@@ -37,10 +37,6 @@ function main(parent) {
* `projects/`PROJECT_ID`/locations/`LOCATION_ID
* + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID
- * + Organizations scope, location specified:
- * `organizations/`ORG_ID`/locations/`LOCATION_ID
- * + Organizations scope, no location specified (defaults to global):
- * `organizations/`ORG_ID
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
* for processing data:
@@ -53,7 +49,7 @@ function main(parent) {
*/
// const pageToken = 'abc123'
/**
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
*/
// const pageSize = 1234
@@ -64,7 +60,7 @@ function main(parent) {
* insignificant.
* Example: `name asc, display_name, create_time desc`
* Supported fields are:
- * - `create_time`: corresponds to time the most recent version of the
+ * - `create_time`: corresponds to the time the most recent version of the
* resource was created.
* - `state`: corresponds to the state of the resource.
* - `name`: corresponds to resource name.
diff --git a/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json b/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json
index 4cfaf6db..3ac6c502 100644
--- a/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json
+++ b/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json
@@ -259,7 +259,7 @@
"regionTag": "dlp_v2_generated_DlpService_ListInfoTypes_async",
"title": "DlpService listInfoTypes Sample",
"origin": "API_DEFINITION",
- "description": " Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.",
+ "description": " Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.",
"canonical": true,
"file": "dlp_service.list_info_types.js",
"language": "JAVASCRIPT",
@@ -311,7 +311,7 @@
"regionTag": "dlp_v2_generated_DlpService_CreateInspectTemplate_async",
"title": "DlpService createInspectTemplate Sample",
"origin": "API_DEFINITION",
- "description": " Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.",
+ "description": " Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.",
"canonical": true,
"file": "dlp_service.create_inspect_template.js",
"language": "JAVASCRIPT",
@@ -547,7 +547,7 @@
"regionTag": "dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async",
"title": "DlpService createDeidentifyTemplate Sample",
"origin": "API_DEFINITION",
- "description": " Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.",
+ "description": " Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.",
"canonical": true,
"file": "dlp_service.create_deidentify_template.js",
"language": "JAVASCRIPT",
@@ -1271,7 +1271,7 @@
"regionTag": "dlp_v2_generated_DlpService_DeleteDlpJob_async",
"title": "DlpService deleteDlpJob Sample",
"origin": "API_DEFINITION",
- "description": " Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
+ "description": " Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.",
"canonical": true,
"file": "dlp_service.delete_dlp_job.js",
"language": "JAVASCRIPT",
@@ -1498,7 +1498,7 @@
"segments": [
{
"start": 25,
- "end": 94,
+ "end": 90,
"type": "FULL"
}
],
diff --git a/src/v2/dlp_service_client.ts b/src/v2/dlp_service_client.ts
index d608d082..382f731f 100644
--- a/src/v2/dlp_service_client.ts
+++ b/src/v2/dlp_service_client.ts
@@ -17,16 +17,17 @@
// ** All changes to this file may be overwritten. **
/* global window */
-import * as gax from 'google-gax';
-import {
+import type * as gax from 'google-gax';
+import type {
Callback,
CallOptions,
Descriptors,
ClientOptions,
PaginationCallback,
GaxCall,
+ LocationsClient,
+ LocationProtos,
} from 'google-gax';
-
import {Transform} from 'stream';
import * as protos from '../../protos/protos';
import jsonProtos = require('../../protos/protos.json');
@@ -36,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json');
* This file defines retry strategy and timeouts for all API methods in this library.
*/
import * as gapicConfig from './dlp_service_client_config.json';
-
const version = require('../../../package.json').version;
/**
@@ -69,6 +69,7 @@ export class DlpServiceClient {
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
+ locationsClient: LocationsClient;
pathTemplates: {[name: string]: gax.PathTemplate};
dlpServiceStub?: Promise<{[name: string]: Function}>;
@@ -104,8 +105,18 @@ export class DlpServiceClient {
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
+ * need to avoid loading the default gRPC version and want to use the fallback
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
+ * ```
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
+ * const client = new DlpServiceClient({fallback: 'rest'}, gax);
+ * ```
*/
- constructor(opts?: ClientOptions) {
+ constructor(
+ opts?: ClientOptions,
+ gaxInstance?: typeof gax | typeof gax.fallback
+ ) {
// Ensure that options include all the required fields.
const staticMembers = this.constructor as typeof DlpServiceClient;
const servicePath =
@@ -125,8 +136,13 @@ export class DlpServiceClient {
opts['scopes'] = staticMembers.scopes;
}
+ // Load google-gax module synchronously if needed
+ if (!gaxInstance) {
+ gaxInstance = require('google-gax') as typeof gax;
+ }
+
// Choose either gRPC or proto-over-HTTP implementation of google-gax.
- this._gaxModule = opts.fallback ? gax.fallback : gax;
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
@@ -147,6 +163,10 @@ export class DlpServiceClient {
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
}
+ this.locationsClient = new this._gaxModule.LocationsClient(
+ this._gaxGrpc,
+ opts
+ );
// Determine the client header string.
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
@@ -284,7 +304,7 @@ export class DlpServiceClient {
this.innerApiCalls = {};
// Add a warn function to the client constructor so it can be easily tested.
- this.warn = gax.warn;
+ this.warn = this._gaxModule.warn;
}
/**
@@ -552,7 +572,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -668,7 +688,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -799,7 +819,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -933,14 +953,14 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.reidentifyContent(request, options, callback);
}
/**
- * Returns a list of the sensitive information types that the DLP API
+ * Returns a list of the sensitive information types that DLP API
* supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
* learn more.
*
@@ -1031,14 +1051,14 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.listInfoTypes(request, options, callback);
}
/**
- * Creates an InspectTemplate for re-using frequently used configuration
+ * Creates an InspectTemplate for reusing frequently used configuration
* for inspecting content, images, and storage.
* See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
@@ -1152,7 +1172,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -1250,7 +1270,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -1344,7 +1364,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -1438,14 +1458,14 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.deleteInspectTemplate(request, options, callback);
}
/**
- * Creates a DeidentifyTemplate for re-using frequently used configuration
+ * Creates a DeidentifyTemplate for reusing frequently used configuration
* for de-identifying content, images, and storage.
* See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
* more.
@@ -1560,7 +1580,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -1663,7 +1683,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -1762,7 +1782,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -1857,7 +1877,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -1972,7 +1992,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -2063,7 +2083,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2159,7 +2179,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2248,7 +2268,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2335,7 +2355,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2428,7 +2448,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2544,7 +2564,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -2629,7 +2649,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2637,7 +2657,7 @@ export class DlpServiceClient {
}
/**
* Deletes a long-running DlpJob. This method indicates that the client is
- * no longer interested in the DlpJob result. The job will be cancelled if
+ * no longer interested in the DlpJob result. The job will be canceled if
* possible.
* See https://cloud.google.com/dlp/docs/inspecting-storage and
* https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
@@ -2716,7 +2736,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2803,7 +2823,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -2924,7 +2944,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -3026,7 +3046,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -3115,7 +3135,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -3210,7 +3230,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -3306,7 +3326,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -3390,7 +3410,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
@@ -3428,7 +3448,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListInspectTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3440,10 +3460,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3527,7 +3547,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -3563,7 +3583,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListInspectTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3575,10 +3595,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3602,7 +3622,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listInspectTemplates'];
@@ -3646,7 +3666,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListInspectTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3658,10 +3678,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3686,7 +3706,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listInspectTemplates'];
@@ -3730,7 +3750,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListDeidentifyTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3742,10 +3762,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3829,7 +3849,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -3869,7 +3889,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListDeidentifyTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3881,10 +3901,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3908,7 +3928,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listDeidentifyTemplates'];
@@ -3952,7 +3972,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListDeidentifyTemplates`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -3964,10 +3984,10 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the template was created.
- * - `update_time`: corresponds to time the template was last updated.
- * - `name`: corresponds to template's name.
- * - `display_name`: corresponds to template's display name.
+ * - `create_time`: corresponds to the time the template was created.
+ * - `update_time`: corresponds to the time the template was last updated.
+ * - `name`: corresponds to the template's name.
+ * - `display_name`: corresponds to the template's display name.
* @param {string} request.locationId
* Deprecated. This field has no effect.
* @param {object} [options]
@@ -3992,7 +4012,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listDeidentifyTemplates'];
@@ -4043,11 +4063,11 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the JobTrigger was created.
- * - `update_time`: corresponds to time the JobTrigger was last updated.
+ * - `create_time`: corresponds to the time the JobTrigger was created.
+ * - `update_time`: corresponds to the time the JobTrigger was last updated.
* - `last_run_time`: corresponds to the last time the JobTrigger ran.
- * - `name`: corresponds to JobTrigger's name.
- * - `display_name`: corresponds to JobTrigger's display name.
+ * - `name`: corresponds to the JobTrigger's name.
+ * - `display_name`: corresponds to the JobTrigger's display name.
* - `status`: corresponds to JobTrigger's status.
* @param {string} request.filter
* Allows filtering.
@@ -4153,7 +4173,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -4197,11 +4217,11 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the JobTrigger was created.
- * - `update_time`: corresponds to time the JobTrigger was last updated.
+ * - `create_time`: corresponds to the time the JobTrigger was created.
+ * - `update_time`: corresponds to the time the JobTrigger was last updated.
* - `last_run_time`: corresponds to the last time the JobTrigger ran.
- * - `name`: corresponds to JobTrigger's name.
- * - `display_name`: corresponds to JobTrigger's display name.
+ * - `name`: corresponds to the JobTrigger's name.
+ * - `display_name`: corresponds to the JobTrigger's display name.
* - `status`: corresponds to JobTrigger's status.
* @param {string} request.filter
* Allows filtering.
@@ -4253,7 +4273,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listJobTriggers'];
@@ -4305,11 +4325,11 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the JobTrigger was created.
- * - `update_time`: corresponds to time the JobTrigger was last updated.
+ * - `create_time`: corresponds to the time the JobTrigger was created.
+ * - `update_time`: corresponds to the time the JobTrigger was last updated.
* - `last_run_time`: corresponds to the last time the JobTrigger ran.
- * - `name`: corresponds to JobTrigger's name.
- * - `display_name`: corresponds to JobTrigger's display name.
+ * - `name`: corresponds to the JobTrigger's name.
+ * - `display_name`: corresponds to the JobTrigger's display name.
* - `status`: corresponds to JobTrigger's status.
* @param {string} request.filter
* Allows filtering.
@@ -4362,7 +4382,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listJobTriggers'];
@@ -4410,13 +4430,13 @@ export class DlpServiceClient {
* * Supported fields/values for inspect jobs:
* - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
* - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
- * - `trigger_name` - The resource name of the trigger that created job.
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - `trigger_name` - The name of the trigger that created the job.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * Supported fields for risk analysis jobs:
* - `state` - RUNNING|CANCELED|FINISHED|FAILED
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * The operator must be `=` or `!=`.
*
* Examples:
@@ -4443,9 +4463,9 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the job was created.
- * - `end_time`: corresponds to time the job ended.
- * - `name`: corresponds to job's name.
+ * - `create_time`: corresponds to the time the job was created.
+ * - `end_time`: corresponds to the time the job ended.
+ * - `name`: corresponds to the job's name.
* - `state`: corresponds to `state`
* @param {string} request.locationId
* Deprecated. This field has no effect.
@@ -4522,7 +4542,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -4562,13 +4582,13 @@ export class DlpServiceClient {
* * Supported fields/values for inspect jobs:
* - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
* - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
- * - `trigger_name` - The resource name of the trigger that created job.
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - `trigger_name` - The name of the trigger that created the job.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * Supported fields for risk analysis jobs:
* - `state` - RUNNING|CANCELED|FINISHED|FAILED
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * The operator must be `=` or `!=`.
*
* Examples:
@@ -4595,9 +4615,9 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the job was created.
- * - `end_time`: corresponds to time the job ended.
- * - `name`: corresponds to job's name.
+ * - `create_time`: corresponds to the time the job was created.
+ * - `end_time`: corresponds to the time the job ended.
+ * - `name`: corresponds to the job's name.
* - `state`: corresponds to `state`
* @param {string} request.locationId
* Deprecated. This field has no effect.
@@ -4622,7 +4642,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listDlpJobs'];
@@ -4670,13 +4690,13 @@ export class DlpServiceClient {
* * Supported fields/values for inspect jobs:
* - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
* - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
- * - `trigger_name` - The resource name of the trigger that created job.
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - `trigger_name` - The name of the trigger that created the job.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * Supported fields for risk analysis jobs:
* - `state` - RUNNING|CANCELED|FINISHED|FAILED
- * - 'end_time` - Corresponds to time the job finished.
- * - 'start_time` - Corresponds to time the job finished.
+ * - 'end_time` - Corresponds to the time the job finished.
+ * - 'start_time` - Corresponds to the time the job finished.
* * The operator must be `=` or `!=`.
*
* Examples:
@@ -4703,9 +4723,9 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the job was created.
- * - `end_time`: corresponds to time the job ended.
- * - `name`: corresponds to job's name.
+ * - `create_time`: corresponds to the time the job was created.
+ * - `end_time`: corresponds to the time the job ended.
+ * - `name`: corresponds to the job's name.
* - `state`: corresponds to `state`
* @param {string} request.locationId
* Deprecated. This field has no effect.
@@ -4731,7 +4751,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listDlpJobs'];
@@ -4761,10 +4781,6 @@ export class DlpServiceClient {
* `projects/`PROJECT_ID`/locations/`LOCATION_ID
* + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID
- * + Organizations scope, location specified:
- * `organizations/`ORG_ID`/locations/`LOCATION_ID
- * + Organizations scope, no location specified (defaults to global):
- * `organizations/`ORG_ID
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
@@ -4775,7 +4791,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListStoredInfoTypes`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -4787,7 +4803,7 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the most recent version of the
+ * - `create_time`: corresponds to the time the most recent version of the
* resource was created.
* - `state`: corresponds to the state of the resource.
* - `name`: corresponds to resource name.
@@ -4875,7 +4891,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
@@ -4897,10 +4913,6 @@ export class DlpServiceClient {
* `projects/`PROJECT_ID`/locations/`LOCATION_ID
* + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID
- * + Organizations scope, location specified:
- * `organizations/`ORG_ID`/locations/`LOCATION_ID
- * + Organizations scope, no location specified (defaults to global):
- * `organizations/`ORG_ID
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
@@ -4911,7 +4923,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListStoredInfoTypes`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -4923,7 +4935,7 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the most recent version of the
+ * - `create_time`: corresponds to the time the most recent version of the
* resource was created.
* - `state`: corresponds to the state of the resource.
* - `name`: corresponds to resource name.
@@ -4951,7 +4963,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listStoredInfoTypes'];
@@ -4981,10 +4993,6 @@ export class DlpServiceClient {
* `projects/`PROJECT_ID`/locations/`LOCATION_ID
* + Projects scope, no location specified (defaults to global):
* `projects/`PROJECT_ID
- * + Organizations scope, location specified:
- * `organizations/`ORG_ID`/locations/`LOCATION_ID
- * + Organizations scope, no location specified (defaults to global):
- * `organizations/`ORG_ID
*
* The following example `parent` string specifies a parent project with the
* identifier `example-project`, and specifies the `europe-west3` location
@@ -4995,7 +5003,7 @@ export class DlpServiceClient {
* Page token to continue retrieval. Comes from previous call
* to `ListStoredInfoTypes`.
* @param {number} request.pageSize
- * Size of the page, can be limited by server. If zero server returns
+ * Size of the page, can be limited by the server. If zero server returns
* a page of max size 100.
* @param {string} request.orderBy
* Comma separated list of fields to order by,
@@ -5007,7 +5015,7 @@ export class DlpServiceClient {
*
* Supported fields are:
*
- * - `create_time`: corresponds to time the most recent version of the
+ * - `create_time`: corresponds to the time the most recent version of the
* resource was created.
* - `state`: corresponds to the state of the resource.
* - `name`: corresponds to resource name.
@@ -5036,7 +5044,7 @@ export class DlpServiceClient {
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
- gax.routingHeader.fromParams({
+ this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
});
const defaultCallSettings = this._defaults['listStoredInfoTypes'];
@@ -5048,6 +5056,86 @@ export class DlpServiceClient {
callSettings
) as AsyncIterable;
}
+ /**
+ * Gets information about a location.
+ *
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * Resource name for the location.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Promise} - The promise which resolves to an array.
+ * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example
+ * ```
+ * const [response] = await client.getLocation(request);
+ * ```
+ */
+ getLocation(
+ request: LocationProtos.google.cloud.location.IGetLocationRequest,
+ options?:
+ | gax.CallOptions
+ | Callback<
+ LocationProtos.google.cloud.location.ILocation,
+ | LocationProtos.google.cloud.location.IGetLocationRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >,
+ callback?: Callback<
+ LocationProtos.google.cloud.location.ILocation,
+ | LocationProtos.google.cloud.location.IGetLocationRequest
+ | null
+ | undefined,
+ {} | null | undefined
+ >
+ ): Promise {
+ return this.locationsClient.getLocation(request, options, callback);
+ }
+
+ /**
+ * Lists information about the supported locations for this service. Returns an iterable object.
+ *
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
+ * @param {Object} request
+ * The request object that will be sent.
+ * @param {string} request.name
+ * The resource that owns the locations collection, if applicable.
+ * @param {string} request.filter
+ * The standard list filter.
+ * @param {number} request.pageSize
+ * The standard list page size.
+ * @param {string} request.pageToken
+ * The standard list page token.
+ * @param {object} [options]
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
+ * @returns {Object}
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
+ * When you iterate the returned iterable, each element will be an object representing
+ * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page,
+ * so you can stop the iteration when you don't need more results.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
+ * for more details and examples.
+ * @example
+ * ```
+ * const iterable = client.listLocationsAsync(request);
+ * for await (const response of iterable) {
+ * // process response
+ * }
+ * ```
+ */
+ listLocationsAsync(
+ request: LocationProtos.google.cloud.location.IListLocationsRequest,
+ options?: CallOptions
+ ): AsyncIterable {
+ return this.locationsClient.listLocationsAsync(request, options);
+ }
+
// --------------------
// -- Path templates --
// --------------------
@@ -6054,6 +6142,7 @@ export class DlpServiceClient {
return this.dlpServiceStub.then(stub => {
this._terminated = true;
stub.close();
+ this.locationsClient.close();
});
}
return Promise.resolve();
diff --git a/test/gapic_dlp_service_v2.ts b/test/gapic_dlp_service_v2.ts
index ee286268..eb4a112d 100644
--- a/test/gapic_dlp_service_v2.ts
+++ b/test/gapic_dlp_service_v2.ts
@@ -25,7 +25,7 @@ import * as dlpserviceModule from '../src';
import {PassThrough} from 'stream';
-import {protobuf} from 'google-gax';
+import {protobuf, LocationProtos} from 'google-gax';
function generateSampleMessage(instance: T) {
const filledObject = (
@@ -5416,6 +5416,198 @@ describe('v2.DlpServiceClient', () => {
);
});
});
+ describe('getLocation', () => {
+ it('invokes getLocation without error', async () => {
+ const client = new dlpserviceModule.v2.DlpServiceClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new LocationProtos.google.cloud.location.GetLocationRequest()
+ );
+ request.name = '';
+ const expectedHeaderRequestParams = 'name=';
+ const expectedOptions = {
+ otherArgs: {
+ headers: {
+ 'x-goog-request-params': expectedHeaderRequestParams,
+ },
+ },
+ };
+ const expectedResponse = generateSampleMessage(
+ new LocationProtos.google.cloud.location.Location()
+ );
+ client.locationsClient.getLocation = stubSimpleCall(expectedResponse);
+ const response = await client.getLocation(request, expectedOptions);
+ assert.deepStrictEqual(response, [expectedResponse]);
+ assert(
+ (client.locationsClient.getLocation as SinonStub)
+ .getCall(0)
+ .calledWith(request, expectedOptions, undefined)
+ );
+ });
+ it('invokes getLocation without error using callback', async () => {
+ const client = new dlpserviceModule.v2.DlpServiceClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new LocationProtos.google.cloud.location.GetLocationRequest()
+ );
+ request.name = '';
+ const expectedHeaderRequestParams = 'name=';
+ const expectedOptions = {
+ otherArgs: {
+ headers: {
+ 'x-goog-request-params': expectedHeaderRequestParams,
+ },
+ },
+ };
+ const expectedResponse = generateSampleMessage(
+ new LocationProtos.google.cloud.location.Location()
+ );
+ client.locationsClient.getLocation = sinon
+ .stub()
+ .callsArgWith(2, null, expectedResponse);
+ const promise = new Promise((resolve, reject) => {
+ client.getLocation(
+ request,
+ expectedOptions,
+ (
+ err?: Error | null,
+ result?: LocationProtos.google.cloud.location.ILocation | null
+ ) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(result);
+ }
+ }
+ );
+ });
+ const response = await promise;
+ assert.deepStrictEqual(response, expectedResponse);
+ assert((client.locationsClient.getLocation as SinonStub).getCall(0));
+ });
+ it('invokes getLocation with error', async () => {
+ const client = new dlpserviceModule.v2.DlpServiceClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new LocationProtos.google.cloud.location.GetLocationRequest()
+ );
+ request.name = '';
+ const expectedHeaderRequestParams = 'name=';
+ const expectedOptions = {
+ otherArgs: {
+ headers: {
+ 'x-goog-request-params': expectedHeaderRequestParams,
+ },
+ },
+ };
+ const expectedError = new Error('expected');
+ client.locationsClient.getLocation = stubSimpleCall(
+ undefined,
+ expectedError
+ );
+ await assert.rejects(
+ client.getLocation(request, expectedOptions),
+ expectedError
+ );
+ assert(
+ (client.locationsClient.getLocation as SinonStub)
+ .getCall(0)
+ .calledWith(request, expectedOptions, undefined)
+ );
+ });
+ });
+ describe('listLocationsAsync', () => {
+ it('uses async iteration with listLocations without error', async () => {
+ const client = new dlpserviceModule.v2.DlpServiceClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new LocationProtos.google.cloud.location.ListLocationsRequest()
+ );
+ request.name = '';
+ const expectedHeaderRequestParams = 'name=';
+ const expectedResponse = [
+ generateSampleMessage(
+ new LocationProtos.google.cloud.location.Location()
+ ),
+ generateSampleMessage(
+ new LocationProtos.google.cloud.location.Location()
+ ),
+ generateSampleMessage(
+ new LocationProtos.google.cloud.location.Location()
+ ),
+ ];
+ client.locationsClient.descriptors.page.listLocations.asyncIterate =
+ stubAsyncIterationCall(expectedResponse);
+ const responses: LocationProtos.google.cloud.location.ILocation[] = [];
+ const iterable = client.listLocationsAsync(request);
+ for await (const resource of iterable) {
+ responses.push(resource!);
+ }
+ assert.deepStrictEqual(responses, expectedResponse);
+ assert.deepStrictEqual(
+ (
+ client.locationsClient.descriptors.page.listLocations
+ .asyncIterate as SinonStub
+ ).getCall(0).args[1],
+ request
+ );
+ assert.strictEqual(
+ (
+ client.locationsClient.descriptors.page.listLocations
+ .asyncIterate as SinonStub
+ ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'],
+ expectedHeaderRequestParams
+ );
+ });
+ it('uses async iteration with listLocations with error', async () => {
+ const client = new dlpserviceModule.v2.DlpServiceClient({
+ credentials: {client_email: 'bogus', private_key: 'bogus'},
+ projectId: 'bogus',
+ });
+ client.initialize();
+ const request = generateSampleMessage(
+ new LocationProtos.google.cloud.location.ListLocationsRequest()
+ );
+ request.name = '';
+ const expectedHeaderRequestParams = 'name=';
+ const expectedError = new Error('expected');
+ client.locationsClient.descriptors.page.listLocations.asyncIterate =
+ stubAsyncIterationCall(undefined, expectedError);
+ const iterable = client.listLocationsAsync(request);
+ await assert.rejects(async () => {
+ const responses: LocationProtos.google.cloud.location.ILocation[] = [];
+ for await (const resource of iterable) {
+ responses.push(resource!);
+ }
+ });
+ assert.deepStrictEqual(
+ (
+ client.locationsClient.descriptors.page.listLocations
+ .asyncIterate as SinonStub
+ ).getCall(0).args[1],
+ request
+ );
+ assert.strictEqual(
+ (
+ client.locationsClient.descriptors.page.listLocations
+ .asyncIterate as SinonStub
+ ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'],
+ expectedHeaderRequestParams
+ );
+ });
+ });
describe('Path templates', () => {
describe('finding', () => {