diff --git a/packages/google-privacy-dlp/.jsdoc.js b/packages/google-privacy-dlp/.jsdoc.js index abfa05d60f8..c9baf1f32f8 100644 --- a/packages/google-privacy-dlp/.jsdoc.js +++ b/packages/google-privacy-dlp/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto index 0dc4119b8ad..cc077d6d770 100644 --- a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto +++ b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -37,6 +36,10 @@ option java_multiple_files = true; option java_outer_classname = "DlpProto"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; // The Cloud Data Loss Prevention (DLP) API is a service that allows clients // to detect the presence of Personally Identifiable Information (PII) and other @@ -49,7 +52,8 @@ option php_namespace = "Google\\Cloud\\Dlp\\V2"; // https://cloud.google.com/dlp/docs/. service DlpService { option (google.api.default_host) = "dlp.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Finds potentially sensitive info in content. // This method has limits on input size, processing time, and output size. @@ -98,7 +102,8 @@ service DlpService { // When no InfoTypes or CustomInfoTypes are specified in this request, the // system will automatically choose what detectors to run. By default this may // be all types, but may change over time as detectors are updated. - rpc DeidentifyContent(DeidentifyContentRequest) returns (DeidentifyContentResponse) { + rpc DeidentifyContent(DeidentifyContentRequest) + returns (DeidentifyContentResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:deidentify" body: "*" @@ -113,7 +118,8 @@ service DlpService { // See // https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example // to learn more. - rpc ReidentifyContent(ReidentifyContentRequest) returns (ReidentifyContentResponse) { + rpc ReidentifyContent(ReidentifyContentRequest) + returns (ReidentifyContentResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:reidentify" body: "*" @@ -130,9 +136,7 @@ service DlpService { rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { option (google.api.http) = { get: "/v2/infoTypes" - additional_bindings { - get: "/v2/locations/{location_id}/infoTypes" - } + additional_bindings { get: "/v2/locations/{location_id}/infoTypes" } }; option (google.api.method_signature) = "location_id"; } @@ -140,7 +144,8 @@ service DlpService { // 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. - rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) { + rpc CreateInspectTemplate(CreateInspectTemplateRequest) + returns (InspectTemplate) { option (google.api.http) = { post: "/v2/{parent=organizations/*}/inspectTemplates" body: "*" @@ -158,12 +163,14 @@ service DlpService { } }; option (google.api.method_signature) = "parent,inspect_template"; - option (google.api.method_signature) = "parent,inspect_template,location_id"; + option (google.api.method_signature) = + "parent,inspect_template,location_id"; } // Updates the InspectTemplate. // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) returns (InspectTemplate) { + rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) + returns (InspectTemplate) { option (google.api.http) = { patch: "/v2/{name=organizations/*/inspectTemplates/*}" body: "*" @@ -191,9 +198,7 @@ service DlpService { additional_bindings { get: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" } - additional_bindings { - get: "/v2/{name=projects/*/inspectTemplates/*}" - } + additional_bindings { get: "/v2/{name=projects/*/inspectTemplates/*}" } additional_bindings { get: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" } @@ -203,15 +208,14 @@ service DlpService { // Lists InspectTemplates. // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) { + rpc ListInspectTemplates(ListInspectTemplatesRequest) + returns (ListInspectTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/inspectTemplates" additional_bindings { get: "/v2/{parent=organizations/*}/locations/{location_id}/inspectTemplates" } - additional_bindings { - get: "/v2/{parent=projects/*}/inspectTemplates" - } + additional_bindings { get: "/v2/{parent=projects/*}/inspectTemplates" } additional_bindings { get: "/v2/{parent=projects/*}/locations/{location_id}/inspectTemplates" } @@ -221,15 +225,14 @@ service DlpService { // Deletes an InspectTemplate. // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) { + rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/inspectTemplates/*}" additional_bindings { delete: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" } - additional_bindings { - delete: "/v2/{name=projects/*/inspectTemplates/*}" - } + additional_bindings { delete: "/v2/{name=projects/*/inspectTemplates/*}" } additional_bindings { delete: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" } @@ -241,7 +244,8 @@ service DlpService { // for de-identifying content, images, and storage. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. - rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { option (google.api.http) = { post: "/v2/{parent=organizations/*}/deidentifyTemplates" body: "*" @@ -259,13 +263,15 @@ service DlpService { } }; option (google.api.method_signature) = "parent,deidentify_template"; - option (google.api.method_signature) = "parent,deidentify_template,location_id"; + option (google.api.method_signature) = + "parent,deidentify_template,location_id"; } // Updates the DeidentifyTemplate. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. - rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { option (google.api.http) = { patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" body: "*" @@ -282,21 +288,21 @@ service DlpService { body: "*" } }; - option (google.api.method_signature) = "name,deidentify_template,update_mask"; + option (google.api.method_signature) = + "name,deidentify_template,update_mask"; } // Gets a DeidentifyTemplate. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. - rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { option (google.api.http) = { get: "/v2/{name=organizations/*/deidentifyTemplates/*}" additional_bindings { get: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" } - additional_bindings { - get: "/v2/{name=projects/*/deidentifyTemplates/*}" - } + additional_bindings { get: "/v2/{name=projects/*/deidentifyTemplates/*}" } additional_bindings { get: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" } @@ -307,15 +313,14 @@ service DlpService { // Lists DeidentifyTemplates. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. - rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) { + rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) + returns (ListDeidentifyTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/deidentifyTemplates" additional_bindings { get: "/v2/{parent=organizations/*}/locations/{location_id}/deidentifyTemplates" } - additional_bindings { - get: "/v2/{parent=projects/*}/deidentifyTemplates" - } + additional_bindings { get: "/v2/{parent=projects/*}/deidentifyTemplates" } additional_bindings { get: "/v2/{parent=projects/*}/locations/{location_id}/deidentifyTemplates" } @@ -326,7 +331,8 @@ service DlpService { // Deletes a DeidentifyTemplate. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. - rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) { + rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" additional_bindings { @@ -372,6 +378,21 @@ service DlpService { option (google.api.method_signature) = "name,job_trigger,update_mask"; } + // Inspect hybrid content and store findings to a trigger. The inspection + // will be processed asynchronously. To review the findings monitor the + // jobs within the trigger. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) + returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + // Gets a job trigger. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { @@ -386,7 +407,8 @@ service DlpService { // Lists job triggers. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) { + rpc ListJobTriggers(ListJobTriggersRequest) + returns (ListJobTriggersResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*}/jobTriggers" additional_bindings { @@ -398,7 +420,8 @@ service DlpService { // Deletes a job trigger. // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) { + rpc DeleteJobTrigger(DeleteJobTriggerRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/jobTriggers/*}" additional_bindings { @@ -462,9 +485,7 @@ service DlpService { rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { option (google.api.http) = { get: "/v2/{name=projects/*/dlpJobs/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" - } + additional_bindings { get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" } }; option (google.api.method_signature) = "name"; } @@ -503,7 +524,8 @@ service DlpService { // Creates a pre-built stored infoType to be used for inspection. // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to // learn more. - rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) { + rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) + returns (StoredInfoType) { option (google.api.http) = { post: "/v2/{parent=organizations/*}/storedInfoTypes" body: "*" @@ -528,7 +550,8 @@ service DlpService { // will continue to be used until the new version is ready. // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to // learn more. - rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) { + rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) + returns (StoredInfoType) { option (google.api.http) = { patch: "/v2/{name=organizations/*/storedInfoTypes/*}" body: "*" @@ -557,9 +580,7 @@ service DlpService { additional_bindings { get: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" } - additional_bindings { - get: "/v2/{name=projects/*/storedInfoTypes/*}" - } + additional_bindings { get: "/v2/{name=projects/*/storedInfoTypes/*}" } additional_bindings { get: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" } @@ -570,15 +591,14 @@ service DlpService { // Lists stored infoTypes. // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to // learn more. - rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { + rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) + returns (ListStoredInfoTypesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/storedInfoTypes" additional_bindings { get: "/v2/{parent=organizations/*}/locations/{location_id}/storedInfoTypes" } - additional_bindings { - get: "/v2/{parent=projects/*}/storedInfoTypes" - } + additional_bindings { get: "/v2/{parent=projects/*}/storedInfoTypes" } additional_bindings { get: "/v2/{parent=projects/*}/locations/{location_id}/storedInfoTypes" } @@ -589,21 +609,47 @@ service DlpService { // Deletes a stored infoType. // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to // learn more. - rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { + rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/storedInfoTypes/*}" additional_bindings { delete: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" } - additional_bindings { - delete: "/v2/{name=projects/*/storedInfoTypes/*}" - } + additional_bindings { delete: "/v2/{name=projects/*/storedInfoTypes/*}" } additional_bindings { delete: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" } }; option (google.api.method_signature) = "name"; } + + // Inspect hybrid content and store findings to a job. + // To review the findings inspect the job. Inspection will occur + // asynchronously. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) + returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Finish a running hybrid DlpJob. Triggers the finalization steps and running + // of any enabled actions that have not yet run. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish" + body: "*" + }; + } } // List of exclude infoTypes. @@ -681,7 +727,7 @@ message InspectConfig { } // Max number of findings that will be returned for each item scanned. - // When set within `InspectDataSourceRequest`, + // When set within `InspectJobConfig`, // the maximum returned is 2000 regardless if this is set higher. // When set within `InspectContentRequest`, this field is ignored. int32 max_findings_per_item = 1; @@ -823,6 +869,16 @@ message InspectResult { // Represents a piece of potentially sensitive content. message Finding { + option (google.api.resource) = { + type: "dlp.googleapis.com/InspectFinding" + pattern: "projects/{project}/locations/{location}/findings/{finding}" + }; + + // Resource name in format + // projects/{project}/locations/{location}/findings/{finding} + // Populated only when viewing persisted findings. + string name = 14; + // The content that was found. Even if the content is not textual, it // may be converted to a textual representation here. // Provided if `include_quote` is true and the finding is @@ -847,6 +903,44 @@ message Finding { // to true and a supported infoType was requested. Currently supported // infoTypes: DATE, DATE_OF_BIRTH and TIME. QuoteInfo quote_info = 7; + + // The job that stored the finding. + string resource_name = 8 + [(google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" }]; + + // Job trigger name, if applicable, for this finding. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: AIP-122 discourages _name suffixes for + // resource names, but this has existed as part of the bigquery schema + // before this rule existed. --) + string trigger_name = 9 [ + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // The labels associated with this `InspectFinding`. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + // + // No more than 10 labels can be associated with a given finding. + // + // Example: "environment" : "production" + // Example: "pipeline" : "etl" + map labels = 10; + + // Time the job started that produced this finding. + google.protobuf.Timestamp job_create_time = 11; + + // The job that stored the finding. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: AIP-122 discourages _name suffixes for + // resource names, but this has existed as part of the bigquery schema + // before this rule existed. --) + string job_name = 13 + [(google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" }]; } // Specifies the location of the finding. @@ -866,9 +960,13 @@ message Location { // List of nested objects pointing to the precise location of the finding // within the file or record. repeated ContentLocation content_locations = 7; + + // Information about the container where this finding occurred, if available. + Container container = 8; } -// Findings container location data. +// Precise location of the finding within a document, record, image, or metadata +// container. message ContentLocation { // Name of the container where the finding is located. // The top level name is the source file name or table name. Names of some @@ -930,6 +1028,49 @@ message TableLocation { int64 row_index = 1; } +// 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. + string type = 1; + + // Project where the finding was found. + // Can be different from the project that owns the finding. + string project_id = 2; + + // A string representation of the full container name. + // Examples: + // - BigQuery: 'Project:DataSetId.TableId' + // - Google 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 + // 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 + // 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. + google.protobuf.Timestamp update_time = 6; + + // Findings container version, if available + // ("generation" for Google Cloud Storage). + string version = 7; +} + // Generic half-open interval [start, end) message Range { // Index of the first character of the range (inclusive). @@ -985,8 +1126,8 @@ message RedactImageRequest { // The parent resource name, for example projects/my-project-id. string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + type: "cloudresourcemanager.googleapis.com/Project" + }]; // The geographic location to process the request. Reserved for future // extensions. @@ -1036,8 +1177,8 @@ message RedactImageResponse { message DeidentifyContentRequest { // The parent resource name, for example projects/my-project-id. string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + type: "cloudresourcemanager.googleapis.com/Project" + }]; // Configuration for the de-identification of the content item. // Items specified here will override the template referenced by the @@ -1141,8 +1282,8 @@ message ReidentifyContentResponse { message InspectContentRequest { // The parent resource name, for example projects/my-project-id. string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + type: "cloudresourcemanager.googleapis.com/Project" + }]; // Configuration for the inspector. What specified here will override // the template referenced by the inspect_template_name argument. @@ -1172,6 +1313,7 @@ message InspectContentResponse { // Cloud repository for storing output. message OutputStorageConfig { // Predefined schemas for storing findings. + // Only for use with external storage. enum OutputSchema { // Unused. OUTPUT_SCHEMA_UNSPECIFIED = 0; @@ -1221,6 +1363,7 @@ message OutputStorageConfig { // If unspecified, then all available columns will be used for a new table or // an (existing) table with no schema, and no changes will be made to an // existing table that has a schema. + // Only for use with external storage. OutputSchema output_schema = 3; } @@ -1256,6 +1399,12 @@ message InspectDataSourceDetails { // Statistics of how many instances of each info type were found during // inspect job. repeated InfoTypeStats info_type_stats = 3; + + // Statistics related to the processing of hybrid inspect. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + HybridInspectStatistics hybrid_stats = 7; } // The configuration used for this job. @@ -1265,6 +1414,23 @@ message InspectDataSourceDetails { Result result = 3; } +// Statistics related to processing hybrid inspect requests.s +message HybridInspectStatistics { + // The number of hybrid inspection requests processed within this job. + int64 processed_count = 1; + + // The number of hybrid inspection requests aborted because the job ran + // out of quota or was ended before they could be processed. + int64 aborted_count = 2; + + // The number of hybrid requests currently being processed. Only populated + // when called via method `getDlpJob`. + // A burst of traffic may cause hybrid inspect requests to be enqueued. + // Processing will take place as quickly as possible, but resource limitations + // may impact how long a request is enqueued for. + int64 pending_count = 3; +} + // InfoType description. message InfoTypeDescription { // Internal name of the infoType. @@ -1368,10 +1534,11 @@ message StatisticalTable { BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Quasi-identifier columns. - repeated QuasiIdentifierField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + repeated QuasiIdentifierField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; - // Required. The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -1484,15 +1651,16 @@ message PrivacyMetric { BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Quasi-identifier columns. - repeated QuasiIdField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + repeated QuasiIdField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; - // Required. The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; } - // Required. Fields considered to be quasi-identifiers. No two columns can have the - // same tag. + // Required. Fields considered to be quasi-identifiers. No two columns can + // have the same tag. repeated TaggedField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; // ISO 3166-1 alpha-2 region code to use in the statistical modeling. @@ -1511,8 +1679,8 @@ message PrivacyMetric { // Similarly to the k-map metric, we cannot compute δ-presence exactly without // knowing the attack dataset, so we use a statistical model instead. message DeltaPresenceEstimationConfig { - // Required. Fields considered to be quasi-identifiers. No two fields can have the - // same tag. + // Required. Fields considered to be quasi-identifiers. No two fields can + // have the same tag. repeated QuasiId quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; // ISO 3166-1 alpha-2 region code to use in the statistical modeling. @@ -1585,7 +1753,8 @@ message AnalyzeDataSourceRiskDetails { } // Histogram of value frequencies in the column. - repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = + 5; } // Result of the k-anonymity computation. @@ -1665,7 +1834,8 @@ message AnalyzeDataSourceRiskDetails { } // Histogram of l-diversity equivalence class sensitive value frequencies. - repeated LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + repeated LDiversityHistogramBucket + sensitive_value_frequency_histogram_buckets = 5; } // Result of the reidentifiability analysis. Note that these results are an @@ -1771,7 +1941,8 @@ message AnalyzeDataSourceRiskDetails { // {min_probability: 0.3, max_probability: 0.4, frequency: 99} // mean that there are no record with an estimated probability in [0.1, 0.2) // nor larger or equal to 0.4. - repeated DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + repeated DeltaPresenceEstimationHistogramBucket + delta_presence_estimation_histogram = 1; } // Privacy metric to compute. @@ -1891,6 +2062,38 @@ message DeidentifyConfig { // a column within a table. RecordTransformations record_transformations = 2; } + + // Mode for handling transformation errors. If left unspecified, the default + // mode is `TransformationErrorHandling.ThrowError`. + TransformationErrorHandling transformation_error_handling = 3; +} + +// 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 +// `DateShift` transformation would result in a transformation error, since date +// info cannot be extracted from an IP address. +// Information about any incompatible transformations, and how they were +// handled, is returned in the response as part of the +// `TransformationOverviews`. +message TransformationErrorHandling { + // Throw an error and fail the request when a transformation error occurs. + message ThrowError {} + + // Skips the data without modifying it if the requested transformation would + // cause an error. For example, if a `DateShift` transformation were applied + // an an IP address, this mode would leave the IP address unchanged in the + // response. + message LeaveUntransformed {} + + // How transformation errors should be handled. + oneof mode { + // Throw an error + ThrowError throw_error = 1; + + // Ignore errors + LeaveUntransformed leave_untransformed = 2; + } } // A rule for transforming a value. @@ -2043,16 +2246,12 @@ message ReplaceValueConfig { } // Replace each matching finding with the name of the info_type. -message ReplaceWithInfoTypeConfig { - -} +message ReplaceWithInfoTypeConfig {} // Redact a given value. For example, if used with an `InfoTypeTransformation` // transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the // output would be 'My phone number is '. -message RedactConfig { - -} +message RedactConfig {} // Characters to skip when doing deidentification of a value. These will be left // alone and skipped. @@ -2136,18 +2335,18 @@ message CharacterMaskConfig { // // See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. message FixedSizeBucketingConfig { - // Required. Lower bound value of buckets. All values less than `lower_bound` are - // grouped together into a single bucket; for example if `lower_bound` = 10, - // then all values less than 10 are replaced with the value “-10”. + // Required. Lower bound value of buckets. All values less than `lower_bound` + // are grouped together into a single bucket; for example if `lower_bound` = + // 10, then all values less than 10 are replaced with the value “-10”. Value lower_bound = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Upper bound value of buckets. All values greater than upper_bound are - // grouped together into a single bucket; for example if `upper_bound` = 89, - // then all values greater than 89 are replaced with the value “89+”. + // Required. Upper bound value of buckets. All values greater than upper_bound + // are grouped together into a single bucket; for example if `upper_bound` = + // 89, then all values greater than 89 are replaced with the value “89+”. Value upper_bound = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Size of each bucket (except for minimum and maximum buckets). So if - // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + // Required. Size of each bucket (except for minimum and maximum buckets). So + // if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. double bucket_size = 3 [(google.api.field_behavior) = REQUIRED]; @@ -2341,14 +2540,15 @@ message KmsWrappedCryptoKey { // same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting // to learn more. message DateShiftConfig { - // Required. Range of shift in days. Actual shift will be selected at random within this - // range (inclusive ends). Negative means shift to earlier in time. Must not - // be more than 365250 days (1000 years) each direction. + // Required. Range of shift in days. Actual shift will be selected at random + // within this range (inclusive ends). Negative means shift to earlier in + // time. Must not be more than 365250 days (1000 years) each direction. // // For example, 3 means shift date to at most 3 days into the future. int32 upper_bound_days = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. For example, -5 means shift date to at most 5 days back in the past. + // Required. For example, -5 means shift date to at most 5 days back in the + // past. int32 lower_bound_days = 2 [(google.api.field_behavior) = REQUIRED]; // Points to the field that contains the context, for example, an entity id. @@ -2380,12 +2580,14 @@ message InfoTypeTransformations { repeated InfoType info_types = 1; // Required. Primitive transformation to apply to the infoType. - PrimitiveTransformation primitive_transformation = 2 [(google.api.field_behavior) = REQUIRED]; + PrimitiveTransformation primitive_transformation = 2 + [(google.api.field_behavior) = REQUIRED]; } // Required. Transformation for each infoType. Cannot specify more than one // for a given infoType. - repeated InfoTypeTransformation transformations = 1 [(google.api.field_behavior) = REQUIRED]; + repeated InfoTypeTransformation transformations = 1 + [(google.api.field_behavior) = REQUIRED]; } // The transformation to apply to the field. @@ -2577,6 +2779,10 @@ message Schedule { } } +// Job trigger option for hybrid jobs. Jobs must be manually created +// and finished. +message Manual {} + // The inspectTemplate contains a configuration (set of types of sensitive data // to be detected) to be used anywhere you otherwise would normally specify // InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates @@ -2586,6 +2792,8 @@ message InspectTemplate { type: "dlp.googleapis.com/InspectTemplate" pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" pattern: "projects/{project}/inspectTemplates/{inspect_template}" + pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" }; // Output only. The template name. @@ -2602,10 +2810,12 @@ message InspectTemplate { string description = 3; // Output only. The creation timestamp of an inspectTemplate. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of an inspectTemplate. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The core content of the template. Configuration of the scanning process. InspectConfig inspect_config = 6; @@ -2618,6 +2828,8 @@ message DeidentifyTemplate { type: "dlp.googleapis.com/DeidentifyTemplate" pattern: "organizations/{organization}/deidentifyTemplates/{deidentify_template}" pattern: "projects/{project}/deidentifyTemplates/{deidentify_template}" + pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" }; // Output only. The template name. @@ -2634,10 +2846,12 @@ message DeidentifyTemplate { string description = 3; // Output only. The creation timestamp of an inspectTemplate. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of an inspectTemplate. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // ///////////// // The core content of the template // /////////////// DeidentifyConfig deidentify_config = 6; @@ -2659,6 +2873,7 @@ message JobTrigger { option (google.api.resource) = { type: "dlp.googleapis.com/JobTrigger" pattern: "projects/{project}/jobTriggers/{job_trigger}" + pattern: "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" }; // What event needs to occur for a new job to be started. @@ -2666,6 +2881,12 @@ message JobTrigger { oneof trigger { // Create a job on a repeating basis based on the elapse of time. Schedule schedule = 1; + + // For use with hybrid jobs. Jobs must be manually created and finished. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + Manual manual = 2; } } @@ -2709,20 +2930,23 @@ message JobTrigger { // a single Schedule trigger and must have at least one object. repeated Trigger triggers = 5; - // Output only. A stream of errors encountered when the trigger was activated. Repeated - // errors may result in the JobTrigger automatically being paused. + // Output only. A stream of errors encountered when the trigger was activated. + // Repeated errors may result in the JobTrigger automatically being paused. // Will return the last 100 errors. Whenever the JobTrigger is modified // this list will be cleared. repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The creation timestamp of a triggeredJob. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update timestamp of a triggeredJob. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp of the last time this trigger executed. - google.protobuf.Timestamp last_run_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_run_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. A status for this trigger. Status status = 10 [(google.api.field_behavior) = REQUIRED]; @@ -2763,9 +2987,7 @@ message Action { // 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 { - - } + message PublishSummaryToCscc {} // Publish findings of a DlpJob to Cloud Data Catalog. Labels summarizing the // results of the DlpJob will be applied to the entry for the resource scanned @@ -2777,23 +2999,17 @@ message Action { // Only a single instance of this action can be specified and only allowed if // all resources being scanned are BigQuery tables. // Compatible with: Inspect - message PublishFindingsToCloudDataCatalog { - - } + message PublishFindingsToCloudDataCatalog {} // Enable email notification to project owners and editors on jobs's // completion/failure. - message JobNotificationEmails { - - } + message JobNotificationEmails {} // Enable Stackdriver metric dlp.googleapis.com/finding_count. This // will publish a metric to stack driver on each infotype requested and // how many findings were found for it. CustomDetectors will be bucketed // as 'Custom' under the Stackdriver label 'info_type'. - message PublishToStackdriver { - - } + message PublishToStackdriver {} oneof action { // Save resulting findings in a provided location. @@ -2806,7 +3022,8 @@ message Action { PublishSummaryToCscc publish_summary_to_cscc = 3; // Publish findings to Cloud Datahub. - PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = + 5; // Enable email notification for project owners and editors on job's // completion/failure. @@ -2844,8 +3061,8 @@ message CreateInspectTemplateRequest { // Request message for UpdateInspectTemplate. message UpdateInspectTemplateRequest { - // Required. Resource name of organization and inspectTemplate to be updated, for - // example `organizations/433245324/inspectTemplates/432452342` or + // Required. Resource name of organization and inspectTemplate to be updated, + // for example `organizations/433245324/inspectTemplates/432452342` or // projects/project-id/inspectTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -2863,8 +3080,8 @@ message UpdateInspectTemplateRequest { // Request message for GetInspectTemplate. message GetInspectTemplateRequest { - // Required. Resource name of the organization and inspectTemplate to be read, for - // example `organizations/433245324/inspectTemplates/432452342` or + // Required. Resource name of the organization and inspectTemplate to be read, + // for example `organizations/433245324/inspectTemplates/432452342` or // projects/project-id/inspectTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -2925,9 +3142,9 @@ message ListInspectTemplatesResponse { // Request message for DeleteInspectTemplate. message DeleteInspectTemplateRequest { - // Required. Resource name of the organization and inspectTemplate to be deleted, for - // example `organizations/433245324/inspectTemplates/432452342` or - // projects/project-id/inspectTemplates/432452342. + // Required. Resource name of the organization and inspectTemplate to be + // deleted, for example `organizations/433245324/inspectTemplates/432452342` + // or projects/project-id/inspectTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2966,9 +3183,7 @@ message ActivateJobTriggerRequest { // `projects/dlp-test-project/jobTriggers/53234423`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } ]; } @@ -2978,9 +3193,7 @@ message UpdateJobTriggerRequest { // `projects/dlp-test-project/jobTriggers/53234423`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } ]; // New JobTrigger value. @@ -2996,9 +3209,7 @@ message GetJobTriggerRequest { // `projects/dlp-test-project/jobTriggers/53234423`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } ]; } @@ -3116,9 +3327,7 @@ message DeleteJobTriggerRequest { // `projects/dlp-test-project/jobTriggers/53234423`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } ]; } @@ -3144,9 +3353,10 @@ message DlpJob { option (google.api.resource) = { type: "dlp.googleapis.com/DlpJob" pattern: "projects/{project}/dlpJobs/{dlp_job}" + pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" }; - // Possible states of a job. + // Possible states of a job. New items may be added. enum JobState { // Unused. JOB_STATE_UNSPECIFIED = 0; @@ -3154,7 +3364,8 @@ message DlpJob { // The job has not yet started. PENDING = 1; - // The job is currently running. + // The job is currently running. Once a job has finished it will transition + // to FAILED or DONE. RUNNING = 2; // The job is no longer running. @@ -3165,6 +3376,12 @@ message DlpJob { // The job had an error and did not complete. FAILED = 5; + + // 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 + // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. + ACTIVE = 6; } // The server-assigned name. @@ -3206,9 +3423,7 @@ message GetDlpJobRequest { // Required. The name of the DlpJob resource. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } ]; } @@ -3295,9 +3510,16 @@ message CancelDlpJobRequest { // Required. The name of the DlpJob resource to be cancelled. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// The request message for finishing a DLP hybrid job. +message FinishDlpJobRequest { + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } ]; } @@ -3306,9 +3528,7 @@ message DeleteDlpJobRequest { // Required. The name of the DlpJob resource to be deleted. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } ]; } @@ -3324,7 +3544,8 @@ message CreateDeidentifyTemplateRequest { ]; // Required. The DeidentifyTemplate to create. - DeidentifyTemplate deidentify_template = 2 [(google.api.field_behavior) = REQUIRED]; + DeidentifyTemplate deidentify_template = 2 + [(google.api.field_behavior) = REQUIRED]; // The template id can contain uppercase and lowercase letters, // numbers, and hyphens; that is, it must match the regular @@ -3339,8 +3560,9 @@ message CreateDeidentifyTemplateRequest { // Request message for UpdateDeidentifyTemplate. message UpdateDeidentifyTemplateRequest { - // Required. Resource name of organization and deidentify template to be updated, for - // example `organizations/433245324/deidentifyTemplates/432452342` or + // Required. Resource name of organization and deidentify template to be + // updated, for example + // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3358,9 +3580,9 @@ message UpdateDeidentifyTemplateRequest { // Request message for GetDeidentifyTemplate. message GetDeidentifyTemplateRequest { - // Required. Resource name of the organization and deidentify template to be read, for - // example `organizations/433245324/deidentifyTemplates/432452342` or - // projects/project-id/deidentifyTemplates/432452342. + // Required. Resource name of the organization and deidentify template to be + // read, for example `organizations/433245324/deidentifyTemplates/432452342` + // or projects/project-id/deidentifyTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3421,8 +3643,9 @@ message ListDeidentifyTemplatesResponse { // Request message for DeleteDeidentifyTemplate. message DeleteDeidentifyTemplateRequest { - // Required. Resource name of the organization and deidentify template to be deleted, - // for example `organizations/433245324/deidentifyTemplates/432452342` or + // Required. Resource name of the organization and deidentify template to be + // deleted, for example + // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3474,6 +3697,12 @@ message StoredInfoTypeConfig { oneof type { // StoredInfoType where findings are defined by a dictionary of phrases. LargeCustomDictionaryConfig large_custom_dictionary = 3; + + // Store dictionary-based CustomInfoType. + CustomInfoType.Dictionary dictionary = 4; + + // Store regular expression-based StoredInfoType. + CustomInfoType.Regex regex = 5; } } @@ -3526,6 +3755,8 @@ message StoredInfoType { type: "dlp.googleapis.com/StoredInfoType" pattern: "organizations/{organization}/storedInfoTypes/{stored_info_type}" pattern: "projects/{project}/storedInfoTypes/{stored_info_type}" + pattern: "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" }; // Resource name. @@ -3566,8 +3797,8 @@ message CreateStoredInfoTypeRequest { // Request message for UpdateStoredInfoType. message UpdateStoredInfoTypeRequest { - // Required. Resource name of organization and storedInfoType to be updated, for - // example `organizations/433245324/storedInfoTypes/432452342` or + // Required. Resource name of organization and storedInfoType to be updated, + // for example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3587,8 +3818,8 @@ message UpdateStoredInfoTypeRequest { // Request message for GetStoredInfoType. message GetStoredInfoTypeRequest { - // Required. Resource name of the organization and storedInfoType to be read, for - // example `organizations/433245324/storedInfoTypes/432452342` or + // Required. Resource name of the organization and storedInfoType to be read, + // for example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3650,8 +3881,8 @@ message ListStoredInfoTypesResponse { // Request message for DeleteStoredInfoType. message DeleteStoredInfoTypeRequest { - // Required. Resource name of the organization and storedInfoType to be deleted, for - // example `organizations/433245324/storedInfoTypes/432452342` or + // Required. Resource name of the organization and storedInfoType to be + // deleted, for example `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3661,6 +3892,86 @@ message DeleteStoredInfoTypeRequest { ]; } +// Request to search for potentially sensitive info in a custom location. +message HybridInspectJobTriggerRequest { + // Required. Resource name of the trigger to execute a hybrid inspect on, for + // example `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectDlpJobRequest { + // Required. Resource name of the job to execute a hybrid inspect on, for + // example `projects/dlp-test-project/dlpJob/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// An individual hybrid item to inspect. Will be stored temporarily during +// processing. +message HybridContentItem { + // The item to inspect. + ContentItem item = 1; + + // Supplementary information that will be added to each finding. + HybridFindingDetails finding_details = 2; +} + +// Populate to associate additional data with each finding. +message HybridFindingDetails { + // Details about the container where the content being inspected is from. + Container container_details = 1; + + // Offset in bytes of the line, from the beginning of the file, where the + // finding is located. Populate if the item being scanned is only part of a + // bigger item, such as a shard of a file and you want to track the absolute + // position of the finding. + int64 file_offset = 2; + + // Offset of the row for tables. Populate if the row(s) being scanned are + // part of a bigger dataset and you want to keep track of their absolute + // position. + int64 row_offset = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. If not known ahead + // of time, can also be set within each inspect hybrid call and the two + // will be merged. Note that identifying_fields will only be stored to + // BigQuery, and only if the BigQuery action has been included. + TableOptions table_options = 4; + + // Labels to represent user provided metadata about the data being inspected. + // If configured by the job, some key values may be required. + // The labels associated with `Finding`'s produced by hybrid + // inspection. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + // + // No more than 10 labels can be associated with a given finding. + // + // Example: "environment" : "production" + // Example: "pipeline" : "etl" + map labels = 5; +} + +// Quota exceeded errors will be thrown once quota has been met. +message HybridInspectResponse {} + // Operators available for comparing the value of fields. enum RelationalOperator { // Unused diff --git a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto index aebc873ad8a..585d777d7aa 100644 --- a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto +++ b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -134,9 +133,7 @@ message CustomInfoType { // output. This should be used in conjunction with a field on the // transformation such as `surrogate_info_type`. This CustomInfoType does // not support the use of `detection_rules`. - message SurrogateType { - - } + message SurrogateType {} // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a // `CustomInfoType` to alter behavior under certain circumstances, depending @@ -435,8 +432,11 @@ message BigQueryOptions { // Complete BigQuery table reference. BigQueryTable table_reference = 1; - // References to fields uniquely identifying rows within the table. - // Nested fields in the format, like `person.birthdate.year`, are allowed. + // Table fields that may uniquely identify a row within the table. When + // `actions.saveFindings.outputConfig.table` is specified, the values of + // columns specified here are available in the output table under + // `location.content_locations.record_location.record_key.id_values`. Nested + // fields such as `person.birthdate.year` are allowed. repeated FieldId identifying_fields = 2; // Max number of rows to scan. If the table has more rows than this value, the @@ -495,14 +495,20 @@ message StorageConfig { } oneof type { - // Google Cloud Datastore options specification. + // Google Cloud Datastore options. DatastoreOptions datastore_options = 2; - // Google Cloud Storage options specification. + // Google Cloud Storage options. CloudStorageOptions cloud_storage_options = 3; - // BigQuery options specification. + // BigQuery options. BigQueryOptions big_query_options = 4; + + // Hybrid inspection options. + // Early access feature is in a pre-release state and might change or have + // limited support. For more information, see + // https://cloud.google.com/products#product-launch-stages. + HybridOptions hybrid_options = 9; } TimespanConfig timespan_config = 6; @@ -534,13 +540,52 @@ enum FileType { AVRO = 7; } +// Configuration to control jobs where the content being inspected is outside +// of Google Cloud Platform. +message HybridOptions { + // A short description of where the data is coming from. Will be stored once + // in the job. 256 max length. + string description = 1; + + // These are labels that each inspection request must include within their + // 'finding_labels' map. Request may contain others, but any missing one of + // these will be rejected. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + // + // No more than 10 keys can be required. + repeated string required_finding_label_keys = 2; + + // To organize findings, these labels will be added to each finding. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + // + // No more than 10 labels can be associated with a given finding. + // + // Example: "environment" : "production" + // Example: "pipeline" : "etl" + map labels = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. + TableOptions table_options = 4; +} + // Row key for identifying a record in BigQuery table. message BigQueryKey { // Complete BigQuery table reference. BigQueryTable table_reference = 1; - // Absolute number of the row from the beginning of the table at the time - // of scanning. + // Row number inferred at the time the table was scanned. This value is + // nondeterministic, cannot be queried, and may be null for inspection + // jobs. To locate findings within a table, specify + // `inspect_job.storage_config.big_query_options.identifying_fields` in + // `CreateDlpJobRequest`. int64 row_number = 2; } @@ -607,7 +652,7 @@ message RecordKey { } // Values of identifying columns in the given row. Order of values matches - // the order of field identifiers specified in the scanning request. + // the order of `identifying_fields` specified in the scanning request. repeated string id_values = 5; } @@ -646,3 +691,12 @@ message EntityId { // Composite key indicating which field contains the entity identifier. FieldId field = 1; } + +// Instructions regarding the table content being inspected. +message TableOptions { + // The columns that are the primary keys for table objects included in + // ContentItem. A copy of this cell's value will stored alongside alongside + // each finding so that the finding can be traced to the specific row it came + // from. No more than 3 may be provided. + repeated FieldId identifying_fields = 1; +} diff --git a/packages/google-privacy-dlp/protos/protos.d.ts b/packages/google-privacy-dlp/protos/protos.d.ts index fd447dab872..15217f2db01 100644 --- a/packages/google-privacy-dlp/protos/protos.d.ts +++ b/packages/google-privacy-dlp/protos/protos.d.ts @@ -284,6 +284,20 @@ export namespace google { */ public updateJobTrigger(request: google.privacy.dlp.v2.IUpdateJobTriggerRequest): Promise; + /** + * Calls HybridInspectJobTrigger. + * @param request HybridInspectJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HybridInspectResponse + */ + public hybridInspectJobTrigger(request: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.HybridInspectJobTriggerCallback): void; + + /** + * Calls HybridInspectJobTrigger. + * @param request HybridInspectJobTriggerRequest message or plain object + * @returns Promise + */ + public hybridInspectJobTrigger(request: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest): Promise; + /** * Calls GetJobTrigger. * @param request GetJobTriggerRequest message or plain object @@ -479,6 +493,34 @@ export namespace google { * @returns Promise */ public deleteStoredInfoType(request: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest): Promise; + + /** + * Calls HybridInspectDlpJob. + * @param request HybridInspectDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HybridInspectResponse + */ + public hybridInspectDlpJob(request: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.HybridInspectDlpJobCallback): void; + + /** + * Calls HybridInspectDlpJob. + * @param request HybridInspectDlpJobRequest message or plain object + * @returns Promise + */ + public hybridInspectDlpJob(request: google.privacy.dlp.v2.IHybridInspectDlpJobRequest): Promise; + + /** + * Calls FinishDlpJob. + * @param request FinishDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public finishDlpJob(request: google.privacy.dlp.v2.IFinishDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.FinishDlpJobCallback): void; + + /** + * Calls FinishDlpJob. + * @param request FinishDlpJobRequest message or plain object + * @returns Promise + */ + public finishDlpJob(request: google.privacy.dlp.v2.IFinishDlpJobRequest): Promise; } namespace DlpService { @@ -602,6 +644,13 @@ export namespace google { */ type UpdateJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.JobTrigger) => void; + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#hybridInspectJobTrigger}. + * @param error Error, if any + * @param [response] HybridInspectResponse + */ + type HybridInspectJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.HybridInspectResponse) => void; + /** * Callback as used by {@link google.privacy.dlp.v2.DlpService#getJobTrigger}. * @param error Error, if any @@ -699,6 +748,20 @@ export namespace google { * @param [response] Empty */ type DeleteStoredInfoTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#hybridInspectDlpJob}. + * @param error Error, if any + * @param [response] HybridInspectResponse + */ + type HybridInspectDlpJobCallback = (error: (Error|null), response?: google.privacy.dlp.v2.HybridInspectResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#finishDlpJob}. + * @param error Error, if any + * @param [response] Empty + */ + type FinishDlpJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } /** Properties of an ExcludeInfoTypes. */ @@ -804,7 +867,7 @@ export namespace google { excludeInfoTypes?: (google.privacy.dlp.v2.IExcludeInfoTypes|null); /** ExclusionRule matchingType */ - matchingType?: (google.privacy.dlp.v2.MatchingType|null); + matchingType?: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType|null); } /** Represents an ExclusionRule. */ @@ -826,7 +889,7 @@ export namespace google { public excludeInfoTypes?: (google.privacy.dlp.v2.IExcludeInfoTypes|null); /** ExclusionRule matchingType. */ - public matchingType: google.privacy.dlp.v2.MatchingType; + public matchingType: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType); /** ExclusionRule type. */ public type?: ("dictionary"|"regex"|"excludeInfoTypes"); @@ -1104,7 +1167,7 @@ export namespace google { infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); /** InspectConfig minLikelihood */ - minLikelihood?: (google.privacy.dlp.v2.Likelihood|null); + minLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); /** InspectConfig limits */ limits?: (google.privacy.dlp.v2.InspectConfig.IFindingLimits|null); @@ -1138,7 +1201,7 @@ export namespace google { public infoTypes: google.privacy.dlp.v2.IInfoType[]; /** InspectConfig minLikelihood. */ - public minLikelihood: google.privacy.dlp.v2.Likelihood; + public minLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); /** InspectConfig limits. */ public limits?: (google.privacy.dlp.v2.InspectConfig.IFindingLimits|null); @@ -1437,10 +1500,10 @@ export namespace google { interface IByteContentItem { /** ByteContentItem type */ - type?: (google.privacy.dlp.v2.ByteContentItem.BytesType|null); + type?: (google.privacy.dlp.v2.ByteContentItem.BytesType|keyof typeof google.privacy.dlp.v2.ByteContentItem.BytesType|null); /** ByteContentItem data */ - data?: (Uint8Array|null); + data?: (Uint8Array|string|null); } /** Represents a ByteContentItem. */ @@ -1453,10 +1516,10 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IByteContentItem); /** ByteContentItem type. */ - public type: google.privacy.dlp.v2.ByteContentItem.BytesType; + public type: (google.privacy.dlp.v2.ByteContentItem.BytesType|keyof typeof google.privacy.dlp.v2.ByteContentItem.BytesType); /** ByteContentItem data. */ - public data: Uint8Array; + public data: (Uint8Array|string); /** * Creates a new ByteContentItem instance using the specified properties. @@ -1937,6 +2000,9 @@ export namespace google { /** Properties of a Finding. */ interface IFinding { + /** Finding name */ + name?: (string|null); + /** Finding quote */ quote?: (string|null); @@ -1944,7 +2010,7 @@ export namespace google { infoType?: (google.privacy.dlp.v2.IInfoType|null); /** Finding likelihood */ - likelihood?: (google.privacy.dlp.v2.Likelihood|null); + likelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); /** Finding location */ location?: (google.privacy.dlp.v2.ILocation|null); @@ -1954,6 +2020,21 @@ export namespace google { /** Finding quoteInfo */ quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + + /** Finding resourceName */ + resourceName?: (string|null); + + /** Finding triggerName */ + triggerName?: (string|null); + + /** Finding labels */ + labels?: ({ [k: string]: string }|null); + + /** Finding jobCreateTime */ + jobCreateTime?: (google.protobuf.ITimestamp|null); + + /** Finding jobName */ + jobName?: (string|null); } /** Represents a Finding. */ @@ -1965,6 +2046,9 @@ export namespace google { */ constructor(properties?: google.privacy.dlp.v2.IFinding); + /** Finding name. */ + public name: string; + /** Finding quote. */ public quote: string; @@ -1972,7 +2056,7 @@ export namespace google { public infoType?: (google.privacy.dlp.v2.IInfoType|null); /** Finding likelihood. */ - public likelihood: google.privacy.dlp.v2.Likelihood; + public likelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); /** Finding location. */ public location?: (google.privacy.dlp.v2.ILocation|null); @@ -1983,6 +2067,21 @@ export namespace google { /** Finding quoteInfo. */ public quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + /** Finding resourceName. */ + public resourceName: string; + + /** Finding triggerName. */ + public triggerName: string; + + /** Finding labels. */ + public labels: { [k: string]: string }; + + /** Finding jobCreateTime. */ + public jobCreateTime?: (google.protobuf.ITimestamp|null); + + /** Finding jobName. */ + public jobName: string; + /** * Creates a new Finding instance using the specified properties. * @param [properties] Properties to set @@ -2065,6 +2164,9 @@ export namespace google { /** Location contentLocations */ contentLocations?: (google.privacy.dlp.v2.IContentLocation[]|null); + + /** Location container */ + container?: (google.privacy.dlp.v2.IContainer|null); } /** Represents a Location. */ @@ -2085,6 +2187,9 @@ export namespace google { /** Location contentLocations. */ public contentLocations: google.privacy.dlp.v2.IContentLocation[]; + /** Location container. */ + public container?: (google.privacy.dlp.v2.IContainer|null); + /** * Creates a new Location instance using the specified properties. * @param [properties] Properties to set @@ -2283,7 +2388,7 @@ export namespace google { interface IDocumentLocation { /** DocumentLocation fileOffset */ - fileOffset?: (number|Long|null); + fileOffset?: (number|Long|string|null); } /** Represents a DocumentLocation. */ @@ -2296,7 +2401,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IDocumentLocation); /** DocumentLocation fileOffset. */ - public fileOffset: (number|Long); + public fileOffset: (number|Long|string); /** * Creates a new DocumentLocation instance using the specified properties. @@ -2475,7 +2580,7 @@ export namespace google { interface ITableLocation { /** TableLocation rowIndex */ - rowIndex?: (number|Long|null); + rowIndex?: (number|Long|string|null); } /** Represents a TableLocation. */ @@ -2488,7 +2593,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.ITableLocation); /** TableLocation rowIndex. */ - public rowIndex: (number|Long); + public rowIndex: (number|Long|string); /** * Creates a new TableLocation instance using the specified properties. @@ -2561,14 +2666,140 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a Container. */ + interface IContainer { + + /** Container type */ + type?: (string|null); + + /** Container projectId */ + projectId?: (string|null); + + /** Container fullPath */ + fullPath?: (string|null); + + /** Container rootPath */ + rootPath?: (string|null); + + /** Container relativePath */ + relativePath?: (string|null); + + /** Container updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Container version */ + version?: (string|null); + } + + /** Represents a Container. */ + class Container implements IContainer { + + /** + * Constructs a new Container. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IContainer); + + /** Container type. */ + public type: string; + + /** Container projectId. */ + public projectId: string; + + /** Container fullPath. */ + public fullPath: string; + + /** Container rootPath. */ + public rootPath: string; + + /** Container relativePath. */ + public relativePath: string; + + /** Container updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Container version. */ + public version: string; + + /** + * Creates a new Container instance using the specified properties. + * @param [properties] Properties to set + * @returns Container instance + */ + public static create(properties?: google.privacy.dlp.v2.IContainer): google.privacy.dlp.v2.Container; + + /** + * Encodes the specified Container message. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Container message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Container + * @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.Container; + + /** + * Decodes a Container message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Container + * @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.Container; + + /** + * Verifies a Container 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 Container message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Container + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Container; + + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @param message Container + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Container to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Range. */ interface IRange { /** Range start */ - start?: (number|Long|null); + start?: (number|Long|string|null); /** Range end */ - end?: (number|Long|null); + end?: (number|Long|string|null); } /** Represents a Range. */ @@ -2581,10 +2812,10 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IRange); /** Range start. */ - public start: (number|Long); + public start: (number|Long|string); /** Range end. */ - public end: (number|Long); + public end: (number|Long|string); /** * Creates a new Range instance using the specified properties. @@ -3189,7 +3420,7 @@ export namespace google { interface IRedactImageResponse { /** RedactImageResponse redactedImage */ - redactedImage?: (Uint8Array|null); + redactedImage?: (Uint8Array|string|null); /** RedactImageResponse extractedText */ extractedText?: (string|null); @@ -3208,7 +3439,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IRedactImageResponse); /** RedactImageResponse redactedImage. */ - public redactedImage: Uint8Array; + public redactedImage: (Uint8Array|string); /** RedactImageResponse extractedText. */ public extractedText: string; @@ -3942,7 +4173,7 @@ export namespace google { table?: (google.privacy.dlp.v2.IBigQueryTable|null); /** OutputStorageConfig outputSchema */ - outputSchema?: (google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|null); + outputSchema?: (google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|keyof typeof google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|null); } /** Represents an OutputStorageConfig. */ @@ -3958,7 +4189,7 @@ export namespace google { public table?: (google.privacy.dlp.v2.IBigQueryTable|null); /** OutputStorageConfig outputSchema. */ - public outputSchema: google.privacy.dlp.v2.OutputStorageConfig.OutputSchema; + public outputSchema: (google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|keyof typeof google.privacy.dlp.v2.OutputStorageConfig.OutputSchema); /** OutputStorageConfig type. */ public type?: "table"; @@ -4054,7 +4285,7 @@ export namespace google { infoType?: (google.privacy.dlp.v2.IInfoType|null); /** InfoTypeStats count */ - count?: (number|Long|null); + count?: (number|Long|string|null); } /** Represents an InfoTypeStats. */ @@ -4070,7 +4301,7 @@ export namespace google { public infoType?: (google.privacy.dlp.v2.IInfoType|null); /** InfoTypeStats count. */ - public count: (number|Long); + public count: (number|Long|string); /** * Creates a new InfoTypeStats instance using the specified properties. @@ -4341,13 +4572,16 @@ export namespace google { interface IResult { /** Result processedBytes */ - processedBytes?: (number|Long|null); + processedBytes?: (number|Long|string|null); /** Result totalEstimatedBytes */ - totalEstimatedBytes?: (number|Long|null); + totalEstimatedBytes?: (number|Long|string|null); /** Result infoTypeStats */ infoTypeStats?: (google.privacy.dlp.v2.IInfoTypeStats[]|null); + + /** Result hybridStats */ + hybridStats?: (google.privacy.dlp.v2.IHybridInspectStatistics|null); } /** Represents a Result. */ @@ -4360,14 +4594,17 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.InspectDataSourceDetails.IResult); /** Result processedBytes. */ - public processedBytes: (number|Long); + public processedBytes: (number|Long|string); /** Result totalEstimatedBytes. */ - public totalEstimatedBytes: (number|Long); + public totalEstimatedBytes: (number|Long|string); /** Result infoTypeStats. */ public infoTypeStats: google.privacy.dlp.v2.IInfoTypeStats[]; + /** Result hybridStats. */ + public hybridStats?: (google.privacy.dlp.v2.IHybridInspectStatistics|null); + /** * Creates a new Result instance using the specified properties. * @param [properties] Properties to set @@ -4440,6 +4677,108 @@ export namespace google { } } + /** Properties of a HybridInspectStatistics. */ + interface IHybridInspectStatistics { + + /** HybridInspectStatistics processedCount */ + processedCount?: (number|Long|string|null); + + /** HybridInspectStatistics abortedCount */ + abortedCount?: (number|Long|string|null); + + /** HybridInspectStatistics pendingCount */ + pendingCount?: (number|Long|string|null); + } + + /** Represents a HybridInspectStatistics. */ + class HybridInspectStatistics implements IHybridInspectStatistics { + + /** + * Constructs a new HybridInspectStatistics. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectStatistics); + + /** HybridInspectStatistics processedCount. */ + public processedCount: (number|Long|string); + + /** HybridInspectStatistics abortedCount. */ + public abortedCount: (number|Long|string); + + /** HybridInspectStatistics pendingCount. */ + public pendingCount: (number|Long|string); + + /** + * Creates a new HybridInspectStatistics instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectStatistics instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectStatistics): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Encodes the specified HybridInspectStatistics message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @param message HybridInspectStatistics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectStatistics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectStatistics message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @param message HybridInspectStatistics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectStatistics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectStatistics + * @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.HybridInspectStatistics; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectStatistics + * @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.HybridInspectStatistics; + + /** + * Verifies a HybridInspectStatistics 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 HybridInspectStatistics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectStatistics + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Creates a plain object from a HybridInspectStatistics message. Also converts values to other types if specified. + * @param message HybridInspectStatistics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectStatistics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectStatistics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an InfoTypeDescription. */ interface IInfoTypeDescription { @@ -6506,19 +6845,19 @@ export namespace google { interface ICategoricalStatsHistogramBucket { /** CategoricalStatsHistogramBucket valueFrequencyLowerBound */ - valueFrequencyLowerBound?: (number|Long|null); + valueFrequencyLowerBound?: (number|Long|string|null); /** CategoricalStatsHistogramBucket valueFrequencyUpperBound */ - valueFrequencyUpperBound?: (number|Long|null); + valueFrequencyUpperBound?: (number|Long|string|null); /** CategoricalStatsHistogramBucket bucketSize */ - bucketSize?: (number|Long|null); + bucketSize?: (number|Long|string|null); /** CategoricalStatsHistogramBucket bucketValues */ bucketValues?: (google.privacy.dlp.v2.IValueFrequency[]|null); /** CategoricalStatsHistogramBucket bucketValueCount */ - bucketValueCount?: (number|Long|null); + bucketValueCount?: (number|Long|string|null); } /** Represents a CategoricalStatsHistogramBucket. */ @@ -6531,19 +6870,19 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket); /** CategoricalStatsHistogramBucket valueFrequencyLowerBound. */ - public valueFrequencyLowerBound: (number|Long); + public valueFrequencyLowerBound: (number|Long|string); /** CategoricalStatsHistogramBucket valueFrequencyUpperBound. */ - public valueFrequencyUpperBound: (number|Long); + public valueFrequencyUpperBound: (number|Long|string); /** CategoricalStatsHistogramBucket bucketSize. */ - public bucketSize: (number|Long); + public bucketSize: (number|Long|string); /** CategoricalStatsHistogramBucket bucketValues. */ public bucketValues: google.privacy.dlp.v2.IValueFrequency[]; /** CategoricalStatsHistogramBucket bucketValueCount. */ - public bucketValueCount: (number|Long); + public bucketValueCount: (number|Long|string); /** * Creates a new CategoricalStatsHistogramBucket instance using the specified properties. @@ -6716,7 +7055,7 @@ export namespace google { quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); /** KAnonymityEquivalenceClass equivalenceClassSize */ - equivalenceClassSize?: (number|Long|null); + equivalenceClassSize?: (number|Long|string|null); } /** Represents a KAnonymityEquivalenceClass. */ @@ -6732,7 +7071,7 @@ export namespace google { public quasiIdsValues: google.privacy.dlp.v2.IValue[]; /** KAnonymityEquivalenceClass equivalenceClassSize. */ - public equivalenceClassSize: (number|Long); + public equivalenceClassSize: (number|Long|string); /** * Creates a new KAnonymityEquivalenceClass instance using the specified properties. @@ -6809,19 +7148,19 @@ export namespace google { interface IKAnonymityHistogramBucket { /** KAnonymityHistogramBucket equivalenceClassSizeLowerBound */ - equivalenceClassSizeLowerBound?: (number|Long|null); + equivalenceClassSizeLowerBound?: (number|Long|string|null); /** KAnonymityHistogramBucket equivalenceClassSizeUpperBound */ - equivalenceClassSizeUpperBound?: (number|Long|null); + equivalenceClassSizeUpperBound?: (number|Long|string|null); /** KAnonymityHistogramBucket bucketSize */ - bucketSize?: (number|Long|null); + bucketSize?: (number|Long|string|null); /** KAnonymityHistogramBucket bucketValues */ bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass[]|null); /** KAnonymityHistogramBucket bucketValueCount */ - bucketValueCount?: (number|Long|null); + bucketValueCount?: (number|Long|string|null); } /** Represents a KAnonymityHistogramBucket. */ @@ -6834,19 +7173,19 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket); /** KAnonymityHistogramBucket equivalenceClassSizeLowerBound. */ - public equivalenceClassSizeLowerBound: (number|Long); + public equivalenceClassSizeLowerBound: (number|Long|string); /** KAnonymityHistogramBucket equivalenceClassSizeUpperBound. */ - public equivalenceClassSizeUpperBound: (number|Long); + public equivalenceClassSizeUpperBound: (number|Long|string); /** KAnonymityHistogramBucket bucketSize. */ - public bucketSize: (number|Long); + public bucketSize: (number|Long|string); /** KAnonymityHistogramBucket bucketValues. */ public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass[]; /** KAnonymityHistogramBucket bucketValueCount. */ - public bucketValueCount: (number|Long); + public bucketValueCount: (number|Long|string); /** * Creates a new KAnonymityHistogramBucket instance using the specified properties. @@ -7019,10 +7358,10 @@ export namespace google { quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); /** LDiversityEquivalenceClass equivalenceClassSize */ - equivalenceClassSize?: (number|Long|null); + equivalenceClassSize?: (number|Long|string|null); /** LDiversityEquivalenceClass numDistinctSensitiveValues */ - numDistinctSensitiveValues?: (number|Long|null); + numDistinctSensitiveValues?: (number|Long|string|null); /** LDiversityEquivalenceClass topSensitiveValues */ topSensitiveValues?: (google.privacy.dlp.v2.IValueFrequency[]|null); @@ -7041,10 +7380,10 @@ export namespace google { public quasiIdsValues: google.privacy.dlp.v2.IValue[]; /** LDiversityEquivalenceClass equivalenceClassSize. */ - public equivalenceClassSize: (number|Long); + public equivalenceClassSize: (number|Long|string); /** LDiversityEquivalenceClass numDistinctSensitiveValues. */ - public numDistinctSensitiveValues: (number|Long); + public numDistinctSensitiveValues: (number|Long|string); /** LDiversityEquivalenceClass topSensitiveValues. */ public topSensitiveValues: google.privacy.dlp.v2.IValueFrequency[]; @@ -7124,19 +7463,19 @@ export namespace google { interface ILDiversityHistogramBucket { /** LDiversityHistogramBucket sensitiveValueFrequencyLowerBound */ - sensitiveValueFrequencyLowerBound?: (number|Long|null); + sensitiveValueFrequencyLowerBound?: (number|Long|string|null); /** LDiversityHistogramBucket sensitiveValueFrequencyUpperBound */ - sensitiveValueFrequencyUpperBound?: (number|Long|null); + sensitiveValueFrequencyUpperBound?: (number|Long|string|null); /** LDiversityHistogramBucket bucketSize */ - bucketSize?: (number|Long|null); + bucketSize?: (number|Long|string|null); /** LDiversityHistogramBucket bucketValues */ bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass[]|null); /** LDiversityHistogramBucket bucketValueCount */ - bucketValueCount?: (number|Long|null); + bucketValueCount?: (number|Long|string|null); } /** Represents a LDiversityHistogramBucket. */ @@ -7149,19 +7488,19 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket); /** LDiversityHistogramBucket sensitiveValueFrequencyLowerBound. */ - public sensitiveValueFrequencyLowerBound: (number|Long); + public sensitiveValueFrequencyLowerBound: (number|Long|string); /** LDiversityHistogramBucket sensitiveValueFrequencyUpperBound. */ - public sensitiveValueFrequencyUpperBound: (number|Long); + public sensitiveValueFrequencyUpperBound: (number|Long|string); /** LDiversityHistogramBucket bucketSize. */ - public bucketSize: (number|Long); + public bucketSize: (number|Long|string); /** LDiversityHistogramBucket bucketValues. */ public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass[]; /** LDiversityHistogramBucket bucketValueCount. */ - public bucketValueCount: (number|Long); + public bucketValueCount: (number|Long|string); /** * Creates a new LDiversityHistogramBucket instance using the specified properties. @@ -7334,7 +7673,7 @@ export namespace google { quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); /** KMapEstimationQuasiIdValues estimatedAnonymity */ - estimatedAnonymity?: (number|Long|null); + estimatedAnonymity?: (number|Long|string|null); } /** Represents a KMapEstimationQuasiIdValues. */ @@ -7350,7 +7689,7 @@ export namespace google { public quasiIdsValues: google.privacy.dlp.v2.IValue[]; /** KMapEstimationQuasiIdValues estimatedAnonymity. */ - public estimatedAnonymity: (number|Long); + public estimatedAnonymity: (number|Long|string); /** * Creates a new KMapEstimationQuasiIdValues instance using the specified properties. @@ -7427,19 +7766,19 @@ export namespace google { interface IKMapEstimationHistogramBucket { /** KMapEstimationHistogramBucket minAnonymity */ - minAnonymity?: (number|Long|null); + minAnonymity?: (number|Long|string|null); /** KMapEstimationHistogramBucket maxAnonymity */ - maxAnonymity?: (number|Long|null); + maxAnonymity?: (number|Long|string|null); /** KMapEstimationHistogramBucket bucketSize */ - bucketSize?: (number|Long|null); + bucketSize?: (number|Long|string|null); /** KMapEstimationHistogramBucket bucketValues */ bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues[]|null); /** KMapEstimationHistogramBucket bucketValueCount */ - bucketValueCount?: (number|Long|null); + bucketValueCount?: (number|Long|string|null); } /** Represents a KMapEstimationHistogramBucket. */ @@ -7452,19 +7791,19 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket); /** KMapEstimationHistogramBucket minAnonymity. */ - public minAnonymity: (number|Long); + public minAnonymity: (number|Long|string); /** KMapEstimationHistogramBucket maxAnonymity. */ - public maxAnonymity: (number|Long); + public maxAnonymity: (number|Long|string); /** KMapEstimationHistogramBucket bucketSize. */ - public bucketSize: (number|Long); + public bucketSize: (number|Long|string); /** KMapEstimationHistogramBucket bucketValues. */ public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues[]; /** KMapEstimationHistogramBucket bucketValueCount. */ - public bucketValueCount: (number|Long); + public bucketValueCount: (number|Long|string); /** * Creates a new KMapEstimationHistogramBucket instance using the specified properties. @@ -7736,13 +8075,13 @@ export namespace google { maxProbability?: (number|null); /** DeltaPresenceEstimationHistogramBucket bucketSize */ - bucketSize?: (number|Long|null); + bucketSize?: (number|Long|string|null); /** DeltaPresenceEstimationHistogramBucket bucketValues */ bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues[]|null); /** DeltaPresenceEstimationHistogramBucket bucketValueCount */ - bucketValueCount?: (number|Long|null); + bucketValueCount?: (number|Long|string|null); } /** Represents a DeltaPresenceEstimationHistogramBucket. */ @@ -7761,13 +8100,13 @@ export namespace google { public maxProbability: number; /** DeltaPresenceEstimationHistogramBucket bucketSize. */ - public bucketSize: (number|Long); + public bucketSize: (number|Long|string); /** DeltaPresenceEstimationHistogramBucket bucketValues. */ public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues[]; /** DeltaPresenceEstimationHistogramBucket bucketValueCount. */ - public bucketValueCount: (number|Long); + public bucketValueCount: (number|Long|string); /** * Creates a new DeltaPresenceEstimationHistogramBucket instance using the specified properties. @@ -7849,7 +8188,7 @@ export namespace google { value?: (google.privacy.dlp.v2.IValue|null); /** ValueFrequency count */ - count?: (number|Long|null); + count?: (number|Long|string|null); } /** Represents a ValueFrequency. */ @@ -7865,7 +8204,7 @@ export namespace google { public value?: (google.privacy.dlp.v2.IValue|null); /** ValueFrequency count. */ - public count: (number|Long); + public count: (number|Long|string); /** * Creates a new ValueFrequency instance using the specified properties. @@ -7942,7 +8281,7 @@ export namespace google { interface IValue { /** Value integerValue */ - integerValue?: (number|Long|null); + integerValue?: (number|Long|string|null); /** Value floatValue */ floatValue?: (number|null); @@ -7963,7 +8302,7 @@ export namespace google { dateValue?: (google.type.IDate|null); /** Value dayOfWeekValue */ - dayOfWeekValue?: (google.type.DayOfWeek|null); + dayOfWeekValue?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); } /** Represents a Value. */ @@ -7976,7 +8315,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IValue); /** Value integerValue. */ - public integerValue: (number|Long); + public integerValue: (number|Long|string); /** Value floatValue. */ public floatValue: number; @@ -7997,7 +8336,7 @@ export namespace google { public dateValue?: (google.type.IDate|null); /** Value dayOfWeekValue. */ - public dayOfWeekValue: google.type.DayOfWeek; + public dayOfWeekValue: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); /** Value type. */ public type?: ("integerValue"|"floatValue"|"stringValue"|"booleanValue"|"timestampValue"|"timeValue"|"dateValue"|"dayOfWeekValue"); @@ -8173,7 +8512,7 @@ export namespace google { date?: (google.type.IDate|null); /** DateTime dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|null); + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); /** DateTime time */ time?: (google.type.ITimeOfDay|null); @@ -8195,7 +8534,7 @@ export namespace google { public date?: (google.type.IDate|null); /** DateTime dayOfWeek. */ - public dayOfWeek: google.type.DayOfWeek; + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); /** DateTime time. */ public time?: (google.type.ITimeOfDay|null); @@ -8375,6 +8714,9 @@ export namespace google { /** DeidentifyConfig recordTransformations */ recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null); + + /** DeidentifyConfig transformationErrorHandling */ + transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null); } /** Represents a DeidentifyConfig. */ @@ -8392,6 +8734,9 @@ export namespace google { /** DeidentifyConfig recordTransformations. */ public recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null); + /** DeidentifyConfig transformationErrorHandling. */ + public transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null); + /** DeidentifyConfig transformation. */ public transformation?: ("infoTypeTransformations"|"recordTransformations"); @@ -8466,57 +8811,327 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a PrimitiveTransformation. */ - interface IPrimitiveTransformation { - - /** PrimitiveTransformation replaceConfig */ - replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null); + /** Properties of a TransformationErrorHandling. */ + interface ITransformationErrorHandling { - /** PrimitiveTransformation redactConfig */ - redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null); + /** TransformationErrorHandling throwError */ + throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null); - /** PrimitiveTransformation characterMaskConfig */ - characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null); + /** TransformationErrorHandling leaveUntransformed */ + leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null); + } - /** PrimitiveTransformation cryptoReplaceFfxFpeConfig */ - cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null); + /** Represents a TransformationErrorHandling. */ + class TransformationErrorHandling implements ITransformationErrorHandling { - /** PrimitiveTransformation fixedSizeBucketingConfig */ - fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null); + /** + * Constructs a new TransformationErrorHandling. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationErrorHandling); - /** PrimitiveTransformation bucketingConfig */ - bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null); + /** TransformationErrorHandling throwError. */ + public throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null); - /** PrimitiveTransformation replaceWithInfoTypeConfig */ - replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null); + /** TransformationErrorHandling leaveUntransformed. */ + public leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null); - /** PrimitiveTransformation timePartConfig */ - timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null); + /** TransformationErrorHandling mode. */ + public mode?: ("throwError"|"leaveUntransformed"); - /** PrimitiveTransformation cryptoHashConfig */ - cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null); + /** + * 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; - /** PrimitiveTransformation dateShiftConfig */ - dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null); + /** + * 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.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer; - /** PrimitiveTransformation cryptoDeterministicConfig */ - cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null); - } + /** + * 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.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a PrimitiveTransformation. */ - class PrimitiveTransformation implements IPrimitiveTransformation { + /** + * 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 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.TransformationErrorHandling; /** - * Constructs a new PrimitiveTransformation. - * @param [properties] Properties to set + * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationErrorHandling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.privacy.dlp.v2.IPrimitiveTransformation); + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling; - /** PrimitiveTransformation replaceConfig. */ - public replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null); + /** + * 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); - /** PrimitiveTransformation redactConfig. */ - public redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null); + /** + * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationErrorHandling + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling; + + /** + * 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.TransformationErrorHandling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationErrorHandling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + 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; + + /** + * 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; + + /** + * 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 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; + + /** + * 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; + + /** + * 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 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; + + /** + * 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 }; + + /** + * Converts this ThrowError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LeaveUntransformed. */ + interface ILeaveUntransformed { + } + + /** Represents a LeaveUntransformed. */ + class LeaveUntransformed implements ILeaveUntransformed { + + /** + * Constructs a new LeaveUntransformed. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed); + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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; + + /** + * 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 }; + } + } + + /** 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); + } + + /** 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); @@ -8623,7 +9238,7 @@ export namespace google { interface ITimePartConfig { /** TimePartConfig partToExtract */ - partToExtract?: (google.privacy.dlp.v2.TimePartConfig.TimePart|null); + partToExtract?: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart|null); } /** Represents a TimePartConfig. */ @@ -8636,7 +9251,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.ITimePartConfig); /** TimePartConfig partToExtract. */ - public partToExtract: google.privacy.dlp.v2.TimePartConfig.TimePart; + public partToExtract: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart); /** * Creates a new TimePartConfig instance using the specified properties. @@ -9180,7 +9795,7 @@ export namespace google { charactersToSkip?: (string|null); /** CharsToIgnore commonCharactersToIgnore */ - commonCharactersToIgnore?: (google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null); + commonCharactersToIgnore?: (google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|keyof typeof google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null); } /** Represents a CharsToIgnore. */ @@ -9196,7 +9811,7 @@ export namespace google { public charactersToSkip: string; /** CharsToIgnore commonCharactersToIgnore. */ - public commonCharactersToIgnore: google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore; + public commonCharactersToIgnore: (google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|keyof typeof google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore); /** CharsToIgnore characters. */ public characters?: ("charactersToSkip"|"commonCharactersToIgnore"); @@ -9700,7 +10315,7 @@ export namespace google { context?: (google.privacy.dlp.v2.IFieldId|null); /** CryptoReplaceFfxFpeConfig commonAlphabet */ - commonAlphabet?: (google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null); + commonAlphabet?: (google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|keyof typeof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null); /** CryptoReplaceFfxFpeConfig customAlphabet */ customAlphabet?: (string|null); @@ -9728,7 +10343,7 @@ export namespace google { public context?: (google.privacy.dlp.v2.IFieldId|null); /** CryptoReplaceFfxFpeConfig commonAlphabet. */ - public commonAlphabet: google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; + public commonAlphabet: (google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|keyof typeof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet); /** CryptoReplaceFfxFpeConfig customAlphabet. */ public customAlphabet: string; @@ -10024,7 +10639,7 @@ export namespace google { interface IUnwrappedCryptoKey { /** UnwrappedCryptoKey key */ - key?: (Uint8Array|null); + key?: (Uint8Array|string|null); } /** Represents an UnwrappedCryptoKey. */ @@ -10037,7 +10652,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IUnwrappedCryptoKey); /** UnwrappedCryptoKey key. */ - public key: Uint8Array; + public key: (Uint8Array|string); /** * Creates a new UnwrappedCryptoKey instance using the specified properties. @@ -10114,7 +10729,7 @@ export namespace google { interface IKmsWrappedCryptoKey { /** KmsWrappedCryptoKey wrappedKey */ - wrappedKey?: (Uint8Array|null); + wrappedKey?: (Uint8Array|string|null); /** KmsWrappedCryptoKey cryptoKeyName */ cryptoKeyName?: (string|null); @@ -10130,7 +10745,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.IKmsWrappedCryptoKey); /** KmsWrappedCryptoKey wrappedKey. */ - public wrappedKey: Uint8Array; + public wrappedKey: (Uint8Array|string); /** KmsWrappedCryptoKey cryptoKeyName. */ public cryptoKeyName: string; @@ -10902,7 +11517,7 @@ export namespace google { field?: (google.privacy.dlp.v2.IFieldId|null); /** Condition operator */ - operator?: (google.privacy.dlp.v2.RelationalOperator|null); + operator?: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator|null); /** Condition value */ value?: (google.privacy.dlp.v2.IValue|null); @@ -10921,7 +11536,7 @@ export namespace google { public field?: (google.privacy.dlp.v2.IFieldId|null); /** Condition operator. */ - public operator: google.privacy.dlp.v2.RelationalOperator; + public operator: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator); /** Condition value. */ public value?: (google.privacy.dlp.v2.IValue|null); @@ -11091,7 +11706,7 @@ export namespace google { interface IExpressions { /** Expressions logicalOperator */ - logicalOperator?: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null); + 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); @@ -11107,7 +11722,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions); /** Expressions logicalOperator. */ - public logicalOperator: google.privacy.dlp.v2.RecordCondition.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); @@ -11200,7 +11815,7 @@ export namespace google { interface ITransformationOverview { /** TransformationOverview transformedBytes */ - transformedBytes?: (number|Long|null); + transformedBytes?: (number|Long|string|null); /** TransformationOverview transformationSummaries */ transformationSummaries?: (google.privacy.dlp.v2.ITransformationSummary[]|null); @@ -11216,7 +11831,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.ITransformationOverview); /** TransformationOverview transformedBytes. */ - public transformedBytes: (number|Long); + public transformedBytes: (number|Long|string); /** TransformationOverview transformationSummaries. */ public transformationSummaries: google.privacy.dlp.v2.ITransformationSummary[]; @@ -11314,7 +11929,7 @@ export namespace google { results?: (google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]|null); /** TransformationSummary transformedBytes */ - transformedBytes?: (number|Long|null); + transformedBytes?: (number|Long|string|null); } /** Represents a TransformationSummary. */ @@ -11345,7 +11960,7 @@ export namespace google { public results: google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]; /** TransformationSummary transformedBytes. */ - public transformedBytes: (number|Long); + public transformedBytes: (number|Long|string); /** * Creates a new TransformationSummary instance using the specified properties. @@ -11424,10 +12039,10 @@ export namespace google { interface ISummaryResult { /** SummaryResult count */ - count?: (number|Long|null); + count?: (number|Long|string|null); /** SummaryResult code */ - code?: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null); + code?: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null); /** SummaryResult details */ details?: (string|null); @@ -11443,10 +12058,10 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult); /** SummaryResult count. */ - public count: (number|Long); + public count: (number|Long|string); /** SummaryResult code. */ - public code: google.privacy.dlp.v2.TransformationSummary.TransformationResultCode; + public code: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode); /** SummaryResult details. */ public details: string; @@ -11623,6 +12238,90 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a Manual. */ + interface IManual { + } + + /** Represents a Manual. */ + class Manual implements IManual { + + /** + * Constructs a new Manual. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IManual); + + /** + * Creates a new Manual instance using the specified properties. + * @param [properties] Properties to set + * @returns Manual instance + */ + public static create(properties?: google.privacy.dlp.v2.IManual): google.privacy.dlp.v2.Manual; + + /** + * Encodes the specified Manual message. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @param message Manual message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IManual, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Manual message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @param message Manual message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IManual, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Manual message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Manual + * @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.Manual; + + /** + * Decodes a Manual message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Manual + * @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.Manual; + + /** + * Verifies a Manual 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 Manual message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Manual + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Manual; + + /** + * Creates a plain object from a Manual message. Also converts values to other types if specified. + * @param message Manual + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Manual, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Manual to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an InspectTemplate. */ interface IInspectTemplate { @@ -11990,7 +12689,7 @@ export namespace google { lastRunTime?: (google.protobuf.ITimestamp|null); /** JobTrigger status */ - status?: (google.privacy.dlp.v2.JobTrigger.Status|null); + status?: (google.privacy.dlp.v2.JobTrigger.Status|keyof typeof google.privacy.dlp.v2.JobTrigger.Status|null); } /** Represents a JobTrigger. */ @@ -12030,7 +12729,7 @@ export namespace google { public lastRunTime?: (google.protobuf.ITimestamp|null); /** JobTrigger status. */ - public status: google.privacy.dlp.v2.JobTrigger.Status; + public status: (google.privacy.dlp.v2.JobTrigger.Status|keyof typeof google.privacy.dlp.v2.JobTrigger.Status); /** JobTrigger job. */ public job?: "inspectJob"; @@ -12113,6 +12812,9 @@ export namespace google { /** Trigger schedule */ schedule?: (google.privacy.dlp.v2.ISchedule|null); + + /** Trigger manual */ + manual?: (google.privacy.dlp.v2.IManual|null); } /** Represents a Trigger. */ @@ -12127,8 +12829,11 @@ export namespace google { /** Trigger schedule. */ public schedule?: (google.privacy.dlp.v2.ISchedule|null); + /** Trigger manual. */ + public manual?: (google.privacy.dlp.v2.IManual|null); + /** Trigger trigger. */ - public trigger?: "schedule"; + public trigger?: ("schedule"|"manual"); /** * Creates a new Trigger instance using the specified properties. @@ -14380,10 +15085,10 @@ export namespace google { name?: (string|null); /** DlpJob type */ - type?: (google.privacy.dlp.v2.DlpJobType|null); + type?: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType|null); /** DlpJob state */ - state?: (google.privacy.dlp.v2.DlpJob.JobState|null); + state?: (google.privacy.dlp.v2.DlpJob.JobState|keyof typeof google.privacy.dlp.v2.DlpJob.JobState|null); /** DlpJob riskDetails */ riskDetails?: (google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null); @@ -14420,10 +15125,10 @@ export namespace google { public name: string; /** DlpJob type. */ - public type: google.privacy.dlp.v2.DlpJobType; + public type: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType); /** DlpJob state. */ - public state: google.privacy.dlp.v2.DlpJob.JobState; + public state: (google.privacy.dlp.v2.DlpJob.JobState|keyof typeof google.privacy.dlp.v2.DlpJob.JobState); /** DlpJob riskDetails. */ public riskDetails?: (google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null); @@ -14529,7 +15234,8 @@ export namespace google { RUNNING = 2, DONE = 3, CANCELED = 4, - FAILED = 5 + FAILED = 5, + ACTIVE = 6 } } @@ -14639,7 +15345,7 @@ export namespace google { pageToken?: (string|null); /** ListDlpJobsRequest type */ - type?: (google.privacy.dlp.v2.DlpJobType|null); + type?: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType|null); /** ListDlpJobsRequest orderBy */ orderBy?: (string|null); @@ -14670,7 +15376,7 @@ export namespace google { public pageToken: string; /** ListDlpJobsRequest type. */ - public type: google.privacy.dlp.v2.DlpJobType; + public type: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType); /** ListDlpJobsRequest orderBy. */ public orderBy: string; @@ -14935,69 +15641,159 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDlpJobRequest. */ - interface IDeleteDlpJobRequest { + /** Properties of a FinishDlpJobRequest. */ + interface IFinishDlpJobRequest { - /** DeleteDlpJobRequest name */ + /** FinishDlpJobRequest name */ name?: (string|null); } - /** Represents a DeleteDlpJobRequest. */ - class DeleteDlpJobRequest implements IDeleteDlpJobRequest { + /** Represents a FinishDlpJobRequest. */ + class FinishDlpJobRequest implements IFinishDlpJobRequest { /** - * Constructs a new DeleteDlpJobRequest. + * Constructs a new FinishDlpJobRequest. * @param [properties] Properties to set */ - constructor(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest); + constructor(properties?: google.privacy.dlp.v2.IFinishDlpJobRequest); - /** DeleteDlpJobRequest name. */ + /** FinishDlpJobRequest name. */ public name: string; /** - * Creates a new DeleteDlpJobRequest instance using the specified properties. + * Creates a new FinishDlpJobRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDlpJobRequest instance + * @returns FinishDlpJobRequest instance */ - public static create(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest): google.privacy.dlp.v2.DeleteDlpJobRequest; + public static create(properties?: google.privacy.dlp.v2.IFinishDlpJobRequest): google.privacy.dlp.v2.FinishDlpJobRequest; /** - * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. - * @param message DeleteDlpJobRequest message or plain object to encode + * Encodes the specified FinishDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @param message FinishDlpJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.privacy.dlp.v2.IFinishDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. - * @param message DeleteDlpJobRequest message or plain object to encode + * Encodes the specified FinishDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @param message FinishDlpJobRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.privacy.dlp.v2.IFinishDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. + * Decodes a FinishDlpJobRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDlpJobRequest + * @returns FinishDlpJobRequest * @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.DeleteDlpJobRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FinishDlpJobRequest; /** - * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. + * Decodes a FinishDlpJobRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDlpJobRequest + * @returns FinishDlpJobRequest * @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.DeleteDlpJobRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FinishDlpJobRequest; /** - * Verifies a DeleteDlpJobRequest message. + * Verifies a FinishDlpJobRequest 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 FinishDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FinishDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FinishDlpJobRequest; + + /** + * Creates a plain object from a FinishDlpJobRequest message. Also converts values to other types if specified. + * @param message FinishDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FinishDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FinishDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteDlpJobRequest. */ + interface IDeleteDlpJobRequest { + + /** DeleteDlpJobRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDlpJobRequest. */ + class DeleteDlpJobRequest implements IDeleteDlpJobRequest { + + /** + * Constructs a new DeleteDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest); + + /** DeleteDlpJobRequest name. */ + public name: string; + + /** + * Creates a new DeleteDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest): google.privacy.dlp.v2.DeleteDlpJobRequest; + + /** + * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @param message DeleteDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @param message DeleteDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDlpJobRequest + * @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.DeleteDlpJobRequest; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDlpJobRequest + * @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.DeleteDlpJobRequest; + + /** + * Verifies a DeleteDlpJobRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ @@ -15734,7 +16530,7 @@ export namespace google { interface ILargeCustomDictionaryStats { /** LargeCustomDictionaryStats approxNumPhrases */ - approxNumPhrases?: (number|Long|null); + approxNumPhrases?: (number|Long|string|null); } /** Represents a LargeCustomDictionaryStats. */ @@ -15747,7 +16543,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.ILargeCustomDictionaryStats); /** LargeCustomDictionaryStats approxNumPhrases. */ - public approxNumPhrases: (number|Long); + public approxNumPhrases: (number|Long|string); /** * Creates a new LargeCustomDictionaryStats instance using the specified properties. @@ -15831,6 +16627,12 @@ export namespace google { /** StoredInfoTypeConfig largeCustomDictionary */ largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null); + + /** StoredInfoTypeConfig dictionary */ + dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** StoredInfoTypeConfig regex */ + regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); } /** Represents a StoredInfoTypeConfig. */ @@ -15851,8 +16653,14 @@ export namespace google { /** StoredInfoTypeConfig largeCustomDictionary. */ public largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null); + /** StoredInfoTypeConfig dictionary. */ + public dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** StoredInfoTypeConfig regex. */ + public regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + /** StoredInfoTypeConfig type. */ - public type?: "largeCustomDictionary"; + public type?: ("largeCustomDictionary"|"dictionary"|"regex"); /** * Creates a new StoredInfoTypeConfig instance using the specified properties. @@ -16028,7 +16836,7 @@ export namespace google { createTime?: (google.protobuf.ITimestamp|null); /** StoredInfoTypeVersion state */ - state?: (google.privacy.dlp.v2.StoredInfoTypeState|null); + state?: (google.privacy.dlp.v2.StoredInfoTypeState|keyof typeof google.privacy.dlp.v2.StoredInfoTypeState|null); /** StoredInfoTypeVersion errors */ errors?: (google.privacy.dlp.v2.IError[]|null); @@ -16053,7 +16861,7 @@ export namespace google { public createTime?: (google.protobuf.ITimestamp|null); /** StoredInfoTypeVersion state. */ - public state: google.privacy.dlp.v2.StoredInfoTypeState; + public state: (google.privacy.dlp.v2.StoredInfoTypeState|keyof typeof google.privacy.dlp.v2.StoredInfoTypeState); /** StoredInfoTypeVersion errors. */ public errors: google.privacy.dlp.v2.IError[]; @@ -16543,292 +17351,778 @@ export namespace google { /** ListStoredInfoTypesRequest pageToken */ pageToken?: (string|null); - /** ListStoredInfoTypesRequest pageSize */ - pageSize?: (number|null); + /** ListStoredInfoTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListStoredInfoTypesRequest orderBy */ + orderBy?: (string|null); + + /** ListStoredInfoTypesRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListStoredInfoTypesRequest. */ + class ListStoredInfoTypesRequest implements IListStoredInfoTypesRequest { + + /** + * Constructs a new ListStoredInfoTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest); + + /** ListStoredInfoTypesRequest parent. */ + public parent: string; + + /** ListStoredInfoTypesRequest pageToken. */ + public pageToken: string; + + /** ListStoredInfoTypesRequest pageSize. */ + public pageSize: number; + + /** ListStoredInfoTypesRequest orderBy. */ + public orderBy: string; + + /** ListStoredInfoTypesRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListStoredInfoTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoredInfoTypesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @param message ListStoredInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @param message ListStoredInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoredInfoTypesRequest + * @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.ListStoredInfoTypesRequest; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoredInfoTypesRequest + * @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.ListStoredInfoTypesRequest; + + /** + * Verifies a ListStoredInfoTypesRequest 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 ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoredInfoTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. + * @param message ListStoredInfoTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoredInfoTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListStoredInfoTypesResponse. */ + interface IListStoredInfoTypesResponse { + + /** ListStoredInfoTypesResponse storedInfoTypes */ + storedInfoTypes?: (google.privacy.dlp.v2.IStoredInfoType[]|null); + + /** ListStoredInfoTypesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListStoredInfoTypesResponse. */ + class ListStoredInfoTypesResponse implements IListStoredInfoTypesResponse { + + /** + * Constructs a new ListStoredInfoTypesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse); + + /** ListStoredInfoTypesResponse storedInfoTypes. */ + public storedInfoTypes: google.privacy.dlp.v2.IStoredInfoType[]; + + /** ListStoredInfoTypesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListStoredInfoTypesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoredInfoTypesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @param message ListStoredInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @param message ListStoredInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoredInfoTypesResponse + * @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.ListStoredInfoTypesResponse; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoredInfoTypesResponse + * @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.ListStoredInfoTypesResponse; + + /** + * Verifies a ListStoredInfoTypesResponse 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 ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoredInfoTypesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. + * @param message ListStoredInfoTypesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoredInfoTypesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteStoredInfoTypeRequest. */ + interface IDeleteStoredInfoTypeRequest { + + /** DeleteStoredInfoTypeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteStoredInfoTypeRequest. */ + class DeleteStoredInfoTypeRequest implements IDeleteStoredInfoTypeRequest { + + /** + * Constructs a new DeleteStoredInfoTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest); + + /** DeleteStoredInfoTypeRequest name. */ + public name: string; + + /** + * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteStoredInfoTypeRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteStoredInfoTypeRequest + * @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.DeleteStoredInfoTypeRequest; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteStoredInfoTypeRequest + * @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.DeleteStoredInfoTypeRequest; + + /** + * Verifies a DeleteStoredInfoTypeRequest 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 DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteStoredInfoTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. + * @param message DeleteStoredInfoTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteStoredInfoTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HybridInspectJobTriggerRequest. */ + interface IHybridInspectJobTriggerRequest { + + /** HybridInspectJobTriggerRequest name */ + name?: (string|null); + + /** HybridInspectJobTriggerRequest hybridItem */ + hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + } + + /** Represents a HybridInspectJobTriggerRequest. */ + class HybridInspectJobTriggerRequest implements IHybridInspectJobTriggerRequest { + + /** + * Constructs a new HybridInspectJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest); + + /** HybridInspectJobTriggerRequest name. */ + public name: string; + + /** HybridInspectJobTriggerRequest hybridItem. */ + public hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + + /** + * Creates a new HybridInspectJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @param message HybridInspectJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @param message HybridInspectJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectJobTriggerRequest + * @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.HybridInspectJobTriggerRequest; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectJobTriggerRequest + * @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.HybridInspectJobTriggerRequest; + + /** + * Verifies a HybridInspectJobTriggerRequest 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 HybridInspectJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Creates a plain object from a HybridInspectJobTriggerRequest message. Also converts values to other types if specified. + * @param message HybridInspectJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HybridInspectDlpJobRequest. */ + interface IHybridInspectDlpJobRequest { + + /** HybridInspectDlpJobRequest name */ + name?: (string|null); + + /** HybridInspectDlpJobRequest hybridItem */ + hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + } + + /** Represents a HybridInspectDlpJobRequest. */ + class HybridInspectDlpJobRequest implements IHybridInspectDlpJobRequest { + + /** + * Constructs a new HybridInspectDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectDlpJobRequest); + + /** HybridInspectDlpJobRequest name. */ + public name: string; + + /** HybridInspectDlpJobRequest hybridItem. */ + public hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + + /** + * Creates a new HybridInspectDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectDlpJobRequest): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Encodes the specified HybridInspectDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @param message HybridInspectDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @param message HybridInspectDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectDlpJobRequest + * @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.HybridInspectDlpJobRequest; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectDlpJobRequest + * @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.HybridInspectDlpJobRequest; + + /** + * Verifies a HybridInspectDlpJobRequest 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 HybridInspectDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Creates a plain object from a HybridInspectDlpJobRequest message. Also converts values to other types if specified. + * @param message HybridInspectDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HybridContentItem. */ + interface IHybridContentItem { - /** ListStoredInfoTypesRequest orderBy */ - orderBy?: (string|null); + /** HybridContentItem item */ + item?: (google.privacy.dlp.v2.IContentItem|null); - /** ListStoredInfoTypesRequest locationId */ - locationId?: (string|null); + /** HybridContentItem findingDetails */ + findingDetails?: (google.privacy.dlp.v2.IHybridFindingDetails|null); } - /** Represents a ListStoredInfoTypesRequest. */ - class ListStoredInfoTypesRequest implements IListStoredInfoTypesRequest { + /** Represents a HybridContentItem. */ + class HybridContentItem implements IHybridContentItem { /** - * Constructs a new ListStoredInfoTypesRequest. + * Constructs a new HybridContentItem. * @param [properties] Properties to set */ - constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest); - - /** ListStoredInfoTypesRequest parent. */ - public parent: string; - - /** ListStoredInfoTypesRequest pageToken. */ - public pageToken: string; - - /** ListStoredInfoTypesRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.privacy.dlp.v2.IHybridContentItem); - /** ListStoredInfoTypesRequest orderBy. */ - public orderBy: string; + /** HybridContentItem item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); - /** ListStoredInfoTypesRequest locationId. */ - public locationId: string; + /** HybridContentItem findingDetails. */ + public findingDetails?: (google.privacy.dlp.v2.IHybridFindingDetails|null); /** - * Creates a new ListStoredInfoTypesRequest instance using the specified properties. + * Creates a new HybridContentItem instance using the specified properties. * @param [properties] Properties to set - * @returns ListStoredInfoTypesRequest instance + * @returns HybridContentItem instance */ - public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + public static create(properties?: google.privacy.dlp.v2.IHybridContentItem): google.privacy.dlp.v2.HybridContentItem; /** - * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. - * @param message ListStoredInfoTypesRequest message or plain object to encode + * Encodes the specified HybridContentItem message. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @param message HybridContentItem message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.privacy.dlp.v2.IHybridContentItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. - * @param message ListStoredInfoTypesRequest message or plain object to encode + * Encodes the specified HybridContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @param message HybridContentItem message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridContentItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. + * Decodes a HybridContentItem message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListStoredInfoTypesRequest + * @returns HybridContentItem * @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.ListStoredInfoTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridContentItem; /** - * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridContentItem message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListStoredInfoTypesRequest + * @returns HybridContentItem * @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.ListStoredInfoTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridContentItem; /** - * Verifies a ListStoredInfoTypesRequest message. + * Verifies a HybridContentItem 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 ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridContentItem message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListStoredInfoTypesRequest + * @returns HybridContentItem */ - public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridContentItem; /** - * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. - * @param message ListStoredInfoTypesRequest + * Creates a plain object from a HybridContentItem message. Also converts values to other types if specified. + * @param message HybridContentItem * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.privacy.dlp.v2.HybridContentItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListStoredInfoTypesRequest to JSON. + * Converts this HybridContentItem to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListStoredInfoTypesResponse. */ - interface IListStoredInfoTypesResponse { + /** Properties of a HybridFindingDetails. */ + interface IHybridFindingDetails { - /** ListStoredInfoTypesResponse storedInfoTypes */ - storedInfoTypes?: (google.privacy.dlp.v2.IStoredInfoType[]|null); + /** HybridFindingDetails containerDetails */ + containerDetails?: (google.privacy.dlp.v2.IContainer|null); - /** ListStoredInfoTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** HybridFindingDetails fileOffset */ + fileOffset?: (number|Long|string|null); + + /** HybridFindingDetails rowOffset */ + rowOffset?: (number|Long|string|null); + + /** HybridFindingDetails tableOptions */ + tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** HybridFindingDetails labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a ListStoredInfoTypesResponse. */ - class ListStoredInfoTypesResponse implements IListStoredInfoTypesResponse { + /** Represents a HybridFindingDetails. */ + class HybridFindingDetails implements IHybridFindingDetails { /** - * Constructs a new ListStoredInfoTypesResponse. + * Constructs a new HybridFindingDetails. * @param [properties] Properties to set */ - constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse); + constructor(properties?: google.privacy.dlp.v2.IHybridFindingDetails); - /** ListStoredInfoTypesResponse storedInfoTypes. */ - public storedInfoTypes: google.privacy.dlp.v2.IStoredInfoType[]; + /** HybridFindingDetails containerDetails. */ + public containerDetails?: (google.privacy.dlp.v2.IContainer|null); - /** ListStoredInfoTypesResponse nextPageToken. */ - public nextPageToken: string; + /** HybridFindingDetails fileOffset. */ + public fileOffset: (number|Long|string); + + /** HybridFindingDetails rowOffset. */ + public rowOffset: (number|Long|string); + + /** HybridFindingDetails tableOptions. */ + public tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** HybridFindingDetails labels. */ + public labels: { [k: string]: string }; /** - * Creates a new ListStoredInfoTypesResponse instance using the specified properties. + * Creates a new HybridFindingDetails instance using the specified properties. * @param [properties] Properties to set - * @returns ListStoredInfoTypesResponse instance + * @returns HybridFindingDetails instance */ - public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + public static create(properties?: google.privacy.dlp.v2.IHybridFindingDetails): google.privacy.dlp.v2.HybridFindingDetails; /** - * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. - * @param message ListStoredInfoTypesResponse message or plain object to encode + * Encodes the specified HybridFindingDetails message. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @param message HybridFindingDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.privacy.dlp.v2.IHybridFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. - * @param message ListStoredInfoTypesResponse message or plain object to encode + * Encodes the specified HybridFindingDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @param message HybridFindingDetails message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. + * Decodes a HybridFindingDetails message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListStoredInfoTypesResponse + * @returns HybridFindingDetails * @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.ListStoredInfoTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridFindingDetails; /** - * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a HybridFindingDetails message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListStoredInfoTypesResponse + * @returns HybridFindingDetails * @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.ListStoredInfoTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridFindingDetails; /** - * Verifies a ListStoredInfoTypesResponse message. + * Verifies a HybridFindingDetails 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 ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a HybridFindingDetails message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListStoredInfoTypesResponse + * @returns HybridFindingDetails */ - public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridFindingDetails; /** - * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. - * @param message ListStoredInfoTypesResponse + * Creates a plain object from a HybridFindingDetails message. Also converts values to other types if specified. + * @param message HybridFindingDetails * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.privacy.dlp.v2.HybridFindingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListStoredInfoTypesResponse to JSON. + * Converts this HybridFindingDetails to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteStoredInfoTypeRequest. */ - interface IDeleteStoredInfoTypeRequest { - - /** DeleteStoredInfoTypeRequest name */ - name?: (string|null); + /** Properties of a HybridInspectResponse. */ + interface IHybridInspectResponse { } - /** Represents a DeleteStoredInfoTypeRequest. */ - class DeleteStoredInfoTypeRequest implements IDeleteStoredInfoTypeRequest { + /** Represents a HybridInspectResponse. */ + class HybridInspectResponse implements IHybridInspectResponse { /** - * Constructs a new DeleteStoredInfoTypeRequest. + * Constructs a new HybridInspectResponse. * @param [properties] Properties to set */ - constructor(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest); - - /** DeleteStoredInfoTypeRequest name. */ - public name: string; + constructor(properties?: google.privacy.dlp.v2.IHybridInspectResponse); /** - * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. + * Creates a new HybridInspectResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteStoredInfoTypeRequest instance + * @returns HybridInspectResponse instance */ - public static create(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + public static create(properties?: google.privacy.dlp.v2.IHybridInspectResponse): google.privacy.dlp.v2.HybridInspectResponse; /** - * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. - * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * Encodes the specified HybridInspectResponse message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @param message HybridInspectResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.privacy.dlp.v2.IHybridInspectResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. - * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * Encodes the specified HybridInspectResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @param message HybridInspectResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. + * Decodes a HybridInspectResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteStoredInfoTypeRequest + * @returns HybridInspectResponse * @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.DeleteStoredInfoTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridInspectResponse; /** - * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridInspectResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteStoredInfoTypeRequest + * @returns HybridInspectResponse * @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.DeleteStoredInfoTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridInspectResponse; /** - * Verifies a DeleteStoredInfoTypeRequest message. + * Verifies a HybridInspectResponse 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 DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridInspectResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteStoredInfoTypeRequest + * @returns HybridInspectResponse */ - public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectResponse; /** - * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. - * @param message DeleteStoredInfoTypeRequest + * Creates a plain object from a HybridInspectResponse message. Also converts values to other types if specified. + * @param message HybridInspectResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.privacy.dlp.v2.HybridInspectResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteStoredInfoTypeRequest to JSON. + * Converts this HybridInspectResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -17087,7 +18381,7 @@ export namespace google { infoType?: (google.privacy.dlp.v2.IInfoType|null); /** CustomInfoType likelihood */ - likelihood?: (google.privacy.dlp.v2.Likelihood|null); + likelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); /** CustomInfoType dictionary */ dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); @@ -17105,7 +18399,7 @@ export namespace google { detectionRules?: (google.privacy.dlp.v2.CustomInfoType.IDetectionRule[]|null); /** CustomInfoType exclusionType */ - exclusionType?: (google.privacy.dlp.v2.CustomInfoType.ExclusionType|null); + exclusionType?: (google.privacy.dlp.v2.CustomInfoType.ExclusionType|keyof typeof google.privacy.dlp.v2.CustomInfoType.ExclusionType|null); } /** Represents a CustomInfoType. */ @@ -17121,7 +18415,7 @@ export namespace google { public infoType?: (google.privacy.dlp.v2.IInfoType|null); /** CustomInfoType likelihood. */ - public likelihood: google.privacy.dlp.v2.Likelihood; + public likelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); /** CustomInfoType dictionary. */ public dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); @@ -17139,7 +18433,7 @@ export namespace google { public detectionRules: google.privacy.dlp.v2.CustomInfoType.IDetectionRule[]; /** CustomInfoType exclusionType. */ - public exclusionType: google.privacy.dlp.v2.CustomInfoType.ExclusionType; + public exclusionType: (google.privacy.dlp.v2.CustomInfoType.ExclusionType|keyof typeof google.privacy.dlp.v2.CustomInfoType.ExclusionType); /** CustomInfoType type. */ public type?: ("dictionary"|"regex"|"surrogateType"|"storedType"); @@ -17784,7 +19078,7 @@ export namespace google { interface ILikelihoodAdjustment { /** LikelihoodAdjustment fixedLikelihood */ - fixedLikelihood?: (google.privacy.dlp.v2.Likelihood|null); + fixedLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); /** LikelihoodAdjustment relativeLikelihood */ relativeLikelihood?: (number|null); @@ -17800,7 +19094,7 @@ export namespace google { constructor(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment); /** LikelihoodAdjustment fixedLikelihood. */ - public fixedLikelihood: google.privacy.dlp.v2.Likelihood; + public fixedLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); /** LikelihoodAdjustment relativeLikelihood. */ public relativeLikelihood: number; @@ -18470,7 +19764,7 @@ export namespace google { fileSet?: (google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null); /** CloudStorageOptions bytesLimitPerFile */ - bytesLimitPerFile?: (number|Long|null); + bytesLimitPerFile?: (number|Long|string|null); /** CloudStorageOptions bytesLimitPerFilePercent */ bytesLimitPerFilePercent?: (number|null); @@ -18479,7 +19773,7 @@ export namespace google { fileTypes?: (google.privacy.dlp.v2.FileType[]|null); /** CloudStorageOptions sampleMethod */ - sampleMethod?: (google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|null); + sampleMethod?: (google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|null); /** CloudStorageOptions filesLimitPercent */ filesLimitPercent?: (number|null); @@ -18498,7 +19792,7 @@ export namespace google { public fileSet?: (google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null); /** CloudStorageOptions bytesLimitPerFile. */ - public bytesLimitPerFile: (number|Long); + public bytesLimitPerFile: (number|Long|string); /** CloudStorageOptions bytesLimitPerFilePercent. */ public bytesLimitPerFilePercent: number; @@ -18507,7 +19801,7 @@ export namespace google { public fileTypes: google.privacy.dlp.v2.FileType[]; /** CloudStorageOptions sampleMethod. */ - public sampleMethod: google.privacy.dlp.v2.CloudStorageOptions.SampleMethod; + public sampleMethod: (google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.CloudStorageOptions.SampleMethod); /** CloudStorageOptions filesLimitPercent. */ public filesLimitPercent: number; @@ -18879,13 +20173,13 @@ export namespace google { identifyingFields?: (google.privacy.dlp.v2.IFieldId[]|null); /** BigQueryOptions rowsLimit */ - rowsLimit?: (number|Long|null); + rowsLimit?: (number|Long|string|null); /** BigQueryOptions rowsLimitPercent */ rowsLimitPercent?: (number|null); /** BigQueryOptions sampleMethod */ - sampleMethod?: (google.privacy.dlp.v2.BigQueryOptions.SampleMethod|null); + sampleMethod?: (google.privacy.dlp.v2.BigQueryOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.BigQueryOptions.SampleMethod|null); /** BigQueryOptions excludedFields */ excludedFields?: (google.privacy.dlp.v2.IFieldId[]|null); @@ -18907,13 +20201,13 @@ export namespace google { public identifyingFields: google.privacy.dlp.v2.IFieldId[]; /** BigQueryOptions rowsLimit. */ - public rowsLimit: (number|Long); + public rowsLimit: (number|Long|string); /** BigQueryOptions rowsLimitPercent. */ public rowsLimitPercent: number; /** BigQueryOptions sampleMethod. */ - public sampleMethod: google.privacy.dlp.v2.BigQueryOptions.SampleMethod; + public sampleMethod: (google.privacy.dlp.v2.BigQueryOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.BigQueryOptions.SampleMethod); /** BigQueryOptions excludedFields. */ public excludedFields: google.privacy.dlp.v2.IFieldId[]; @@ -19011,6 +20305,9 @@ export namespace google { /** StorageConfig bigQueryOptions */ bigQueryOptions?: (google.privacy.dlp.v2.IBigQueryOptions|null); + /** StorageConfig hybridOptions */ + hybridOptions?: (google.privacy.dlp.v2.IHybridOptions|null); + /** StorageConfig timespanConfig */ timespanConfig?: (google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null); } @@ -19033,11 +20330,14 @@ export namespace google { /** StorageConfig bigQueryOptions. */ public bigQueryOptions?: (google.privacy.dlp.v2.IBigQueryOptions|null); + /** StorageConfig hybridOptions. */ + public hybridOptions?: (google.privacy.dlp.v2.IHybridOptions|null); + /** StorageConfig timespanConfig. */ public timespanConfig?: (google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null); /** StorageConfig type. */ - public type?: ("datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"); + public type?: ("datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"|"hybridOptions"); /** * Creates a new StorageConfig instance using the specified properties. @@ -19230,6 +20530,114 @@ export namespace google { AVRO = 7 } + /** Properties of a HybridOptions. */ + interface IHybridOptions { + + /** HybridOptions description */ + description?: (string|null); + + /** HybridOptions requiredFindingLabelKeys */ + requiredFindingLabelKeys?: (string[]|null); + + /** HybridOptions labels */ + labels?: ({ [k: string]: string }|null); + + /** HybridOptions tableOptions */ + tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + } + + /** Represents a HybridOptions. */ + class HybridOptions implements IHybridOptions { + + /** + * Constructs a new HybridOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridOptions); + + /** HybridOptions description. */ + public description: string; + + /** HybridOptions requiredFindingLabelKeys. */ + public requiredFindingLabelKeys: string[]; + + /** HybridOptions labels. */ + public labels: { [k: string]: string }; + + /** HybridOptions tableOptions. */ + public tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** + * Creates a new HybridOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridOptions): google.privacy.dlp.v2.HybridOptions; + + /** + * Encodes the specified HybridOptions message. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @param message HybridOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @param message HybridOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridOptions + * @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.HybridOptions; + + /** + * Decodes a HybridOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridOptions + * @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.HybridOptions; + + /** + * Verifies a HybridOptions 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 HybridOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridOptions; + + /** + * Creates a plain object from a HybridOptions message. Also converts values to other types if specified. + * @param message HybridOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a BigQueryKey. */ interface IBigQueryKey { @@ -19237,7 +20645,7 @@ export namespace google { tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); /** BigQueryKey rowNumber */ - rowNumber?: (number|Long|null); + rowNumber?: (number|Long|string|null); } /** Represents a BigQueryKey. */ @@ -19253,7 +20661,7 @@ export namespace google { public tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); /** BigQueryKey rowNumber. */ - public rowNumber: (number|Long); + public rowNumber: (number|Long|string); /** * Creates a new BigQueryKey instance using the specified properties. @@ -19521,7 +20929,7 @@ export namespace google { kind?: (string|null); /** PathElement id */ - id?: (number|Long|null); + id?: (number|Long|string|null); /** PathElement name */ name?: (string|null); @@ -19540,7 +20948,7 @@ export namespace google { public kind: string; /** PathElement id. */ - public id: (number|Long); + public id: (number|Long|string); /** PathElement name. */ public name: string; @@ -20012,6 +21420,96 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a TableOptions. */ + interface ITableOptions { + + /** TableOptions identifyingFields */ + identifyingFields?: (google.privacy.dlp.v2.IFieldId[]|null); + } + + /** Represents a TableOptions. */ + class TableOptions implements ITableOptions { + + /** + * Constructs a new TableOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITableOptions); + + /** TableOptions identifyingFields. */ + public identifyingFields: google.privacy.dlp.v2.IFieldId[]; + + /** + * Creates a new TableOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns TableOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.ITableOptions): google.privacy.dlp.v2.TableOptions; + + /** + * Encodes the specified TableOptions message. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @param message TableOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITableOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @param message TableOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITableOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableOptions + * @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.TableOptions; + + /** + * Decodes a TableOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableOptions + * @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.TableOptions; + + /** + * Verifies a TableOptions 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 TableOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TableOptions; + + /** + * Creates a plain object from a TableOptions message. Also converts values to other types if specified. + * @param message TableOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TableOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } } @@ -20381,7 +21879,7 @@ export namespace google { nameField?: (string|null); /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); /** ResourceDescriptor plural */ plural?: (string|null); @@ -20409,7 +21907,7 @@ export namespace google { public nameField: string; /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); /** ResourceDescriptor plural. */ public plural: string; @@ -21289,10 +22787,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -21329,10 +22827,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -22107,7 +23605,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -22183,7 +23681,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -22432,13 +23930,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -22469,13 +23967,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); /** FieldOptions packed. */ public packed: boolean; /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -22974,7 +24472,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -22999,7 +24497,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -23095,16 +24593,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -23126,16 +24624,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -23722,7 +25220,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -23738,7 +25236,7 @@ export namespace google { constructor(properties?: google.protobuf.ITimestamp); /** Timestamp seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Timestamp nanos. */ public nanos: number; @@ -23818,7 +25316,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -23834,7 +25332,7 @@ export namespace google { constructor(properties?: google.protobuf.IDuration); /** Duration seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Duration nanos. */ public nanos: number; @@ -24091,7 +25589,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -24107,7 +25605,7 @@ export namespace google { public type_url: string; /** Any value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new Any instance using the specified properties. diff --git a/packages/google-privacy-dlp/protos/protos.js b/packages/google-privacy-dlp/protos/protos.js index 6eaf4f2ad57..0dd3ccb8139 100644 --- a/packages/google-privacy-dlp/protos/protos.js +++ b/packages/google-privacy-dlp/protos/protos.js @@ -659,6 +659,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#hybridInspectJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef HybridInspectJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.HybridInspectResponse} [response] HybridInspectResponse + */ + + /** + * Calls HybridInspectJobTrigger. + * @function hybridInspectJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} request HybridInspectJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.HybridInspectJobTriggerCallback} callback Node-style callback called with the error, if any, and HybridInspectResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.hybridInspectJobTrigger = function hybridInspectJobTrigger(request, callback) { + return this.rpcCall(hybridInspectJobTrigger, $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest, $root.google.privacy.dlp.v2.HybridInspectResponse, request, callback); + }, "name", { value: "HybridInspectJobTrigger" }); + + /** + * Calls HybridInspectJobTrigger. + * @function hybridInspectJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} request HybridInspectJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.privacy.dlp.v2.DlpService#getJobTrigger}. * @memberof google.privacy.dlp.v2.DlpService @@ -1121,6 +1154,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#hybridInspectDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef HybridInspectDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.HybridInspectResponse} [response] HybridInspectResponse + */ + + /** + * Calls HybridInspectDlpJob. + * @function hybridInspectDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} request HybridInspectDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.HybridInspectDlpJobCallback} callback Node-style callback called with the error, if any, and HybridInspectResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.hybridInspectDlpJob = function hybridInspectDlpJob(request, callback) { + return this.rpcCall(hybridInspectDlpJob, $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest, $root.google.privacy.dlp.v2.HybridInspectResponse, request, callback); + }, "name", { value: "HybridInspectDlpJob" }); + + /** + * Calls HybridInspectDlpJob. + * @function hybridInspectDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} request HybridInspectDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService#finishDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef FinishDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls FinishDlpJob. + * @function finishDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} request FinishDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.FinishDlpJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.finishDlpJob = function finishDlpJob(request, callback) { + return this.rpcCall(finishDlpJob, $root.google.privacy.dlp.v2.FinishDlpJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "FinishDlpJob" }); + + /** + * Calls FinishDlpJob. + * @function finishDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} request FinishDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return DlpService; })(); @@ -4370,12 +4469,18 @@ * Properties of a Finding. * @memberof google.privacy.dlp.v2 * @interface IFinding + * @property {string|null} [name] Finding name * @property {string|null} [quote] Finding quote * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] Finding infoType * @property {google.privacy.dlp.v2.Likelihood|null} [likelihood] Finding likelihood * @property {google.privacy.dlp.v2.ILocation|null} [location] Finding location * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime * @property {google.privacy.dlp.v2.IQuoteInfo|null} [quoteInfo] Finding quoteInfo + * @property {string|null} [resourceName] Finding resourceName + * @property {string|null} [triggerName] Finding triggerName + * @property {Object.|null} [labels] Finding labels + * @property {google.protobuf.ITimestamp|null} [jobCreateTime] Finding jobCreateTime + * @property {string|null} [jobName] Finding jobName */ /** @@ -4387,12 +4492,21 @@ * @param {google.privacy.dlp.v2.IFinding=} [properties] Properties to set */ function Finding(properties) { + this.labels = {}; 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]]; } + /** + * Finding name. + * @member {string} name + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.name = ""; + /** * Finding quote. * @member {string} quote @@ -4441,6 +4555,46 @@ */ Finding.prototype.quoteInfo = null; + /** + * Finding resourceName. + * @member {string} resourceName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.resourceName = ""; + + /** + * Finding triggerName. + * @member {string} triggerName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.triggerName = ""; + + /** + * Finding labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.labels = $util.emptyObject; + + /** + * Finding jobCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} jobCreateTime + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.jobCreateTime = null; + + /** + * Finding jobName. + * @member {string} jobName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.jobName = ""; + /** * Creates a new Finding instance using the specified properties. * @function create @@ -4477,6 +4631,19 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) $root.google.privacy.dlp.v2.QuoteInfo.encode(message.quoteInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceName); + if (message.triggerName != null && message.hasOwnProperty("triggerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.triggerName); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.jobCreateTime != null && message.hasOwnProperty("jobCreateTime")) + $root.google.protobuf.Timestamp.encode(message.jobCreateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.jobName != null && message.hasOwnProperty("jobName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.jobName); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.name); return writer; }; @@ -4507,10 +4674,13 @@ Finding.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.Finding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Finding(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 14: + message.name = reader.string(); + break; case 1: message.quote = reader.string(); break; @@ -4529,6 +4699,26 @@ case 7: message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.decode(reader, reader.uint32()); break; + case 8: + message.resourceName = reader.string(); + break; + case 9: + message.triggerName = reader.string(); + break; + case 10: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 11: + message.jobCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.jobName = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -4564,6 +4754,9 @@ Finding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.quote != null && message.hasOwnProperty("quote")) if (!$util.isString(message.quote)) return "quote: string expected"; @@ -4599,6 +4792,28 @@ if (error) return "quoteInfo." + error; } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.triggerName != null && message.hasOwnProperty("triggerName")) + if (!$util.isString(message.triggerName)) + return "triggerName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.jobCreateTime != null && message.hasOwnProperty("jobCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.jobCreateTime); + if (error) + return "jobCreateTime." + error; + } + if (message.jobName != null && message.hasOwnProperty("jobName")) + if (!$util.isString(message.jobName)) + return "jobName: string expected"; return null; }; @@ -4614,6 +4829,8 @@ if (object instanceof $root.google.privacy.dlp.v2.Finding) return object; var message = new $root.google.privacy.dlp.v2.Finding(); + if (object.name != null) + message.name = String(object.name); if (object.quote != null) message.quote = String(object.quote); if (object.infoType != null) { @@ -4662,6 +4879,24 @@ throw TypeError(".google.privacy.dlp.v2.Finding.quoteInfo: object expected"); message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.fromObject(object.quoteInfo); } + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.triggerName != null) + message.triggerName = String(object.triggerName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.jobCreateTime != null) { + if (typeof object.jobCreateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.jobCreateTime: object expected"); + message.jobCreateTime = $root.google.protobuf.Timestamp.fromObject(object.jobCreateTime); + } + if (object.jobName != null) + message.jobName = String(object.jobName); return message; }; @@ -4678,6 +4913,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.quote = ""; object.infoType = null; @@ -4685,6 +4922,11 @@ object.location = null; object.createTime = null; object.quoteInfo = null; + object.resourceName = ""; + object.triggerName = ""; + object.jobCreateTime = null; + object.jobName = ""; + object.name = ""; } if (message.quote != null && message.hasOwnProperty("quote")) object.quote = message.quote; @@ -4698,6 +4940,22 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) object.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.toObject(message.quoteInfo, options); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.triggerName != null && message.hasOwnProperty("triggerName")) + object.triggerName = message.triggerName; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.jobCreateTime != null && message.hasOwnProperty("jobCreateTime")) + object.jobCreateTime = $root.google.protobuf.Timestamp.toObject(message.jobCreateTime, options); + if (message.jobName != null && message.hasOwnProperty("jobName")) + object.jobName = message.jobName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -4724,6 +4982,7 @@ * @property {google.privacy.dlp.v2.IRange|null} [byteRange] Location byteRange * @property {google.privacy.dlp.v2.IRange|null} [codepointRange] Location codepointRange * @property {Array.|null} [contentLocations] Location contentLocations + * @property {google.privacy.dlp.v2.IContainer|null} [container] Location container */ /** @@ -4766,6 +5025,14 @@ */ Location.prototype.contentLocations = $util.emptyArray; + /** + * Location container. + * @member {google.privacy.dlp.v2.IContainer|null|undefined} container + * @memberof google.privacy.dlp.v2.Location + * @instance + */ + Location.prototype.container = null; + /** * Creates a new Location instance using the specified properties. * @function create @@ -4797,6 +5064,8 @@ if (message.contentLocations != null && message.contentLocations.length) for (var i = 0; i < message.contentLocations.length; ++i) $root.google.privacy.dlp.v2.ContentLocation.encode(message.contentLocations[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.container != null && message.hasOwnProperty("container")) + $root.google.privacy.dlp.v2.Container.encode(message.container, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -4842,6 +5111,9 @@ message.contentLocations = []; message.contentLocations.push($root.google.privacy.dlp.v2.ContentLocation.decode(reader, reader.uint32())); break; + case 8: + message.container = $root.google.privacy.dlp.v2.Container.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4896,6 +5168,11 @@ return "contentLocations." + error; } } + if (message.container != null && message.hasOwnProperty("container")) { + var error = $root.google.privacy.dlp.v2.Container.verify(message.container); + if (error) + return "container." + error; + } return null; }; @@ -4931,6 +5208,11 @@ message.contentLocations[i] = $root.google.privacy.dlp.v2.ContentLocation.fromObject(object.contentLocations[i]); } } + if (object.container != null) { + if (typeof object.container !== "object") + throw TypeError(".google.privacy.dlp.v2.Location.container: object expected"); + message.container = $root.google.privacy.dlp.v2.Container.fromObject(object.container); + } return message; }; @@ -4952,6 +5234,7 @@ if (options.defaults) { object.byteRange = null; object.codepointRange = null; + object.container = null; } if (message.byteRange != null && message.hasOwnProperty("byteRange")) object.byteRange = $root.google.privacy.dlp.v2.Range.toObject(message.byteRange, options); @@ -4962,6 +5245,8 @@ for (var j = 0; j < message.contentLocations.length; ++j) object.contentLocations[j] = $root.google.privacy.dlp.v2.ContentLocation.toObject(message.contentLocations[j], options); } + if (message.container != null && message.hasOwnProperty("container")) + object.container = $root.google.privacy.dlp.v2.Container.toObject(message.container, options); return object; }; @@ -5980,6 +6265,331 @@ return TableLocation; })(); + v2.Container = (function() { + + /** + * Properties of a Container. + * @memberof google.privacy.dlp.v2 + * @interface IContainer + * @property {string|null} [type] Container type + * @property {string|null} [projectId] Container projectId + * @property {string|null} [fullPath] Container fullPath + * @property {string|null} [rootPath] Container rootPath + * @property {string|null} [relativePath] Container relativePath + * @property {google.protobuf.ITimestamp|null} [updateTime] Container updateTime + * @property {string|null} [version] Container version + */ + + /** + * Constructs a new Container. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Container. + * @implements IContainer + * @constructor + * @param {google.privacy.dlp.v2.IContainer=} [properties] Properties to set + */ + function Container(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]]; + } + + /** + * Container type. + * @member {string} type + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.type = ""; + + /** + * Container projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.projectId = ""; + + /** + * Container fullPath. + * @member {string} fullPath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.fullPath = ""; + + /** + * Container rootPath. + * @member {string} rootPath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.rootPath = ""; + + /** + * Container relativePath. + * @member {string} relativePath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.relativePath = ""; + + /** + * Container updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.updateTime = null; + + /** + * Container version. + * @member {string} version + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.version = ""; + + /** + * Creates a new Container instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Container} Container instance + */ + Container.create = function create(properties) { + return new Container(properties); + }; + + /** + * Encodes the specified Container message. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.fullPath != null && message.hasOwnProperty("fullPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fullPath); + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.rootPath); + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.relativePath); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.version != null && message.hasOwnProperty("version")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); + return writer; + }; + + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Container message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Container + * @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.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.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.Container(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.projectId = reader.string(); + break; + case 3: + message.fullPath = reader.string(); + break; + case 4: + message.rootPath = reader.string(); + break; + case 5: + message.relativePath = reader.string(); + break; + case 6: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Container message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Container message. + * @function verify + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Container.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.fullPath != null && message.hasOwnProperty("fullPath")) + if (!$util.isString(message.fullPath)) + return "fullPath: string expected"; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + if (!$util.isString(message.rootPath)) + return "rootPath: string expected"; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Container message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Container} Container + */ + Container.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.Container) + return object; + var message = new $root.google.privacy.dlp.v2.Container(); + if (object.type != null) + message.type = String(object.type); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.fullPath != null) + message.fullPath = String(object.fullPath); + if (object.rootPath != null) + message.rootPath = String(object.rootPath); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.Container.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.Container} message Container + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Container.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.projectId = ""; + object.fullPath = ""; + object.rootPath = ""; + object.relativePath = ""; + object.updateTime = null; + object.version = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.fullPath != null && message.hasOwnProperty("fullPath")) + object.fullPath = message.fullPath; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + object.rootPath = message.rootPath; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Container to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Container + * @instance + * @returns {Object.} JSON object + */ + Container.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Container; + })(); + v2.Range = (function() { /** @@ -10307,6 +10917,7 @@ * @property {number|Long|null} [processedBytes] Result processedBytes * @property {number|Long|null} [totalEstimatedBytes] Result totalEstimatedBytes * @property {Array.|null} [infoTypeStats] Result infoTypeStats + * @property {google.privacy.dlp.v2.IHybridInspectStatistics|null} [hybridStats] Result hybridStats */ /** @@ -10349,6 +10960,14 @@ */ Result.prototype.infoTypeStats = $util.emptyArray; + /** + * Result hybridStats. + * @member {google.privacy.dlp.v2.IHybridInspectStatistics|null|undefined} hybridStats + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.hybridStats = null; + /** * Creates a new Result instance using the specified properties. * @function create @@ -10380,6 +10999,8 @@ if (message.infoTypeStats != null && message.infoTypeStats.length) for (var i = 0; i < message.infoTypeStats.length; ++i) $root.google.privacy.dlp.v2.InfoTypeStats.encode(message.infoTypeStats[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.hybridStats != null && message.hasOwnProperty("hybridStats")) + $root.google.privacy.dlp.v2.HybridInspectStatistics.encode(message.hybridStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -10425,6 +11046,9 @@ message.infoTypeStats = []; message.infoTypeStats.push($root.google.privacy.dlp.v2.InfoTypeStats.decode(reader, reader.uint32())); break; + case 7: + message.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -10475,6 +11099,11 @@ return "infoTypeStats." + error; } } + if (message.hybridStats != null && message.hasOwnProperty("hybridStats")) { + var error = $root.google.privacy.dlp.v2.HybridInspectStatistics.verify(message.hybridStats); + if (error) + return "hybridStats." + error; + } return null; }; @@ -10518,6 +11147,11 @@ message.infoTypeStats[i] = $root.google.privacy.dlp.v2.InfoTypeStats.fromObject(object.infoTypeStats[i]); } } + if (object.hybridStats != null) { + if (typeof object.hybridStats !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.Result.hybridStats: object expected"); + message.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.fromObject(object.hybridStats); + } return message; }; @@ -10547,6 +11181,7 @@ object.totalEstimatedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.totalEstimatedBytes = options.longs === String ? "0" : 0; + object.hybridStats = null; } if (message.processedBytes != null && message.hasOwnProperty("processedBytes")) if (typeof message.processedBytes === "number") @@ -10563,6 +11198,8 @@ for (var j = 0; j < message.infoTypeStats.length; ++j) object.infoTypeStats[j] = $root.google.privacy.dlp.v2.InfoTypeStats.toObject(message.infoTypeStats[j], options); } + if (message.hybridStats != null && message.hasOwnProperty("hybridStats")) + object.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.toObject(message.hybridStats, options); return object; }; @@ -10583,6 +11220,280 @@ return InspectDataSourceDetails; })(); + v2.HybridInspectStatistics = (function() { + + /** + * Properties of a HybridInspectStatistics. + * @memberof google.privacy.dlp.v2 + * @interface IHybridInspectStatistics + * @property {number|Long|null} [processedCount] HybridInspectStatistics processedCount + * @property {number|Long|null} [abortedCount] HybridInspectStatistics abortedCount + * @property {number|Long|null} [pendingCount] HybridInspectStatistics pendingCount + */ + + /** + * Constructs a new HybridInspectStatistics. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridInspectStatistics. + * @implements IHybridInspectStatistics + * @constructor + * @param {google.privacy.dlp.v2.IHybridInspectStatistics=} [properties] Properties to set + */ + function HybridInspectStatistics(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]]; + } + + /** + * HybridInspectStatistics processedCount. + * @member {number|Long} processedCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.processedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridInspectStatistics abortedCount. + * @member {number|Long} abortedCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.abortedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridInspectStatistics pendingCount. + * @member {number|Long} pendingCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.pendingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HybridInspectStatistics instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics instance + */ + HybridInspectStatistics.create = function create(properties) { + return new HybridInspectStatistics(properties); + }; + + /** + * Encodes the specified HybridInspectStatistics message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics} message HybridInspectStatistics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectStatistics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedCount != null && message.hasOwnProperty("processedCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.processedCount); + if (message.abortedCount != null && message.hasOwnProperty("abortedCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.abortedCount); + if (message.pendingCount != null && message.hasOwnProperty("pendingCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.pendingCount); + return writer; + }; + + /** + * Encodes the specified HybridInspectStatistics message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics} message HybridInspectStatistics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectStatistics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @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.HybridInspectStatistics} HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectStatistics.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.HybridInspectStatistics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.processedCount = reader.int64(); + break; + case 2: + message.abortedCount = reader.int64(); + break; + case 3: + message.pendingCount = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectStatistics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridInspectStatistics message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridInspectStatistics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.processedCount != null && message.hasOwnProperty("processedCount")) + if (!$util.isInteger(message.processedCount) && !(message.processedCount && $util.isInteger(message.processedCount.low) && $util.isInteger(message.processedCount.high))) + return "processedCount: integer|Long expected"; + if (message.abortedCount != null && message.hasOwnProperty("abortedCount")) + if (!$util.isInteger(message.abortedCount) && !(message.abortedCount && $util.isInteger(message.abortedCount.low) && $util.isInteger(message.abortedCount.high))) + return "abortedCount: integer|Long expected"; + if (message.pendingCount != null && message.hasOwnProperty("pendingCount")) + if (!$util.isInteger(message.pendingCount) && !(message.pendingCount && $util.isInteger(message.pendingCount.low) && $util.isInteger(message.pendingCount.high))) + return "pendingCount: integer|Long expected"; + return null; + }; + + /** + * Creates a HybridInspectStatistics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics + */ + HybridInspectStatistics.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectStatistics) + return object; + var message = new $root.google.privacy.dlp.v2.HybridInspectStatistics(); + if (object.processedCount != null) + if ($util.Long) + (message.processedCount = $util.Long.fromValue(object.processedCount)).unsigned = false; + else if (typeof object.processedCount === "string") + message.processedCount = parseInt(object.processedCount, 10); + else if (typeof object.processedCount === "number") + message.processedCount = object.processedCount; + else if (typeof object.processedCount === "object") + message.processedCount = new $util.LongBits(object.processedCount.low >>> 0, object.processedCount.high >>> 0).toNumber(); + if (object.abortedCount != null) + if ($util.Long) + (message.abortedCount = $util.Long.fromValue(object.abortedCount)).unsigned = false; + else if (typeof object.abortedCount === "string") + message.abortedCount = parseInt(object.abortedCount, 10); + else if (typeof object.abortedCount === "number") + message.abortedCount = object.abortedCount; + else if (typeof object.abortedCount === "object") + message.abortedCount = new $util.LongBits(object.abortedCount.low >>> 0, object.abortedCount.high >>> 0).toNumber(); + if (object.pendingCount != null) + if ($util.Long) + (message.pendingCount = $util.Long.fromValue(object.pendingCount)).unsigned = false; + else if (typeof object.pendingCount === "string") + message.pendingCount = parseInt(object.pendingCount, 10); + else if (typeof object.pendingCount === "number") + message.pendingCount = object.pendingCount; + else if (typeof object.pendingCount === "object") + message.pendingCount = new $util.LongBits(object.pendingCount.low >>> 0, object.pendingCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HybridInspectStatistics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.HybridInspectStatistics} message HybridInspectStatistics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridInspectStatistics.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.processedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.processedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.abortedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.abortedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pendingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pendingCount = options.longs === String ? "0" : 0; + } + if (message.processedCount != null && message.hasOwnProperty("processedCount")) + if (typeof message.processedCount === "number") + object.processedCount = options.longs === String ? String(message.processedCount) : message.processedCount; + else + object.processedCount = options.longs === String ? $util.Long.prototype.toString.call(message.processedCount) : options.longs === Number ? new $util.LongBits(message.processedCount.low >>> 0, message.processedCount.high >>> 0).toNumber() : message.processedCount; + if (message.abortedCount != null && message.hasOwnProperty("abortedCount")) + if (typeof message.abortedCount === "number") + object.abortedCount = options.longs === String ? String(message.abortedCount) : message.abortedCount; + else + object.abortedCount = options.longs === String ? $util.Long.prototype.toString.call(message.abortedCount) : options.longs === Number ? new $util.LongBits(message.abortedCount.low >>> 0, message.abortedCount.high >>> 0).toNumber() : message.abortedCount; + if (message.pendingCount != null && message.hasOwnProperty("pendingCount")) + if (typeof message.pendingCount === "number") + object.pendingCount = options.longs === String ? String(message.pendingCount) : message.pendingCount; + else + object.pendingCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingCount) : options.longs === Number ? new $util.LongBits(message.pendingCount.low >>> 0, message.pendingCount.high >>> 0).toNumber() : message.pendingCount; + return object; + }; + + /** + * Converts this HybridInspectStatistics to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + * @returns {Object.} JSON object + */ + HybridInspectStatistics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HybridInspectStatistics; + })(); + v2.InfoTypeDescription = (function() { /** @@ -20882,6 +21793,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.ITransformationErrorHandling|null} [transformationErrorHandling] DeidentifyConfig transformationErrorHandling */ /** @@ -20915,6 +21827,14 @@ */ DeidentifyConfig.prototype.recordTransformations = null; + /** + * DeidentifyConfig transformationErrorHandling. + * @member {google.privacy.dlp.v2.ITransformationErrorHandling|null|undefined} transformationErrorHandling + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + DeidentifyConfig.prototype.transformationErrorHandling = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -20957,6 +21877,8 @@ $root.google.privacy.dlp.v2.InfoTypeTransformations.encode(message.infoTypeTransformations, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.recordTransformations != null && message.hasOwnProperty("recordTransformations")) $root.google.privacy.dlp.v2.RecordTransformations.encode(message.recordTransformations, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) + $root.google.privacy.dlp.v2.TransformationErrorHandling.encode(message.transformationErrorHandling, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -20997,6 +21919,9 @@ case 2: message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.decode(reader, reader.uint32()); break; + case 3: + message.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -21051,6 +21976,11 @@ return "recordTransformations." + error; } } + if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) { + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.verify(message.transformationErrorHandling); + if (error) + return "transformationErrorHandling." + error; + } return null; }; @@ -21076,6 +22006,11 @@ throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.recordTransformations: object expected"); message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.fromObject(object.recordTransformations); } + if (object.transformationErrorHandling != null) { + if (typeof object.transformationErrorHandling !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.transformationErrorHandling: object expected"); + message.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.fromObject(object.transformationErrorHandling); + } return message; }; @@ -21092,6 +22027,8 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.transformationErrorHandling = null; if (message.infoTypeTransformations != null && message.hasOwnProperty("infoTypeTransformations")) { object.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.toObject(message.infoTypeTransformations, options); if (options.oneofs) @@ -21102,6 +22039,8 @@ if (options.oneofs) object.transformation = "recordTransformations"; } + if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) + object.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.toObject(message.transformationErrorHandling, options); return object; }; @@ -21119,34 +22058,25 @@ return DeidentifyConfig; })(); - 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 + * @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) @@ -21154,219 +22084,102 @@ } /** - * PrimitiveTransformation replaceConfig. - * @member {google.privacy.dlp.v2.IReplaceValueConfig|null|undefined} replaceConfig - * @memberof google.privacy.dlp.v2.PrimitiveTransformation - * @instance - */ - PrimitiveTransformation.prototype.replaceConfig = 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 + * TransformationErrorHandling throwError. + * @member {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null|undefined} throwError + * @memberof google.privacy.dlp.v2.TransformationErrorHandling * @instance */ - PrimitiveTransformation.prototype.dateShiftConfig = null; + TransformationErrorHandling.prototype.throwError = null; /** - * PrimitiveTransformation cryptoDeterministicConfig. - * @member {google.privacy.dlp.v2.ICryptoDeterministicConfig|null|undefined} cryptoDeterministicConfig - * @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.cryptoDeterministicConfig = 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"|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"]), + 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 && message.hasOwnProperty("replaceConfig")) - $root.google.privacy.dlp.v2.ReplaceValueConfig.encode(message.replaceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) - $root.google.privacy.dlp.v2.RedactConfig.encode(message.redactConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) - $root.google.privacy.dlp.v2.CharacterMaskConfig.encode(message.characterMaskConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) - $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.encode(message.cryptoReplaceFfxFpeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) - $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.encode(message.fixedSizeBucketingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) - $root.google.privacy.dlp.v2.BucketingConfig.encode(message.bucketingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) - $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.encode(message.replaceWithInfoTypeConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) - $root.google.privacy.dlp.v2.TimePartConfig.encode(message.timePartConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) - $root.google.privacy.dlp.v2.CryptoHashConfig.encode(message.cryptoHashConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) - $root.google.privacy.dlp.v2.DateShiftConfig.encode(message.dateShiftConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) - $root.google.privacy.dlp.v2.CryptoDeterministicConfig.encode(message.cryptoDeterministicConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.throwError != null && message.hasOwnProperty("throwError")) + $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.encode(message.throwError, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.leaveUntransformed != null && message.hasOwnProperty("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()); + message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21377,317 +22190,467 @@ }; /** - * 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; + if (message.throwError != null && message.hasOwnProperty("throwError")) { + properties.mode = 1; { - var error = $root.google.privacy.dlp.v2.DateShiftConfig.verify(message.dateShiftConfig); + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify(message.throwError); if (error) - return "dateShiftConfig." + error; + return "throwError." + error; } } - if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) { - 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.CryptoDeterministicConfig.verify(message.cryptoDeterministicConfig); + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify(message.leaveUntransformed); if (error) - return "cryptoDeterministicConfig." + 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); + 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.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.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 (message.throwError != null && message.hasOwnProperty("throwError")) { + object.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.toObject(message.throwError, options); if (options.oneofs) - object.transformation = "dateShiftConfig"; + object.mode = "throwError"; } - if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) { - object.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.toObject(message.cryptoDeterministicConfig, 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 = "cryptoDeterministicConfig"; + 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); }; - return PrimitiveTransformation; + TransformationErrorHandling.ThrowError = (function() { + + /** + * Properties of a ThrowError. + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @interface IThrowError + */ + + /** + * 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); + }; + + 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); + }; + + return LeaveUntransformed; + })(); + + return TransformationErrorHandling; })(); - v2.TimePartConfig = (function() { + v2.PrimitiveTransformation = (function() { /** - * Properties of a TimePartConfig. + * 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 */ /** - * 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) @@ -21695,75 +22658,219 @@ } /** - * 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. + * 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; + + // 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"|undefined} transformation + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + Object.defineProperty(PrimitiveTransformation.prototype, "transformation", { + get: $util.oneOfGetter($oneOfFields = ["replaceConfig", "redactConfig", "characterMaskConfig", "cryptoReplaceFfxFpeConfig", "fixedSizeBucketingConfig", "bucketingConfig", "replaceWithInfoTypeConfig", "timePartConfig", "cryptoHashConfig", "dateShiftConfig", "cryptoDeterministicConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrimitiveTransformation instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.TimePartConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation * @static - * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig instance + * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation instance */ - TimePartConfig.create = function create(properties) { - return new TimePartConfig(properties); + PrimitiveTransformation.create = function create(properties) { + return new PrimitiveTransformation(properties); }; /** - * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.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.TimePartConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation * @static - * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig 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 */ - TimePartConfig.encode = function encode(message, writer) { + PrimitiveTransformation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.partToExtract != null && message.hasOwnProperty("partToExtract")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partToExtract); + if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) + $root.google.privacy.dlp.v2.ReplaceValueConfig.encode(message.replaceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) + $root.google.privacy.dlp.v2.RedactConfig.encode(message.redactConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) + $root.google.privacy.dlp.v2.CharacterMaskConfig.encode(message.characterMaskConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) + $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.encode(message.cryptoReplaceFfxFpeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) + $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.encode(message.fixedSizeBucketingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) + $root.google.privacy.dlp.v2.BucketingConfig.encode(message.bucketingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) + $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.encode(message.replaceWithInfoTypeConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) + $root.google.privacy.dlp.v2.TimePartConfig.encode(message.timePartConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) + $root.google.privacy.dlp.v2.CryptoHashConfig.encode(message.cryptoHashConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) + $root.google.privacy.dlp.v2.DateShiftConfig.encode(message.dateShiftConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) + $root.google.privacy.dlp.v2.CryptoDeterministicConfig.encode(message.cryptoDeterministicConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; /** - * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.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.TimePartConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation * @static - * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig 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 */ - TimePartConfig.encodeDelimited = function encodeDelimited(message, writer) { + PrimitiveTransformation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimePartConfig message from the specified reader or buffer. + * Decodes a PrimitiveTransformation message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.TimePartConfig + * @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.TimePartConfig} TimePartConfig + * @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 */ - TimePartConfig.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.TimePartConfig(); + 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.partToExtract = reader.int32(); + 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; default: reader.skipType(tag & 7); @@ -21774,23 +22881,420 @@ }; /** - * Decodes a TimePartConfig 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.TimePartConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig + * @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 */ - TimePartConfig.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 TimePartConfig message. + * Verifies a PrimitiveTransformation message. + * @function verify + * @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 + */ + PrimitiveTransformation.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; + { + var error = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.verify(message.cryptoDeterministicConfig); + if (error) + return "cryptoDeterministicConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation + */ + PrimitiveTransformation.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.PrimitiveTransformation) + 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); + } + return message; + }; + + /** + * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {google.privacy.dlp.v2.PrimitiveTransformation} message PrimitiveTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimitiveTransformation.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 (options.oneofs) + object.transformation = "cryptoDeterministicConfig"; + } + 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); + }; + + return PrimitiveTransformation; + })(); + + v2.TimePartConfig = (function() { + + /** + * Properties of a TimePartConfig. + * @memberof google.privacy.dlp.v2 + * @interface ITimePartConfig + * @property {google.privacy.dlp.v2.TimePartConfig.TimePart|null} [partToExtract] TimePartConfig partToExtract + */ + + /** + * Constructs a new TimePartConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TimePartConfig. + * @implements ITimePartConfig + * @constructor + * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set + */ + function TimePartConfig(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]]; + } + + /** + * TimePartConfig partToExtract. + * @member {google.privacy.dlp.v2.TimePartConfig.TimePart} partToExtract + * @memberof google.privacy.dlp.v2.TimePartConfig + * @instance + */ + TimePartConfig.prototype.partToExtract = 0; + + /** + * 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 + */ + TimePartConfig.create = function create(properties) { + return new TimePartConfig(properties); + }; + + /** + * 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 + */ + TimePartConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partToExtract != null && message.hasOwnProperty("partToExtract")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partToExtract); + return writer; + }; + + /** + * 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 + */ + TimePartConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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 + */ + TimePartConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimePartConfig message. * @function verify * @memberof google.privacy.dlp.v2.TimePartConfig * @static @@ -28973,6 +30477,166 @@ return Schedule; })(); + v2.Manual = (function() { + + /** + * Properties of a Manual. + * @memberof google.privacy.dlp.v2 + * @interface IManual + */ + + /** + * Constructs a new Manual. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Manual. + * @implements IManual + * @constructor + * @param {google.privacy.dlp.v2.IManual=} [properties] Properties to set + */ + function Manual(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 Manual instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Manual} Manual instance + */ + Manual.create = function create(properties) { + return new Manual(properties); + }; + + /** + * Encodes the specified Manual message. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual} message Manual message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manual.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Manual message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual} message Manual message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manual.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Manual message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Manual + * @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.Manual} Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manual.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.Manual(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Manual message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Manual} Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manual.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Manual message. + * @function verify + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Manual.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Manual message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Manual} Manual + */ + Manual.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.Manual) + return object; + return new $root.google.privacy.dlp.v2.Manual(); + }; + + /** + * Creates a plain object from a Manual message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.Manual} message Manual + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Manual.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Manual to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Manual + * @instance + * @returns {Object.} JSON object + */ + Manual.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Manual; + })(); + v2.InspectTemplate = (function() { /** @@ -30332,6 +31996,7 @@ * @memberof google.privacy.dlp.v2.JobTrigger * @interface ITrigger * @property {google.privacy.dlp.v2.ISchedule|null} [schedule] Trigger schedule + * @property {google.privacy.dlp.v2.IManual|null} [manual] Trigger manual */ /** @@ -30357,17 +32022,25 @@ */ Trigger.prototype.schedule = null; + /** + * Trigger manual. + * @member {google.privacy.dlp.v2.IManual|null|undefined} manual + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @instance + */ + Trigger.prototype.manual = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Trigger trigger. - * @member {"schedule"|undefined} trigger + * @member {"schedule"|"manual"|undefined} trigger * @memberof google.privacy.dlp.v2.JobTrigger.Trigger * @instance */ Object.defineProperty(Trigger.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), + get: $util.oneOfGetter($oneOfFields = ["schedule", "manual"]), set: $util.oneOfSetter($oneOfFields) }); @@ -30397,6 +32070,8 @@ writer = $Writer.create(); if (message.schedule != null && message.hasOwnProperty("schedule")) $root.google.privacy.dlp.v2.Schedule.encode(message.schedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.manual != null && message.hasOwnProperty("manual")) + $root.google.privacy.dlp.v2.Manual.encode(message.manual, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -30434,6 +32109,9 @@ case 1: message.schedule = $root.google.privacy.dlp.v2.Schedule.decode(reader, reader.uint32()); break; + case 2: + message.manual = $root.google.privacy.dlp.v2.Manual.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -30478,6 +32156,16 @@ return "schedule." + error; } } + if (message.manual != null && message.hasOwnProperty("manual")) { + if (properties.trigger === 1) + return "trigger: multiple values"; + properties.trigger = 1; + { + var error = $root.google.privacy.dlp.v2.Manual.verify(message.manual); + if (error) + return "manual." + error; + } + } return null; }; @@ -30498,6 +32186,11 @@ throw TypeError(".google.privacy.dlp.v2.JobTrigger.Trigger.schedule: object expected"); message.schedule = $root.google.privacy.dlp.v2.Schedule.fromObject(object.schedule); } + if (object.manual != null) { + if (typeof object.manual !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.Trigger.manual: object expected"); + message.manual = $root.google.privacy.dlp.v2.Manual.fromObject(object.manual); + } return message; }; @@ -30519,6 +32212,11 @@ if (options.oneofs) object.trigger = "schedule"; } + if (message.manual != null && message.hasOwnProperty("manual")) { + object.manual = $root.google.privacy.dlp.v2.Manual.toObject(message.manual, options); + if (options.oneofs) + object.trigger = "manual"; + } return object; }; @@ -31913,71 +33611,1263 @@ return null; }; - /** - * Creates a PublishToStackdriver message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver - */ - PublishToStackdriver.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.Action.PublishToStackdriver) - return object; - return new $root.google.privacy.dlp.v2.Action.PublishToStackdriver(); - }; + /** + * Creates a PublishToStackdriver message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver + */ + PublishToStackdriver.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishToStackdriver) + return object; + return new $root.google.privacy.dlp.v2.Action.PublishToStackdriver(); + }; + + /** + * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {google.privacy.dlp.v2.Action.PublishToStackdriver} message PublishToStackdriver + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToStackdriver.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishToStackdriver to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @instance + * @returns {Object.} JSON object + */ + PublishToStackdriver.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublishToStackdriver; + })(); + + return Action; + })(); + + v2.CreateInspectTemplateRequest = (function() { + + /** + * Properties of a CreateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateInspectTemplateRequest + * @property {string|null} [parent] CreateInspectTemplateRequest parent + * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] CreateInspectTemplateRequest inspectTemplate + * @property {string|null} [templateId] CreateInspectTemplateRequest templateId + * @property {string|null} [locationId] CreateInspectTemplateRequest locationId + */ + + /** + * Constructs a new CreateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateInspectTemplateRequest. + * @implements ICreateInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set + */ + function CreateInspectTemplateRequest(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]]; + } + + /** + * CreateInspectTemplateRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.parent = ""; + + /** + * CreateInspectTemplateRequest inspectTemplate. + * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.inspectTemplate = null; + + /** + * CreateInspectTemplateRequest templateId. + * @member {string} templateId + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.templateId = ""; + + /** + * CreateInspectTemplateRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.locationId = ""; + + /** + * Creates a new CreateInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest instance + */ + CreateInspectTemplateRequest.create = function create(properties) { + return new CreateInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.templateId != null && message.hasOwnProperty("templateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @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.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInspectTemplateRequest.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.CreateInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.templateId = reader.string(); + break; + case 4: + message.locationId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateInspectTemplateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate); + if (error) + return "inspectTemplate." + error; + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + */ + CreateInspectTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CreateInspectTemplateRequest) + return object; + var message = new $root.google.privacy.dlp.v2.CreateInspectTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inspectTemplate != null) { + if (typeof object.inspectTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateInspectTemplateRequest.inspectTemplate: object expected"); + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate); + } + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.CreateInspectTemplateRequest} message CreateInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.inspectTemplate = null; + object.templateId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); + if (message.templateId != null && message.hasOwnProperty("templateId")) + object.templateId = message.templateId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateInspectTemplateRequest; + })(); + + v2.UpdateInspectTemplateRequest = (function() { + + /** + * Properties of an UpdateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateInspectTemplateRequest + * @property {string|null} [name] UpdateInspectTemplateRequest name + * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] UpdateInspectTemplateRequest inspectTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateInspectTemplateRequest updateMask + */ + + /** + * Constructs a new UpdateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateInspectTemplateRequest. + * @implements IUpdateInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set + */ + function UpdateInspectTemplateRequest(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]]; + } + + /** + * UpdateInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.name = ""; + + /** + * UpdateInspectTemplateRequest inspectTemplate. + * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.inspectTemplate = null; + + /** + * UpdateInspectTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest instance + */ + UpdateInspectTemplateRequest.create = function create(properties) { + return new UpdateInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified UpdateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @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.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInspectTemplateRequest.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.UpdateInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateInspectTemplateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate); + if (error) + return "inspectTemplate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + */ + UpdateInspectTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest) + return object; + var message = new $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inspectTemplate != null) { + if (typeof object.inspectTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.inspectTemplate: object expected"); + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.UpdateInspectTemplateRequest} message UpdateInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inspectTemplate = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateInspectTemplateRequest; + })(); + + v2.GetInspectTemplateRequest = (function() { + + /** + * Properties of a GetInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetInspectTemplateRequest + * @property {string|null} [name] GetInspectTemplateRequest name + */ + + /** + * Constructs a new GetInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetInspectTemplateRequest. + * @implements IGetInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set + */ + function GetInspectTemplateRequest(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]]; + } + + /** + * GetInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @instance + */ + GetInspectTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest instance + */ + GetInspectTemplateRequest.create = function create(properties) { + return new GetInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified GetInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @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.GetInspectTemplateRequest} GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInspectTemplateRequest.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.GetInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInspectTemplateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + */ + GetInspectTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.GetInspectTemplateRequest) + return object; + var message = new $root.google.privacy.dlp.v2.GetInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.GetInspectTemplateRequest} message GetInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetInspectTemplateRequest; + })(); + + v2.ListInspectTemplatesRequest = (function() { + + /** + * Properties of a ListInspectTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListInspectTemplatesRequest + * @property {string|null} [parent] ListInspectTemplatesRequest parent + * @property {string|null} [pageToken] ListInspectTemplatesRequest pageToken + * @property {number|null} [pageSize] ListInspectTemplatesRequest pageSize + * @property {string|null} [orderBy] ListInspectTemplatesRequest orderBy + * @property {string|null} [locationId] ListInspectTemplatesRequest locationId + */ + + /** + * Constructs a new ListInspectTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInspectTemplatesRequest. + * @implements IListInspectTemplatesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set + */ + function ListInspectTemplatesRequest(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]]; + } + + /** + * ListInspectTemplatesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.parent = ""; + + /** + * ListInspectTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.pageToken = ""; + + /** + * ListInspectTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.pageSize = 0; + + /** + * ListInspectTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.orderBy = ""; + + /** + * ListInspectTemplatesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.locationId = ""; + + /** + * Creates a new ListInspectTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest instance + */ + ListInspectTemplatesRequest.create = function create(properties) { + return new ListInspectTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListInspectTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListInspectTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @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.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesRequest.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.ListInspectTemplatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.locationId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInspectTemplatesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInspectTemplatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListInspectTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + */ + ListInspectTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesRequest) + return object; + var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListInspectTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.ListInspectTemplatesRequest} message ListInspectTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInspectTemplatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListInspectTemplatesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInspectTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListInspectTemplatesRequest; + })(); + + v2.ListInspectTemplatesResponse = (function() { + + /** + * Properties of a ListInspectTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListInspectTemplatesResponse + * @property {Array.|null} [inspectTemplates] ListInspectTemplatesResponse inspectTemplates + * @property {string|null} [nextPageToken] ListInspectTemplatesResponse nextPageToken + */ + + /** + * Constructs a new ListInspectTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInspectTemplatesResponse. + * @implements IListInspectTemplatesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set + */ + function ListInspectTemplatesResponse(properties) { + this.inspectTemplates = []; + 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]]; + } + + /** + * ListInspectTemplatesResponse inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + */ + ListInspectTemplatesResponse.prototype.inspectTemplates = $util.emptyArray; + + /** + * ListInspectTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + */ + ListInspectTemplatesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInspectTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse instance + */ + ListInspectTemplatesResponse.create = function create(properties) { + return new ListInspectTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListInspectTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListInspectTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @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.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesResponse.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.ListInspectTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push($root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInspectTemplatesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInspectTemplatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplates[i]); + if (error) + return "inspectTemplates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver - * @static - * @param {google.privacy.dlp.v2.Action.PublishToStackdriver} message PublishToStackdriver - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishToStackdriver.toObject = function toObject() { - return {}; - }; + /** + * Creates a ListInspectTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + */ + ListInspectTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesResponse) + return object; + var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesResponse(); + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) { + if (typeof object.inspectTemplates[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: object expected"); + message.inspectTemplates[i] = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Converts this PublishToStackdriver to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver - * @instance - * @returns {Object.} JSON object - */ - PublishToStackdriver.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListInspectTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.ListInspectTemplatesResponse} message ListInspectTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInspectTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inspectTemplates = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return PublishToStackdriver; - })(); + /** + * Converts this ListInspectTemplatesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInspectTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Action; + return ListInspectTemplatesResponse; })(); - v2.CreateInspectTemplateRequest = (function() { + v2.DeleteInspectTemplateRequest = (function() { /** - * Properties of a CreateInspectTemplateRequest. + * Properties of a DeleteInspectTemplateRequest. * @memberof google.privacy.dlp.v2 - * @interface ICreateInspectTemplateRequest - * @property {string|null} [parent] CreateInspectTemplateRequest parent - * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] CreateInspectTemplateRequest inspectTemplate - * @property {string|null} [templateId] CreateInspectTemplateRequest templateId - * @property {string|null} [locationId] CreateInspectTemplateRequest locationId + * @interface IDeleteInspectTemplateRequest + * @property {string|null} [name] DeleteInspectTemplateRequest name */ /** - * Constructs a new CreateInspectTemplateRequest. + * Constructs a new DeleteInspectTemplateRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CreateInspectTemplateRequest. - * @implements ICreateInspectTemplateRequest + * @classdesc Represents a DeleteInspectTemplateRequest. + * @implements IDeleteInspectTemplateRequest * @constructor - * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set */ - function CreateInspectTemplateRequest(properties) { + function DeleteInspectTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31985,114 +34875,75 @@ } /** - * CreateInspectTemplateRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest - * @instance - */ - CreateInspectTemplateRequest.prototype.parent = ""; - - /** - * CreateInspectTemplateRequest inspectTemplate. - * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest - * @instance - */ - CreateInspectTemplateRequest.prototype.inspectTemplate = null; - - /** - * CreateInspectTemplateRequest templateId. - * @member {string} templateId - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest - * @instance - */ - CreateInspectTemplateRequest.prototype.templateId = ""; - - /** - * CreateInspectTemplateRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * DeleteInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @instance */ - CreateInspectTemplateRequest.prototype.locationId = ""; + DeleteInspectTemplateRequest.prototype.name = ""; /** - * Creates a new CreateInspectTemplateRequest instance using the specified properties. + * Creates a new DeleteInspectTemplateRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest instance + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest instance */ - CreateInspectTemplateRequest.create = function create(properties) { - return new CreateInspectTemplateRequest(properties); + DeleteInspectTemplateRequest.create = function create(properties) { + return new DeleteInspectTemplateRequest(properties); }; /** - * Encodes the specified CreateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInspectTemplateRequest.encode = function encode(message, writer) { + DeleteInspectTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.templateId != null && message.hasOwnProperty("templateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer. + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @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.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateInspectTemplateRequest.decode = function decode(reader, length) { + DeleteInspectTemplateRequest.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.CreateInspectTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32()); - break; - case 3: - message.templateId = reader.string(); - break; - case 4: - message.locationId = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -32103,139 +34954,110 @@ }; /** - * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateInspectTemplateRequest message. + * Verifies a DeleteInspectTemplateRequest message. * @function verify - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateInspectTemplateRequest.verify = function verify(message) { + DeleteInspectTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { - var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate); - if (error) - return "inspectTemplate." + error; - } - if (message.templateId != null && message.hasOwnProperty("templateId")) - if (!$util.isString(message.templateId)) - return "templateId: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest */ - CreateInspectTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CreateInspectTemplateRequest) + DeleteInspectTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest) return object; - var message = new $root.google.privacy.dlp.v2.CreateInspectTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.inspectTemplate != null) { - if (typeof object.inspectTemplate !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateInspectTemplateRequest.inspectTemplate: object expected"); - message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate); - } - if (object.templateId != null) - message.templateId = String(object.templateId); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateInspectTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteInspectTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @static - * @param {google.privacy.dlp.v2.CreateInspectTemplateRequest} message CreateInspectTemplateRequest + * @param {google.privacy.dlp.v2.DeleteInspectTemplateRequest} message DeleteInspectTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateInspectTemplateRequest.toObject = function toObject(message, options) { + DeleteInspectTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.inspectTemplate = null; - object.templateId = ""; - object.locationId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); - if (message.templateId != null && message.hasOwnProperty("templateId")) - object.templateId = message.templateId; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateInspectTemplateRequest to JSON. + * Converts this DeleteInspectTemplateRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest * @instance * @returns {Object.} JSON object */ - CreateInspectTemplateRequest.prototype.toJSON = function toJSON() { + DeleteInspectTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateInspectTemplateRequest; + return DeleteInspectTemplateRequest; })(); - v2.UpdateInspectTemplateRequest = (function() { + v2.CreateJobTriggerRequest = (function() { /** - * Properties of an UpdateInspectTemplateRequest. + * Properties of a CreateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IUpdateInspectTemplateRequest - * @property {string|null} [name] UpdateInspectTemplateRequest name - * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] UpdateInspectTemplateRequest inspectTemplate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateInspectTemplateRequest updateMask + * @interface ICreateJobTriggerRequest + * @property {string|null} [parent] CreateJobTriggerRequest parent + * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] CreateJobTriggerRequest jobTrigger + * @property {string|null} [triggerId] CreateJobTriggerRequest triggerId + * @property {string|null} [locationId] CreateJobTriggerRequest locationId */ /** - * Constructs a new UpdateInspectTemplateRequest. + * Constructs a new CreateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an UpdateInspectTemplateRequest. - * @implements IUpdateInspectTemplateRequest + * @classdesc Represents a CreateJobTriggerRequest. + * @implements ICreateJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set */ - function UpdateInspectTemplateRequest(properties) { + function CreateJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32243,101 +35065,114 @@ } /** - * UpdateInspectTemplateRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * CreateJobTriggerRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @instance */ - UpdateInspectTemplateRequest.prototype.name = ""; + CreateJobTriggerRequest.prototype.parent = ""; /** - * UpdateInspectTemplateRequest inspectTemplate. - * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * CreateJobTriggerRequest jobTrigger. + * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @instance */ - UpdateInspectTemplateRequest.prototype.inspectTemplate = null; + CreateJobTriggerRequest.prototype.jobTrigger = null; /** - * UpdateInspectTemplateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * CreateJobTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @instance */ - UpdateInspectTemplateRequest.prototype.updateMask = null; + CreateJobTriggerRequest.prototype.triggerId = ""; /** - * Creates a new UpdateInspectTemplateRequest instance using the specified properties. + * CreateJobTriggerRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + */ + CreateJobTriggerRequest.prototype.locationId = ""; + + /** + * Creates a new CreateJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest instance + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest instance */ - UpdateInspectTemplateRequest.create = function create(properties) { - return new UpdateInspectTemplateRequest(properties); + CreateJobTriggerRequest.create = function create(properties) { + return new CreateJobTriggerRequest(properties); }; /** - * Encodes the specified UpdateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * Encodes the specified CreateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateInspectTemplateRequest.encode = function encode(message, writer) { + CreateJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerId); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); return writer; }; /** - * Encodes the specified UpdateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * Encodes the specified CreateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer. + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @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.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateInspectTemplateRequest.decode = function decode(reader, length) { + CreateJobTriggerRequest.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.UpdateInspectTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32()); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.triggerId = reader.string(); + break; + case 4: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -32348,134 +35183,137 @@ }; /** - * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + CreateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateInspectTemplateRequest message. + * Verifies a CreateJobTriggerRequest message. * @function verify - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateInspectTemplateRequest.verify = function verify(message) { + CreateJobTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { - var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate); - if (error) - return "inspectTemplate." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger); if (error) - return "updateMask." + error; + return "jobTrigger." + error; } + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates an UpdateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest */ - UpdateInspectTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest) + CreateJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CreateJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.inspectTemplate != null) { - if (typeof object.inspectTemplate !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.inspectTemplate: object expected"); - message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.privacy.dlp.v2.CreateJobTriggerRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.jobTrigger != null) { + if (typeof object.jobTrigger !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateJobTriggerRequest.jobTrigger: object expected"); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger); } + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from an UpdateInspectTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.UpdateInspectTemplateRequest} message UpdateInspectTemplateRequest + * @param {google.privacy.dlp.v2.CreateJobTriggerRequest} message CreateJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateInspectTemplateRequest.toObject = function toObject(message, options) { + CreateJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.inspectTemplate = null; - object.updateMask = null; + object.parent = ""; + object.jobTrigger = null; + object.triggerId = ""; + object.locationId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this UpdateInspectTemplateRequest to JSON. + * Converts this CreateJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest * @instance * @returns {Object.} JSON object */ - UpdateInspectTemplateRequest.prototype.toJSON = function toJSON() { + CreateJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateInspectTemplateRequest; + return CreateJobTriggerRequest; })(); - v2.GetInspectTemplateRequest = (function() { + v2.ActivateJobTriggerRequest = (function() { /** - * Properties of a GetInspectTemplateRequest. + * Properties of an ActivateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IGetInspectTemplateRequest - * @property {string|null} [name] GetInspectTemplateRequest name + * @interface IActivateJobTriggerRequest + * @property {string|null} [name] ActivateJobTriggerRequest name */ /** - * Constructs a new GetInspectTemplateRequest. + * Constructs a new ActivateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a GetInspectTemplateRequest. - * @implements IGetInspectTemplateRequest + * @classdesc Represents an ActivateJobTriggerRequest. + * @implements IActivateJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set */ - function GetInspectTemplateRequest(properties) { + function ActivateJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32483,35 +35321,35 @@ } /** - * GetInspectTemplateRequest name. + * ActivateJobTriggerRequest name. * @member {string} name - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @instance */ - GetInspectTemplateRequest.prototype.name = ""; + ActivateJobTriggerRequest.prototype.name = ""; /** - * Creates a new GetInspectTemplateRequest instance using the specified properties. + * Creates a new ActivateJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest instance + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest instance */ - GetInspectTemplateRequest.create = function create(properties) { - return new GetInspectTemplateRequest(properties); + ActivateJobTriggerRequest.create = function create(properties) { + return new ActivateJobTriggerRequest(properties); }; /** - * Encodes the specified GetInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * Encodes the specified ActivateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInspectTemplateRequest.encode = function encode(message, writer) { + ActivateJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -32520,33 +35358,33 @@ }; /** - * Encodes the specified GetInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * Encodes the specified ActivateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + ActivateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetInspectTemplateRequest message from the specified reader or buffer. + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @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.GetInspectTemplateRequest} GetInspectTemplateRequest + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetInspectTemplateRequest.decode = function decode(reader, length) { + ActivateJobTriggerRequest.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.GetInspectTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ActivateJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -32562,30 +35400,30 @@ }; /** - * Decodes a GetInspectTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + ActivateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetInspectTemplateRequest message. + * Verifies an ActivateJobTriggerRequest message. * @function verify - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetInspectTemplateRequest.verify = function verify(message) { + ActivateJobTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -32595,32 +35433,32 @@ }; /** - * Creates a GetInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ActivateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest */ - GetInspectTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.GetInspectTemplateRequest) + ActivateJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ActivateJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.GetInspectTemplateRequest(); + var message = new $root.google.privacy.dlp.v2.ActivateJobTriggerRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetInspectTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from an ActivateJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.GetInspectTemplateRequest} message GetInspectTemplateRequest + * @param {google.privacy.dlp.v2.ActivateJobTriggerRequest} message ActivateJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetInspectTemplateRequest.toObject = function toObject(message, options) { + ActivateJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -32632,41 +35470,39 @@ }; /** - * Converts this GetInspectTemplateRequest to JSON. + * Converts this ActivateJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest * @instance * @returns {Object.} JSON object */ - GetInspectTemplateRequest.prototype.toJSON = function toJSON() { + ActivateJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetInspectTemplateRequest; + return ActivateJobTriggerRequest; })(); - v2.ListInspectTemplatesRequest = (function() { + v2.UpdateJobTriggerRequest = (function() { /** - * Properties of a ListInspectTemplatesRequest. + * Properties of an UpdateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IListInspectTemplatesRequest - * @property {string|null} [parent] ListInspectTemplatesRequest parent - * @property {string|null} [pageToken] ListInspectTemplatesRequest pageToken - * @property {number|null} [pageSize] ListInspectTemplatesRequest pageSize - * @property {string|null} [orderBy] ListInspectTemplatesRequest orderBy - * @property {string|null} [locationId] ListInspectTemplatesRequest locationId + * @interface IUpdateJobTriggerRequest + * @property {string|null} [name] UpdateJobTriggerRequest name + * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] UpdateJobTriggerRequest jobTrigger + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateJobTriggerRequest updateMask */ /** - * Constructs a new ListInspectTemplatesRequest. + * Constructs a new UpdateJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListInspectTemplatesRequest. - * @implements IListInspectTemplatesRequest + * @classdesc Represents an UpdateJobTriggerRequest. + * @implements IUpdateJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set */ - function ListInspectTemplatesRequest(properties) { + function UpdateJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32674,127 +35510,101 @@ } /** - * ListInspectTemplatesRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest - * @instance - */ - ListInspectTemplatesRequest.prototype.parent = ""; - - /** - * ListInspectTemplatesRequest pageToken. - * @member {string} pageToken - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest - * @instance - */ - ListInspectTemplatesRequest.prototype.pageToken = ""; - - /** - * ListInspectTemplatesRequest pageSize. - * @member {number} pageSize - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * UpdateJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @instance */ - ListInspectTemplatesRequest.prototype.pageSize = 0; + UpdateJobTriggerRequest.prototype.name = ""; /** - * ListInspectTemplatesRequest orderBy. - * @member {string} orderBy - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * UpdateJobTriggerRequest jobTrigger. + * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @instance */ - ListInspectTemplatesRequest.prototype.orderBy = ""; + UpdateJobTriggerRequest.prototype.jobTrigger = null; /** - * ListInspectTemplatesRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * UpdateJobTriggerRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @instance */ - ListInspectTemplatesRequest.prototype.locationId = ""; + UpdateJobTriggerRequest.prototype.updateMask = null; /** - * Creates a new ListInspectTemplatesRequest instance using the specified properties. + * Creates a new UpdateJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest instance + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest instance */ - ListInspectTemplatesRequest.create = function create(properties) { - return new ListInspectTemplatesRequest(properties); + UpdateJobTriggerRequest.create = function create(properties) { + return new UpdateJobTriggerRequest(properties); }; /** - * Encodes the specified ListInspectTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * Encodes the specified UpdateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInspectTemplatesRequest.encode = function encode(message, writer) { + UpdateJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListInspectTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * Encodes the specified UpdateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInspectTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer. + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @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.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInspectTemplatesRequest.decode = function decode(reader, length) { + UpdateJobTriggerRequest.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.ListInspectTemplatesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32()); break; case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.locationId = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -32805,142 +35615,134 @@ }; /** - * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInspectTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListInspectTemplatesRequest message. + * Verifies an UpdateJobTriggerRequest message. * @function verify - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListInspectTemplatesRequest.verify = function verify(message) { + UpdateJobTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger); + if (error) + return "jobTrigger." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a ListInspectTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest */ - ListInspectTemplatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesRequest) + UpdateJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.UpdateJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.jobTrigger != null) { + if (typeof object.jobTrigger !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.jobTrigger: object expected"); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a ListInspectTemplatesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.ListInspectTemplatesRequest} message ListInspectTemplatesRequest + * @param {google.privacy.dlp.v2.UpdateJobTriggerRequest} message UpdateJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInspectTemplatesRequest.toObject = function toObject(message, options) { + UpdateJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - object.orderBy = ""; - object.locationId = ""; + object.name = ""; + object.jobTrigger = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListInspectTemplatesRequest to JSON. + * Converts this UpdateJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest * @instance * @returns {Object.} JSON object */ - ListInspectTemplatesRequest.prototype.toJSON = function toJSON() { + UpdateJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListInspectTemplatesRequest; + return UpdateJobTriggerRequest; })(); - v2.ListInspectTemplatesResponse = (function() { + v2.GetJobTriggerRequest = (function() { /** - * Properties of a ListInspectTemplatesResponse. + * Properties of a GetJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IListInspectTemplatesResponse - * @property {Array.|null} [inspectTemplates] ListInspectTemplatesResponse inspectTemplates - * @property {string|null} [nextPageToken] ListInspectTemplatesResponse nextPageToken + * @interface IGetJobTriggerRequest + * @property {string|null} [name] GetJobTriggerRequest name */ /** - * Constructs a new ListInspectTemplatesResponse. + * Constructs a new GetJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListInspectTemplatesResponse. - * @implements IListInspectTemplatesResponse + * @classdesc Represents a GetJobTriggerRequest. + * @implements IGetJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set */ - function ListInspectTemplatesResponse(properties) { - this.inspectTemplates = []; + function GetJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32948,91 +35750,75 @@ } /** - * ListInspectTemplatesResponse inspectTemplates. - * @member {Array.} inspectTemplates - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse - * @instance - */ - ListInspectTemplatesResponse.prototype.inspectTemplates = $util.emptyArray; - - /** - * ListInspectTemplatesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * GetJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @instance */ - ListInspectTemplatesResponse.prototype.nextPageToken = ""; + GetJobTriggerRequest.prototype.name = ""; /** - * Creates a new ListInspectTemplatesResponse instance using the specified properties. + * Creates a new GetJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse instance + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest instance */ - ListInspectTemplatesResponse.create = function create(properties) { - return new ListInspectTemplatesResponse(properties); + GetJobTriggerRequest.create = function create(properties) { + return new GetJobTriggerRequest(properties); }; /** - * Encodes the specified ListInspectTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * Encodes the specified GetJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInspectTemplatesResponse.encode = function encode(message, writer) { + GetJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inspectTemplates != null && message.inspectTemplates.length) - for (var i = 0; i < message.inspectTemplates.length; ++i) - $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListInspectTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * Encodes the specified GetJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListInspectTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer. + * Decodes a GetJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @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.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInspectTemplatesResponse.decode = function decode(reader, length) { + GetJobTriggerRequest.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.ListInspectTemplatesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.inspectTemplates && message.inspectTemplates.length)) - message.inspectTemplates = []; - message.inspectTemplates.push($root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -33043,133 +35829,111 @@ }; /** - * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListInspectTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + GetJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - /** - * Verifies a ListInspectTemplatesResponse message. - * @function verify - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListInspectTemplatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { - if (!Array.isArray(message.inspectTemplates)) - return "inspectTemplates: array expected"; - for (var i = 0; i < message.inspectTemplates.length; ++i) { - var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplates[i]); - if (error) - return "inspectTemplates." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + /** + * Verifies a GetJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListInspectTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest */ - ListInspectTemplatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesResponse) + GetJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.GetJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesResponse(); - if (object.inspectTemplates) { - if (!Array.isArray(object.inspectTemplates)) - throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: array expected"); - message.inspectTemplates = []; - for (var i = 0; i < object.inspectTemplates.length; ++i) { - if (typeof object.inspectTemplates[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: object expected"); - message.inspectTemplates[i] = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplates[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.privacy.dlp.v2.GetJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListInspectTemplatesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.ListInspectTemplatesResponse} message ListInspectTemplatesResponse + * @param {google.privacy.dlp.v2.GetJobTriggerRequest} message GetJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListInspectTemplatesResponse.toObject = function toObject(message, options) { + GetJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.inspectTemplates = []; if (options.defaults) - object.nextPageToken = ""; - if (message.inspectTemplates && message.inspectTemplates.length) { - object.inspectTemplates = []; - for (var j = 0; j < message.inspectTemplates.length; ++j) - object.inspectTemplates[j] = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplates[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListInspectTemplatesResponse to JSON. + * Converts this GetJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest * @instance * @returns {Object.} JSON object */ - ListInspectTemplatesResponse.prototype.toJSON = function toJSON() { + GetJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListInspectTemplatesResponse; + return GetJobTriggerRequest; })(); - v2.DeleteInspectTemplateRequest = (function() { + v2.CreateDlpJobRequest = (function() { /** - * Properties of a DeleteInspectTemplateRequest. + * Properties of a CreateDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @interface IDeleteInspectTemplateRequest - * @property {string|null} [name] DeleteInspectTemplateRequest name + * @interface ICreateDlpJobRequest + * @property {string|null} [parent] CreateDlpJobRequest parent + * @property {google.privacy.dlp.v2.IInspectJobConfig|null} [inspectJob] CreateDlpJobRequest inspectJob + * @property {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null} [riskJob] CreateDlpJobRequest riskJob + * @property {string|null} [jobId] CreateDlpJobRequest jobId + * @property {string|null} [locationId] CreateDlpJobRequest locationId */ /** - * Constructs a new DeleteInspectTemplateRequest. + * Constructs a new CreateDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DeleteInspectTemplateRequest. - * @implements IDeleteInspectTemplateRequest + * @classdesc Represents a CreateDlpJobRequest. + * @implements ICreateDlpJobRequest * @constructor - * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set */ - function DeleteInspectTemplateRequest(properties) { + function CreateDlpJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33177,75 +35941,141 @@ } /** - * DeleteInspectTemplateRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * CreateDlpJobRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @instance */ - DeleteInspectTemplateRequest.prototype.name = ""; + CreateDlpJobRequest.prototype.parent = ""; /** - * Creates a new DeleteInspectTemplateRequest instance using the specified properties. + * CreateDlpJobRequest inspectJob. + * @member {google.privacy.dlp.v2.IInspectJobConfig|null|undefined} inspectJob + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.inspectJob = null; + + /** + * CreateDlpJobRequest riskJob. + * @member {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null|undefined} riskJob + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.riskJob = null; + + /** + * CreateDlpJobRequest jobId. + * @member {string} jobId + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.jobId = ""; + + /** + * CreateDlpJobRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.locationId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateDlpJobRequest job. + * @member {"inspectJob"|"riskJob"|undefined} job + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + Object.defineProperty(CreateDlpJobRequest.prototype, "job", { + get: $util.oneOfGetter($oneOfFields = ["inspectJob", "riskJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateDlpJobRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest instance + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest instance */ - DeleteInspectTemplateRequest.create = function create(properties) { - return new DeleteInspectTemplateRequest(properties); + CreateDlpJobRequest.create = function create(properties) { + return new CreateDlpJobRequest(properties); }; /** - * Encodes the specified DeleteInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * Encodes the specified CreateDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteInspectTemplateRequest.encode = function encode(message, writer) { + CreateDlpJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + $root.google.privacy.dlp.v2.InspectJobConfig.encode(message.inspectJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.riskJob != null && message.hasOwnProperty("riskJob")) + $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.encode(message.riskJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.jobId != null && message.hasOwnProperty("jobId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); return writer; }; /** - * Encodes the specified DeleteInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * Encodes the specified CreateDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer. + * Decodes a CreateDlpJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @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.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteInspectTemplateRequest.decode = function decode(reader, length) { + CreateDlpJobRequest.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.DeleteInspectTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateDlpJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.decode(reader, reader.uint32()); + break; + case 3: + message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.decode(reader, reader.uint32()); + break; + case 4: + message.jobId = reader.string(); + break; + case 5: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -33256,110 +36086,168 @@ }; /** - * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDlpJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + CreateDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteInspectTemplateRequest message. + * Verifies a CreateDlpJobRequest message. * @function verify - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteInspectTemplateRequest.verify = function verify(message) { + CreateDlpJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + properties.job = 1; + { + var error = $root.google.privacy.dlp.v2.InspectJobConfig.verify(message.inspectJob); + if (error) + return "inspectJob." + error; + } + } + if (message.riskJob != null && message.hasOwnProperty("riskJob")) { + if (properties.job === 1) + return "job: multiple values"; + properties.job = 1; + { + var error = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.verify(message.riskJob); + if (error) + return "riskJob." + error; + } + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a DeleteInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDlpJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest */ - DeleteInspectTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest) + CreateDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CreateDlpJobRequest) return object; - var message = new $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.CreateDlpJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inspectJob != null) { + if (typeof object.inspectJob !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.inspectJob: object expected"); + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.fromObject(object.inspectJob); + } + if (object.riskJob != null) { + if (typeof object.riskJob !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.riskJob: object expected"); + message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.fromObject(object.riskJob); + } + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a DeleteInspectTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDlpJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @static - * @param {google.privacy.dlp.v2.DeleteInspectTemplateRequest} message DeleteInspectTemplateRequest + * @param {google.privacy.dlp.v2.CreateDlpJobRequest} message CreateDlpJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteInspectTemplateRequest.toObject = function toObject(message, options) { + CreateDlpJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.jobId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + object.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.toObject(message.inspectJob, options); + if (options.oneofs) + object.job = "inspectJob"; + } + if (message.riskJob != null && message.hasOwnProperty("riskJob")) { + object.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.toObject(message.riskJob, options); + if (options.oneofs) + object.job = "riskJob"; + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this DeleteInspectTemplateRequest to JSON. + * Converts this CreateDlpJobRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest * @instance * @returns {Object.} JSON object */ - DeleteInspectTemplateRequest.prototype.toJSON = function toJSON() { + CreateDlpJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteInspectTemplateRequest; + return CreateDlpJobRequest; })(); - v2.CreateJobTriggerRequest = (function() { + v2.ListJobTriggersRequest = (function() { /** - * Properties of a CreateJobTriggerRequest. + * Properties of a ListJobTriggersRequest. * @memberof google.privacy.dlp.v2 - * @interface ICreateJobTriggerRequest - * @property {string|null} [parent] CreateJobTriggerRequest parent - * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] CreateJobTriggerRequest jobTrigger - * @property {string|null} [triggerId] CreateJobTriggerRequest triggerId - * @property {string|null} [locationId] CreateJobTriggerRequest locationId + * @interface IListJobTriggersRequest + * @property {string|null} [parent] ListJobTriggersRequest parent + * @property {string|null} [pageToken] ListJobTriggersRequest pageToken + * @property {number|null} [pageSize] ListJobTriggersRequest pageSize + * @property {string|null} [orderBy] ListJobTriggersRequest orderBy + * @property {string|null} [filter] ListJobTriggersRequest filter + * @property {string|null} [locationId] ListJobTriggersRequest locationId */ /** - * Constructs a new CreateJobTriggerRequest. + * Constructs a new ListJobTriggersRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CreateJobTriggerRequest. - * @implements ICreateJobTriggerRequest + * @classdesc Represents a ListJobTriggersRequest. + * @implements IListJobTriggersRequest * @constructor - * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set */ - function CreateJobTriggerRequest(properties) { + function ListJobTriggersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33367,100 +36255,120 @@ } /** - * CreateJobTriggerRequest parent. + * ListJobTriggersRequest parent. * @member {string} parent - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @instance */ - CreateJobTriggerRequest.prototype.parent = ""; + ListJobTriggersRequest.prototype.parent = ""; /** - * CreateJobTriggerRequest jobTrigger. - * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * ListJobTriggersRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @instance */ - CreateJobTriggerRequest.prototype.jobTrigger = null; + ListJobTriggersRequest.prototype.pageToken = ""; /** - * CreateJobTriggerRequest triggerId. - * @member {string} triggerId - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * ListJobTriggersRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @instance */ - CreateJobTriggerRequest.prototype.triggerId = ""; + ListJobTriggersRequest.prototype.pageSize = 0; /** - * CreateJobTriggerRequest locationId. + * ListJobTriggersRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.orderBy = ""; + + /** + * ListJobTriggersRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.filter = ""; + + /** + * ListJobTriggersRequest locationId. * @member {string} locationId - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @instance */ - CreateJobTriggerRequest.prototype.locationId = ""; + ListJobTriggersRequest.prototype.locationId = ""; /** - * Creates a new CreateJobTriggerRequest instance using the specified properties. + * Creates a new ListJobTriggersRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static - * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest instance + * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest instance */ - CreateJobTriggerRequest.create = function create(properties) { - return new CreateJobTriggerRequest(properties); + ListJobTriggersRequest.create = function create(properties) { + return new ListJobTriggersRequest(properties); }; /** - * Encodes the specified CreateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListJobTriggersRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static - * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateJobTriggerRequest.encode = function encode(message, writer) { + ListJobTriggersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) - $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerId); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); return writer; }; /** - * Encodes the specified CreateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListJobTriggersRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static - * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListJobTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateJobTriggerRequest message from the specified reader or buffer. + * Decodes a ListJobTriggersRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @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.CreateJobTriggerRequest} CreateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateJobTriggerRequest.decode = function decode(reader, length) { + ListJobTriggersRequest.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.CreateJobTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListJobTriggersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -33468,12 +36376,18 @@ message.parent = reader.string(); break; case 2: - message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; case 3: - message.triggerId = reader.string(); + message.pageSize = reader.int32(); break; case 4: + message.orderBy = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 7: message.locationId = reader.string(); break; default: @@ -33485,43 +36399,47 @@ }; /** - * Decodes a CreateJobTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobTriggersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListJobTriggersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateJobTriggerRequest message. + * Verifies a ListJobTriggersRequest message. * @function verify - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateJobTriggerRequest.verify = function verify(message) { + ListJobTriggersRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { - var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger); - if (error) - return "jobTrigger." + error; - } - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - if (!$util.isString(message.triggerId)) - return "triggerId: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; if (message.locationId != null && message.hasOwnProperty("locationId")) if (!$util.isString(message.locationId)) return "locationId: string expected"; @@ -33529,93 +36447,102 @@ }; /** - * Creates a CreateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobTriggersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest */ - CreateJobTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CreateJobTriggerRequest) + ListJobTriggersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersRequest) return object; - var message = new $root.google.privacy.dlp.v2.CreateJobTriggerRequest(); + var message = new $root.google.privacy.dlp.v2.ListJobTriggersRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.jobTrigger != null) { - if (typeof object.jobTrigger !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateJobTriggerRequest.jobTrigger: object expected"); - message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger); - } - if (object.triggerId != null) - message.triggerId = String(object.triggerId); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); if (object.locationId != null) message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a CreateJobTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListJobTriggersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @static - * @param {google.privacy.dlp.v2.CreateJobTriggerRequest} message CreateJobTriggerRequest + * @param {google.privacy.dlp.v2.ListJobTriggersRequest} message ListJobTriggersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateJobTriggerRequest.toObject = function toObject(message, options) { + ListJobTriggersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.jobTrigger = null; - object.triggerId = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; object.locationId = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) - object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - object.triggerId = message.triggerId; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; if (message.locationId != null && message.hasOwnProperty("locationId")) object.locationId = message.locationId; return object; }; /** - * Converts this CreateJobTriggerRequest to JSON. + * Converts this ListJobTriggersRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest * @instance * @returns {Object.} JSON object */ - CreateJobTriggerRequest.prototype.toJSON = function toJSON() { + ListJobTriggersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateJobTriggerRequest; + return ListJobTriggersRequest; })(); - v2.ActivateJobTriggerRequest = (function() { + v2.ListJobTriggersResponse = (function() { /** - * Properties of an ActivateJobTriggerRequest. + * Properties of a ListJobTriggersResponse. * @memberof google.privacy.dlp.v2 - * @interface IActivateJobTriggerRequest - * @property {string|null} [name] ActivateJobTriggerRequest name + * @interface IListJobTriggersResponse + * @property {Array.|null} [jobTriggers] ListJobTriggersResponse jobTriggers + * @property {string|null} [nextPageToken] ListJobTriggersResponse nextPageToken */ /** - * Constructs a new ActivateJobTriggerRequest. + * Constructs a new ListJobTriggersResponse. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an ActivateJobTriggerRequest. - * @implements IActivateJobTriggerRequest + * @classdesc Represents a ListJobTriggersResponse. + * @implements IListJobTriggersResponse * @constructor - * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set */ - function ActivateJobTriggerRequest(properties) { + function ListJobTriggersResponse(properties) { + this.jobTriggers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33623,75 +36550,91 @@ } /** - * ActivateJobTriggerRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * ListJobTriggersResponse jobTriggers. + * @member {Array.} jobTriggers + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @instance */ - ActivateJobTriggerRequest.prototype.name = ""; + ListJobTriggersResponse.prototype.jobTriggers = $util.emptyArray; /** - * Creates a new ActivateJobTriggerRequest instance using the specified properties. + * ListJobTriggersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @instance + */ + ListJobTriggersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobTriggersResponse instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static - * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest instance + * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse instance */ - ActivateJobTriggerRequest.create = function create(properties) { - return new ActivateJobTriggerRequest(properties); + ListJobTriggersResponse.create = function create(properties) { + return new ListJobTriggersResponse(properties); }; /** - * Encodes the specified ActivateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListJobTriggersResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static - * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActivateJobTriggerRequest.encode = function encode(message, writer) { + ListJobTriggersResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.jobTriggers != null && message.jobTriggers.length) + for (var i = 0; i < message.jobTriggers.length; ++i) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTriggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ActivateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListJobTriggersResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static - * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActivateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListJobTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer. + * Decodes a ListJobTriggersResponse message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @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.ActivateJobTriggerRequest} ActivateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActivateJobTriggerRequest.decode = function decode(reader, length) { + ListJobTriggersResponse.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.ActivateJobTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListJobTriggersResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.jobTriggers && message.jobTriggers.length)) + message.jobTriggers = []; + message.jobTriggers.push($root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -33702,109 +36645,133 @@ }; /** - * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListJobTriggersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActivateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListJobTriggersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ActivateJobTriggerRequest message. + * Verifies a ListJobTriggersResponse message. * @function verify - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ActivateJobTriggerRequest.verify = function verify(message) { + ListJobTriggersResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.jobTriggers != null && message.hasOwnProperty("jobTriggers")) { + if (!Array.isArray(message.jobTriggers)) + return "jobTriggers: array expected"; + for (var i = 0; i < message.jobTriggers.length; ++i) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTriggers[i]); + if (error) + return "jobTriggers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ActivateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobTriggersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse */ - ActivateJobTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ActivateJobTriggerRequest) + ListJobTriggersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersResponse) return object; - var message = new $root.google.privacy.dlp.v2.ActivateJobTriggerRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.ListJobTriggersResponse(); + if (object.jobTriggers) { + if (!Array.isArray(object.jobTriggers)) + throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: array expected"); + message.jobTriggers = []; + for (var i = 0; i < object.jobTriggers.length; ++i) { + if (typeof object.jobTriggers[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: object expected"); + message.jobTriggers[i] = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTriggers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an ActivateJobTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListJobTriggersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @static - * @param {google.privacy.dlp.v2.ActivateJobTriggerRequest} message ActivateJobTriggerRequest + * @param {google.privacy.dlp.v2.ListJobTriggersResponse} message ListJobTriggersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ActivateJobTriggerRequest.toObject = function toObject(message, options) { + ListJobTriggersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.jobTriggers = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.jobTriggers && message.jobTriggers.length) { + object.jobTriggers = []; + for (var j = 0; j < message.jobTriggers.length; ++j) + object.jobTriggers[j] = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTriggers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ActivateJobTriggerRequest to JSON. + * Converts this ListJobTriggersResponse to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse * @instance * @returns {Object.} JSON object */ - ActivateJobTriggerRequest.prototype.toJSON = function toJSON() { + ListJobTriggersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ActivateJobTriggerRequest; + return ListJobTriggersResponse; })(); - v2.UpdateJobTriggerRequest = (function() { + v2.DeleteJobTriggerRequest = (function() { /** - * Properties of an UpdateJobTriggerRequest. + * Properties of a DeleteJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IUpdateJobTriggerRequest - * @property {string|null} [name] UpdateJobTriggerRequest name - * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] UpdateJobTriggerRequest jobTrigger - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateJobTriggerRequest updateMask + * @interface IDeleteJobTriggerRequest + * @property {string|null} [name] DeleteJobTriggerRequest name */ /** - * Constructs a new UpdateJobTriggerRequest. + * Constructs a new DeleteJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an UpdateJobTriggerRequest. - * @implements IUpdateJobTriggerRequest + * @classdesc Represents a DeleteJobTriggerRequest. + * @implements IDeleteJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set */ - function UpdateJobTriggerRequest(properties) { + function DeleteJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33812,102 +36779,76 @@ } /** - * UpdateJobTriggerRequest name. + * DeleteJobTriggerRequest name. * @member {string} name - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest - * @instance - */ - UpdateJobTriggerRequest.prototype.name = ""; - - /** - * UpdateJobTriggerRequest jobTrigger. - * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest - * @instance - */ - UpdateJobTriggerRequest.prototype.jobTrigger = null; - - /** - * UpdateJobTriggerRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @instance */ - UpdateJobTriggerRequest.prototype.updateMask = null; + DeleteJobTriggerRequest.prototype.name = ""; /** - * Creates a new UpdateJobTriggerRequest instance using the specified properties. + * Creates a new DeleteJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest instance + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest instance */ - UpdateJobTriggerRequest.create = function create(properties) { - return new UpdateJobTriggerRequest(properties); + DeleteJobTriggerRequest.create = function create(properties) { + return new DeleteJobTriggerRequest(properties); }; /** - * Encodes the specified UpdateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * Encodes the specified DeleteJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateJobTriggerRequest.encode = function encode(message, writer) { + DeleteJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) - $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * Encodes the specified DeleteJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer. + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @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.UpdateJobTriggerRequest} UpdateJobTriggerRequest + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateJobTriggerRequest.decode = function decode(reader, length) { + DeleteJobTriggerRequest.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.UpdateJobTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -33917,134 +36858,111 @@ }; /** - * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateJobTriggerRequest message. + * Verifies a DeleteJobTriggerRequest message. * @function verify - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateJobTriggerRequest.verify = function verify(message) { + DeleteJobTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { - var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger); - if (error) - return "jobTrigger." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest */ - UpdateJobTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.UpdateJobTriggerRequest) + DeleteJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.UpdateJobTriggerRequest(); + var message = new $root.google.privacy.dlp.v2.DeleteJobTriggerRequest(); if (object.name != null) message.name = String(object.name); - if (object.jobTrigger != null) { - if (typeof object.jobTrigger !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.jobTrigger: object expected"); - message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } return message; }; /** - * Creates a plain object from an UpdateJobTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.UpdateJobTriggerRequest} message UpdateJobTriggerRequest + * @param {google.privacy.dlp.v2.DeleteJobTriggerRequest} message DeleteJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateJobTriggerRequest.toObject = function toObject(message, options) { + DeleteJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.jobTrigger = null; - object.updateMask = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) - object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateJobTriggerRequest to JSON. + * Converts this DeleteJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest * @instance * @returns {Object.} JSON object */ - UpdateJobTriggerRequest.prototype.toJSON = function toJSON() { + DeleteJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateJobTriggerRequest; + return DeleteJobTriggerRequest; })(); - v2.GetJobTriggerRequest = (function() { + v2.InspectJobConfig = (function() { /** - * Properties of a GetJobTriggerRequest. + * Properties of an InspectJobConfig. * @memberof google.privacy.dlp.v2 - * @interface IGetJobTriggerRequest - * @property {string|null} [name] GetJobTriggerRequest name + * @interface IInspectJobConfig + * @property {google.privacy.dlp.v2.IStorageConfig|null} [storageConfig] InspectJobConfig storageConfig + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] InspectJobConfig inspectConfig + * @property {string|null} [inspectTemplateName] InspectJobConfig inspectTemplateName + * @property {Array.|null} [actions] InspectJobConfig actions */ /** - * Constructs a new GetJobTriggerRequest. + * Constructs a new InspectJobConfig. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a GetJobTriggerRequest. - * @implements IGetJobTriggerRequest + * @classdesc Represents an InspectJobConfig. + * @implements IInspectJobConfig * @constructor - * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set */ - function GetJobTriggerRequest(properties) { + function InspectJobConfig(properties) { + this.actions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34052,75 +36970,117 @@ } /** - * GetJobTriggerRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * InspectJobConfig storageConfig. + * @member {google.privacy.dlp.v2.IStorageConfig|null|undefined} storageConfig + * @memberof google.privacy.dlp.v2.InspectJobConfig * @instance */ - GetJobTriggerRequest.prototype.name = ""; + InspectJobConfig.prototype.storageConfig = null; /** - * Creates a new GetJobTriggerRequest instance using the specified properties. + * InspectJobConfig inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.inspectConfig = null; + + /** + * InspectJobConfig inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.inspectTemplateName = ""; + + /** + * InspectJobConfig actions. + * @member {Array.} actions + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.actions = $util.emptyArray; + + /** + * Creates a new InspectJobConfig instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static - * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest instance + * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig instance */ - GetJobTriggerRequest.create = function create(properties) { - return new GetJobTriggerRequest(properties); + InspectJobConfig.create = function create(properties) { + return new InspectJobConfig(properties); }; /** - * Encodes the specified GetJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * Encodes the specified InspectJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static - * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobTriggerRequest.encode = function encode(message, writer) { + InspectJobConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) + $root.google.privacy.dlp.v2.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplateName); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.privacy.dlp.v2.Action.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * Encodes the specified InspectJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static - * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + InspectJobConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetJobTriggerRequest message from the specified reader or buffer. + * Decodes an InspectJobConfig message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @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.GetJobTriggerRequest} GetJobTriggerRequest + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobTriggerRequest.decode = function decode(reader, length) { + InspectJobConfig.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.GetJobTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectJobConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.decode(reader, reader.uint32()); + break; + case 2: + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32()); + break; + case 3: + message.inspectTemplateName = reader.string(); + break; + case 4: + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.privacy.dlp.v2.Action.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -34131,111 +37091,170 @@ }; /** - * Decodes a GetJobTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes an InspectJobConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + InspectJobConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetJobTriggerRequest message. + * Verifies an InspectJobConfig message. * @function verify - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetJobTriggerRequest.verify = function verify(message) { + InspectJobConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + var error = $root.google.privacy.dlp.v2.StorageConfig.verify(message.storageConfig); + if (error) + return "storageConfig." + error; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig); + if (error) + return "inspectConfig." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.privacy.dlp.v2.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } return null; }; /** - * Creates a GetJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InspectJobConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig */ - GetJobTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.GetJobTriggerRequest) + InspectJobConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.InspectJobConfig) return object; - var message = new $root.google.privacy.dlp.v2.GetJobTriggerRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.InspectJobConfig(); + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.storageConfig: object expected"); + message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.fromObject(object.storageConfig); + } + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: object expected"); + message.actions[i] = $root.google.privacy.dlp.v2.Action.fromObject(object.actions[i]); + } + } return message; }; /** - * Creates a plain object from a GetJobTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from an InspectJobConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @static - * @param {google.privacy.dlp.v2.GetJobTriggerRequest} message GetJobTriggerRequest + * @param {google.privacy.dlp.v2.InspectJobConfig} message InspectJobConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetJobTriggerRequest.toObject = function toObject(message, options) { + InspectJobConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.storageConfig = null; + object.inspectConfig = null; + object.inspectTemplateName = ""; + } + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) + object.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.toObject(message.storageConfig, options); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.privacy.dlp.v2.Action.toObject(message.actions[j], options); + } return object; }; /** - * Converts this GetJobTriggerRequest to JSON. + * Converts this InspectJobConfig to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @memberof google.privacy.dlp.v2.InspectJobConfig * @instance * @returns {Object.} JSON object */ - GetJobTriggerRequest.prototype.toJSON = function toJSON() { + InspectJobConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetJobTriggerRequest; + return InspectJobConfig; })(); - v2.CreateDlpJobRequest = (function() { + v2.DlpJob = (function() { /** - * Properties of a CreateDlpJobRequest. + * Properties of a DlpJob. * @memberof google.privacy.dlp.v2 - * @interface ICreateDlpJobRequest - * @property {string|null} [parent] CreateDlpJobRequest parent - * @property {google.privacy.dlp.v2.IInspectJobConfig|null} [inspectJob] CreateDlpJobRequest inspectJob - * @property {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null} [riskJob] CreateDlpJobRequest riskJob - * @property {string|null} [jobId] CreateDlpJobRequest jobId - * @property {string|null} [locationId] CreateDlpJobRequest locationId + * @interface IDlpJob + * @property {string|null} [name] DlpJob name + * @property {google.privacy.dlp.v2.DlpJobType|null} [type] DlpJob type + * @property {google.privacy.dlp.v2.DlpJob.JobState|null} [state] DlpJob state + * @property {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null} [riskDetails] DlpJob riskDetails + * @property {google.privacy.dlp.v2.IInspectDataSourceDetails|null} [inspectDetails] DlpJob inspectDetails + * @property {google.protobuf.ITimestamp|null} [createTime] DlpJob createTime + * @property {google.protobuf.ITimestamp|null} [startTime] DlpJob startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DlpJob endTime + * @property {string|null} [jobTriggerName] DlpJob jobTriggerName + * @property {Array.|null} [errors] DlpJob errors */ /** - * Constructs a new CreateDlpJobRequest. + * Constructs a new DlpJob. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CreateDlpJobRequest. - * @implements ICreateDlpJobRequest + * @classdesc Represents a DlpJob. + * @implements IDlpJob * @constructor - * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set */ - function CreateDlpJobRequest(properties) { + function DlpJob(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34243,141 +37262,209 @@ } /** - * CreateDlpJobRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - CreateDlpJobRequest.prototype.parent = ""; + DlpJob.prototype.name = ""; /** - * CreateDlpJobRequest inspectJob. - * @member {google.privacy.dlp.v2.IInspectJobConfig|null|undefined} inspectJob - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob type. + * @member {google.privacy.dlp.v2.DlpJobType} type + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - CreateDlpJobRequest.prototype.inspectJob = null; + DlpJob.prototype.type = 0; /** - * CreateDlpJobRequest riskJob. - * @member {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null|undefined} riskJob - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob state. + * @member {google.privacy.dlp.v2.DlpJob.JobState} state + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - CreateDlpJobRequest.prototype.riskJob = null; + DlpJob.prototype.state = 0; /** - * CreateDlpJobRequest jobId. - * @member {string} jobId - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob riskDetails. + * @member {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null|undefined} riskDetails + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - CreateDlpJobRequest.prototype.jobId = ""; + DlpJob.prototype.riskDetails = null; /** - * CreateDlpJobRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob inspectDetails. + * @member {google.privacy.dlp.v2.IInspectDataSourceDetails|null|undefined} inspectDetails + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - CreateDlpJobRequest.prototype.locationId = ""; + DlpJob.prototype.inspectDetails = null; + + /** + * DlpJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.createTime = null; + + /** + * DlpJob startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.startTime = null; + + /** + * DlpJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.endTime = null; + + /** + * DlpJob jobTriggerName. + * @member {string} jobTriggerName + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.jobTriggerName = ""; + + /** + * DlpJob errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.errors = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CreateDlpJobRequest job. - * @member {"inspectJob"|"riskJob"|undefined} job - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * DlpJob details. + * @member {"riskDetails"|"inspectDetails"|undefined} details + * @memberof google.privacy.dlp.v2.DlpJob * @instance */ - Object.defineProperty(CreateDlpJobRequest.prototype, "job", { - get: $util.oneOfGetter($oneOfFields = ["inspectJob", "riskJob"]), + Object.defineProperty(DlpJob.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["riskDetails", "inspectDetails"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CreateDlpJobRequest instance using the specified properties. + * Creates a new DlpJob instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static - * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest instance + * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob instance */ - CreateDlpJobRequest.create = function create(properties) { - return new CreateDlpJobRequest(properties); + DlpJob.create = function create(properties) { + return new DlpJob(properties); }; /** - * Encodes the specified CreateDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * Encodes the specified DlpJob message. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static - * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDlpJobRequest.encode = function encode(message, writer) { + DlpJob.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) - $root.google.privacy.dlp.v2.InspectJobConfig.encode(message.inspectJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.riskJob != null && message.hasOwnProperty("riskJob")) - $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.encode(message.riskJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.jobId != null && message.hasOwnProperty("jobId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.encode(message.riskDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) + $root.google.privacy.dlp.v2.InspectDataSourceDetails.encode(message.inspectDetails, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jobTriggerName); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * Encodes the specified DlpJob message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static - * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + DlpJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDlpJobRequest message from the specified reader or buffer. + * Decodes a DlpJob message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @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.CreateDlpJobRequest} CreateDlpJobRequest + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDlpJobRequest.decode = function decode(reader, length) { + DlpJob.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.CreateDlpJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DlpJob(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: - message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.decode(reader, reader.uint32()); + message.type = reader.int32(); break; case 3: - message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.decode(reader, reader.uint32()); + message.state = reader.int32(); break; case 4: - message.jobId = reader.string(); + message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.decode(reader, reader.uint32()); break; case 5: - message.locationId = reader.string(); + message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.decode(reader, reader.uint32()); + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.jobTriggerName = reader.string(); + break; + case 11: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -34388,168 +37475,316 @@ }; /** - * Decodes a CreateDlpJobRequest message from the specified reader or buffer, length delimited. + * Decodes a DlpJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + DlpJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDlpJobRequest message. + * Verifies a DlpJob message. * @function verify - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDlpJobRequest.verify = function verify(message) { + DlpJob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { - properties.job = 1; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { + properties.details = 1; { - var error = $root.google.privacy.dlp.v2.InspectJobConfig.verify(message.inspectJob); + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify(message.riskDetails); if (error) - return "inspectJob." + error; + return "riskDetails." + error; } } - if (message.riskJob != null && message.hasOwnProperty("riskJob")) { - if (properties.job === 1) - return "job: multiple values"; - properties.job = 1; + if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; { - var error = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.verify(message.riskJob); + var error = $root.google.privacy.dlp.v2.InspectDataSourceDetails.verify(message.inspectDetails); if (error) - return "riskJob." + error; + return "inspectDetails." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) + if (!$util.isString(message.jobTriggerName)) + return "jobTriggerName: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); + if (error) + return "errors." + error; } } - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; return null; }; /** - * Creates a CreateDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DlpJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob */ - CreateDlpJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CreateDlpJobRequest) + DlpJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DlpJob) return object; - var message = new $root.google.privacy.dlp.v2.CreateDlpJobRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.inspectJob != null) { - if (typeof object.inspectJob !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.inspectJob: object expected"); - message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.fromObject(object.inspectJob); + var message = new $root.google.privacy.dlp.v2.DlpJob(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "DLP_JOB_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSPECT_JOB": + case 1: + message.type = 1; + break; + case "RISK_ANALYSIS_JOB": + case 2: + message.type = 2; + break; } - if (object.riskJob != null) { - if (typeof object.riskJob !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.riskJob: object expected"); - message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.fromObject(object.riskJob); + switch (object.state) { + case "JOB_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; + case "CANCELED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ACTIVE": + case 6: + message.state = 6; + break; + } + if (object.riskDetails != null) { + if (typeof object.riskDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.riskDetails: object expected"); + message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.fromObject(object.riskDetails); + } + if (object.inspectDetails != null) { + if (typeof object.inspectDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.inspectDetails: object expected"); + message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.fromObject(object.inspectDetails); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.jobTriggerName != null) + message.jobTriggerName = String(object.jobTriggerName); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); + } } - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.locationId != null) - message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a CreateDlpJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a DlpJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @static - * @param {google.privacy.dlp.v2.CreateDlpJobRequest} message CreateDlpJobRequest + * @param {google.privacy.dlp.v2.DlpJob} message DlpJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDlpJobRequest.toObject = function toObject(message, options) { + DlpJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errors = []; if (options.defaults) { - object.parent = ""; - object.jobId = ""; - object.locationId = ""; + object.name = ""; + object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "JOB_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.jobTriggerName = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { - object.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.toObject(message.inspectJob, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.DlpJob.JobState[message.state] : message.state; + if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { + object.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.toObject(message.riskDetails, options); if (options.oneofs) - object.job = "inspectJob"; + object.details = "riskDetails"; } - if (message.riskJob != null && message.hasOwnProperty("riskJob")) { - object.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.toObject(message.riskJob, options); + if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { + object.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.toObject(message.inspectDetails, options); if (options.oneofs) - object.job = "riskJob"; + object.details = "inspectDetails"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) + object.jobTriggerName = message.jobTriggerName; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); } - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; return object; }; /** - * Converts this CreateDlpJobRequest to JSON. + * Converts this DlpJob to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @memberof google.privacy.dlp.v2.DlpJob * @instance * @returns {Object.} JSON object */ - CreateDlpJobRequest.prototype.toJSON = function toJSON() { + DlpJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDlpJobRequest; + /** + * JobState enum. + * @name google.privacy.dlp.v2.DlpJob.JobState + * @enum {string} + * @property {number} JOB_STATE_UNSPECIFIED=0 JOB_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + * @property {number} CANCELED=4 CANCELED value + * @property {number} FAILED=5 FAILED value + * @property {number} ACTIVE=6 ACTIVE value + */ + DlpJob.JobState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JOB_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + values[valuesById[4] = "CANCELED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ACTIVE"] = 6; + return values; + })(); + + return DlpJob; })(); - v2.ListJobTriggersRequest = (function() { + v2.GetDlpJobRequest = (function() { /** - * Properties of a ListJobTriggersRequest. + * Properties of a GetDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @interface IListJobTriggersRequest - * @property {string|null} [parent] ListJobTriggersRequest parent - * @property {string|null} [pageToken] ListJobTriggersRequest pageToken - * @property {number|null} [pageSize] ListJobTriggersRequest pageSize - * @property {string|null} [orderBy] ListJobTriggersRequest orderBy - * @property {string|null} [filter] ListJobTriggersRequest filter - * @property {string|null} [locationId] ListJobTriggersRequest locationId + * @interface IGetDlpJobRequest + * @property {string|null} [name] GetDlpJobRequest name */ /** - * Constructs a new ListJobTriggersRequest. + * Constructs a new GetDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListJobTriggersRequest. - * @implements IListJobTriggersRequest + * @classdesc Represents a GetDlpJobRequest. + * @implements IGetDlpJobRequest * @constructor - * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set */ - function ListJobTriggersRequest(properties) { + function GetDlpJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34557,140 +37792,75 @@ } /** - * ListJobTriggersRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest - * @instance - */ - ListJobTriggersRequest.prototype.parent = ""; - - /** - * ListJobTriggersRequest pageToken. - * @member {string} pageToken - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest - * @instance - */ - ListJobTriggersRequest.prototype.pageToken = ""; - - /** - * ListJobTriggersRequest pageSize. - * @member {number} pageSize - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest - * @instance - */ - ListJobTriggersRequest.prototype.pageSize = 0; - - /** - * ListJobTriggersRequest orderBy. - * @member {string} orderBy - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest - * @instance - */ - ListJobTriggersRequest.prototype.orderBy = ""; - - /** - * ListJobTriggersRequest filter. - * @member {string} filter - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest - * @instance - */ - ListJobTriggersRequest.prototype.filter = ""; - - /** - * ListJobTriggersRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * GetDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @instance */ - ListJobTriggersRequest.prototype.locationId = ""; + GetDlpJobRequest.prototype.name = ""; /** - * Creates a new ListJobTriggersRequest instance using the specified properties. + * Creates a new GetDlpJobRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest instance + * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest instance */ - ListJobTriggersRequest.create = function create(properties) { - return new ListJobTriggersRequest(properties); + GetDlpJobRequest.create = function create(properties) { + return new GetDlpJobRequest(properties); }; /** - * Encodes the specified ListJobTriggersRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * Encodes the specified GetDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobTriggersRequest.encode = function encode(message, writer) { + GetDlpJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListJobTriggersRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * Encodes the specified GetDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobTriggersRequest message from the specified reader or buffer. + * Decodes a GetDlpJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @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.ListJobTriggersRequest} ListJobTriggersRequest + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobTriggersRequest.decode = function decode(reader, length) { + GetDlpJobRequest.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.ListJobTriggersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetDlpJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 7: - message.locationId = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -34701,150 +37871,113 @@ }; /** - * Decodes a ListJobTriggersRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDlpJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + GetDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobTriggersRequest message. + * Verifies a GetDlpJobRequest message. * @function verify - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobTriggersRequest.verify = function verify(message) { + GetDlpJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListJobTriggersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDlpJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest */ - ListJobTriggersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersRequest) + GetDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.GetDlpJobRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListJobTriggersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.GetDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListJobTriggersRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDlpJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @static - * @param {google.privacy.dlp.v2.ListJobTriggersRequest} message ListJobTriggersRequest + * @param {google.privacy.dlp.v2.GetDlpJobRequest} message GetDlpJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobTriggersRequest.toObject = function toObject(message, options) { + GetDlpJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - object.orderBy = ""; - object.filter = ""; - object.locationId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListJobTriggersRequest to JSON. + * Converts this GetDlpJobRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @memberof google.privacy.dlp.v2.GetDlpJobRequest * @instance * @returns {Object.} JSON object */ - ListJobTriggersRequest.prototype.toJSON = function toJSON() { + GetDlpJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListJobTriggersRequest; + return GetDlpJobRequest; })(); - v2.ListJobTriggersResponse = (function() { + v2.ListDlpJobsRequest = (function() { /** - * Properties of a ListJobTriggersResponse. + * Properties of a ListDlpJobsRequest. * @memberof google.privacy.dlp.v2 - * @interface IListJobTriggersResponse - * @property {Array.|null} [jobTriggers] ListJobTriggersResponse jobTriggers - * @property {string|null} [nextPageToken] ListJobTriggersResponse nextPageToken + * @interface IListDlpJobsRequest + * @property {string|null} [parent] ListDlpJobsRequest parent + * @property {string|null} [filter] ListDlpJobsRequest filter + * @property {number|null} [pageSize] ListDlpJobsRequest pageSize + * @property {string|null} [pageToken] ListDlpJobsRequest pageToken + * @property {google.privacy.dlp.v2.DlpJobType|null} [type] ListDlpJobsRequest type + * @property {string|null} [orderBy] ListDlpJobsRequest orderBy + * @property {string|null} [locationId] ListDlpJobsRequest locationId */ /** - * Constructs a new ListJobTriggersResponse. + * Constructs a new ListDlpJobsRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListJobTriggersResponse. - * @implements IListJobTriggersResponse + * @classdesc Represents a ListDlpJobsRequest. + * @implements IListDlpJobsRequest * @constructor - * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set */ - function ListJobTriggersResponse(properties) { - this.jobTriggers = []; + function ListDlpJobsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34852,91 +37985,153 @@ } /** - * ListJobTriggersResponse jobTriggers. - * @member {Array.} jobTriggers - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * ListDlpJobsRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @instance */ - ListJobTriggersResponse.prototype.jobTriggers = $util.emptyArray; + ListDlpJobsRequest.prototype.parent = ""; /** - * ListJobTriggersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * ListDlpJobsRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @instance */ - ListJobTriggersResponse.prototype.nextPageToken = ""; + ListDlpJobsRequest.prototype.filter = ""; /** - * Creates a new ListJobTriggersResponse instance using the specified properties. + * ListDlpJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.pageSize = 0; + + /** + * ListDlpJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.pageToken = ""; + + /** + * ListDlpJobsRequest type. + * @member {google.privacy.dlp.v2.DlpJobType} type + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.type = 0; + + /** + * ListDlpJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.orderBy = ""; + + /** + * ListDlpJobsRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.locationId = ""; + + /** + * Creates a new ListDlpJobsRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse instance + * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest instance */ - ListJobTriggersResponse.create = function create(properties) { - return new ListJobTriggersResponse(properties); + ListDlpJobsRequest.create = function create(properties) { + return new ListDlpJobsRequest(properties); }; /** - * Encodes the specified ListJobTriggersResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * Encodes the specified ListDlpJobsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobTriggersResponse.encode = function encode(message, writer) { + ListDlpJobsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobTriggers != null && message.jobTriggers.length) - for (var i = 0; i < message.jobTriggers.length; ++i) - $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTriggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); return writer; }; /** - * Encodes the specified ListJobTriggersResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * Encodes the specified ListDlpJobsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static - * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListDlpJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobTriggersResponse message from the specified reader or buffer. + * Decodes a ListDlpJobsRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @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.ListJobTriggersResponse} ListJobTriggersResponse + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobTriggersResponse.decode = function decode(reader, length) { + ListDlpJobsRequest.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.ListJobTriggersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDlpJobsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.parent = reader.string(); + break; case 1: - if (!(message.jobTriggers && message.jobTriggers.length)) - message.jobTriggers = []; - message.jobTriggers.push($root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32())); + message.filter = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.orderBy = reader.string(); + break; + case 7: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -34947,133 +38142,176 @@ }; /** - * Decodes a ListJobTriggersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListDlpJobsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + ListDlpJobsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobTriggersResponse message. + * Verifies a ListDlpJobsRequest message. * @function verify - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobTriggersResponse.verify = function verify(message) { + ListDlpJobsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobTriggers != null && message.hasOwnProperty("jobTriggers")) { - if (!Array.isArray(message.jobTriggers)) - return "jobTriggers: array expected"; - for (var i = 0; i < message.jobTriggers.length; ++i) { - var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTriggers[i]); - if (error) - return "jobTriggers." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a ListJobTriggersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListDlpJobsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest */ - ListJobTriggersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersResponse) + ListDlpJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListJobTriggersResponse(); - if (object.jobTriggers) { - if (!Array.isArray(object.jobTriggers)) - throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: array expected"); - message.jobTriggers = []; - for (var i = 0; i < object.jobTriggers.length; ++i) { - if (typeof object.jobTriggers[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: object expected"); - message.jobTriggers[i] = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTriggers[i]); - } + var message = new $root.google.privacy.dlp.v2.ListDlpJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.type) { + case "DLP_JOB_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSPECT_JOB": + case 1: + message.type = 1; + break; + case "RISK_ANALYSIS_JOB": + case 2: + message.type = 2; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a ListJobTriggersResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListDlpJobsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @static - * @param {google.privacy.dlp.v2.ListJobTriggersResponse} message ListJobTriggersResponse + * @param {google.privacy.dlp.v2.ListDlpJobsRequest} message ListDlpJobsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobTriggersResponse.toObject = function toObject(message, options) { + ListDlpJobsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jobTriggers = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobTriggers && message.jobTriggers.length) { - object.jobTriggers = []; - for (var j = 0; j < message.jobTriggers.length; ++j) - object.jobTriggers[j] = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTriggers[j], options); + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.parent = ""; + object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; + object.orderBy = ""; + object.locationId = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this ListJobTriggersResponse to JSON. + * Converts this ListDlpJobsRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest * @instance * @returns {Object.} JSON object */ - ListJobTriggersResponse.prototype.toJSON = function toJSON() { + ListDlpJobsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListJobTriggersResponse; + return ListDlpJobsRequest; })(); - v2.DeleteJobTriggerRequest = (function() { + v2.ListDlpJobsResponse = (function() { /** - * Properties of a DeleteJobTriggerRequest. + * Properties of a ListDlpJobsResponse. * @memberof google.privacy.dlp.v2 - * @interface IDeleteJobTriggerRequest - * @property {string|null} [name] DeleteJobTriggerRequest name + * @interface IListDlpJobsResponse + * @property {Array.|null} [jobs] ListDlpJobsResponse jobs + * @property {string|null} [nextPageToken] ListDlpJobsResponse nextPageToken */ /** - * Constructs a new DeleteJobTriggerRequest. + * Constructs a new ListDlpJobsResponse. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DeleteJobTriggerRequest. - * @implements IDeleteJobTriggerRequest + * @classdesc Represents a ListDlpJobsResponse. + * @implements IListDlpJobsResponse * @constructor - * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set */ - function DeleteJobTriggerRequest(properties) { + function ListDlpJobsResponse(properties) { + this.jobs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35081,75 +38319,91 @@ } /** - * DeleteJobTriggerRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * ListDlpJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @instance */ - DeleteJobTriggerRequest.prototype.name = ""; + ListDlpJobsResponse.prototype.jobs = $util.emptyArray; /** - * Creates a new DeleteJobTriggerRequest instance using the specified properties. + * ListDlpJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @instance + */ + ListDlpJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDlpJobsResponse instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static - * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest instance + * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse instance */ - DeleteJobTriggerRequest.create = function create(properties) { - return new DeleteJobTriggerRequest(properties); + ListDlpJobsResponse.create = function create(properties) { + return new ListDlpJobsResponse(properties); }; /** - * Encodes the specified DeleteJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListDlpJobsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static - * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteJobTriggerRequest.encode = function encode(message, writer) { + ListDlpJobsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.privacy.dlp.v2.DlpJob.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DeleteJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * Encodes the specified ListDlpJobsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static - * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDlpJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer. + * Decodes a ListDlpJobsResponse message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @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.DeleteJobTriggerRequest} DeleteJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteJobTriggerRequest.decode = function decode(reader, length) { + ListDlpJobsResponse.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.DeleteJobTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDlpJobsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.privacy.dlp.v2.DlpJob.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -35160,111 +38414,133 @@ }; /** - * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDlpJobsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListDlpJobsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteJobTriggerRequest message. + * Verifies a ListDlpJobsResponse message. * @function verify - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteJobTriggerRequest.verify = function verify(message) { + ListDlpJobsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.privacy.dlp.v2.DlpJob.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDlpJobsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse */ - DeleteJobTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DeleteJobTriggerRequest) + ListDlpJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsResponse) return object; - var message = new $root.google.privacy.dlp.v2.DeleteJobTriggerRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.ListDlpJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.privacy.dlp.v2.DlpJob.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteJobTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDlpJobsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @static - * @param {google.privacy.dlp.v2.DeleteJobTriggerRequest} message DeleteJobTriggerRequest + * @param {google.privacy.dlp.v2.ListDlpJobsResponse} message ListDlpJobsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteJobTriggerRequest.toObject = function toObject(message, options) { + ListDlpJobsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.privacy.dlp.v2.DlpJob.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteJobTriggerRequest to JSON. + * Converts this ListDlpJobsResponse to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse * @instance * @returns {Object.} JSON object */ - DeleteJobTriggerRequest.prototype.toJSON = function toJSON() { + ListDlpJobsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteJobTriggerRequest; + return ListDlpJobsResponse; })(); - v2.InspectJobConfig = (function() { + v2.CancelDlpJobRequest = (function() { /** - * Properties of an InspectJobConfig. + * Properties of a CancelDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @interface IInspectJobConfig - * @property {google.privacy.dlp.v2.IStorageConfig|null} [storageConfig] InspectJobConfig storageConfig - * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] InspectJobConfig inspectConfig - * @property {string|null} [inspectTemplateName] InspectJobConfig inspectTemplateName - * @property {Array.|null} [actions] InspectJobConfig actions + * @interface ICancelDlpJobRequest + * @property {string|null} [name] CancelDlpJobRequest name */ /** - * Constructs a new InspectJobConfig. + * Constructs a new CancelDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an InspectJobConfig. - * @implements IInspectJobConfig + * @classdesc Represents a CancelDlpJobRequest. + * @implements ICancelDlpJobRequest * @constructor - * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set */ - function InspectJobConfig(properties) { - this.actions = []; + function CancelDlpJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35272,117 +38548,75 @@ } /** - * InspectJobConfig storageConfig. - * @member {google.privacy.dlp.v2.IStorageConfig|null|undefined} storageConfig - * @memberof google.privacy.dlp.v2.InspectJobConfig - * @instance - */ - InspectJobConfig.prototype.storageConfig = null; - - /** - * InspectJobConfig inspectConfig. - * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig - * @memberof google.privacy.dlp.v2.InspectJobConfig - * @instance - */ - InspectJobConfig.prototype.inspectConfig = null; - - /** - * InspectJobConfig inspectTemplateName. - * @member {string} inspectTemplateName - * @memberof google.privacy.dlp.v2.InspectJobConfig - * @instance - */ - InspectJobConfig.prototype.inspectTemplateName = ""; - - /** - * InspectJobConfig actions. - * @member {Array.} actions - * @memberof google.privacy.dlp.v2.InspectJobConfig + * CancelDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @instance */ - InspectJobConfig.prototype.actions = $util.emptyArray; + CancelDlpJobRequest.prototype.name = ""; /** - * Creates a new InspectJobConfig instance using the specified properties. + * Creates a new CancelDlpJobRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig instance + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest instance */ - InspectJobConfig.create = function create(properties) { - return new InspectJobConfig(properties); + CancelDlpJobRequest.create = function create(properties) { + return new CancelDlpJobRequest(properties); }; /** - * Encodes the specified InspectJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * Encodes the specified CancelDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InspectJobConfig.encode = function encode(message, writer) { + CancelDlpJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) - $root.google.privacy.dlp.v2.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) - $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplateName); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.privacy.dlp.v2.Action.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified InspectJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * Encodes the specified CancelDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InspectJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + CancelDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InspectJobConfig message from the specified reader or buffer. + * Decodes a CancelDlpJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @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.InspectJobConfig} InspectJobConfig + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InspectJobConfig.decode = function decode(reader, length) { + CancelDlpJobRequest.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.InspectJobConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CancelDlpJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.decode(reader, reader.uint32()); - break; - case 2: - message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32()); - break; - case 3: - message.inspectTemplateName = reader.string(); - break; - case 4: - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.privacy.dlp.v2.Action.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -35393,170 +38627,107 @@ }; /** - * Decodes an InspectJobConfig message from the specified reader or buffer, length delimited. + * Decodes a CancelDlpJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InspectJobConfig.decodeDelimited = function decodeDelimited(reader) { + CancelDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InspectJobConfig message. + * Verifies a CancelDlpJobRequest message. * @function verify - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InspectJobConfig.verify = function verify(message) { + CancelDlpJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { - var error = $root.google.privacy.dlp.v2.StorageConfig.verify(message.storageConfig); - if (error) - return "storageConfig." + error; - } - if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { - var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig); - if (error) - return "inspectConfig." + error; - } - if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) - if (!$util.isString(message.inspectTemplateName)) - return "inspectTemplateName: string expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.privacy.dlp.v2.Action.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an InspectJobConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CancelDlpJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest */ - InspectJobConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.InspectJobConfig) + CancelDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CancelDlpJobRequest) return object; - var message = new $root.google.privacy.dlp.v2.InspectJobConfig(); - if (object.storageConfig != null) { - if (typeof object.storageConfig !== "object") - throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.storageConfig: object expected"); - message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.fromObject(object.storageConfig); - } - if (object.inspectConfig != null) { - if (typeof object.inspectConfig !== "object") - throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.inspectConfig: object expected"); - message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig); - } - if (object.inspectTemplateName != null) - message.inspectTemplateName = String(object.inspectTemplateName); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: object expected"); - message.actions[i] = $root.google.privacy.dlp.v2.Action.fromObject(object.actions[i]); - } - } + var message = new $root.google.privacy.dlp.v2.CancelDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an InspectJobConfig message. Also converts values to other types if specified. + * Creates a plain object from a CancelDlpJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @static - * @param {google.privacy.dlp.v2.InspectJobConfig} message InspectJobConfig + * @param {google.privacy.dlp.v2.CancelDlpJobRequest} message CancelDlpJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InspectJobConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (options.defaults) { - object.storageConfig = null; - object.inspectConfig = null; - object.inspectTemplateName = ""; - } - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) - object.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.toObject(message.storageConfig, options); - if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) - object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); - if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) - object.inspectTemplateName = message.inspectTemplateName; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.privacy.dlp.v2.Action.toObject(message.actions[j], options); - } + * @returns {Object.} Plain object + */ + CancelDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this InspectJobConfig to JSON. + * Converts this CancelDlpJobRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.InspectJobConfig + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest * @instance * @returns {Object.} JSON object */ - InspectJobConfig.prototype.toJSON = function toJSON() { + CancelDlpJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InspectJobConfig; + return CancelDlpJobRequest; })(); - v2.DlpJob = (function() { + v2.FinishDlpJobRequest = (function() { /** - * Properties of a DlpJob. + * Properties of a FinishDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @interface IDlpJob - * @property {string|null} [name] DlpJob name - * @property {google.privacy.dlp.v2.DlpJobType|null} [type] DlpJob type - * @property {google.privacy.dlp.v2.DlpJob.JobState|null} [state] DlpJob state - * @property {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null} [riskDetails] DlpJob riskDetails - * @property {google.privacy.dlp.v2.IInspectDataSourceDetails|null} [inspectDetails] DlpJob inspectDetails - * @property {google.protobuf.ITimestamp|null} [createTime] DlpJob createTime - * @property {google.protobuf.ITimestamp|null} [startTime] DlpJob startTime - * @property {google.protobuf.ITimestamp|null} [endTime] DlpJob endTime - * @property {string|null} [jobTriggerName] DlpJob jobTriggerName - * @property {Array.|null} [errors] DlpJob errors + * @interface IFinishDlpJobRequest + * @property {string|null} [name] FinishDlpJobRequest name */ /** - * Constructs a new DlpJob. + * Constructs a new FinishDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DlpJob. - * @implements IDlpJob + * @classdesc Represents a FinishDlpJobRequest. + * @implements IFinishDlpJobRequest * @constructor - * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest=} [properties] Properties to set */ - function DlpJob(properties) { - this.errors = []; + function FinishDlpJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35564,210 +38735,263 @@ } /** - * DlpJob name. + * FinishDlpJobRequest name. * @member {string} name - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest * @instance */ - DlpJob.prototype.name = ""; + FinishDlpJobRequest.prototype.name = ""; /** - * DlpJob type. - * @member {google.privacy.dlp.v2.DlpJobType} type - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Creates a new FinishDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest instance */ - DlpJob.prototype.type = 0; + FinishDlpJobRequest.create = function create(properties) { + return new FinishDlpJobRequest(properties); + }; /** - * DlpJob state. - * @member {google.privacy.dlp.v2.DlpJob.JobState} state - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Encodes the specified FinishDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} message FinishDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DlpJob.prototype.state = 0; + FinishDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * DlpJob riskDetails. - * @member {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null|undefined} riskDetails - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Encodes the specified FinishDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} message FinishDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DlpJob.prototype.riskDetails = null; + FinishDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * DlpJob inspectDetails. - * @member {google.privacy.dlp.v2.IInspectDataSourceDetails|null|undefined} inspectDetails - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Decodes a FinishDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @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.FinishDlpJobRequest} FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DlpJob.prototype.inspectDetails = null; + FinishDlpJobRequest.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.FinishDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * DlpJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Decodes a FinishDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DlpJob.prototype.createTime = null; + FinishDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * DlpJob startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Verifies a FinishDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DlpJob.prototype.startTime = null; + FinishDlpJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * DlpJob endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Creates a FinishDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest */ - DlpJob.prototype.endTime = null; + FinishDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.FinishDlpJobRequest) + return object; + var message = new $root.google.privacy.dlp.v2.FinishDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * DlpJob jobTriggerName. - * @member {string} jobTriggerName - * @memberof google.privacy.dlp.v2.DlpJob - * @instance + * Creates a plain object from a FinishDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.FinishDlpJobRequest} message FinishDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DlpJob.prototype.jobTriggerName = ""; + FinishDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * DlpJob errors. - * @member {Array.} errors - * @memberof google.privacy.dlp.v2.DlpJob + * Converts this FinishDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest * @instance + * @returns {Object.} JSON object */ - DlpJob.prototype.errors = $util.emptyArray; + FinishDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return FinishDlpJobRequest; + })(); + + v2.DeleteDlpJobRequest = (function() { /** - * DlpJob details. - * @member {"riskDetails"|"inspectDetails"|undefined} details - * @memberof google.privacy.dlp.v2.DlpJob + * Properties of a DeleteDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteDlpJobRequest + * @property {string|null} [name] DeleteDlpJobRequest name + */ + + /** + * Constructs a new DeleteDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteDlpJobRequest. + * @implements IDeleteDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set + */ + function DeleteDlpJobRequest(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]]; + } + + /** + * DeleteDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @instance */ - Object.defineProperty(DlpJob.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["riskDetails", "inspectDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteDlpJobRequest.prototype.name = ""; /** - * Creates a new DlpJob instance using the specified properties. + * Creates a new DeleteDlpJobRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DlpJob} DlpJob instance + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest instance */ - DlpJob.create = function create(properties) { - return new DlpJob(properties); + DeleteDlpJobRequest.create = function create(properties) { + return new DeleteDlpJobRequest(properties); }; /** - * Encodes the specified DlpJob message. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DlpJob.encode = function encode(message, writer) { + DeleteDlpJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) - $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.encode(message.riskDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) - $root.google.privacy.dlp.v2.InspectDataSourceDetails.encode(message.inspectDetails, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jobTriggerName); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified DlpJob message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DlpJob.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DlpJob message from the specified reader or buffer. + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @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.DlpJob} DlpJob + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DlpJob.decode = function decode(reader, length) { + DeleteDlpJobRequest.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.DlpJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteDlpJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.decode(reader, reader.uint32()); - break; - case 5: - message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.decode(reader, reader.uint32()); - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.jobTriggerName = reader.string(); - break; - case 11: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -35777,309 +39001,110 @@ }; /** - * Decodes a DlpJob message from the specified reader or buffer, length delimited. + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DlpJob} DlpJob + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DlpJob.decodeDelimited = function decodeDelimited(reader) { + DeleteDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DlpJob message. + * Verifies a DeleteDlpJobRequest message. * @function verify - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DlpJob.verify = function verify(message) { + DeleteDlpJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { - properties.details = 1; - { - var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify(message.riskDetails); - if (error) - return "riskDetails." + error; - } - } - if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.privacy.dlp.v2.InspectDataSourceDetails.verify(message.inspectDetails); - if (error) - return "inspectDetails." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) - if (!$util.isString(message.jobTriggerName)) - return "jobTriggerName: string expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } return null; }; /** - * Creates a DlpJob message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDlpJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DlpJob} DlpJob + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest */ - DlpJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DlpJob) + DeleteDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteDlpJobRequest) return object; - var message = new $root.google.privacy.dlp.v2.DlpJob(); + var message = new $root.google.privacy.dlp.v2.DeleteDlpJobRequest(); if (object.name != null) message.name = String(object.name); - switch (object.type) { - case "DLP_JOB_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INSPECT_JOB": - case 1: - message.type = 1; - break; - case "RISK_ANALYSIS_JOB": - case 2: - message.type = 2; - break; - } - switch (object.state) { - case "JOB_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "DONE": - case 3: - message.state = 3; - break; - case "CANCELED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - } - if (object.riskDetails != null) { - if (typeof object.riskDetails !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.riskDetails: object expected"); - message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.fromObject(object.riskDetails); - } - if (object.inspectDetails != null) { - if (typeof object.inspectDetails !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.inspectDetails: object expected"); - message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.fromObject(object.inspectDetails); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.jobTriggerName != null) - message.jobTriggerName = String(object.jobTriggerName); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: object expected"); - message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); - } - } return message; }; /** - * Creates a plain object from a DlpJob message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDlpJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @static - * @param {google.privacy.dlp.v2.DlpJob} message DlpJob + * @param {google.privacy.dlp.v2.DeleteDlpJobRequest} message DeleteDlpJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DlpJob.toObject = function toObject(message, options) { + DeleteDlpJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "JOB_STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.startTime = null; - object.endTime = null; - object.jobTriggerName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.privacy.dlp.v2.DlpJob.JobState[message.state] : message.state; - if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { - object.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.toObject(message.riskDetails, options); - if (options.oneofs) - object.details = "riskDetails"; - } - if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { - object.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.toObject(message.inspectDetails, options); - if (options.oneofs) - object.details = "inspectDetails"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) - object.jobTriggerName = message.jobTriggerName; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DlpJob to JSON. + * Converts this DeleteDlpJobRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DlpJob + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest * @instance * @returns {Object.} JSON object */ - DlpJob.prototype.toJSON = function toJSON() { + DeleteDlpJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * JobState enum. - * @name google.privacy.dlp.v2.DlpJob.JobState - * @enum {string} - * @property {number} JOB_STATE_UNSPECIFIED=0 JOB_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} DONE=3 DONE value - * @property {number} CANCELED=4 CANCELED value - * @property {number} FAILED=5 FAILED value - */ - DlpJob.JobState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JOB_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "DONE"] = 3; - values[valuesById[4] = "CANCELED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - return values; - })(); - - return DlpJob; + return DeleteDlpJobRequest; })(); - v2.GetDlpJobRequest = (function() { + v2.CreateDeidentifyTemplateRequest = (function() { /** - * Properties of a GetDlpJobRequest. + * Properties of a CreateDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @interface IGetDlpJobRequest - * @property {string|null} [name] GetDlpJobRequest name + * @interface ICreateDeidentifyTemplateRequest + * @property {string|null} [parent] CreateDeidentifyTemplateRequest parent + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] CreateDeidentifyTemplateRequest deidentifyTemplate + * @property {string|null} [templateId] CreateDeidentifyTemplateRequest templateId + * @property {string|null} [locationId] CreateDeidentifyTemplateRequest locationId */ /** - * Constructs a new GetDlpJobRequest. + * Constructs a new CreateDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a GetDlpJobRequest. - * @implements IGetDlpJobRequest + * @classdesc Represents a CreateDeidentifyTemplateRequest. + * @implements ICreateDeidentifyTemplateRequest * @constructor - * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set */ - function GetDlpJobRequest(properties) { + function CreateDeidentifyTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36087,75 +39112,114 @@ } /** - * GetDlpJobRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * CreateDeidentifyTemplateRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @instance */ - GetDlpJobRequest.prototype.name = ""; + CreateDeidentifyTemplateRequest.prototype.parent = ""; /** - * Creates a new GetDlpJobRequest instance using the specified properties. + * CreateDeidentifyTemplateRequest deidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; + + /** + * CreateDeidentifyTemplateRequest templateId. + * @member {string} templateId + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.templateId = ""; + + /** + * CreateDeidentifyTemplateRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.locationId = ""; + + /** + * Creates a new CreateDeidentifyTemplateRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest instance + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest instance */ - GetDlpJobRequest.create = function create(properties) { - return new GetDlpJobRequest(properties); + CreateDeidentifyTemplateRequest.create = function create(properties) { + return new CreateDeidentifyTemplateRequest(properties); }; /** - * Encodes the specified GetDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * Encodes the specified CreateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDlpJobRequest.encode = function encode(message, writer) { + CreateDeidentifyTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.templateId != null && message.hasOwnProperty("templateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); return writer; }; /** - * Encodes the specified GetDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * Encodes the specified CreateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDlpJobRequest message from the specified reader or buffer. + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @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.GetDlpJobRequest} GetDlpJobRequest + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDlpJobRequest.decode = function decode(reader, length) { + CreateDeidentifyTemplateRequest.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.GetDlpJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32()); + break; + case 3: + message.templateId = reader.string(); + break; + case 4: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -36166,113 +39230,139 @@ }; /** - * Decodes a GetDlpJobRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + CreateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDlpJobRequest message. + * Verifies a CreateDeidentifyTemplateRequest message. * @function verify - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDlpJobRequest.verify = function verify(message) { + CreateDeidentifyTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate); + if (error) + return "deidentifyTemplate." + error; + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a GetDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest */ - GetDlpJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.GetDlpJobRequest) + CreateDeidentifyTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) return object; - var message = new $root.google.privacy.dlp.v2.GetDlpJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deidentifyTemplate != null) { + if (typeof object.deidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate); + } + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a GetDlpJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDeidentifyTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.GetDlpJobRequest} message GetDlpJobRequest + * @param {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDlpJobRequest.toObject = function toObject(message, options) { + CreateDeidentifyTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.deidentifyTemplate = null; + object.templateId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); + if (message.templateId != null && message.hasOwnProperty("templateId")) + object.templateId = message.templateId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this GetDlpJobRequest to JSON. + * Converts this CreateDeidentifyTemplateRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest * @instance * @returns {Object.} JSON object */ - GetDlpJobRequest.prototype.toJSON = function toJSON() { + CreateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDlpJobRequest; + return CreateDeidentifyTemplateRequest; })(); - v2.ListDlpJobsRequest = (function() { + v2.UpdateDeidentifyTemplateRequest = (function() { /** - * Properties of a ListDlpJobsRequest. + * Properties of an UpdateDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @interface IListDlpJobsRequest - * @property {string|null} [parent] ListDlpJobsRequest parent - * @property {string|null} [filter] ListDlpJobsRequest filter - * @property {number|null} [pageSize] ListDlpJobsRequest pageSize - * @property {string|null} [pageToken] ListDlpJobsRequest pageToken - * @property {google.privacy.dlp.v2.DlpJobType|null} [type] ListDlpJobsRequest type - * @property {string|null} [orderBy] ListDlpJobsRequest orderBy - * @property {string|null} [locationId] ListDlpJobsRequest locationId + * @interface IUpdateDeidentifyTemplateRequest + * @property {string|null} [name] UpdateDeidentifyTemplateRequest name + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] UpdateDeidentifyTemplateRequest deidentifyTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeidentifyTemplateRequest updateMask */ /** - * Constructs a new ListDlpJobsRequest. + * Constructs a new UpdateDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListDlpJobsRequest. - * @implements IListDlpJobsRequest + * @classdesc Represents an UpdateDeidentifyTemplateRequest. + * @implements IUpdateDeidentifyTemplateRequest * @constructor - * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set */ - function ListDlpJobsRequest(properties) { + function UpdateDeidentifyTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36280,153 +39370,101 @@ } /** - * ListDlpJobsRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest - * @instance - */ - ListDlpJobsRequest.prototype.parent = ""; - - /** - * ListDlpJobsRequest filter. - * @member {string} filter - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest - * @instance - */ - ListDlpJobsRequest.prototype.filter = ""; - - /** - * ListDlpJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest - * @instance - */ - ListDlpJobsRequest.prototype.pageSize = 0; - - /** - * ListDlpJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest - * @instance - */ - ListDlpJobsRequest.prototype.pageToken = ""; - - /** - * ListDlpJobsRequest type. - * @member {google.privacy.dlp.v2.DlpJobType} type - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * UpdateDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @instance */ - ListDlpJobsRequest.prototype.type = 0; + UpdateDeidentifyTemplateRequest.prototype.name = ""; /** - * ListDlpJobsRequest orderBy. - * @member {string} orderBy - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * UpdateDeidentifyTemplateRequest deidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @instance */ - ListDlpJobsRequest.prototype.orderBy = ""; + UpdateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; /** - * ListDlpJobsRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * UpdateDeidentifyTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @instance */ - ListDlpJobsRequest.prototype.locationId = ""; + UpdateDeidentifyTemplateRequest.prototype.updateMask = null; /** - * Creates a new ListDlpJobsRequest instance using the specified properties. + * Creates a new UpdateDeidentifyTemplateRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest instance + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest instance */ - ListDlpJobsRequest.create = function create(properties) { - return new ListDlpJobsRequest(properties); + UpdateDeidentifyTemplateRequest.create = function create(properties) { + return new UpdateDeidentifyTemplateRequest(properties); }; /** - * Encodes the specified ListDlpJobsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * Encodes the specified UpdateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDlpJobsRequest.encode = function encode(message, writer) { + UpdateDeidentifyTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); - if (message.type != null && message.hasOwnProperty("type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDlpJobsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * Encodes the specified UpdateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDlpJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDlpJobsRequest message from the specified reader or buffer. + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @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.ListDlpJobsRequest} ListDlpJobsRequest + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDlpJobsRequest.decode = function decode(reader, length) { + UpdateDeidentifyTemplateRequest.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.ListDlpJobsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.parent = reader.string(); - break; case 1: - message.filter = reader.string(); + message.name = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32()); break; case 3: - message.pageToken = reader.string(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.orderBy = reader.string(); - break; - case 7: - message.locationId = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -36437,176 +39475,134 @@ }; /** - * Decodes a ListDlpJobsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDlpJobsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDlpJobsRequest message. + * Verifies an UpdateDeidentifyTemplateRequest message. * @function verify - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDlpJobsRequest.verify = function verify(message) { + UpdateDeidentifyTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate); + if (error) + return "deidentifyTemplate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a ListDlpJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest */ - ListDlpJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsRequest) + UpdateDeidentifyTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListDlpJobsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - switch (object.type) { - case "DLP_JOB_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INSPECT_JOB": - case 1: - message.type = 1; - break; - case "RISK_ANALYSIS_JOB": - case 2: - message.type = 2; - break; + var message = new $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.deidentifyTemplate != null) { + if (typeof object.deidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.locationId != null) - message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a ListDlpJobsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDeidentifyTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.ListDlpJobsRequest} message ListDlpJobsRequest + * @param {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDlpJobsRequest.toObject = function toObject(message, options) { + UpdateDeidentifyTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.parent = ""; - object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; - object.orderBy = ""; - object.locationId = ""; + var object = {}; + if (options.defaults) { + object.name = ""; + object.deidentifyTemplate = null; + object.updateMask = null; } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListDlpJobsRequest to JSON. + * Converts this UpdateDeidentifyTemplateRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest * @instance * @returns {Object.} JSON object */ - ListDlpJobsRequest.prototype.toJSON = function toJSON() { + UpdateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDlpJobsRequest; + return UpdateDeidentifyTemplateRequest; })(); - v2.ListDlpJobsResponse = (function() { + v2.GetDeidentifyTemplateRequest = (function() { /** - * Properties of a ListDlpJobsResponse. + * Properties of a GetDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @interface IListDlpJobsResponse - * @property {Array.|null} [jobs] ListDlpJobsResponse jobs - * @property {string|null} [nextPageToken] ListDlpJobsResponse nextPageToken + * @interface IGetDeidentifyTemplateRequest + * @property {string|null} [name] GetDeidentifyTemplateRequest name */ /** - * Constructs a new ListDlpJobsResponse. + * Constructs a new GetDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListDlpJobsResponse. - * @implements IListDlpJobsResponse + * @classdesc Represents a GetDeidentifyTemplateRequest. + * @implements IGetDeidentifyTemplateRequest * @constructor - * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set */ - function ListDlpJobsResponse(properties) { - this.jobs = []; + function GetDeidentifyTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36614,91 +39610,75 @@ } /** - * ListDlpJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse - * @instance - */ - ListDlpJobsResponse.prototype.jobs = $util.emptyArray; - - /** - * ListDlpJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * GetDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @instance */ - ListDlpJobsResponse.prototype.nextPageToken = ""; + GetDeidentifyTemplateRequest.prototype.name = ""; /** - * Creates a new ListDlpJobsResponse instance using the specified properties. + * Creates a new GetDeidentifyTemplateRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse instance + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest instance */ - ListDlpJobsResponse.create = function create(properties) { - return new ListDlpJobsResponse(properties); + GetDeidentifyTemplateRequest.create = function create(properties) { + return new GetDeidentifyTemplateRequest(properties); }; /** - * Encodes the specified ListDlpJobsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * Encodes the specified GetDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDlpJobsResponse.encode = function encode(message, writer) { + GetDeidentifyTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.privacy.dlp.v2.DlpJob.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListDlpJobsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * Encodes the specified GetDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDlpJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDlpJobsResponse message from the specified reader or buffer. + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @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.ListDlpJobsResponse} ListDlpJobsResponse + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDlpJobsResponse.decode = function decode(reader, length) { + GetDeidentifyTemplateRequest.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.ListDlpJobsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.privacy.dlp.v2.DlpJob.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -36709,133 +39689,111 @@ }; /** - * Decodes a ListDlpJobsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDlpJobsResponse.decodeDelimited = function decodeDelimited(reader) { + GetDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDlpJobsResponse message. + * Verifies a GetDeidentifyTemplateRequest message. * @function verify - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDlpJobsResponse.verify = function verify(message) { + GetDeidentifyTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.privacy.dlp.v2.DlpJob.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListDlpJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest */ - ListDlpJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsResponse) + GetDeidentifyTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) return object; - var message = new $root.google.privacy.dlp.v2.ListDlpJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.privacy.dlp.v2.DlpJob.fromObject(object.jobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListDlpJobsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetDeidentifyTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.ListDlpJobsResponse} message ListDlpJobsResponse + * @param {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDlpJobsResponse.toObject = function toObject(message, options) { + GetDeidentifyTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.privacy.dlp.v2.DlpJob.toObject(message.jobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListDlpJobsResponse to JSON. + * Converts this GetDeidentifyTemplateRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest * @instance * @returns {Object.} JSON object */ - ListDlpJobsResponse.prototype.toJSON = function toJSON() { + GetDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDlpJobsResponse; + return GetDeidentifyTemplateRequest; })(); - v2.CancelDlpJobRequest = (function() { + v2.ListDeidentifyTemplatesRequest = (function() { /** - * Properties of a CancelDlpJobRequest. + * Properties of a ListDeidentifyTemplatesRequest. * @memberof google.privacy.dlp.v2 - * @interface ICancelDlpJobRequest - * @property {string|null} [name] CancelDlpJobRequest name + * @interface IListDeidentifyTemplatesRequest + * @property {string|null} [parent] ListDeidentifyTemplatesRequest parent + * @property {string|null} [pageToken] ListDeidentifyTemplatesRequest pageToken + * @property {number|null} [pageSize] ListDeidentifyTemplatesRequest pageSize + * @property {string|null} [orderBy] ListDeidentifyTemplatesRequest orderBy + * @property {string|null} [locationId] ListDeidentifyTemplatesRequest locationId */ /** - * Constructs a new CancelDlpJobRequest. + * Constructs a new ListDeidentifyTemplatesRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CancelDlpJobRequest. - * @implements ICancelDlpJobRequest + * @classdesc Represents a ListDeidentifyTemplatesRequest. + * @implements IListDeidentifyTemplatesRequest * @constructor - * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set */ - function CancelDlpJobRequest(properties) { + function ListDeidentifyTemplatesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36843,75 +39801,127 @@ } /** - * CancelDlpJobRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * ListDeidentifyTemplatesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @instance */ - CancelDlpJobRequest.prototype.name = ""; + ListDeidentifyTemplatesRequest.prototype.parent = ""; /** - * Creates a new CancelDlpJobRequest instance using the specified properties. + * ListDeidentifyTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.pageToken = ""; + + /** + * ListDeidentifyTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.pageSize = 0; + + /** + * ListDeidentifyTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.orderBy = ""; + + /** + * ListDeidentifyTemplatesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.locationId = ""; + + /** + * Creates a new ListDeidentifyTemplatesRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static - * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest instance + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest instance */ - CancelDlpJobRequest.create = function create(properties) { - return new CancelDlpJobRequest(properties); + ListDeidentifyTemplatesRequest.create = function create(properties) { + return new ListDeidentifyTemplatesRequest(properties); }; /** - * Encodes the specified CancelDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * Encodes the specified ListDeidentifyTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static - * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelDlpJobRequest.encode = function encode(message, writer) { + ListDeidentifyTemplatesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); return writer; }; /** - * Encodes the specified CancelDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * Encodes the specified ListDeidentifyTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static - * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeidentifyTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelDlpJobRequest message from the specified reader or buffer. + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @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.CancelDlpJobRequest} CancelDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelDlpJobRequest.decode = function decode(reader, length) { + ListDeidentifyTemplatesRequest.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.CancelDlpJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageToken = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.orderBy = reader.string(); + break; + case 5: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -36922,107 +39932,142 @@ }; /** - * Decodes a CancelDlpJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeidentifyTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelDlpJobRequest message. + * Verifies a ListDeidentifyTemplatesRequest message. * @function verify - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelDlpJobRequest.verify = function verify(message) { + ListDeidentifyTemplatesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a CancelDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeidentifyTemplatesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest */ - CancelDlpJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CancelDlpJobRequest) + ListDeidentifyTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) return object; - var message = new $root.google.privacy.dlp.v2.CancelDlpJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a CancelDlpJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeidentifyTemplatesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @static - * @param {google.privacy.dlp.v2.CancelDlpJobRequest} message CancelDlpJobRequest + * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelDlpJobRequest.toObject = function toObject(message, options) { + ListDeidentifyTemplatesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this CancelDlpJobRequest to JSON. + * Converts this ListDeidentifyTemplatesRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest * @instance * @returns {Object.} JSON object */ - CancelDlpJobRequest.prototype.toJSON = function toJSON() { + ListDeidentifyTemplatesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CancelDlpJobRequest; + return ListDeidentifyTemplatesRequest; })(); - v2.DeleteDlpJobRequest = (function() { + v2.ListDeidentifyTemplatesResponse = (function() { /** - * Properties of a DeleteDlpJobRequest. + * Properties of a ListDeidentifyTemplatesResponse. * @memberof google.privacy.dlp.v2 - * @interface IDeleteDlpJobRequest - * @property {string|null} [name] DeleteDlpJobRequest name + * @interface IListDeidentifyTemplatesResponse + * @property {Array.|null} [deidentifyTemplates] ListDeidentifyTemplatesResponse deidentifyTemplates + * @property {string|null} [nextPageToken] ListDeidentifyTemplatesResponse nextPageToken */ /** - * Constructs a new DeleteDlpJobRequest. + * Constructs a new ListDeidentifyTemplatesResponse. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DeleteDlpJobRequest. - * @implements IDeleteDlpJobRequest + * @classdesc Represents a ListDeidentifyTemplatesResponse. + * @implements IListDeidentifyTemplatesResponse * @constructor - * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set */ - function DeleteDlpJobRequest(properties) { + function ListDeidentifyTemplatesResponse(properties) { + this.deidentifyTemplates = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37030,75 +40075,91 @@ } /** - * DeleteDlpJobRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * ListDeidentifyTemplatesResponse deidentifyTemplates. + * @member {Array.} deidentifyTemplates + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @instance */ - DeleteDlpJobRequest.prototype.name = ""; + ListDeidentifyTemplatesResponse.prototype.deidentifyTemplates = $util.emptyArray; /** - * Creates a new DeleteDlpJobRequest instance using the specified properties. + * ListDeidentifyTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @instance + */ + ListDeidentifyTemplatesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDeidentifyTemplatesResponse instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static - * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest instance + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse instance */ - DeleteDlpJobRequest.create = function create(properties) { - return new DeleteDlpJobRequest(properties); + ListDeidentifyTemplatesResponse.create = function create(properties) { + return new ListDeidentifyTemplatesResponse(properties); }; /** - * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * Encodes the specified ListDeidentifyTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static - * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDlpJobRequest.encode = function encode(message, writer) { + ListDeidentifyTemplatesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.deidentifyTemplates != null && message.deidentifyTemplates.length) + for (var i = 0; i < message.deidentifyTemplates.length; ++i) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * Encodes the specified ListDeidentifyTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static - * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDeidentifyTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @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.DeleteDlpJobRequest} DeleteDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDlpJobRequest.decode = function decode(reader, length) { + ListDeidentifyTemplatesResponse.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.DeleteDlpJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.deidentifyTemplates && message.deidentifyTemplates.length)) + message.deidentifyTemplates = []; + message.deidentifyTemplates.push($root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -37109,110 +40170,133 @@ }; /** - * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListDeidentifyTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDlpJobRequest message. + * Verifies a ListDeidentifyTemplatesResponse message. * @function verify - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDlpJobRequest.verify = function verify(message) { + ListDeidentifyTemplatesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.deidentifyTemplates != null && message.hasOwnProperty("deidentifyTemplates")) { + if (!Array.isArray(message.deidentifyTemplates)) + return "deidentifyTemplates: array expected"; + for (var i = 0; i < message.deidentifyTemplates.length; ++i) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplates[i]); + if (error) + return "deidentifyTemplates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDeidentifyTemplatesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse */ - DeleteDlpJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DeleteDlpJobRequest) + ListDeidentifyTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) return object; - var message = new $root.google.privacy.dlp.v2.DeleteDlpJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); + if (object.deidentifyTemplates) { + if (!Array.isArray(object.deidentifyTemplates)) + throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: array expected"); + message.deidentifyTemplates = []; + for (var i = 0; i < object.deidentifyTemplates.length; ++i) { + if (typeof object.deidentifyTemplates[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: object expected"); + message.deidentifyTemplates[i] = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteDlpJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDeidentifyTemplatesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @static - * @param {google.privacy.dlp.v2.DeleteDlpJobRequest} message DeleteDlpJobRequest + * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDlpJobRequest.toObject = function toObject(message, options) { + ListDeidentifyTemplatesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.deidentifyTemplates = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.deidentifyTemplates && message.deidentifyTemplates.length) { + object.deidentifyTemplates = []; + for (var j = 0; j < message.deidentifyTemplates.length; ++j) + object.deidentifyTemplates[j] = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteDlpJobRequest to JSON. + * Converts this ListDeidentifyTemplatesResponse to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse * @instance * @returns {Object.} JSON object */ - DeleteDlpJobRequest.prototype.toJSON = function toJSON() { + ListDeidentifyTemplatesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDlpJobRequest; + return ListDeidentifyTemplatesResponse; })(); - v2.CreateDeidentifyTemplateRequest = (function() { + v2.DeleteDeidentifyTemplateRequest = (function() { /** - * Properties of a CreateDeidentifyTemplateRequest. + * Properties of a DeleteDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @interface ICreateDeidentifyTemplateRequest - * @property {string|null} [parent] CreateDeidentifyTemplateRequest parent - * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] CreateDeidentifyTemplateRequest deidentifyTemplate - * @property {string|null} [templateId] CreateDeidentifyTemplateRequest templateId - * @property {string|null} [locationId] CreateDeidentifyTemplateRequest locationId + * @interface IDeleteDeidentifyTemplateRequest + * @property {string|null} [name] DeleteDeidentifyTemplateRequest name */ /** - * Constructs a new CreateDeidentifyTemplateRequest. + * Constructs a new DeleteDeidentifyTemplateRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CreateDeidentifyTemplateRequest. - * @implements ICreateDeidentifyTemplateRequest + * @classdesc Represents a DeleteDeidentifyTemplateRequest. + * @implements IDeleteDeidentifyTemplateRequest * @constructor - * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set */ - function CreateDeidentifyTemplateRequest(properties) { + function DeleteDeidentifyTemplateRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37220,114 +40304,75 @@ } /** - * CreateDeidentifyTemplateRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest - * @instance - */ - CreateDeidentifyTemplateRequest.prototype.parent = ""; - - /** - * CreateDeidentifyTemplateRequest deidentifyTemplate. - * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest - * @instance - */ - CreateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; - - /** - * CreateDeidentifyTemplateRequest templateId. - * @member {string} templateId - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest - * @instance - */ - CreateDeidentifyTemplateRequest.prototype.templateId = ""; - - /** - * CreateDeidentifyTemplateRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * DeleteDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @instance */ - CreateDeidentifyTemplateRequest.prototype.locationId = ""; + DeleteDeidentifyTemplateRequest.prototype.name = ""; /** - * Creates a new CreateDeidentifyTemplateRequest instance using the specified properties. + * Creates a new DeleteDeidentifyTemplateRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest instance + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest instance */ - CreateDeidentifyTemplateRequest.create = function create(properties) { - return new CreateDeidentifyTemplateRequest(properties); + DeleteDeidentifyTemplateRequest.create = function create(properties) { + return new DeleteDeidentifyTemplateRequest(properties); }; /** - * Encodes the specified CreateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeidentifyTemplateRequest.encode = function encode(message, writer) { + DeleteDeidentifyTemplateRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.templateId != null && message.hasOwnProperty("templateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified DeleteDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer. + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @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.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeidentifyTemplateRequest.decode = function decode(reader, length) { + DeleteDeidentifyTemplateRequest.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.CreateDeidentifyTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32()); - break; - case 3: - message.templateId = reader.string(); - break; - case 4: - message.locationId = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -37338,139 +40383,109 @@ }; /** - * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDeidentifyTemplateRequest message. + * Verifies a DeleteDeidentifyTemplateRequest message. * @function verify - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDeidentifyTemplateRequest.verify = function verify(message) { + DeleteDeidentifyTemplateRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { - var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate); - if (error) - return "deidentifyTemplate." + error; - } - if (message.templateId != null && message.hasOwnProperty("templateId")) - if (!$util.isString(message.templateId)) - return "templateId: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest */ - CreateDeidentifyTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + DeleteDeidentifyTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) return object; - var message = new $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.deidentifyTemplate != null) { - if (typeof object.deidentifyTemplate !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); - message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate); - } - if (object.templateId != null) - message.templateId = String(object.templateId); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDeidentifyTemplateRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @static - * @param {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest + * @param {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDeidentifyTemplateRequest.toObject = function toObject(message, options) { + DeleteDeidentifyTemplateRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.deidentifyTemplate = null; - object.templateId = ""; - object.locationId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); - if (message.templateId != null && message.hasOwnProperty("templateId")) - object.templateId = message.templateId; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateDeidentifyTemplateRequest to JSON. + * Converts this DeleteDeidentifyTemplateRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest * @instance * @returns {Object.} JSON object */ - CreateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + DeleteDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDeidentifyTemplateRequest; + return DeleteDeidentifyTemplateRequest; })(); - v2.UpdateDeidentifyTemplateRequest = (function() { + v2.LargeCustomDictionaryConfig = (function() { /** - * Properties of an UpdateDeidentifyTemplateRequest. + * Properties of a LargeCustomDictionaryConfig. * @memberof google.privacy.dlp.v2 - * @interface IUpdateDeidentifyTemplateRequest - * @property {string|null} [name] UpdateDeidentifyTemplateRequest name - * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] UpdateDeidentifyTemplateRequest deidentifyTemplate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeidentifyTemplateRequest updateMask + * @interface ILargeCustomDictionaryConfig + * @property {google.privacy.dlp.v2.ICloudStoragePath|null} [outputPath] LargeCustomDictionaryConfig outputPath + * @property {google.privacy.dlp.v2.ICloudStorageFileSet|null} [cloudStorageFileSet] LargeCustomDictionaryConfig cloudStorageFileSet + * @property {google.privacy.dlp.v2.IBigQueryField|null} [bigQueryField] LargeCustomDictionaryConfig bigQueryField */ /** - * Constructs a new UpdateDeidentifyTemplateRequest. + * Constructs a new LargeCustomDictionaryConfig. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an UpdateDeidentifyTemplateRequest. - * @implements IUpdateDeidentifyTemplateRequest + * @classdesc Represents a LargeCustomDictionaryConfig. + * @implements ILargeCustomDictionaryConfig * @constructor - * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set */ - function UpdateDeidentifyTemplateRequest(properties) { + function LargeCustomDictionaryConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37478,101 +40493,115 @@ } /** - * UpdateDeidentifyTemplateRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * LargeCustomDictionaryConfig outputPath. + * @member {google.privacy.dlp.v2.ICloudStoragePath|null|undefined} outputPath + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @instance */ - UpdateDeidentifyTemplateRequest.prototype.name = ""; + LargeCustomDictionaryConfig.prototype.outputPath = null; /** - * UpdateDeidentifyTemplateRequest deidentifyTemplate. - * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * LargeCustomDictionaryConfig cloudStorageFileSet. + * @member {google.privacy.dlp.v2.ICloudStorageFileSet|null|undefined} cloudStorageFileSet + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @instance */ - UpdateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; + LargeCustomDictionaryConfig.prototype.cloudStorageFileSet = null; /** - * UpdateDeidentifyTemplateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * LargeCustomDictionaryConfig bigQueryField. + * @member {google.privacy.dlp.v2.IBigQueryField|null|undefined} bigQueryField + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @instance */ - UpdateDeidentifyTemplateRequest.prototype.updateMask = null; + LargeCustomDictionaryConfig.prototype.bigQueryField = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new UpdateDeidentifyTemplateRequest instance using the specified properties. + * LargeCustomDictionaryConfig source. + * @member {"cloudStorageFileSet"|"bigQueryField"|undefined} source + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + */ + Object.defineProperty(LargeCustomDictionaryConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageFileSet", "bigQueryField"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LargeCustomDictionaryConfig instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static - * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest instance + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig instance */ - UpdateDeidentifyTemplateRequest.create = function create(properties) { - return new UpdateDeidentifyTemplateRequest(properties); + LargeCustomDictionaryConfig.create = function create(properties) { + return new LargeCustomDictionaryConfig(properties); }; /** - * Encodes the specified UpdateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified LargeCustomDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static - * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeidentifyTemplateRequest.encode = function encode(message, writer) { + LargeCustomDictionaryConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + $root.google.privacy.dlp.v2.CloudStoragePath.encode(message.outputPath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) + $root.google.privacy.dlp.v2.CloudStorageFileSet.encode(message.cloudStorageFileSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) + $root.google.privacy.dlp.v2.BigQueryField.encode(message.bigQueryField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified LargeCustomDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static - * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + LargeCustomDictionaryConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer. + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @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.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeidentifyTemplateRequest.decode = function decode(reader, length) { + LargeCustomDictionaryConfig.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.UpdateDeidentifyTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.decode(reader, reader.uint32()); break; case 2: - message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32()); + message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -37583,134 +40612,151 @@ }; /** - * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + LargeCustomDictionaryConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDeidentifyTemplateRequest message. + * Verifies a LargeCustomDictionaryConfig message. * @function verify - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDeidentifyTemplateRequest.verify = function verify(message) { + LargeCustomDictionaryConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { - var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate); + var properties = {}; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) { + var error = $root.google.privacy.dlp.v2.CloudStoragePath.verify(message.outputPath); if (error) - return "deidentifyTemplate." + error; + return "outputPath." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageFileSet.verify(message.cloudStorageFileSet); + if (error) + return "cloudStorageFileSet." + error; + } + } + if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryField.verify(message.bigQueryField); + if (error) + return "bigQueryField." + error; + } } return null; }; /** - * Creates an UpdateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LargeCustomDictionaryConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig */ - UpdateDeidentifyTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + LargeCustomDictionaryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig) return object; - var message = new $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.deidentifyTemplate != null) { - if (typeof object.deidentifyTemplate !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); - message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate); + var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); + if (object.outputPath != null) { + if (typeof object.outputPath !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.outputPath: object expected"); + message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.fromObject(object.outputPath); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.cloudStorageFileSet != null) { + if (typeof object.cloudStorageFileSet !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.cloudStorageFileSet: object expected"); + message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.fromObject(object.cloudStorageFileSet); + } + if (object.bigQueryField != null) { + if (typeof object.bigQueryField !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.bigQueryField: object expected"); + message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.fromObject(object.bigQueryField); } return message; }; /** - * Creates a plain object from an UpdateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a LargeCustomDictionaryConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @static - * @param {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest + * @param {google.privacy.dlp.v2.LargeCustomDictionaryConfig} message LargeCustomDictionaryConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDeidentifyTemplateRequest.toObject = function toObject(message, options) { + LargeCustomDictionaryConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.deidentifyTemplate = null; - object.updateMask = null; + if (options.defaults) + object.outputPath = null; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + object.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.toObject(message.outputPath, options); + if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { + object.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.toObject(message.cloudStorageFileSet, options); + if (options.oneofs) + object.source = "cloudStorageFileSet"; + } + if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { + object.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.toObject(message.bigQueryField, options); + if (options.oneofs) + object.source = "bigQueryField"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateDeidentifyTemplateRequest to JSON. + * Converts this LargeCustomDictionaryConfig to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig * @instance * @returns {Object.} JSON object */ - UpdateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + LargeCustomDictionaryConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDeidentifyTemplateRequest; + return LargeCustomDictionaryConfig; })(); - v2.GetDeidentifyTemplateRequest = (function() { + v2.LargeCustomDictionaryStats = (function() { /** - * Properties of a GetDeidentifyTemplateRequest. + * Properties of a LargeCustomDictionaryStats. * @memberof google.privacy.dlp.v2 - * @interface IGetDeidentifyTemplateRequest - * @property {string|null} [name] GetDeidentifyTemplateRequest name + * @interface ILargeCustomDictionaryStats + * @property {number|Long|null} [approxNumPhrases] LargeCustomDictionaryStats approxNumPhrases */ /** - * Constructs a new GetDeidentifyTemplateRequest. + * Constructs a new LargeCustomDictionaryStats. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a GetDeidentifyTemplateRequest. - * @implements IGetDeidentifyTemplateRequest + * @classdesc Represents a LargeCustomDictionaryStats. + * @implements ILargeCustomDictionaryStats * @constructor - * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set */ - function GetDeidentifyTemplateRequest(properties) { + function LargeCustomDictionaryStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37718,75 +40764,75 @@ } /** - * GetDeidentifyTemplateRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * LargeCustomDictionaryStats approxNumPhrases. + * @member {number|Long} approxNumPhrases + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @instance */ - GetDeidentifyTemplateRequest.prototype.name = ""; + LargeCustomDictionaryStats.prototype.approxNumPhrases = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GetDeidentifyTemplateRequest instance using the specified properties. + * Creates a new LargeCustomDictionaryStats instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static - * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest instance + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats instance */ - GetDeidentifyTemplateRequest.create = function create(properties) { - return new GetDeidentifyTemplateRequest(properties); + LargeCustomDictionaryStats.create = function create(properties) { + return new LargeCustomDictionaryStats(properties); }; /** - * Encodes the specified GetDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified LargeCustomDictionaryStats message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static - * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeidentifyTemplateRequest.encode = function encode(message, writer) { + LargeCustomDictionaryStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.approxNumPhrases); return writer; }; /** - * Encodes the specified GetDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified LargeCustomDictionaryStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static - * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + LargeCustomDictionaryStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer. + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @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.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeidentifyTemplateRequest.decode = function decode(reader, length) { + LargeCustomDictionaryStats.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.GetDeidentifyTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.approxNumPhrases = reader.int64(); break; default: reader.skipType(tag & 7); @@ -37797,111 +40843,125 @@ }; /** - * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + LargeCustomDictionaryStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDeidentifyTemplateRequest message. + * Verifies a LargeCustomDictionaryStats message. * @function verify - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDeidentifyTemplateRequest.verify = function verify(message) { + LargeCustomDictionaryStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) + if (!$util.isInteger(message.approxNumPhrases) && !(message.approxNumPhrases && $util.isInteger(message.approxNumPhrases.low) && $util.isInteger(message.approxNumPhrases.high))) + return "approxNumPhrases: integer|Long expected"; return null; }; /** - * Creates a GetDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LargeCustomDictionaryStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats */ - GetDeidentifyTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + LargeCustomDictionaryStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryStats) return object; - var message = new $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryStats(); + if (object.approxNumPhrases != null) + if ($util.Long) + (message.approxNumPhrases = $util.Long.fromValue(object.approxNumPhrases)).unsigned = false; + else if (typeof object.approxNumPhrases === "string") + message.approxNumPhrases = parseInt(object.approxNumPhrases, 10); + else if (typeof object.approxNumPhrases === "number") + message.approxNumPhrases = object.approxNumPhrases; + else if (typeof object.approxNumPhrases === "object") + message.approxNumPhrases = new $util.LongBits(object.approxNumPhrases.low >>> 0, object.approxNumPhrases.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a GetDeidentifyTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a LargeCustomDictionaryStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @static - * @param {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest + * @param {google.privacy.dlp.v2.LargeCustomDictionaryStats} message LargeCustomDictionaryStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDeidentifyTemplateRequest.toObject = function toObject(message, options) { + LargeCustomDictionaryStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.approxNumPhrases = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.approxNumPhrases = options.longs === String ? "0" : 0; + if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) + if (typeof message.approxNumPhrases === "number") + object.approxNumPhrases = options.longs === String ? String(message.approxNumPhrases) : message.approxNumPhrases; + else + object.approxNumPhrases = options.longs === String ? $util.Long.prototype.toString.call(message.approxNumPhrases) : options.longs === Number ? new $util.LongBits(message.approxNumPhrases.low >>> 0, message.approxNumPhrases.high >>> 0).toNumber() : message.approxNumPhrases; return object; }; /** - * Converts this GetDeidentifyTemplateRequest to JSON. + * Converts this LargeCustomDictionaryStats to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats * @instance * @returns {Object.} JSON object */ - GetDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + LargeCustomDictionaryStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDeidentifyTemplateRequest; + return LargeCustomDictionaryStats; })(); - v2.ListDeidentifyTemplatesRequest = (function() { + v2.StoredInfoTypeConfig = (function() { /** - * Properties of a ListDeidentifyTemplatesRequest. + * Properties of a StoredInfoTypeConfig. * @memberof google.privacy.dlp.v2 - * @interface IListDeidentifyTemplatesRequest - * @property {string|null} [parent] ListDeidentifyTemplatesRequest parent - * @property {string|null} [pageToken] ListDeidentifyTemplatesRequest pageToken - * @property {number|null} [pageSize] ListDeidentifyTemplatesRequest pageSize - * @property {string|null} [orderBy] ListDeidentifyTemplatesRequest orderBy - * @property {string|null} [locationId] ListDeidentifyTemplatesRequest locationId + * @interface IStoredInfoTypeConfig + * @property {string|null} [displayName] StoredInfoTypeConfig displayName + * @property {string|null} [description] StoredInfoTypeConfig description + * @property {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null} [largeCustomDictionary] StoredInfoTypeConfig largeCustomDictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IDictionary|null} [dictionary] StoredInfoTypeConfig dictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [regex] StoredInfoTypeConfig regex */ /** - * Constructs a new ListDeidentifyTemplatesRequest. + * Constructs a new StoredInfoTypeConfig. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListDeidentifyTemplatesRequest. - * @implements IListDeidentifyTemplatesRequest + * @classdesc Represents a StoredInfoTypeConfig. + * @implements IStoredInfoTypeConfig * @constructor - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set */ - function ListDeidentifyTemplatesRequest(properties) { + function StoredInfoTypeConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37909,127 +40969,141 @@ } /** - * ListDeidentifyTemplatesRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * StoredInfoTypeConfig displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance */ - ListDeidentifyTemplatesRequest.prototype.parent = ""; + StoredInfoTypeConfig.prototype.displayName = ""; /** - * ListDeidentifyTemplatesRequest pageToken. - * @member {string} pageToken - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * StoredInfoTypeConfig description. + * @member {string} description + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance */ - ListDeidentifyTemplatesRequest.prototype.pageToken = ""; + StoredInfoTypeConfig.prototype.description = ""; /** - * ListDeidentifyTemplatesRequest pageSize. - * @member {number} pageSize - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * StoredInfoTypeConfig largeCustomDictionary. + * @member {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null|undefined} largeCustomDictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance */ - ListDeidentifyTemplatesRequest.prototype.pageSize = 0; + StoredInfoTypeConfig.prototype.largeCustomDictionary = null; /** - * ListDeidentifyTemplatesRequest orderBy. - * @member {string} orderBy - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * StoredInfoTypeConfig dictionary. + * @member {google.privacy.dlp.v2.CustomInfoType.IDictionary|null|undefined} dictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance */ - ListDeidentifyTemplatesRequest.prototype.orderBy = ""; + StoredInfoTypeConfig.prototype.dictionary = null; /** - * ListDeidentifyTemplatesRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * StoredInfoTypeConfig regex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} regex + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance */ - ListDeidentifyTemplatesRequest.prototype.locationId = ""; + StoredInfoTypeConfig.prototype.regex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListDeidentifyTemplatesRequest instance using the specified properties. + * StoredInfoTypeConfig type. + * @member {"largeCustomDictionary"|"dictionary"|"regex"|undefined} type + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + Object.defineProperty(StoredInfoTypeConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary", "dictionary", "regex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StoredInfoTypeConfig instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest instance + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig instance */ - ListDeidentifyTemplatesRequest.create = function create(properties) { - return new ListDeidentifyTemplatesRequest(properties); + StoredInfoTypeConfig.create = function create(properties) { + return new StoredInfoTypeConfig(properties); }; /** - * Encodes the specified ListDeidentifyTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * Encodes the specified StoredInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeidentifyTemplatesRequest.encode = function encode(message, writer) { + StoredInfoTypeConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) + $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.encode(message.largeCustomDictionary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dictionary != null && message.hasOwnProperty("dictionary")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.encode(message.dictionary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.regex != null && message.hasOwnProperty("regex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.regex, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeidentifyTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * Encodes the specified StoredInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeidentifyTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + StoredInfoTypeConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer. + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @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.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeidentifyTemplatesRequest.decode = function decode(reader, length) { + StoredInfoTypeConfig.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.ListDeidentifyTemplatesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.displayName = reader.string(); break; case 2: - message.pageToken = reader.string(); + message.description = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.decode(reader, reader.uint32()); break; case 4: - message.orderBy = reader.string(); + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.decode(reader, reader.uint32()); break; case 5: - message.locationId = reader.string(); + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -38040,142 +41114,175 @@ }; /** - * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer, length delimited. + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeidentifyTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + StoredInfoTypeConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeidentifyTemplatesRequest message. + * Verifies a StoredInfoTypeConfig message. * @function verify - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeidentifyTemplatesRequest.verify = function verify(message) { + StoredInfoTypeConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify(message.largeCustomDictionary); + if (error) + return "largeCustomDictionary." + error; + } + } + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.verify(message.dictionary); + if (error) + return "dictionary." + error; + } + } + if (message.regex != null && message.hasOwnProperty("regex")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.regex); + if (error) + return "regex." + error; + } + } return null; }; /** - * Creates a ListDeidentifyTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StoredInfoTypeConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig */ - ListDeidentifyTemplatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + StoredInfoTypeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeConfig) return object; - var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeConfig(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.largeCustomDictionary != null) { + if (typeof object.largeCustomDictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.largeCustomDictionary: object expected"); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.fromObject(object.largeCustomDictionary); + } + if (object.dictionary != null) { + if (typeof object.dictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.dictionary: object expected"); + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.fromObject(object.dictionary); + } + if (object.regex != null) { + if (typeof object.regex !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.regex: object expected"); + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.regex); + } return message; }; /** - * Creates a plain object from a ListDeidentifyTemplatesRequest message. Also converts values to other types if specified. + * Creates a plain object from a StoredInfoTypeConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @static - * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest + * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} message StoredInfoTypeConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeidentifyTemplatesRequest.toObject = function toObject(message, options) { + StoredInfoTypeConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - object.orderBy = ""; - object.locationId = ""; + object.displayName = ""; + object.description = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.toObject(message.largeCustomDictionary, options); + if (options.oneofs) + object.type = "largeCustomDictionary"; + } + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + object.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.toObject(message.dictionary, options); + if (options.oneofs) + object.type = "dictionary"; + } + if (message.regex != null && message.hasOwnProperty("regex")) { + object.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.regex, options); + if (options.oneofs) + object.type = "regex"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; return object; }; /** - * Converts this ListDeidentifyTemplatesRequest to JSON. + * Converts this StoredInfoTypeConfig to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig * @instance * @returns {Object.} JSON object */ - ListDeidentifyTemplatesRequest.prototype.toJSON = function toJSON() { + StoredInfoTypeConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeidentifyTemplatesRequest; + return StoredInfoTypeConfig; })(); - v2.ListDeidentifyTemplatesResponse = (function() { + v2.StoredInfoTypeStats = (function() { /** - * Properties of a ListDeidentifyTemplatesResponse. + * Properties of a StoredInfoTypeStats. * @memberof google.privacy.dlp.v2 - * @interface IListDeidentifyTemplatesResponse - * @property {Array.|null} [deidentifyTemplates] ListDeidentifyTemplatesResponse deidentifyTemplates - * @property {string|null} [nextPageToken] ListDeidentifyTemplatesResponse nextPageToken + * @interface IStoredInfoTypeStats + * @property {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null} [largeCustomDictionary] StoredInfoTypeStats largeCustomDictionary */ /** - * Constructs a new ListDeidentifyTemplatesResponse. + * Constructs a new StoredInfoTypeStats. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListDeidentifyTemplatesResponse. - * @implements IListDeidentifyTemplatesResponse + * @classdesc Represents a StoredInfoTypeStats. + * @implements IStoredInfoTypeStats * @constructor - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set */ - function ListDeidentifyTemplatesResponse(properties) { - this.deidentifyTemplates = []; + function StoredInfoTypeStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38183,91 +41290,89 @@ } /** - * ListDeidentifyTemplatesResponse deidentifyTemplates. - * @member {Array.} deidentifyTemplates - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * StoredInfoTypeStats largeCustomDictionary. + * @member {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null|undefined} largeCustomDictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @instance */ - ListDeidentifyTemplatesResponse.prototype.deidentifyTemplates = $util.emptyArray; + StoredInfoTypeStats.prototype.largeCustomDictionary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListDeidentifyTemplatesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * StoredInfoTypeStats type. + * @member {"largeCustomDictionary"|undefined} type + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @instance */ - ListDeidentifyTemplatesResponse.prototype.nextPageToken = ""; + Object.defineProperty(StoredInfoTypeStats.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListDeidentifyTemplatesResponse instance using the specified properties. + * Creates a new StoredInfoTypeStats instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse instance + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats instance */ - ListDeidentifyTemplatesResponse.create = function create(properties) { - return new ListDeidentifyTemplatesResponse(properties); + StoredInfoTypeStats.create = function create(properties) { + return new StoredInfoTypeStats(properties); }; /** - * Encodes the specified ListDeidentifyTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * Encodes the specified StoredInfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeidentifyTemplatesResponse.encode = function encode(message, writer) { + StoredInfoTypeStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deidentifyTemplates != null && message.deidentifyTemplates.length) - for (var i = 0; i < message.deidentifyTemplates.length; ++i) - $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) + $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.encode(message.largeCustomDictionary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListDeidentifyTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * Encodes the specified StoredInfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static - * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDeidentifyTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + StoredInfoTypeStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer. + * Decodes a StoredInfoTypeStats message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @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.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeidentifyTemplatesResponse.decode = function decode(reader, length) { + StoredInfoTypeStats.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.ListDeidentifyTemplatesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.deidentifyTemplates && message.deidentifyTemplates.length)) - message.deidentifyTemplates = []; - message.deidentifyTemplates.push($root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -38278,133 +41383,122 @@ }; /** - * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer, length delimited. + * Decodes a StoredInfoTypeStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDeidentifyTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + StoredInfoTypeStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDeidentifyTemplatesResponse message. + * Verifies a StoredInfoTypeStats message. * @function verify - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDeidentifyTemplatesResponse.verify = function verify(message) { + StoredInfoTypeStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deidentifyTemplates != null && message.hasOwnProperty("deidentifyTemplates")) { - if (!Array.isArray(message.deidentifyTemplates)) - return "deidentifyTemplates: array expected"; - for (var i = 0; i < message.deidentifyTemplates.length; ++i) { - var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplates[i]); + var properties = {}; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.verify(message.largeCustomDictionary); if (error) - return "deidentifyTemplates." + error; + return "largeCustomDictionary." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListDeidentifyTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a StoredInfoTypeStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats */ - ListDeidentifyTemplatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + StoredInfoTypeStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeStats) return object; - var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); - if (object.deidentifyTemplates) { - if (!Array.isArray(object.deidentifyTemplates)) - throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: array expected"); - message.deidentifyTemplates = []; - for (var i = 0; i < object.deidentifyTemplates.length; ++i) { - if (typeof object.deidentifyTemplates[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: object expected"); - message.deidentifyTemplates[i] = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplates[i]); - } + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeStats(); + if (object.largeCustomDictionary != null) { + if (typeof object.largeCustomDictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeStats.largeCustomDictionary: object expected"); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.fromObject(object.largeCustomDictionary); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListDeidentifyTemplatesResponse message. Also converts values to other types if specified. + * Creates a plain object from a StoredInfoTypeStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @static - * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse + * @param {google.privacy.dlp.v2.StoredInfoTypeStats} message StoredInfoTypeStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDeidentifyTemplatesResponse.toObject = function toObject(message, options) { + StoredInfoTypeStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.deidentifyTemplates = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.deidentifyTemplates && message.deidentifyTemplates.length) { - object.deidentifyTemplates = []; - for (var j = 0; j < message.deidentifyTemplates.length; ++j) - object.deidentifyTemplates[j] = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplates[j], options); + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.toObject(message.largeCustomDictionary, options); + if (options.oneofs) + object.type = "largeCustomDictionary"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListDeidentifyTemplatesResponse to JSON. + * Converts this StoredInfoTypeStats to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats * @instance * @returns {Object.} JSON object */ - ListDeidentifyTemplatesResponse.prototype.toJSON = function toJSON() { + StoredInfoTypeStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDeidentifyTemplatesResponse; + return StoredInfoTypeStats; })(); - v2.DeleteDeidentifyTemplateRequest = (function() { + v2.StoredInfoTypeVersion = (function() { /** - * Properties of a DeleteDeidentifyTemplateRequest. + * Properties of a StoredInfoTypeVersion. * @memberof google.privacy.dlp.v2 - * @interface IDeleteDeidentifyTemplateRequest - * @property {string|null} [name] DeleteDeidentifyTemplateRequest name + * @interface IStoredInfoTypeVersion + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] StoredInfoTypeVersion config + * @property {google.protobuf.ITimestamp|null} [createTime] StoredInfoTypeVersion createTime + * @property {google.privacy.dlp.v2.StoredInfoTypeState|null} [state] StoredInfoTypeVersion state + * @property {Array.|null} [errors] StoredInfoTypeVersion errors + * @property {google.privacy.dlp.v2.IStoredInfoTypeStats|null} [stats] StoredInfoTypeVersion stats */ /** - * Constructs a new DeleteDeidentifyTemplateRequest. + * Constructs a new StoredInfoTypeVersion. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DeleteDeidentifyTemplateRequest. - * @implements IDeleteDeidentifyTemplateRequest + * @classdesc Represents a StoredInfoTypeVersion. + * @implements IStoredInfoTypeVersion * @constructor - * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set */ - function DeleteDeidentifyTemplateRequest(properties) { + function StoredInfoTypeVersion(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38412,75 +41506,130 @@ } /** - * DeleteDeidentifyTemplateRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * StoredInfoTypeVersion config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @instance */ - DeleteDeidentifyTemplateRequest.prototype.name = ""; + StoredInfoTypeVersion.prototype.config = null; /** - * Creates a new DeleteDeidentifyTemplateRequest instance using the specified properties. + * StoredInfoTypeVersion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.createTime = null; + + /** + * StoredInfoTypeVersion state. + * @member {google.privacy.dlp.v2.StoredInfoTypeState} state + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.state = 0; + + /** + * StoredInfoTypeVersion errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.errors = $util.emptyArray; + + /** + * StoredInfoTypeVersion stats. + * @member {google.privacy.dlp.v2.IStoredInfoTypeStats|null|undefined} stats + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.stats = null; + + /** + * Creates a new StoredInfoTypeVersion instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static - * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest instance + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion instance */ - DeleteDeidentifyTemplateRequest.create = function create(properties) { - return new DeleteDeidentifyTemplateRequest(properties); + StoredInfoTypeVersion.create = function create(properties) { + return new StoredInfoTypeVersion(properties); }; /** - * Encodes the specified DeleteDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified StoredInfoTypeVersion message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static - * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeidentifyTemplateRequest.encode = function encode(message, writer) { + StoredInfoTypeVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && message.hasOwnProperty("stats")) + $root.google.privacy.dlp.v2.StoredInfoTypeStats.encode(message.stats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * Encodes the specified StoredInfoTypeVersion message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static - * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + StoredInfoTypeVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer. + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @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.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeidentifyTemplateRequest.decode = function decode(reader, length) { + StoredInfoTypeVersion.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.DeleteDeidentifyTemplateRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeVersion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); + break; + case 5: + message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -38491,109 +41640,204 @@ }; /** - * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + StoredInfoTypeVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDeidentifyTemplateRequest message. + * Verifies a StoredInfoTypeVersion message. * @function verify - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDeidentifyTemplateRequest.verify = function verify(message) { + StoredInfoTypeVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeStats.verify(message.stats); + if (error) + return "stats." + error; + } return null; }; /** - * Creates a DeleteDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StoredInfoTypeVersion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion */ - DeleteDeidentifyTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + StoredInfoTypeVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeVersion) return object; - var message = new $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeVersion(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + switch (object.state) { + case "STORED_INFO_TYPE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "INVALID": + case 4: + message.state = 4; + break; + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); + } + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.stats: object expected"); + message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.fromObject(object.stats); + } return message; }; /** - * Creates a plain object from a DeleteDeidentifyTemplateRequest message. Also converts values to other types if specified. + * Creates a plain object from a StoredInfoTypeVersion message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @static - * @param {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest + * @param {google.privacy.dlp.v2.StoredInfoTypeVersion} message StoredInfoTypeVersion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDeidentifyTemplateRequest.toObject = function toObject(message, options) { + StoredInfoTypeVersion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.config = null; + object.createTime = null; + object.state = options.enums === String ? "STORED_INFO_TYPE_STATE_UNSPECIFIED" : 0; + object.stats = null; + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.StoredInfoTypeState[message.state] : message.state; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.toObject(message.stats, options); return object; }; /** - * Converts this DeleteDeidentifyTemplateRequest to JSON. + * Converts this StoredInfoTypeVersion to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion * @instance * @returns {Object.} JSON object */ - DeleteDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + StoredInfoTypeVersion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDeidentifyTemplateRequest; + return StoredInfoTypeVersion; })(); - v2.LargeCustomDictionaryConfig = (function() { + v2.StoredInfoType = (function() { /** - * Properties of a LargeCustomDictionaryConfig. + * Properties of a StoredInfoType. * @memberof google.privacy.dlp.v2 - * @interface ILargeCustomDictionaryConfig - * @property {google.privacy.dlp.v2.ICloudStoragePath|null} [outputPath] LargeCustomDictionaryConfig outputPath - * @property {google.privacy.dlp.v2.ICloudStorageFileSet|null} [cloudStorageFileSet] LargeCustomDictionaryConfig cloudStorageFileSet - * @property {google.privacy.dlp.v2.IBigQueryField|null} [bigQueryField] LargeCustomDictionaryConfig bigQueryField + * @interface IStoredInfoType + * @property {string|null} [name] StoredInfoType name + * @property {google.privacy.dlp.v2.IStoredInfoTypeVersion|null} [currentVersion] StoredInfoType currentVersion + * @property {Array.|null} [pendingVersions] StoredInfoType pendingVersions */ /** - * Constructs a new LargeCustomDictionaryConfig. + * Constructs a new StoredInfoType. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a LargeCustomDictionaryConfig. - * @implements ILargeCustomDictionaryConfig + * @classdesc Represents a StoredInfoType. + * @implements IStoredInfoType * @constructor - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set */ - function LargeCustomDictionaryConfig(properties) { + function StoredInfoType(properties) { + this.pendingVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38601,115 +41845,104 @@ } /** - * LargeCustomDictionaryConfig outputPath. - * @member {google.privacy.dlp.v2.ICloudStoragePath|null|undefined} outputPath - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig - * @instance - */ - LargeCustomDictionaryConfig.prototype.outputPath = null; - - /** - * LargeCustomDictionaryConfig cloudStorageFileSet. - * @member {google.privacy.dlp.v2.ICloudStorageFileSet|null|undefined} cloudStorageFileSet - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * StoredInfoType name. + * @member {string} name + * @memberof google.privacy.dlp.v2.StoredInfoType * @instance */ - LargeCustomDictionaryConfig.prototype.cloudStorageFileSet = null; + StoredInfoType.prototype.name = ""; /** - * LargeCustomDictionaryConfig bigQueryField. - * @member {google.privacy.dlp.v2.IBigQueryField|null|undefined} bigQueryField - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * StoredInfoType currentVersion. + * @member {google.privacy.dlp.v2.IStoredInfoTypeVersion|null|undefined} currentVersion + * @memberof google.privacy.dlp.v2.StoredInfoType * @instance */ - LargeCustomDictionaryConfig.prototype.bigQueryField = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + StoredInfoType.prototype.currentVersion = null; /** - * LargeCustomDictionaryConfig source. - * @member {"cloudStorageFileSet"|"bigQueryField"|undefined} source - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * StoredInfoType pendingVersions. + * @member {Array.} pendingVersions + * @memberof google.privacy.dlp.v2.StoredInfoType * @instance */ - Object.defineProperty(LargeCustomDictionaryConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["cloudStorageFileSet", "bigQueryField"]), - set: $util.oneOfSetter($oneOfFields) - }); + StoredInfoType.prototype.pendingVersions = $util.emptyArray; /** - * Creates a new LargeCustomDictionaryConfig instance using the specified properties. + * Creates a new StoredInfoType instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig instance + * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType instance */ - LargeCustomDictionaryConfig.create = function create(properties) { - return new LargeCustomDictionaryConfig(properties); + StoredInfoType.create = function create(properties) { + return new StoredInfoType(properties); }; /** - * Encodes the specified LargeCustomDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * Encodes the specified StoredInfoType message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LargeCustomDictionaryConfig.encode = function encode(message, writer) { + StoredInfoType.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - $root.google.privacy.dlp.v2.CloudStoragePath.encode(message.outputPath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) - $root.google.privacy.dlp.v2.CloudStorageFileSet.encode(message.cloudStorageFileSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) - $root.google.privacy.dlp.v2.BigQueryField.encode(message.bigQueryField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.currentVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingVersions != null && message.pendingVersions.length) + for (var i = 0; i < message.pendingVersions.length; ++i) + $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.pendingVersions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified LargeCustomDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * Encodes the specified StoredInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LargeCustomDictionaryConfig.encodeDelimited = function encodeDelimited(message, writer) { + StoredInfoType.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer. + * Decodes a StoredInfoType message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @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.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LargeCustomDictionaryConfig.decode = function decode(reader, length) { + StoredInfoType.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.LargeCustomDictionaryConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoType(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.decode(reader, reader.uint32()); + message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32()); break; case 3: - message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.decode(reader, reader.uint32()); + if (!(message.pendingVersions && message.pendingVersions.length)) + message.pendingVersions = []; + message.pendingVersions.push($root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -38720,151 +41953,150 @@ }; /** - * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer, length delimited. + * Decodes a StoredInfoType message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LargeCustomDictionaryConfig.decodeDelimited = function decodeDelimited(reader) { + StoredInfoType.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LargeCustomDictionaryConfig message. + * Verifies a StoredInfoType message. * @function verify - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LargeCustomDictionaryConfig.verify = function verify(message) { + StoredInfoType.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) { - var error = $root.google.privacy.dlp.v2.CloudStoragePath.verify(message.outputPath); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.currentVersion); if (error) - return "outputPath." + error; - } - if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { - properties.source = 1; - { - var error = $root.google.privacy.dlp.v2.CloudStorageFileSet.verify(message.cloudStorageFileSet); - if (error) - return "cloudStorageFileSet." + error; - } + return "currentVersion." + error; } - if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.privacy.dlp.v2.BigQueryField.verify(message.bigQueryField); + if (message.pendingVersions != null && message.hasOwnProperty("pendingVersions")) { + if (!Array.isArray(message.pendingVersions)) + return "pendingVersions: array expected"; + for (var i = 0; i < message.pendingVersions.length; ++i) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.pendingVersions[i]); if (error) - return "bigQueryField." + error; + return "pendingVersions." + error; } } return null; }; /** - * Creates a LargeCustomDictionaryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a StoredInfoType message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType */ - LargeCustomDictionaryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig) + StoredInfoType.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoType) return object; - var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); - if (object.outputPath != null) { - if (typeof object.outputPath !== "object") - throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.outputPath: object expected"); - message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.fromObject(object.outputPath); - } - if (object.cloudStorageFileSet != null) { - if (typeof object.cloudStorageFileSet !== "object") - throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.cloudStorageFileSet: object expected"); - message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.fromObject(object.cloudStorageFileSet); + var message = new $root.google.privacy.dlp.v2.StoredInfoType(); + if (object.name != null) + message.name = String(object.name); + if (object.currentVersion != null) { + if (typeof object.currentVersion !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.currentVersion: object expected"); + message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.currentVersion); } - if (object.bigQueryField != null) { - if (typeof object.bigQueryField !== "object") - throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.bigQueryField: object expected"); - message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.fromObject(object.bigQueryField); + if (object.pendingVersions) { + if (!Array.isArray(object.pendingVersions)) + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: array expected"); + message.pendingVersions = []; + for (var i = 0; i < object.pendingVersions.length; ++i) { + if (typeof object.pendingVersions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: object expected"); + message.pendingVersions[i] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.pendingVersions[i]); + } } return message; }; /** - * Creates a plain object from a LargeCustomDictionaryConfig message. Also converts values to other types if specified. + * Creates a plain object from a StoredInfoType message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @static - * @param {google.privacy.dlp.v2.LargeCustomDictionaryConfig} message LargeCustomDictionaryConfig + * @param {google.privacy.dlp.v2.StoredInfoType} message StoredInfoType * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LargeCustomDictionaryConfig.toObject = function toObject(message, options) { + StoredInfoType.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.outputPath = null; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - object.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.toObject(message.outputPath, options); - if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { - object.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.toObject(message.cloudStorageFileSet, options); - if (options.oneofs) - object.source = "cloudStorageFileSet"; + if (options.arrays || options.defaults) + object.pendingVersions = []; + if (options.defaults) { + object.name = ""; + object.currentVersion = null; } - if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { - object.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.toObject(message.bigQueryField, options); - if (options.oneofs) - object.source = "bigQueryField"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.currentVersion, options); + if (message.pendingVersions && message.pendingVersions.length) { + object.pendingVersions = []; + for (var j = 0; j < message.pendingVersions.length; ++j) + object.pendingVersions[j] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.pendingVersions[j], options); } return object; }; /** - * Converts this LargeCustomDictionaryConfig to JSON. + * Converts this StoredInfoType to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @memberof google.privacy.dlp.v2.StoredInfoType * @instance * @returns {Object.} JSON object */ - LargeCustomDictionaryConfig.prototype.toJSON = function toJSON() { + StoredInfoType.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LargeCustomDictionaryConfig; + return StoredInfoType; })(); - v2.LargeCustomDictionaryStats = (function() { + v2.CreateStoredInfoTypeRequest = (function() { /** - * Properties of a LargeCustomDictionaryStats. + * Properties of a CreateStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @interface ILargeCustomDictionaryStats - * @property {number|Long|null} [approxNumPhrases] LargeCustomDictionaryStats approxNumPhrases + * @interface ICreateStoredInfoTypeRequest + * @property {string|null} [parent] CreateStoredInfoTypeRequest parent + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] CreateStoredInfoTypeRequest config + * @property {string|null} [storedInfoTypeId] CreateStoredInfoTypeRequest storedInfoTypeId + * @property {string|null} [locationId] CreateStoredInfoTypeRequest locationId */ /** - * Constructs a new LargeCustomDictionaryStats. + * Constructs a new CreateStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a LargeCustomDictionaryStats. - * @implements ILargeCustomDictionaryStats + * @classdesc Represents a CreateStoredInfoTypeRequest. + * @implements ICreateStoredInfoTypeRequest * @constructor - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set */ - function LargeCustomDictionaryStats(properties) { + function CreateStoredInfoTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38872,75 +42104,114 @@ } /** - * LargeCustomDictionaryStats approxNumPhrases. - * @member {number|Long} approxNumPhrases - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * CreateStoredInfoTypeRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @instance */ - LargeCustomDictionaryStats.prototype.approxNumPhrases = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CreateStoredInfoTypeRequest.prototype.parent = ""; /** - * Creates a new LargeCustomDictionaryStats instance using the specified properties. + * CreateStoredInfoTypeRequest config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.config = null; + + /** + * CreateStoredInfoTypeRequest storedInfoTypeId. + * @member {string} storedInfoTypeId + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.storedInfoTypeId = ""; + + /** + * CreateStoredInfoTypeRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.locationId = ""; + + /** + * Creates a new CreateStoredInfoTypeRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats instance + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest instance */ - LargeCustomDictionaryStats.create = function create(properties) { - return new LargeCustomDictionaryStats(properties); + CreateStoredInfoTypeRequest.create = function create(properties) { + return new CreateStoredInfoTypeRequest(properties); }; /** - * Encodes the specified LargeCustomDictionaryStats message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * Encodes the specified CreateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LargeCustomDictionaryStats.encode = function encode(message, writer) { + CreateStoredInfoTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.approxNumPhrases); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.storedInfoTypeId); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); return writer; }; /** - * Encodes the specified LargeCustomDictionaryStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * Encodes the specified CreateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LargeCustomDictionaryStats.encodeDelimited = function encodeDelimited(message, writer) { + CreateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer. + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @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.LargeCustomDictionaryStats} LargeCustomDictionaryStats + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LargeCustomDictionaryStats.decode = function decode(reader, length) { + CreateStoredInfoTypeRequest.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.LargeCustomDictionaryStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.approxNumPhrases = reader.int64(); + message.parent = reader.string(); + break; + case 2: + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); + break; + case 3: + message.storedInfoTypeId = reader.string(); + break; + case 4: + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -38951,123 +42222,139 @@ }; /** - * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer, length delimited. + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LargeCustomDictionaryStats.decodeDelimited = function decodeDelimited(reader) { + CreateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LargeCustomDictionaryStats message. + * Verifies a CreateStoredInfoTypeRequest message. * @function verify - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LargeCustomDictionaryStats.verify = function verify(message) { + CreateStoredInfoTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) - if (!$util.isInteger(message.approxNumPhrases) && !(message.approxNumPhrases && $util.isInteger(message.approxNumPhrases.low) && $util.isInteger(message.approxNumPhrases.high))) - return "approxNumPhrases: integer|Long expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) + if (!$util.isString(message.storedInfoTypeId)) + return "storedInfoTypeId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a LargeCustomDictionaryStats message from a plain object. Also converts values to their respective internal types. + * Creates a CreateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest */ - LargeCustomDictionaryStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryStats) + CreateStoredInfoTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) return object; - var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryStats(); - if (object.approxNumPhrases != null) - if ($util.Long) - (message.approxNumPhrases = $util.Long.fromValue(object.approxNumPhrases)).unsigned = false; - else if (typeof object.approxNumPhrases === "string") - message.approxNumPhrases = parseInt(object.approxNumPhrases, 10); - else if (typeof object.approxNumPhrases === "number") - message.approxNumPhrases = object.approxNumPhrases; - else if (typeof object.approxNumPhrases === "object") - message.approxNumPhrases = new $util.LongBits(object.approxNumPhrases.low >>> 0, object.approxNumPhrases.high >>> 0).toNumber(); + var message = new $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateStoredInfoTypeRequest.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); + } + if (object.storedInfoTypeId != null) + message.storedInfoTypeId = String(object.storedInfoTypeId); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a LargeCustomDictionaryStats message. Also converts values to other types if specified. + * Creates a plain object from a CreateStoredInfoTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.LargeCustomDictionaryStats} message LargeCustomDictionaryStats + * @param {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LargeCustomDictionaryStats.toObject = function toObject(message, options) { + CreateStoredInfoTypeRequest.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.approxNumPhrases = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.approxNumPhrases = options.longs === String ? "0" : 0; - if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) - if (typeof message.approxNumPhrases === "number") - object.approxNumPhrases = options.longs === String ? String(message.approxNumPhrases) : message.approxNumPhrases; - else - object.approxNumPhrases = options.longs === String ? $util.Long.prototype.toString.call(message.approxNumPhrases) : options.longs === Number ? new $util.LongBits(message.approxNumPhrases.low >>> 0, message.approxNumPhrases.high >>> 0).toNumber() : message.approxNumPhrases; + if (options.defaults) { + object.parent = ""; + object.config = null; + object.storedInfoTypeId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) + object.storedInfoTypeId = message.storedInfoTypeId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this LargeCustomDictionaryStats to JSON. + * Converts this CreateStoredInfoTypeRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest * @instance * @returns {Object.} JSON object */ - LargeCustomDictionaryStats.prototype.toJSON = function toJSON() { + CreateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LargeCustomDictionaryStats; + return CreateStoredInfoTypeRequest; })(); - v2.StoredInfoTypeConfig = (function() { + v2.UpdateStoredInfoTypeRequest = (function() { /** - * Properties of a StoredInfoTypeConfig. + * Properties of an UpdateStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @interface IStoredInfoTypeConfig - * @property {string|null} [displayName] StoredInfoTypeConfig displayName - * @property {string|null} [description] StoredInfoTypeConfig description - * @property {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null} [largeCustomDictionary] StoredInfoTypeConfig largeCustomDictionary + * @interface IUpdateStoredInfoTypeRequest + * @property {string|null} [name] UpdateStoredInfoTypeRequest name + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] UpdateStoredInfoTypeRequest config + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoredInfoTypeRequest updateMask */ /** - * Constructs a new StoredInfoTypeConfig. + * Constructs a new UpdateStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a StoredInfoTypeConfig. - * @implements IStoredInfoTypeConfig + * @classdesc Represents an UpdateStoredInfoTypeRequest. + * @implements IUpdateStoredInfoTypeRequest * @constructor - * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set */ - function StoredInfoTypeConfig(properties) { + function UpdateStoredInfoTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39075,115 +42362,101 @@ } /** - * StoredInfoTypeConfig displayName. - * @member {string} displayName - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig - * @instance - */ - StoredInfoTypeConfig.prototype.displayName = ""; - - /** - * StoredInfoTypeConfig description. - * @member {string} description - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * UpdateStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @instance */ - StoredInfoTypeConfig.prototype.description = ""; + UpdateStoredInfoTypeRequest.prototype.name = ""; /** - * StoredInfoTypeConfig largeCustomDictionary. - * @member {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null|undefined} largeCustomDictionary - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * UpdateStoredInfoTypeRequest config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @instance */ - StoredInfoTypeConfig.prototype.largeCustomDictionary = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateStoredInfoTypeRequest.prototype.config = null; /** - * StoredInfoTypeConfig type. - * @member {"largeCustomDictionary"|undefined} type - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * UpdateStoredInfoTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @instance */ - Object.defineProperty(StoredInfoTypeConfig.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateStoredInfoTypeRequest.prototype.updateMask = null; /** - * Creates a new StoredInfoTypeConfig instance using the specified properties. + * Creates a new UpdateStoredInfoTypeRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig instance + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest instance */ - StoredInfoTypeConfig.create = function create(properties) { - return new StoredInfoTypeConfig(properties); + UpdateStoredInfoTypeRequest.create = function create(properties) { + return new UpdateStoredInfoTypeRequest(properties); }; /** - * Encodes the specified StoredInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * Encodes the specified UpdateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeConfig.encode = function encode(message, writer) { + UpdateStoredInfoTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) - $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.encode(message.largeCustomDictionary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && message.hasOwnProperty("config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified StoredInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * Encodes the specified UpdateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StoredInfoTypeConfig message from the specified reader or buffer. + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @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.StoredInfoTypeConfig} StoredInfoTypeConfig + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeConfig.decode = function decode(reader, length) { + UpdateStoredInfoTypeRequest.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.StoredInfoTypeConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); + message.name = reader.string(); break; case 2: - message.description = reader.string(); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); break; case 3: - message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -39194,135 +42467,134 @@ }; /** - * Decodes a StoredInfoTypeConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StoredInfoTypeConfig message. + * Verifies an UpdateStoredInfoTypeRequest message. * @function verify - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StoredInfoTypeConfig.verify = function verify(message) { + UpdateStoredInfoTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { - properties.type = 1; - { - var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify(message.largeCustomDictionary); - if (error) - return "largeCustomDictionary." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } return null; }; /** - * Creates a StoredInfoTypeConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest */ - StoredInfoTypeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeConfig) + UpdateStoredInfoTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) return object; - var message = new $root.google.privacy.dlp.v2.StoredInfoTypeConfig(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.largeCustomDictionary != null) { - if (typeof object.largeCustomDictionary !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.largeCustomDictionary: object expected"); - message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.fromObject(object.largeCustomDictionary); + var message = new $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a StoredInfoTypeConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateStoredInfoTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} message StoredInfoTypeConfig + * @param {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StoredInfoTypeConfig.toObject = function toObject(message, options) { + UpdateStoredInfoTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.displayName = ""; - object.description = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { - object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.toObject(message.largeCustomDictionary, options); - if (options.oneofs) - object.type = "largeCustomDictionary"; + object.name = ""; + object.config = null; + object.updateMask = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StoredInfoTypeConfig to JSON. + * Converts this UpdateStoredInfoTypeRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest * @instance * @returns {Object.} JSON object */ - StoredInfoTypeConfig.prototype.toJSON = function toJSON() { + UpdateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StoredInfoTypeConfig; + return UpdateStoredInfoTypeRequest; })(); - v2.StoredInfoTypeStats = (function() { + v2.GetStoredInfoTypeRequest = (function() { /** - * Properties of a StoredInfoTypeStats. + * Properties of a GetStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @interface IStoredInfoTypeStats - * @property {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null} [largeCustomDictionary] StoredInfoTypeStats largeCustomDictionary + * @interface IGetStoredInfoTypeRequest + * @property {string|null} [name] GetStoredInfoTypeRequest name */ /** - * Constructs a new StoredInfoTypeStats. + * Constructs a new GetStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a StoredInfoTypeStats. - * @implements IStoredInfoTypeStats + * @classdesc Represents a GetStoredInfoTypeRequest. + * @implements IGetStoredInfoTypeRequest * @constructor - * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set */ - function StoredInfoTypeStats(properties) { + function GetStoredInfoTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39330,89 +42602,75 @@ } /** - * StoredInfoTypeStats largeCustomDictionary. - * @member {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null|undefined} largeCustomDictionary - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats - * @instance - */ - StoredInfoTypeStats.prototype.largeCustomDictionary = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * StoredInfoTypeStats type. - * @member {"largeCustomDictionary"|undefined} type - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * GetStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @instance */ - Object.defineProperty(StoredInfoTypeStats.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetStoredInfoTypeRequest.prototype.name = ""; /** - * Creates a new StoredInfoTypeStats instance using the specified properties. + * Creates a new GetStoredInfoTypeRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats instance + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest instance */ - StoredInfoTypeStats.create = function create(properties) { - return new StoredInfoTypeStats(properties); + GetStoredInfoTypeRequest.create = function create(properties) { + return new GetStoredInfoTypeRequest(properties); }; /** - * Encodes the specified StoredInfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * Encodes the specified GetStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeStats.encode = function encode(message, writer) { + GetStoredInfoTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) - $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.encode(message.largeCustomDictionary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified StoredInfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * Encodes the specified GetStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeStats.encodeDelimited = function encodeDelimited(message, writer) { + GetStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StoredInfoTypeStats message from the specified reader or buffer. + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @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.StoredInfoTypeStats} StoredInfoTypeStats + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeStats.decode = function decode(reader, length) { + GetStoredInfoTypeRequest.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.StoredInfoTypeStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -39423,122 +42681,111 @@ }; /** - * Decodes a StoredInfoTypeStats message from the specified reader or buffer, length delimited. + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeStats.decodeDelimited = function decodeDelimited(reader) { + GetStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StoredInfoTypeStats message. + * Verifies a GetStoredInfoTypeRequest message. * @function verify - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StoredInfoTypeStats.verify = function verify(message) { + GetStoredInfoTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { - properties.type = 1; - { - var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.verify(message.largeCustomDictionary); - if (error) - return "largeCustomDictionary." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a StoredInfoTypeStats message from a plain object. Also converts values to their respective internal types. + * Creates a GetStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest */ - StoredInfoTypeStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeStats) + GetStoredInfoTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest) return object; - var message = new $root.google.privacy.dlp.v2.StoredInfoTypeStats(); - if (object.largeCustomDictionary != null) { - if (typeof object.largeCustomDictionary !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeStats.largeCustomDictionary: object expected"); - message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.fromObject(object.largeCustomDictionary); - } + var message = new $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a StoredInfoTypeStats message. Also converts values to other types if specified. + * Creates a plain object from a GetStoredInfoTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.StoredInfoTypeStats} message StoredInfoTypeStats + * @param {google.privacy.dlp.v2.GetStoredInfoTypeRequest} message GetStoredInfoTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StoredInfoTypeStats.toObject = function toObject(message, options) { + GetStoredInfoTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { - object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.toObject(message.largeCustomDictionary, options); - if (options.oneofs) - object.type = "largeCustomDictionary"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this StoredInfoTypeStats to JSON. + * Converts this GetStoredInfoTypeRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest * @instance * @returns {Object.} JSON object */ - StoredInfoTypeStats.prototype.toJSON = function toJSON() { + GetStoredInfoTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StoredInfoTypeStats; + return GetStoredInfoTypeRequest; })(); - v2.StoredInfoTypeVersion = (function() { + v2.ListStoredInfoTypesRequest = (function() { /** - * Properties of a StoredInfoTypeVersion. + * Properties of a ListStoredInfoTypesRequest. * @memberof google.privacy.dlp.v2 - * @interface IStoredInfoTypeVersion - * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] StoredInfoTypeVersion config - * @property {google.protobuf.ITimestamp|null} [createTime] StoredInfoTypeVersion createTime - * @property {google.privacy.dlp.v2.StoredInfoTypeState|null} [state] StoredInfoTypeVersion state - * @property {Array.|null} [errors] StoredInfoTypeVersion errors - * @property {google.privacy.dlp.v2.IStoredInfoTypeStats|null} [stats] StoredInfoTypeVersion stats + * @interface IListStoredInfoTypesRequest + * @property {string|null} [parent] ListStoredInfoTypesRequest parent + * @property {string|null} [pageToken] ListStoredInfoTypesRequest pageToken + * @property {number|null} [pageSize] ListStoredInfoTypesRequest pageSize + * @property {string|null} [orderBy] ListStoredInfoTypesRequest orderBy + * @property {string|null} [locationId] ListStoredInfoTypesRequest locationId */ /** - * Constructs a new StoredInfoTypeVersion. + * Constructs a new ListStoredInfoTypesRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a StoredInfoTypeVersion. - * @implements IStoredInfoTypeVersion + * @classdesc Represents a ListStoredInfoTypesRequest. + * @implements IListStoredInfoTypesRequest * @constructor - * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set */ - function StoredInfoTypeVersion(properties) { - this.errors = []; + function ListStoredInfoTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39546,130 +42793,127 @@ } /** - * StoredInfoTypeVersion config. - * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * ListStoredInfoTypesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance */ - StoredInfoTypeVersion.prototype.config = null; + ListStoredInfoTypesRequest.prototype.parent = ""; /** - * StoredInfoTypeVersion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * ListStoredInfoTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance */ - StoredInfoTypeVersion.prototype.createTime = null; + ListStoredInfoTypesRequest.prototype.pageToken = ""; /** - * StoredInfoTypeVersion state. - * @member {google.privacy.dlp.v2.StoredInfoTypeState} state - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * ListStoredInfoTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance */ - StoredInfoTypeVersion.prototype.state = 0; + ListStoredInfoTypesRequest.prototype.pageSize = 0; /** - * StoredInfoTypeVersion errors. - * @member {Array.} errors - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * ListStoredInfoTypesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance */ - StoredInfoTypeVersion.prototype.errors = $util.emptyArray; + ListStoredInfoTypesRequest.prototype.orderBy = ""; /** - * StoredInfoTypeVersion stats. - * @member {google.privacy.dlp.v2.IStoredInfoTypeStats|null|undefined} stats - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * ListStoredInfoTypesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance */ - StoredInfoTypeVersion.prototype.stats = null; + ListStoredInfoTypesRequest.prototype.locationId = ""; /** - * Creates a new StoredInfoTypeVersion instance using the specified properties. + * Creates a new ListStoredInfoTypesRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion instance + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest instance */ - StoredInfoTypeVersion.create = function create(properties) { - return new StoredInfoTypeVersion(properties); + ListStoredInfoTypesRequest.create = function create(properties) { + return new ListStoredInfoTypesRequest(properties); }; /** - * Encodes the specified StoredInfoTypeVersion message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeVersion.encode = function encode(message, writer) { + ListStoredInfoTypesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.config != null && message.hasOwnProperty("config")) - $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && message.hasOwnProperty("state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.stats != null && message.hasOwnProperty("stats")) - $root.google.privacy.dlp.v2.StoredInfoTypeStats.encode(message.stats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && message.hasOwnProperty("locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); return writer; }; /** - * Encodes the specified StoredInfoTypeVersion message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static - * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoTypeVersion.encodeDelimited = function encodeDelimited(message, writer) { + ListStoredInfoTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StoredInfoTypeVersion message from the specified reader or buffer. + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @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.StoredInfoTypeVersion} StoredInfoTypeVersion + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeVersion.decode = function decode(reader, length) { + ListStoredInfoTypesRequest.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.StoredInfoTypeVersion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; case 3: - message.state = reader.int32(); + message.pageSize = reader.int32(); break; case 4: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); + message.orderBy = reader.string(); break; case 5: - message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.decode(reader, reader.uint32()); + message.locationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -39680,204 +42924,142 @@ }; /** - * Decodes a StoredInfoTypeVersion message from the specified reader or buffer, length delimited. + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoTypeVersion.decodeDelimited = function decodeDelimited(reader) { + ListStoredInfoTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StoredInfoTypeVersion message. + * Verifies a ListStoredInfoTypesRequest message. * @function verify - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StoredInfoTypeVersion.verify = function verify(message) { + ListStoredInfoTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeStats.verify(message.stats); - if (error) - return "stats." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; return null; }; /** - * Creates a StoredInfoTypeVersion message from a plain object. Also converts values to their respective internal types. + * Creates a ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest */ - StoredInfoTypeVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeVersion) + ListStoredInfoTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest) return object; - var message = new $root.google.privacy.dlp.v2.StoredInfoTypeVersion(); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.config: object expected"); - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - switch (object.state) { - case "STORED_INFO_TYPE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "INVALID": - case 4: - message.state = 4; - break; - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: object expected"); - message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); - } - } - if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.stats: object expected"); - message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.fromObject(object.stats); - } + var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); return message; }; /** - * Creates a plain object from a StoredInfoTypeVersion message. Also converts values to other types if specified. + * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @static - * @param {google.privacy.dlp.v2.StoredInfoTypeVersion} message StoredInfoTypeVersion + * @param {google.privacy.dlp.v2.ListStoredInfoTypesRequest} message ListStoredInfoTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StoredInfoTypeVersion.toObject = function toObject(message, options) { + ListStoredInfoTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; if (options.defaults) { - object.config = null; - object.createTime = null; - object.state = options.enums === String ? "STORED_INFO_TYPE_STATE_UNSPECIFIED" : 0; - object.stats = null; - } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.privacy.dlp.v2.StoredInfoTypeState[message.state] : message.state; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; } - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.toObject(message.stats, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; return object; }; /** - * Converts this StoredInfoTypeVersion to JSON. + * Converts this ListStoredInfoTypesRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest * @instance * @returns {Object.} JSON object */ - StoredInfoTypeVersion.prototype.toJSON = function toJSON() { + ListStoredInfoTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StoredInfoTypeVersion; + return ListStoredInfoTypesRequest; })(); - v2.StoredInfoType = (function() { + v2.ListStoredInfoTypesResponse = (function() { /** - * Properties of a StoredInfoType. + * Properties of a ListStoredInfoTypesResponse. * @memberof google.privacy.dlp.v2 - * @interface IStoredInfoType - * @property {string|null} [name] StoredInfoType name - * @property {google.privacy.dlp.v2.IStoredInfoTypeVersion|null} [currentVersion] StoredInfoType currentVersion - * @property {Array.|null} [pendingVersions] StoredInfoType pendingVersions + * @interface IListStoredInfoTypesResponse + * @property {Array.|null} [storedInfoTypes] ListStoredInfoTypesResponse storedInfoTypes + * @property {string|null} [nextPageToken] ListStoredInfoTypesResponse nextPageToken */ /** - * Constructs a new StoredInfoType. + * Constructs a new ListStoredInfoTypesResponse. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a StoredInfoType. - * @implements IStoredInfoType + * @classdesc Represents a ListStoredInfoTypesResponse. + * @implements IListStoredInfoTypesResponse * @constructor - * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set */ - function StoredInfoType(properties) { - this.pendingVersions = []; + function ListStoredInfoTypesResponse(properties) { + this.storedInfoTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39885,104 +43067,91 @@ } /** - * StoredInfoType name. - * @member {string} name - * @memberof google.privacy.dlp.v2.StoredInfoType - * @instance - */ - StoredInfoType.prototype.name = ""; - - /** - * StoredInfoType currentVersion. - * @member {google.privacy.dlp.v2.IStoredInfoTypeVersion|null|undefined} currentVersion - * @memberof google.privacy.dlp.v2.StoredInfoType + * ListStoredInfoTypesResponse storedInfoTypes. + * @member {Array.} storedInfoTypes + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @instance */ - StoredInfoType.prototype.currentVersion = null; + ListStoredInfoTypesResponse.prototype.storedInfoTypes = $util.emptyArray; /** - * StoredInfoType pendingVersions. - * @member {Array.} pendingVersions - * @memberof google.privacy.dlp.v2.StoredInfoType + * ListStoredInfoTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @instance */ - StoredInfoType.prototype.pendingVersions = $util.emptyArray; + ListStoredInfoTypesResponse.prototype.nextPageToken = ""; /** - * Creates a new StoredInfoType instance using the specified properties. + * Creates a new ListStoredInfoTypesResponse instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static - * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType instance + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse instance */ - StoredInfoType.create = function create(properties) { - return new StoredInfoType(properties); + ListStoredInfoTypesResponse.create = function create(properties) { + return new ListStoredInfoTypesResponse(properties); }; /** - * Encodes the specified StoredInfoType message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static - * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoType.encode = function encode(message, writer) { + ListStoredInfoTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.currentVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pendingVersions != null && message.pendingVersions.length) - for (var i = 0; i < message.pendingVersions.length; ++i) - $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.pendingVersions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.storedInfoTypes != null && message.storedInfoTypes.length) + for (var i = 0; i < message.storedInfoTypes.length; ++i) + $root.google.privacy.dlp.v2.StoredInfoType.encode(message.storedInfoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified StoredInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static - * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StoredInfoType.encodeDelimited = function encodeDelimited(message, writer) { + ListStoredInfoTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StoredInfoType message from the specified reader or buffer. + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @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.StoredInfoType} StoredInfoType + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoType.decode = function decode(reader, length) { + ListStoredInfoTypesResponse.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.StoredInfoType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.storedInfoTypes && message.storedInfoTypes.length)) + message.storedInfoTypes = []; + message.storedInfoTypes.push($root.google.privacy.dlp.v2.StoredInfoType.decode(reader, reader.uint32())); break; case 2: - message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.pendingVersions && message.pendingVersions.length)) - message.pendingVersions = []; - message.pendingVersions.push($root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -39993,150 +43162,133 @@ }; /** - * Decodes a StoredInfoType message from the specified reader or buffer, length delimited. + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StoredInfoType.decodeDelimited = function decodeDelimited(reader) { + ListStoredInfoTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StoredInfoType message. + * Verifies a ListStoredInfoTypesResponse message. * @function verify - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StoredInfoType.verify = function verify(message) { + ListStoredInfoTypesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.currentVersion); - if (error) - return "currentVersion." + error; - } - if (message.pendingVersions != null && message.hasOwnProperty("pendingVersions")) { - if (!Array.isArray(message.pendingVersions)) - return "pendingVersions: array expected"; - for (var i = 0; i < message.pendingVersions.length; ++i) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.pendingVersions[i]); + if (message.storedInfoTypes != null && message.hasOwnProperty("storedInfoTypes")) { + if (!Array.isArray(message.storedInfoTypes)) + return "storedInfoTypes: array expected"; + for (var i = 0; i < message.storedInfoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.StoredInfoType.verify(message.storedInfoTypes[i]); if (error) - return "pendingVersions." + error; + return "storedInfoTypes." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a StoredInfoType message from a plain object. Also converts values to their respective internal types. + * Creates a ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse */ - StoredInfoType.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.StoredInfoType) + ListStoredInfoTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse) return object; - var message = new $root.google.privacy.dlp.v2.StoredInfoType(); - if (object.name != null) - message.name = String(object.name); - if (object.currentVersion != null) { - if (typeof object.currentVersion !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoType.currentVersion: object expected"); - message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.currentVersion); - } - if (object.pendingVersions) { - if (!Array.isArray(object.pendingVersions)) - throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: array expected"); - message.pendingVersions = []; - for (var i = 0; i < object.pendingVersions.length; ++i) { - if (typeof object.pendingVersions[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: object expected"); - message.pendingVersions[i] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.pendingVersions[i]); + var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); + if (object.storedInfoTypes) { + if (!Array.isArray(object.storedInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: array expected"); + message.storedInfoTypes = []; + for (var i = 0; i < object.storedInfoTypes.length; ++i) { + if (typeof object.storedInfoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: object expected"); + message.storedInfoTypes[i] = $root.google.privacy.dlp.v2.StoredInfoType.fromObject(object.storedInfoTypes[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a StoredInfoType message. Also converts values to other types if specified. + * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @static - * @param {google.privacy.dlp.v2.StoredInfoType} message StoredInfoType + * @param {google.privacy.dlp.v2.ListStoredInfoTypesResponse} message ListStoredInfoTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StoredInfoType.toObject = function toObject(message, options) { + ListStoredInfoTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pendingVersions = []; - if (options.defaults) { - object.name = ""; - object.currentVersion = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) - object.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.currentVersion, options); - if (message.pendingVersions && message.pendingVersions.length) { - object.pendingVersions = []; - for (var j = 0; j < message.pendingVersions.length; ++j) - object.pendingVersions[j] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.pendingVersions[j], options); + object.storedInfoTypes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.storedInfoTypes && message.storedInfoTypes.length) { + object.storedInfoTypes = []; + for (var j = 0; j < message.storedInfoTypes.length; ++j) + object.storedInfoTypes[j] = $root.google.privacy.dlp.v2.StoredInfoType.toObject(message.storedInfoTypes[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this StoredInfoType to JSON. + * Converts this ListStoredInfoTypesResponse to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.StoredInfoType + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse * @instance * @returns {Object.} JSON object */ - StoredInfoType.prototype.toJSON = function toJSON() { + ListStoredInfoTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StoredInfoType; + return ListStoredInfoTypesResponse; })(); - v2.CreateStoredInfoTypeRequest = (function() { + v2.DeleteStoredInfoTypeRequest = (function() { /** - * Properties of a CreateStoredInfoTypeRequest. + * Properties of a DeleteStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @interface ICreateStoredInfoTypeRequest - * @property {string|null} [parent] CreateStoredInfoTypeRequest parent - * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] CreateStoredInfoTypeRequest config - * @property {string|null} [storedInfoTypeId] CreateStoredInfoTypeRequest storedInfoTypeId - * @property {string|null} [locationId] CreateStoredInfoTypeRequest locationId + * @interface IDeleteStoredInfoTypeRequest + * @property {string|null} [name] DeleteStoredInfoTypeRequest name */ /** - * Constructs a new CreateStoredInfoTypeRequest. + * Constructs a new DeleteStoredInfoTypeRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CreateStoredInfoTypeRequest. - * @implements ICreateStoredInfoTypeRequest + * @classdesc Represents a DeleteStoredInfoTypeRequest. + * @implements IDeleteStoredInfoTypeRequest * @constructor - * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set */ - function CreateStoredInfoTypeRequest(properties) { + function DeleteStoredInfoTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40144,114 +43296,75 @@ } /** - * CreateStoredInfoTypeRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest - * @instance - */ - CreateStoredInfoTypeRequest.prototype.parent = ""; - - /** - * CreateStoredInfoTypeRequest config. - * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest - * @instance - */ - CreateStoredInfoTypeRequest.prototype.config = null; - - /** - * CreateStoredInfoTypeRequest storedInfoTypeId. - * @member {string} storedInfoTypeId - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest - * @instance - */ - CreateStoredInfoTypeRequest.prototype.storedInfoTypeId = ""; - - /** - * CreateStoredInfoTypeRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * DeleteStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @instance */ - CreateStoredInfoTypeRequest.prototype.locationId = ""; + DeleteStoredInfoTypeRequest.prototype.name = ""; /** - * Creates a new CreateStoredInfoTypeRequest instance using the specified properties. + * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest instance + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest instance */ - CreateStoredInfoTypeRequest.create = function create(properties) { - return new CreateStoredInfoTypeRequest(properties); + DeleteStoredInfoTypeRequest.create = function create(properties) { + return new DeleteStoredInfoTypeRequest(properties); }; /** - * Encodes the specified CreateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateStoredInfoTypeRequest.encode = function encode(message, writer) { + DeleteStoredInfoTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.config != null && message.hasOwnProperty("config")) - $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.storedInfoTypeId); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer. + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @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.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateStoredInfoTypeRequest.decode = function decode(reader, length) { + DeleteStoredInfoTypeRequest.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.CreateStoredInfoTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); - break; - case 3: - message.storedInfoTypeId = reader.string(); - break; - case 4: - message.locationId = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -40262,139 +43375,108 @@ }; /** - * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateStoredInfoTypeRequest message. + * Verifies a DeleteStoredInfoTypeRequest message. * @function verify - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateStoredInfoTypeRequest.verify = function verify(message) { + DeleteStoredInfoTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) - if (!$util.isString(message.storedInfoTypeId)) - return "storedInfoTypeId: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest */ - CreateStoredInfoTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + DeleteStoredInfoTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) return object; - var message = new $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.privacy.dlp.v2.CreateStoredInfoTypeRequest.config: object expected"); - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); - } - if (object.storedInfoTypeId != null) - message.storedInfoTypeId = String(object.storedInfoTypeId); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateStoredInfoTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @static - * @param {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest + * @param {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateStoredInfoTypeRequest.toObject = function toObject(message, options) { + DeleteStoredInfoTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.config = null; - object.storedInfoTypeId = ""; - object.locationId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); - if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) - object.storedInfoTypeId = message.storedInfoTypeId; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateStoredInfoTypeRequest to JSON. + * Converts this DeleteStoredInfoTypeRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest * @instance * @returns {Object.} JSON object */ - CreateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + DeleteStoredInfoTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateStoredInfoTypeRequest; + return DeleteStoredInfoTypeRequest; })(); - v2.UpdateStoredInfoTypeRequest = (function() { + v2.HybridInspectJobTriggerRequest = (function() { /** - * Properties of an UpdateStoredInfoTypeRequest. + * Properties of a HybridInspectJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @interface IUpdateStoredInfoTypeRequest - * @property {string|null} [name] UpdateStoredInfoTypeRequest name - * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] UpdateStoredInfoTypeRequest config - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoredInfoTypeRequest updateMask + * @interface IHybridInspectJobTriggerRequest + * @property {string|null} [name] HybridInspectJobTriggerRequest name + * @property {google.privacy.dlp.v2.IHybridContentItem|null} [hybridItem] HybridInspectJobTriggerRequest hybridItem */ /** - * Constructs a new UpdateStoredInfoTypeRequest. + * Constructs a new HybridInspectJobTriggerRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an UpdateStoredInfoTypeRequest. - * @implements IUpdateStoredInfoTypeRequest + * @classdesc Represents a HybridInspectJobTriggerRequest. + * @implements IHybridInspectJobTriggerRequest * @constructor - * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest=} [properties] Properties to set */ - function UpdateStoredInfoTypeRequest(properties) { + function HybridInspectJobTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40402,101 +43484,88 @@ } /** - * UpdateStoredInfoTypeRequest name. + * HybridInspectJobTriggerRequest name. * @member {string} name - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest - * @instance - */ - UpdateStoredInfoTypeRequest.prototype.name = ""; - - /** - * UpdateStoredInfoTypeRequest config. - * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @instance */ - UpdateStoredInfoTypeRequest.prototype.config = null; + HybridInspectJobTriggerRequest.prototype.name = ""; /** - * UpdateStoredInfoTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * HybridInspectJobTriggerRequest hybridItem. + * @member {google.privacy.dlp.v2.IHybridContentItem|null|undefined} hybridItem + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @instance */ - UpdateStoredInfoTypeRequest.prototype.updateMask = null; + HybridInspectJobTriggerRequest.prototype.hybridItem = null; /** - * Creates a new UpdateStoredInfoTypeRequest instance using the specified properties. + * Creates a new HybridInspectJobTriggerRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest instance + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest instance */ - UpdateStoredInfoTypeRequest.create = function create(properties) { - return new UpdateStoredInfoTypeRequest(properties); + HybridInspectJobTriggerRequest.create = function create(properties) { + return new HybridInspectJobTriggerRequest(properties); }; /** - * Encodes the specified UpdateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateStoredInfoTypeRequest.encode = function encode(message, writer) { + HybridInspectJobTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && message.hasOwnProperty("config")) - $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + $root.google.privacy.dlp.v2.HybridContentItem.encode(message.hybridItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + HybridInspectJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer. + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @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.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateStoredInfoTypeRequest.decode = function decode(reader, length) { + HybridInspectJobTriggerRequest.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.UpdateStoredInfoTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32()); - break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -40507,134 +43576,122 @@ }; /** - * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + HybridInspectJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateStoredInfoTypeRequest message. + * Verifies a HybridInspectJobTriggerRequest message. * @function verify - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateStoredInfoTypeRequest.verify = function verify(message) { + HybridInspectJobTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) { + var error = $root.google.privacy.dlp.v2.HybridContentItem.verify(message.hybridItem); if (error) - return "updateMask." + error; + return "hybridItem." + error; } return null; }; /** - * Creates an UpdateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridInspectJobTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest */ - UpdateStoredInfoTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + HybridInspectJobTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) return object; - var message = new $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); + var message = new $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); if (object.name != null) message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.config: object expected"); - message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.hybridItem != null) { + if (typeof object.hybridItem !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridInspectJobTriggerRequest.hybridItem: object expected"); + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.fromObject(object.hybridItem); } return message; }; /** - * Creates a plain object from an UpdateStoredInfoTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a HybridInspectJobTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @static - * @param {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest + * @param {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateStoredInfoTypeRequest.toObject = function toObject(message, options) { + HybridInspectJobTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.config = null; - object.updateMask = null; + object.hybridItem = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + object.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.toObject(message.hybridItem, options); return object; }; /** - * Converts this UpdateStoredInfoTypeRequest to JSON. + * Converts this HybridInspectJobTriggerRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest * @instance * @returns {Object.} JSON object */ - UpdateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + HybridInspectJobTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateStoredInfoTypeRequest; + return HybridInspectJobTriggerRequest; })(); - v2.GetStoredInfoTypeRequest = (function() { + v2.HybridInspectDlpJobRequest = (function() { /** - * Properties of a GetStoredInfoTypeRequest. + * Properties of a HybridInspectDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @interface IGetStoredInfoTypeRequest - * @property {string|null} [name] GetStoredInfoTypeRequest name + * @interface IHybridInspectDlpJobRequest + * @property {string|null} [name] HybridInspectDlpJobRequest name + * @property {google.privacy.dlp.v2.IHybridContentItem|null} [hybridItem] HybridInspectDlpJobRequest hybridItem */ /** - * Constructs a new GetStoredInfoTypeRequest. + * Constructs a new HybridInspectDlpJobRequest. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a GetStoredInfoTypeRequest. - * @implements IGetStoredInfoTypeRequest + * @classdesc Represents a HybridInspectDlpJobRequest. + * @implements IHybridInspectDlpJobRequest * @constructor - * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest=} [properties] Properties to set */ - function GetStoredInfoTypeRequest(properties) { + function HybridInspectDlpJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40642,76 +43699,89 @@ } /** - * GetStoredInfoTypeRequest name. + * HybridInspectDlpJobRequest name. * @member {string} name - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @instance */ - GetStoredInfoTypeRequest.prototype.name = ""; + HybridInspectDlpJobRequest.prototype.name = ""; /** - * Creates a new GetStoredInfoTypeRequest instance using the specified properties. + * HybridInspectDlpJobRequest hybridItem. + * @member {google.privacy.dlp.v2.IHybridContentItem|null|undefined} hybridItem + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @instance + */ + HybridInspectDlpJobRequest.prototype.hybridItem = null; + + /** + * Creates a new HybridInspectDlpJobRequest instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest instance + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest instance */ - GetStoredInfoTypeRequest.create = function create(properties) { - return new GetStoredInfoTypeRequest(properties); + HybridInspectDlpJobRequest.create = function create(properties) { + return new HybridInspectDlpJobRequest(properties); }; /** - * Encodes the specified GetStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} message HybridInspectDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetStoredInfoTypeRequest.encode = function encode(message, writer) { + HybridInspectDlpJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + $root.google.privacy.dlp.v2.HybridContentItem.encode(message.hybridItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static - * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} message HybridInspectDlpJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + HybridInspectDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer. + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @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.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetStoredInfoTypeRequest.decode = function decode(reader, length) { + HybridInspectDlpJobRequest.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.GetStoredInfoTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 3: + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -40721,111 +43791,122 @@ }; /** - * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + HybridInspectDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetStoredInfoTypeRequest message. + * Verifies a HybridInspectDlpJobRequest message. * @function verify - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetStoredInfoTypeRequest.verify = function verify(message) { + HybridInspectDlpJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) { + var error = $root.google.privacy.dlp.v2.HybridContentItem.verify(message.hybridItem); + if (error) + return "hybridItem." + error; + } return null; }; /** - * Creates a GetStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridInspectDlpJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest */ - GetStoredInfoTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest) + HybridInspectDlpJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest) return object; - var message = new $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); + var message = new $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); if (object.name != null) message.name = String(object.name); + if (object.hybridItem != null) { + if (typeof object.hybridItem !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridInspectDlpJobRequest.hybridItem: object expected"); + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.fromObject(object.hybridItem); + } return message; }; /** - * Creates a plain object from a GetStoredInfoTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a HybridInspectDlpJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @static - * @param {google.privacy.dlp.v2.GetStoredInfoTypeRequest} message GetStoredInfoTypeRequest + * @param {google.privacy.dlp.v2.HybridInspectDlpJobRequest} message HybridInspectDlpJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetStoredInfoTypeRequest.toObject = function toObject(message, options) { + HybridInspectDlpJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.hybridItem = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + object.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.toObject(message.hybridItem, options); return object; }; /** - * Converts this GetStoredInfoTypeRequest to JSON. + * Converts this HybridInspectDlpJobRequest to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest * @instance * @returns {Object.} JSON object */ - GetStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + HybridInspectDlpJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetStoredInfoTypeRequest; + return HybridInspectDlpJobRequest; })(); - v2.ListStoredInfoTypesRequest = (function() { + v2.HybridContentItem = (function() { /** - * Properties of a ListStoredInfoTypesRequest. + * Properties of a HybridContentItem. * @memberof google.privacy.dlp.v2 - * @interface IListStoredInfoTypesRequest - * @property {string|null} [parent] ListStoredInfoTypesRequest parent - * @property {string|null} [pageToken] ListStoredInfoTypesRequest pageToken - * @property {number|null} [pageSize] ListStoredInfoTypesRequest pageSize - * @property {string|null} [orderBy] ListStoredInfoTypesRequest orderBy - * @property {string|null} [locationId] ListStoredInfoTypesRequest locationId + * @interface IHybridContentItem + * @property {google.privacy.dlp.v2.IContentItem|null} [item] HybridContentItem item + * @property {google.privacy.dlp.v2.IHybridFindingDetails|null} [findingDetails] HybridContentItem findingDetails */ /** - * Constructs a new ListStoredInfoTypesRequest. + * Constructs a new HybridContentItem. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListStoredInfoTypesRequest. - * @implements IListStoredInfoTypesRequest + * @classdesc Represents a HybridContentItem. + * @implements IHybridContentItem * @constructor - * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IHybridContentItem=} [properties] Properties to set */ - function ListStoredInfoTypesRequest(properties) { + function HybridContentItem(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40833,127 +43914,88 @@ } /** - * ListStoredInfoTypesRequest parent. - * @member {string} parent - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest - * @instance - */ - ListStoredInfoTypesRequest.prototype.parent = ""; - - /** - * ListStoredInfoTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest - * @instance - */ - ListStoredInfoTypesRequest.prototype.pageToken = ""; - - /** - * ListStoredInfoTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest - * @instance - */ - ListStoredInfoTypesRequest.prototype.pageSize = 0; - - /** - * ListStoredInfoTypesRequest orderBy. - * @member {string} orderBy - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * HybridContentItem item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.HybridContentItem * @instance */ - ListStoredInfoTypesRequest.prototype.orderBy = ""; + HybridContentItem.prototype.item = null; /** - * ListStoredInfoTypesRequest locationId. - * @member {string} locationId - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * HybridContentItem findingDetails. + * @member {google.privacy.dlp.v2.IHybridFindingDetails|null|undefined} findingDetails + * @memberof google.privacy.dlp.v2.HybridContentItem * @instance */ - ListStoredInfoTypesRequest.prototype.locationId = ""; + HybridContentItem.prototype.findingDetails = null; /** - * Creates a new ListStoredInfoTypesRequest instance using the specified properties. + * Creates a new HybridContentItem instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest instance + * @param {google.privacy.dlp.v2.IHybridContentItem=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem instance */ - ListStoredInfoTypesRequest.create = function create(properties) { - return new ListStoredInfoTypesRequest(properties); + HybridContentItem.create = function create(properties) { + return new HybridContentItem(properties); }; /** - * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * Encodes the specified HybridContentItem message. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridContentItem} message HybridContentItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListStoredInfoTypesRequest.encode = function encode(message, writer) { + HybridContentItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.locationId != null && message.hasOwnProperty("locationId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + if (message.item != null && message.hasOwnProperty("item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.findingDetails != null && message.hasOwnProperty("findingDetails")) + $root.google.privacy.dlp.v2.HybridFindingDetails.encode(message.findingDetails, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * Encodes the specified HybridContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridContentItem} message HybridContentItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListStoredInfoTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + HybridContentItem.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. + * Decodes a HybridContentItem message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @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.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListStoredInfoTypesRequest.decode = function decode(reader, length) { + HybridContentItem.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.ListStoredInfoTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridContentItem(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32()); break; case 2: - message.pageToken = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.orderBy = reader.string(); - break; - case 5: - message.locationId = reader.string(); + message.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -40964,142 +44006,131 @@ }; /** - * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridContentItem message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListStoredInfoTypesRequest.decodeDelimited = function decodeDelimited(reader) { + HybridContentItem.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListStoredInfoTypesRequest message. + * Verifies a HybridContentItem message. * @function verify - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListStoredInfoTypesRequest.verify = function verify(message) { + HybridContentItem.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.locationId != null && message.hasOwnProperty("locationId")) - if (!$util.isString(message.locationId)) - return "locationId: string expected"; + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item); + if (error) + return "item." + error; + } + if (message.findingDetails != null && message.hasOwnProperty("findingDetails")) { + var error = $root.google.privacy.dlp.v2.HybridFindingDetails.verify(message.findingDetails); + if (error) + return "findingDetails." + error; + } return null; }; /** - * Creates a ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridContentItem message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem */ - ListStoredInfoTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest) + HybridContentItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridContentItem) return object; - var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.locationId != null) - message.locationId = String(object.locationId); + var message = new $root.google.privacy.dlp.v2.HybridContentItem(); + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridContentItem.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item); + } + if (object.findingDetails != null) { + if (typeof object.findingDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridContentItem.findingDetails: object expected"); + message.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.fromObject(object.findingDetails); + } return message; }; /** - * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a HybridContentItem message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @static - * @param {google.privacy.dlp.v2.ListStoredInfoTypesRequest} message ListStoredInfoTypesRequest + * @param {google.privacy.dlp.v2.HybridContentItem} message HybridContentItem * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListStoredInfoTypesRequest.toObject = function toObject(message, options) { + HybridContentItem.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; - object.orderBy = ""; - object.locationId = ""; + object.item = null; + object.findingDetails = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.findingDetails != null && message.hasOwnProperty("findingDetails")) + object.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.toObject(message.findingDetails, options); return object; }; /** - * Converts this ListStoredInfoTypesRequest to JSON. + * Converts this HybridContentItem to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @memberof google.privacy.dlp.v2.HybridContentItem * @instance * @returns {Object.} JSON object */ - ListStoredInfoTypesRequest.prototype.toJSON = function toJSON() { + HybridContentItem.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListStoredInfoTypesRequest; + return HybridContentItem; })(); - v2.ListStoredInfoTypesResponse = (function() { + v2.HybridFindingDetails = (function() { /** - * Properties of a ListStoredInfoTypesResponse. + * Properties of a HybridFindingDetails. * @memberof google.privacy.dlp.v2 - * @interface IListStoredInfoTypesResponse - * @property {Array.|null} [storedInfoTypes] ListStoredInfoTypesResponse storedInfoTypes - * @property {string|null} [nextPageToken] ListStoredInfoTypesResponse nextPageToken + * @interface IHybridFindingDetails + * @property {google.privacy.dlp.v2.IContainer|null} [containerDetails] HybridFindingDetails containerDetails + * @property {number|Long|null} [fileOffset] HybridFindingDetails fileOffset + * @property {number|Long|null} [rowOffset] HybridFindingDetails rowOffset + * @property {google.privacy.dlp.v2.ITableOptions|null} [tableOptions] HybridFindingDetails tableOptions + * @property {Object.|null} [labels] HybridFindingDetails labels */ /** - * Constructs a new ListStoredInfoTypesResponse. + * Constructs a new HybridFindingDetails. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a ListStoredInfoTypesResponse. - * @implements IListStoredInfoTypesResponse + * @classdesc Represents a HybridFindingDetails. + * @implements IHybridFindingDetails * @constructor - * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IHybridFindingDetails=} [properties] Properties to set */ - function ListStoredInfoTypesResponse(properties) { - this.storedInfoTypes = []; + function HybridFindingDetails(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41107,91 +44138,133 @@ } /** - * ListStoredInfoTypesResponse storedInfoTypes. - * @member {Array.} storedInfoTypes - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * HybridFindingDetails containerDetails. + * @member {google.privacy.dlp.v2.IContainer|null|undefined} containerDetails + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @instance */ - ListStoredInfoTypesResponse.prototype.storedInfoTypes = $util.emptyArray; + HybridFindingDetails.prototype.containerDetails = null; /** - * ListStoredInfoTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * HybridFindingDetails fileOffset. + * @member {number|Long} fileOffset + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @instance */ - ListStoredInfoTypesResponse.prototype.nextPageToken = ""; + HybridFindingDetails.prototype.fileOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ListStoredInfoTypesResponse instance using the specified properties. + * HybridFindingDetails rowOffset. + * @member {number|Long} rowOffset + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.rowOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridFindingDetails tableOptions. + * @member {google.privacy.dlp.v2.ITableOptions|null|undefined} tableOptions + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.tableOptions = null; + + /** + * HybridFindingDetails labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.labels = $util.emptyObject; + + /** + * Creates a new HybridFindingDetails instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse instance + * @param {google.privacy.dlp.v2.IHybridFindingDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails instance */ - ListStoredInfoTypesResponse.create = function create(properties) { - return new ListStoredInfoTypesResponse(properties); + HybridFindingDetails.create = function create(properties) { + return new HybridFindingDetails(properties); }; /** - * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * Encodes the specified HybridFindingDetails message. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridFindingDetails} message HybridFindingDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListStoredInfoTypesResponse.encode = function encode(message, writer) { + HybridFindingDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.storedInfoTypes != null && message.storedInfoTypes.length) - for (var i = 0; i < message.storedInfoTypes.length; ++i) - $root.google.privacy.dlp.v2.StoredInfoType.encode(message.storedInfoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.containerDetails != null && message.hasOwnProperty("containerDetails")) + $root.google.privacy.dlp.v2.Container.encode(message.containerDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.fileOffset); + if (message.rowOffset != null && message.hasOwnProperty("rowOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowOffset); + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + $root.google.privacy.dlp.v2.TableOptions.encode(message.tableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * Encodes the specified HybridFindingDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static - * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridFindingDetails} message HybridFindingDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListStoredInfoTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + HybridFindingDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. + * Decodes a HybridFindingDetails message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @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.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListStoredInfoTypesResponse.decode = function decode(reader, length) { + HybridFindingDetails.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.ListStoredInfoTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridFindingDetails(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.storedInfoTypes && message.storedInfoTypes.length)) - message.storedInfoTypes = []; - message.storedInfoTypes.push($root.google.privacy.dlp.v2.StoredInfoType.decode(reader, reader.uint32())); + message.containerDetails = $root.google.privacy.dlp.v2.Container.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.fileOffset = reader.int64(); + break; + case 3: + message.rowOffset = reader.int64(); + break; + case 4: + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.decode(reader, reader.uint32()); + break; + case 5: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -41202,133 +44275,192 @@ }; /** - * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a HybridFindingDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListStoredInfoTypesResponse.decodeDelimited = function decodeDelimited(reader) { + HybridFindingDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListStoredInfoTypesResponse message. + * Verifies a HybridFindingDetails message. * @function verify - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListStoredInfoTypesResponse.verify = function verify(message) { + HybridFindingDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.storedInfoTypes != null && message.hasOwnProperty("storedInfoTypes")) { - if (!Array.isArray(message.storedInfoTypes)) - return "storedInfoTypes: array expected"; - for (var i = 0; i < message.storedInfoTypes.length; ++i) { - var error = $root.google.privacy.dlp.v2.StoredInfoType.verify(message.storedInfoTypes[i]); - if (error) - return "storedInfoTypes." + error; - } + if (message.containerDetails != null && message.hasOwnProperty("containerDetails")) { + var error = $root.google.privacy.dlp.v2.Container.verify(message.containerDetails); + if (error) + return "containerDetails." + error; + } + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (!$util.isInteger(message.fileOffset) && !(message.fileOffset && $util.isInteger(message.fileOffset.low) && $util.isInteger(message.fileOffset.high))) + return "fileOffset: integer|Long expected"; + if (message.rowOffset != null && message.hasOwnProperty("rowOffset")) + if (!$util.isInteger(message.rowOffset) && !(message.rowOffset && $util.isInteger(message.rowOffset.low) && $util.isInteger(message.rowOffset.high))) + return "rowOffset: integer|Long expected"; + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) { + var error = $root.google.privacy.dlp.v2.TableOptions.verify(message.tableOptions); + if (error) + return "tableOptions." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a HybridFindingDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails */ - ListStoredInfoTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse) + HybridFindingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridFindingDetails) return object; - var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); - if (object.storedInfoTypes) { - if (!Array.isArray(object.storedInfoTypes)) - throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: array expected"); - message.storedInfoTypes = []; - for (var i = 0; i < object.storedInfoTypes.length; ++i) { - if (typeof object.storedInfoTypes[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: object expected"); - message.storedInfoTypes[i] = $root.google.privacy.dlp.v2.StoredInfoType.fromObject(object.storedInfoTypes[i]); - } + var message = new $root.google.privacy.dlp.v2.HybridFindingDetails(); + if (object.containerDetails != null) { + if (typeof object.containerDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.containerDetails: object expected"); + message.containerDetails = $root.google.privacy.dlp.v2.Container.fromObject(object.containerDetails); + } + if (object.fileOffset != null) + if ($util.Long) + (message.fileOffset = $util.Long.fromValue(object.fileOffset)).unsigned = false; + else if (typeof object.fileOffset === "string") + message.fileOffset = parseInt(object.fileOffset, 10); + else if (typeof object.fileOffset === "number") + message.fileOffset = object.fileOffset; + else if (typeof object.fileOffset === "object") + message.fileOffset = new $util.LongBits(object.fileOffset.low >>> 0, object.fileOffset.high >>> 0).toNumber(); + if (object.rowOffset != null) + if ($util.Long) + (message.rowOffset = $util.Long.fromValue(object.rowOffset)).unsigned = false; + else if (typeof object.rowOffset === "string") + message.rowOffset = parseInt(object.rowOffset, 10); + else if (typeof object.rowOffset === "number") + message.rowOffset = object.rowOffset; + else if (typeof object.rowOffset === "object") + message.rowOffset = new $util.LongBits(object.rowOffset.low >>> 0, object.rowOffset.high >>> 0).toNumber(); + if (object.tableOptions != null) { + if (typeof object.tableOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.tableOptions: object expected"); + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.fromObject(object.tableOptions); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a HybridFindingDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @static - * @param {google.privacy.dlp.v2.ListStoredInfoTypesResponse} message ListStoredInfoTypesResponse + * @param {google.privacy.dlp.v2.HybridFindingDetails} message HybridFindingDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListStoredInfoTypesResponse.toObject = function toObject(message, options) { + HybridFindingDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.storedInfoTypes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.storedInfoTypes && message.storedInfoTypes.length) { - object.storedInfoTypes = []; - for (var j = 0; j < message.storedInfoTypes.length; ++j) - object.storedInfoTypes[j] = $root.google.privacy.dlp.v2.StoredInfoType.toObject(message.storedInfoTypes[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.containerDetails = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.fileOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileOffset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowOffset = options.longs === String ? "0" : 0; + object.tableOptions = null; + } + if (message.containerDetails != null && message.hasOwnProperty("containerDetails")) + object.containerDetails = $root.google.privacy.dlp.v2.Container.toObject(message.containerDetails, options); + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (typeof message.fileOffset === "number") + object.fileOffset = options.longs === String ? String(message.fileOffset) : message.fileOffset; + else + object.fileOffset = options.longs === String ? $util.Long.prototype.toString.call(message.fileOffset) : options.longs === Number ? new $util.LongBits(message.fileOffset.low >>> 0, message.fileOffset.high >>> 0).toNumber() : message.fileOffset; + if (message.rowOffset != null && message.hasOwnProperty("rowOffset")) + if (typeof message.rowOffset === "number") + object.rowOffset = options.longs === String ? String(message.rowOffset) : message.rowOffset; + else + object.rowOffset = options.longs === String ? $util.Long.prototype.toString.call(message.rowOffset) : options.longs === Number ? new $util.LongBits(message.rowOffset.low >>> 0, message.rowOffset.high >>> 0).toNumber() : message.rowOffset; + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + object.tableOptions = $root.google.privacy.dlp.v2.TableOptions.toObject(message.tableOptions, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListStoredInfoTypesResponse to JSON. + * Converts this HybridFindingDetails to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @memberof google.privacy.dlp.v2.HybridFindingDetails * @instance * @returns {Object.} JSON object */ - ListStoredInfoTypesResponse.prototype.toJSON = function toJSON() { + HybridFindingDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListStoredInfoTypesResponse; + return HybridFindingDetails; })(); - v2.DeleteStoredInfoTypeRequest = (function() { + v2.HybridInspectResponse = (function() { /** - * Properties of a DeleteStoredInfoTypeRequest. + * Properties of a HybridInspectResponse. * @memberof google.privacy.dlp.v2 - * @interface IDeleteStoredInfoTypeRequest - * @property {string|null} [name] DeleteStoredInfoTypeRequest name + * @interface IHybridInspectResponse */ /** - * Constructs a new DeleteStoredInfoTypeRequest. + * Constructs a new HybridInspectResponse. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DeleteStoredInfoTypeRequest. - * @implements IDeleteStoredInfoTypeRequest + * @classdesc Represents a HybridInspectResponse. + * @implements IHybridInspectResponse * @constructor - * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IHybridInspectResponse=} [properties] Properties to set */ - function DeleteStoredInfoTypeRequest(properties) { + function HybridInspectResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41336,76 +44468,63 @@ } /** - * DeleteStoredInfoTypeRequest name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest - * @instance - */ - DeleteStoredInfoTypeRequest.prototype.name = ""; - - /** - * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. + * Creates a new HybridInspectResponse instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static - * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest instance + * @param {google.privacy.dlp.v2.IHybridInspectResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse instance */ - DeleteStoredInfoTypeRequest.create = function create(properties) { - return new DeleteStoredInfoTypeRequest(properties); + HybridInspectResponse.create = function create(properties) { + return new HybridInspectResponse(properties); }; /** - * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectResponse message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static - * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectResponse} message HybridInspectResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteStoredInfoTypeRequest.encode = function encode(message, writer) { + HybridInspectResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * Encodes the specified HybridInspectResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static - * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode + * @param {google.privacy.dlp.v2.IHybridInspectResponse} message HybridInspectResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + HybridInspectResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. + * Decodes a HybridInspectResponse message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @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.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteStoredInfoTypeRequest.decode = function decode(reader, length) { + HybridInspectResponse.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.DeleteStoredInfoTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -41415,87 +44534,74 @@ }; /** - * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridInspectResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + HybridInspectResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteStoredInfoTypeRequest message. + * Verifies a HybridInspectResponse message. * @function verify - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteStoredInfoTypeRequest.verify = function verify(message) { + HybridInspectResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; return null; }; /** - * Creates a DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridInspectResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse */ - DeleteStoredInfoTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + HybridInspectResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectResponse) return object; - var message = new $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.privacy.dlp.v2.HybridInspectResponse(); }; /** - * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a HybridInspectResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @static - * @param {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest + * @param {google.privacy.dlp.v2.HybridInspectResponse} message HybridInspectResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteStoredInfoTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; + HybridInspectResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DeleteStoredInfoTypeRequest to JSON. + * Converts this HybridInspectResponse to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @memberof google.privacy.dlp.v2.HybridInspectResponse * @instance * @returns {Object.} JSON object */ - DeleteStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + HybridInspectResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteStoredInfoTypeRequest; + return HybridInspectResponse; })(); /** @@ -46768,6 +49874,7 @@ * @property {google.privacy.dlp.v2.IDatastoreOptions|null} [datastoreOptions] StorageConfig datastoreOptions * @property {google.privacy.dlp.v2.ICloudStorageOptions|null} [cloudStorageOptions] StorageConfig cloudStorageOptions * @property {google.privacy.dlp.v2.IBigQueryOptions|null} [bigQueryOptions] StorageConfig bigQueryOptions + * @property {google.privacy.dlp.v2.IHybridOptions|null} [hybridOptions] StorageConfig hybridOptions * @property {google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null} [timespanConfig] StorageConfig timespanConfig */ @@ -46810,6 +49917,14 @@ */ StorageConfig.prototype.bigQueryOptions = null; + /** + * StorageConfig hybridOptions. + * @member {google.privacy.dlp.v2.IHybridOptions|null|undefined} hybridOptions + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.hybridOptions = null; + /** * StorageConfig timespanConfig. * @member {google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null|undefined} timespanConfig @@ -46823,12 +49938,12 @@ /** * StorageConfig type. - * @member {"datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"|undefined} type + * @member {"datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"|"hybridOptions"|undefined} type * @memberof google.privacy.dlp.v2.StorageConfig * @instance */ Object.defineProperty(StorageConfig.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["datastoreOptions", "cloudStorageOptions", "bigQueryOptions"]), + get: $util.oneOfGetter($oneOfFields = ["datastoreOptions", "cloudStorageOptions", "bigQueryOptions", "hybridOptions"]), set: $util.oneOfSetter($oneOfFields) }); @@ -46864,6 +49979,8 @@ $root.google.privacy.dlp.v2.BigQueryOptions.encode(message.bigQueryOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.timespanConfig != null && message.hasOwnProperty("timespanConfig")) $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.encode(message.timespanConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.hybridOptions != null && message.hasOwnProperty("hybridOptions")) + $root.google.privacy.dlp.v2.HybridOptions.encode(message.hybridOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -46907,6 +50024,9 @@ case 4: message.bigQueryOptions = $root.google.privacy.dlp.v2.BigQueryOptions.decode(reader, reader.uint32()); break; + case 9: + message.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.decode(reader, reader.uint32()); + break; case 6: message.timespanConfig = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.decode(reader, reader.uint32()); break; @@ -46974,6 +50094,16 @@ return "bigQueryOptions." + error; } } + if (message.hybridOptions != null && message.hasOwnProperty("hybridOptions")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.HybridOptions.verify(message.hybridOptions); + if (error) + return "hybridOptions." + error; + } + } if (message.timespanConfig != null && message.hasOwnProperty("timespanConfig")) { var error = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify(message.timespanConfig); if (error) @@ -47009,6 +50139,11 @@ throw TypeError(".google.privacy.dlp.v2.StorageConfig.bigQueryOptions: object expected"); message.bigQueryOptions = $root.google.privacy.dlp.v2.BigQueryOptions.fromObject(object.bigQueryOptions); } + if (object.hybridOptions != null) { + if (typeof object.hybridOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.hybridOptions: object expected"); + message.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.fromObject(object.hybridOptions); + } if (object.timespanConfig != null) { if (typeof object.timespanConfig !== "object") throw TypeError(".google.privacy.dlp.v2.StorageConfig.timespanConfig: object expected"); @@ -47049,6 +50184,11 @@ } if (message.timespanConfig != null && message.hasOwnProperty("timespanConfig")) object.timespanConfig = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.toObject(message.timespanConfig, options); + if (message.hybridOptions != null && message.hasOwnProperty("hybridOptions")) { + object.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.toObject(message.hybridOptions, options); + if (options.oneofs) + object.type = "hybridOptions"; + } return object; }; @@ -47355,6 +50495,304 @@ return values; })(); + v2.HybridOptions = (function() { + + /** + * Properties of a HybridOptions. + * @memberof google.privacy.dlp.v2 + * @interface IHybridOptions + * @property {string|null} [description] HybridOptions description + * @property {Array.|null} [requiredFindingLabelKeys] HybridOptions requiredFindingLabelKeys + * @property {Object.|null} [labels] HybridOptions labels + * @property {google.privacy.dlp.v2.ITableOptions|null} [tableOptions] HybridOptions tableOptions + */ + + /** + * Constructs a new HybridOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridOptions. + * @implements IHybridOptions + * @constructor + * @param {google.privacy.dlp.v2.IHybridOptions=} [properties] Properties to set + */ + function HybridOptions(properties) { + this.requiredFindingLabelKeys = []; + this.labels = {}; + 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]]; + } + + /** + * HybridOptions description. + * @member {string} description + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.description = ""; + + /** + * HybridOptions requiredFindingLabelKeys. + * @member {Array.} requiredFindingLabelKeys + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.requiredFindingLabelKeys = $util.emptyArray; + + /** + * HybridOptions labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.labels = $util.emptyObject; + + /** + * HybridOptions tableOptions. + * @member {google.privacy.dlp.v2.ITableOptions|null|undefined} tableOptions + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.tableOptions = null; + + /** + * Creates a new HybridOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions instance + */ + HybridOptions.create = function create(properties) { + return new HybridOptions(properties); + }; + + /** + * Encodes the specified HybridOptions message. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions} message HybridOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.requiredFindingLabelKeys != null && message.requiredFindingLabelKeys.length) + for (var i = 0; i < message.requiredFindingLabelKeys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requiredFindingLabelKeys[i]); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + $root.google.privacy.dlp.v2.TableOptions.encode(message.tableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions} message HybridOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridOptions + * @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.HybridOptions} HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridOptions.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.HybridOptions(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.requiredFindingLabelKeys && message.requiredFindingLabelKeys.length)) + message.requiredFindingLabelKeys = []; + message.requiredFindingLabelKeys.push(reader.string()); + break; + case 3: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 4: + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HybridOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.requiredFindingLabelKeys != null && message.hasOwnProperty("requiredFindingLabelKeys")) { + if (!Array.isArray(message.requiredFindingLabelKeys)) + return "requiredFindingLabelKeys: array expected"; + for (var i = 0; i < message.requiredFindingLabelKeys.length; ++i) + if (!$util.isString(message.requiredFindingLabelKeys[i])) + return "requiredFindingLabelKeys: string[] expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) { + var error = $root.google.privacy.dlp.v2.TableOptions.verify(message.tableOptions); + if (error) + return "tableOptions." + error; + } + return null; + }; + + /** + * Creates a HybridOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions + */ + HybridOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.HybridOptions) + return object; + var message = new $root.google.privacy.dlp.v2.HybridOptions(); + if (object.description != null) + message.description = String(object.description); + if (object.requiredFindingLabelKeys) { + if (!Array.isArray(object.requiredFindingLabelKeys)) + throw TypeError(".google.privacy.dlp.v2.HybridOptions.requiredFindingLabelKeys: array expected"); + message.requiredFindingLabelKeys = []; + for (var i = 0; i < object.requiredFindingLabelKeys.length; ++i) + message.requiredFindingLabelKeys[i] = String(object.requiredFindingLabelKeys[i]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridOptions.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.tableOptions != null) { + if (typeof object.tableOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridOptions.tableOptions: object expected"); + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.fromObject(object.tableOptions); + } + return message; + }; + + /** + * Creates a plain object from a HybridOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.HybridOptions} message HybridOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requiredFindingLabelKeys = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.description = ""; + object.tableOptions = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.requiredFindingLabelKeys && message.requiredFindingLabelKeys.length) { + object.requiredFindingLabelKeys = []; + for (var j = 0; j < message.requiredFindingLabelKeys.length; ++j) + object.requiredFindingLabelKeys[j] = message.requiredFindingLabelKeys[j]; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + object.tableOptions = $root.google.privacy.dlp.v2.TableOptions.toObject(message.tableOptions, options); + return object; + }; + + /** + * Converts this HybridOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + * @returns {Object.} JSON object + */ + HybridOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HybridOptions; + })(); + v2.BigQueryKey = (function() { /** @@ -49206,6 +52644,214 @@ return EntityId; })(); + v2.TableOptions = (function() { + + /** + * Properties of a TableOptions. + * @memberof google.privacy.dlp.v2 + * @interface ITableOptions + * @property {Array.|null} [identifyingFields] TableOptions identifyingFields + */ + + /** + * Constructs a new TableOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TableOptions. + * @implements ITableOptions + * @constructor + * @param {google.privacy.dlp.v2.ITableOptions=} [properties] Properties to set + */ + function TableOptions(properties) { + this.identifyingFields = []; + 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]]; + } + + /** + * TableOptions identifyingFields. + * @member {Array.} identifyingFields + * @memberof google.privacy.dlp.v2.TableOptions + * @instance + */ + TableOptions.prototype.identifyingFields = $util.emptyArray; + + /** + * Creates a new TableOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions instance + */ + TableOptions.create = function create(properties) { + return new TableOptions(properties); + }; + + /** + * Encodes the specified TableOptions message. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions} message TableOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifyingFields != null && message.identifyingFields.length) + for (var i = 0; i < message.identifyingFields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.identifyingFields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions} message TableOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TableOptions + * @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.TableOptions} TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableOptions.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.TableOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.identifyingFields && message.identifyingFields.length)) + message.identifyingFields = []; + message.identifyingFields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identifyingFields != null && message.hasOwnProperty("identifyingFields")) { + if (!Array.isArray(message.identifyingFields)) + return "identifyingFields: array expected"; + for (var i = 0; i < message.identifyingFields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.identifyingFields[i]); + if (error) + return "identifyingFields." + error; + } + } + return null; + }; + + /** + * Creates a TableOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions + */ + TableOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.TableOptions) + return object; + var message = new $root.google.privacy.dlp.v2.TableOptions(); + if (object.identifyingFields) { + if (!Array.isArray(object.identifyingFields)) + throw TypeError(".google.privacy.dlp.v2.TableOptions.identifyingFields: array expected"); + message.identifyingFields = []; + for (var i = 0; i < object.identifyingFields.length; ++i) { + if (typeof object.identifyingFields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableOptions.identifyingFields: object expected"); + message.identifyingFields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.identifyingFields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TableOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.TableOptions} message TableOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identifyingFields = []; + if (message.identifyingFields && message.identifyingFields.length) { + object.identifyingFields = []; + for (var j = 0; j < message.identifyingFields.length; ++j) + object.identifyingFields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.identifyingFields[j], options); + } + return object; + }; + + /** + * Converts this TableOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TableOptions + * @instance + * @returns {Object.} JSON object + */ + TableOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableOptions; + })(); + return v2; })(); diff --git a/packages/google-privacy-dlp/protos/protos.json b/packages/google-privacy-dlp/protos/protos.json index e7cffbcbfcf..87d6e67ab26 100644 --- a/packages/google-privacy-dlp/protos/protos.json +++ b/packages/google-privacy-dlp/protos/protos.json @@ -13,7 +13,9 @@ "java_multiple_files": true, "java_outer_classname": "DlpStorage", "java_package": "com.google.privacy.dlp.v2", - "php_namespace": "Google\\Cloud\\Dlp\\V2" + "php_namespace": "Google\\Cloud\\Dlp\\V2", + "(google.api.resource_definition).type": "dlp.googleapis.com/OrganizationLocation", + "(google.api.resource_definition).pattern": "organizations/{organization}/locations/{location}" }, "nested": { "DlpService": { @@ -191,6 +193,15 @@ "(google.api.method_signature)": "name,job_trigger,update_mask" } }, + "HybridInspectJobTrigger": { + "requestType": "HybridInspectJobTriggerRequest", + "responseType": "HybridInspectResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + } + }, "GetJobTrigger": { "requestType": "GetJobTriggerRequest", "responseType": "JobTrigger", @@ -324,6 +335,23 @@ "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}", "(google.api.method_signature)": "name" } + }, + "HybridInspectDlpJob": { + "requestType": "HybridInspectDlpJobRequest", + "responseType": "HybridInspectResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + } + }, + "FinishDlpJob": { + "requestType": "FinishDlpJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish", + "(google.api.http).body": "*" + } } } }, @@ -562,7 +590,15 @@ } }, "Finding": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/InspectFinding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/findings/{finding}" + }, "fields": { + "name": { + "type": "string", + "id": 14 + }, "quote": { "type": "string", "id": 1 @@ -586,6 +622,36 @@ "quoteInfo": { "type": "QuoteInfo", "id": 7 + }, + "resourceName": { + "type": "string", + "id": 8, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "triggerName": { + "type": "string", + "id": 9, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "jobCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "jobName": { + "type": "string", + "id": 13, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } } } }, @@ -603,6 +669,10 @@ "rule": "repeated", "type": "ContentLocation", "id": 7 + }, + "container": { + "type": "Container", + "id": 8 } } }, @@ -675,6 +745,38 @@ } } }, + "Container": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + }, + "fullPath": { + "type": "string", + "id": 3 + }, + "rootPath": { + "type": "string", + "id": 4 + }, + "relativePath": { + "type": "string", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "version": { + "type": "string", + "id": 7 + } + } + }, "Range": { "fields": { "start": { @@ -1017,11 +1119,31 @@ "rule": "repeated", "type": "InfoTypeStats", "id": 3 + }, + "hybridStats": { + "type": "HybridInspectStatistics", + "id": 7 } } } } }, + "HybridInspectStatistics": { + "fields": { + "processedCount": { + "type": "int64", + "id": 1 + }, + "abortedCount": { + "type": "int64", + "id": 2 + }, + "pendingCount": { + "type": "int64", + "id": 3 + } + } + }, "InfoTypeDescription": { "fields": { "name": { @@ -1789,6 +1911,38 @@ "recordTransformations": { "type": "RecordTransformations", "id": 2 + }, + "transformationErrorHandling": { + "type": "TransformationErrorHandling", + "id": 3 + } + } + }, + "TransformationErrorHandling": { + "oneofs": { + "mode": { + "oneof": [ + "throwError", + "leaveUntransformed" + ] + } + }, + "fields": { + "throwError": { + "type": "ThrowError", + "id": 1 + }, + "leaveUntransformed": { + "type": "LeaveUntransformed", + "id": 2 + } + }, + "nested": { + "ThrowError": { + "fields": {} + }, + "LeaveUntransformed": { + "fields": {} } } }, @@ -2409,10 +2563,13 @@ } } }, + "Manual": { + "fields": {} + }, "InspectTemplate": { "options": { "(google.api.resource).type": "dlp.googleapis.com/InspectTemplate", - "(google.api.resource).pattern": "projects/{project}/inspectTemplates/{inspect_template}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" }, "fields": { "name": { @@ -2453,7 +2610,7 @@ "DeidentifyTemplate": { "options": { "(google.api.resource).type": "dlp.googleapis.com/DeidentifyTemplate", - "(google.api.resource).pattern": "projects/{project}/deidentifyTemplates/{deidentify_template}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" }, "fields": { "name": { @@ -2507,7 +2664,7 @@ "JobTrigger": { "options": { "(google.api.resource).type": "dlp.googleapis.com/JobTrigger", - "(google.api.resource).pattern": "projects/{project}/jobTriggers/{job_trigger}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" }, "oneofs": { "job": { @@ -2580,7 +2737,8 @@ "oneofs": { "trigger": { "oneof": [ - "schedule" + "schedule", + "manual" ] } }, @@ -2588,6 +2746,10 @@ "schedule": { "type": "Schedule", "id": 1 + }, + "manual": { + "type": "Manual", + "id": 2 } } }, @@ -2971,7 +3133,7 @@ "DlpJob": { "options": { "(google.api.resource).type": "dlp.googleapis.com/DlpJob", - "(google.api.resource).pattern": "projects/{project}/dlpJobs/{dlp_job}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" }, "oneofs": { "details": { @@ -3032,7 +3194,8 @@ "RUNNING": 2, "DONE": 3, "CANCELED": 4, - "FAILED": 5 + "FAILED": 5, + "ACTIVE": 6 } } } @@ -3110,6 +3273,18 @@ } } }, + "FinishDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + } + } + }, "DeleteDlpJobRequest": { "fields": { "name": { @@ -3270,7 +3445,9 @@ "oneofs": { "type": { "oneof": [ - "largeCustomDictionary" + "largeCustomDictionary", + "dictionary", + "regex" ] } }, @@ -3286,6 +3463,14 @@ "largeCustomDictionary": { "type": "LargeCustomDictionaryConfig", "id": 3 + }, + "dictionary": { + "type": "CustomInfoType.Dictionary", + "id": 4 + }, + "regex": { + "type": "CustomInfoType.Regex", + "id": 5 } } }, @@ -3332,7 +3517,7 @@ "StoredInfoType": { "options": { "(google.api.resource).type": "dlp.googleapis.com/StoredInfoType", - "(google.api.resource).pattern": "projects/{project}/storedInfoTypes/{stored_info_type}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" }, "fields": { "name": { @@ -3462,6 +3647,78 @@ } } }, + "HybridInspectJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + }, + "hybridItem": { + "type": "HybridContentItem", + "id": 3 + } + } + }, + "HybridInspectDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "hybridItem": { + "type": "HybridContentItem", + "id": 3 + } + } + }, + "HybridContentItem": { + "fields": { + "item": { + "type": "ContentItem", + "id": 1 + }, + "findingDetails": { + "type": "HybridFindingDetails", + "id": 2 + } + } + }, + "HybridFindingDetails": { + "fields": { + "containerDetails": { + "type": "Container", + "id": 1 + }, + "fileOffset": { + "type": "int64", + "id": 2 + }, + "rowOffset": { + "type": "int64", + "id": 3 + }, + "tableOptions": { + "type": "TableOptions", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + } + } + }, + "HybridInspectResponse": { + "fields": {} + }, "RelationalOperator": { "values": { "RELATIONAL_OPERATOR_UNSPECIFIED": 0, @@ -3878,7 +4135,8 @@ "oneof": [ "datastoreOptions", "cloudStorageOptions", - "bigQueryOptions" + "bigQueryOptions", + "hybridOptions" ] } }, @@ -3895,6 +4153,10 @@ "type": "BigQueryOptions", "id": 4 }, + "hybridOptions": { + "type": "HybridOptions", + "id": 9 + }, "timespanConfig": { "type": "TimespanConfig", "id": 6 @@ -3932,6 +4194,28 @@ "AVRO": 7 } }, + "HybridOptions": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "requiredFindingLabelKeys": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "tableOptions": { + "type": "TableOptions", + "id": 4 + } + } + }, "BigQueryKey": { "fields": { "tableReference": { @@ -4051,6 +4335,15 @@ "id": 1 } } + }, + "TableOptions": { + "fields": { + "identifyingFields": { + "rule": "repeated", + "type": "FieldId", + "id": 1 + } + } } } } diff --git a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts index 5d615dd08cb..1ab8f1100d9 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -48,7 +48,12 @@ const version = require('../../../package.json').version; * @memberof v2 */ export class DlpServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; @@ -156,11 +161,8 @@ export class DlpServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - dlpJobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/dlpJobs/{dlp_job}' - ), - jobTriggerPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/jobTriggers/{job_trigger}' + inspectFindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findings/{finding}' ), organizationPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}' @@ -171,6 +173,15 @@ export class DlpServiceClient { organizationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/inspectTemplates/{inspect_template}' ), + organizationLocationDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}' + ), + organizationLocationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}' + ), + organizationLocationStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}' + ), organizationStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/storedInfoTypes/{stored_info_type}' ), @@ -180,9 +191,30 @@ export class DlpServiceClient { projectDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/deidentifyTemplates/{deidentify_template}' ), + projectDlpJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/dlpJobs/{dlp_job}' + ), projectInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/inspectTemplates/{inspect_template}' ), + projectJobTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/jobTriggers/{job_trigger}' + ), + projectLocationDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}' + ), + projectLocationDlpJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dlpJobs/{dlp_job}' + ), + projectLocationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/inspectTemplates/{inspect_template}' + ), + projectLocationJobTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobTriggers/{job_trigger}' + ), + projectLocationStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}' + ), projectStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/storedInfoTypes/{stored_info_type}' ), @@ -282,6 +314,7 @@ export class DlpServiceClient { 'deleteDeidentifyTemplate', 'createJobTrigger', 'updateJobTrigger', + 'hybridInspectJobTrigger', 'getJobTrigger', 'listJobTriggers', 'deleteJobTrigger', @@ -296,6 +329,8 @@ export class DlpServiceClient { 'getStoredInfoType', 'listStoredInfoTypes', 'deleteStoredInfoType', + 'hybridInspectDlpJob', + 'finishDlpJob', ]; for (const methodName of dlpServiceStubMethods) { @@ -304,7 +339,8 @@ export class DlpServiceClient { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -981,8 +1017,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of organization and inspectTemplate to be updated, for - * example `organizations/433245324/inspectTemplates/432452342` or + * Required. Resource name of organization and inspectTemplate to be updated, + * for example `organizations/433245324/inspectTemplates/432452342` or * projects/project-id/inspectTemplates/432452342. * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate * New InspectTemplate value. @@ -1069,8 +1105,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and inspectTemplate to be read, for - * example `organizations/433245324/inspectTemplates/432452342` or + * Required. Resource name of the organization and inspectTemplate to be read, + * for example `organizations/433245324/inspectTemplates/432452342` or * projects/project-id/inspectTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1149,9 +1185,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and inspectTemplate to be deleted, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. + * Required. Resource name of the organization and inspectTemplate to be + * deleted, for example `organizations/433245324/inspectTemplates/432452342` + * or projects/project-id/inspectTemplates/432452342. * @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. @@ -1337,8 +1373,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of organization and deidentify template to be updated, for - * example `organizations/433245324/deidentifyTemplates/432452342` or + * Required. Resource name of organization and deidentify template to be + * updated, for example + * `organizations/433245324/deidentifyTemplates/432452342` or * projects/project-id/deidentifyTemplates/432452342. * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate * New DeidentifyTemplate value. @@ -1430,9 +1467,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and deidentify template to be read, for - * example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. + * Required. Resource name of the organization and deidentify template to be + * read, for example `organizations/433245324/deidentifyTemplates/432452342` + * or projects/project-id/deidentifyTemplates/432452342. * @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. @@ -1519,8 +1556,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and deidentify template to be deleted, - * for example `organizations/433245324/deidentifyTemplates/432452342` or + * Required. Resource name of the organization and deidentify template to be + * deleted, for example + * `organizations/433245324/deidentifyTemplates/432452342` or * projects/project-id/deidentifyTemplates/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1741,6 +1779,99 @@ export class DlpServiceClient { this.initialize(); return this._innerApiCalls.updateJobTrigger(request, options, callback); } + hybridInspectJobTrigger( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + ( + | protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined + ), + {} | undefined + ] + >; + hybridInspectJobTrigger( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + | protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined, + {} | undefined + > + ): void; + /** + * Inspect hybrid content and store findings to a trigger. The inspection + * will be processed asynchronously. To review the findings monitor the + * jobs within the trigger. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the trigger to execute a hybrid inspect on, for + * example `projects/dlp-test-project/jobTriggers/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + hybridInspectJobTrigger( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + | protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + | protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + ( + | protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.hybridInspectJobTrigger( + request, + options, + callback + ); + } getJobTrigger( request: protosTypes.google.privacy.dlp.v2.IGetJobTriggerRequest, options?: gax.CallOptions @@ -2407,8 +2538,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of organization and storedInfoType to be updated, for - * example `organizations/433245324/storedInfoTypes/432452342` or + * Required. Resource name of organization and storedInfoType to be updated, + * for example `organizations/433245324/storedInfoTypes/432452342` or * projects/project-id/storedInfoTypes/432452342. * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config * Updated configuration for the storedInfoType. If not provided, a new @@ -2494,8 +2625,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and storedInfoType to be read, for - * example `organizations/433245324/storedInfoTypes/432452342` or + * Required. Resource name of the organization and storedInfoType to be read, + * for example `organizations/433245324/storedInfoTypes/432452342` or * projects/project-id/storedInfoTypes/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2575,8 +2706,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the organization and storedInfoType to be deleted, for - * example `organizations/433245324/storedInfoTypes/432452342` or + * Required. Resource name of the organization and storedInfoType to be + * deleted, for example `organizations/433245324/storedInfoTypes/432452342` or * projects/project-id/storedInfoTypes/432452342. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -2629,6 +2760,163 @@ export class DlpServiceClient { this.initialize(); return this._innerApiCalls.deleteStoredInfoType(request, options, callback); } + hybridInspectDlpJob( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined + ] + >; + hybridInspectDlpJob( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined + > + ): void; + /** + * Inspect hybrid content and store findings to a job. + * To review the findings inspect the job. Inspection will occur + * asynchronously. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the job to execute a hybrid inspect on, for + * example `projects/dlp-test-project/dlpJob/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @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 [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + hybridInspectDlpJob( + request: protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + | protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.privacy.dlp.v2.IHybridInspectResponse, + protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.hybridInspectDlpJob(request, options, callback); + } + finishDlpJob( + request: protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined + ] + >; + finishDlpJob( + request: protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined + > + ): void; + /** + * Finish a running hybrid DlpJob. Triggers the finalization steps and running + * of any enabled actions that have not yet run. + * Early access feature is in a pre-release state and might change or have + * limited support. For more information, see + * https://cloud.google.com/products#product-launch-stages. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be cancelled. + * @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 [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + finishDlpJob( + request: protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this._innerApiCalls.finishDlpJob(request, options, callback); + } listInspectTemplates( request: protosTypes.google.privacy.dlp.v2.IListInspectTemplatesRequest, @@ -3637,77 +3925,58 @@ export class DlpServiceClient { // -------------------- /** - * Return a fully-qualified dlpJob resource name string. + * Return a fully-qualified inspectFinding resource name string. * * @param {string} project - * @param {string} dlp_job + * @param {string} location + * @param {string} finding * @returns {string} Resource name string. */ - dlpJobPath(project: string, dlpJob: string) { - return this._pathTemplates.dlpJobPathTemplate.render({ + inspectFindingPath(project: string, location: string, finding: string) { + return this._pathTemplates.inspectFindingPathTemplate.render({ project, - dlp_job: dlpJob, + location, + finding, }); } /** - * Parse the project from DlpJob resource. + * Parse the project from InspectFinding resource. * - * @param {string} dlpJobName - * A fully-qualified path representing DlpJob resource. + * @param {string} inspectFindingName + * A fully-qualified path representing InspectFinding resource. * @returns {string} A string representing the project. */ - matchProjectFromDlpJobName(dlpJobName: string) { - return this._pathTemplates.dlpJobPathTemplate.match(dlpJobName).project; - } - - /** - * Parse the dlp_job from DlpJob resource. - * - * @param {string} dlpJobName - * A fully-qualified path representing DlpJob resource. - * @returns {string} A string representing the dlp_job. - */ - matchDlpJobFromDlpJobName(dlpJobName: string) { - return this._pathTemplates.dlpJobPathTemplate.match(dlpJobName).dlp_job; - } - - /** - * Return a fully-qualified jobTrigger resource name string. - * - * @param {string} project - * @param {string} job_trigger - * @returns {string} Resource name string. - */ - jobTriggerPath(project: string, jobTrigger: string) { - return this._pathTemplates.jobTriggerPathTemplate.render({ - project, - job_trigger: jobTrigger, - }); + matchProjectFromInspectFindingName(inspectFindingName: string) { + return this._pathTemplates.inspectFindingPathTemplate.match( + inspectFindingName + ).project; } /** - * Parse the project from JobTrigger resource. + * Parse the location from InspectFinding resource. * - * @param {string} jobTriggerName - * A fully-qualified path representing JobTrigger resource. - * @returns {string} A string representing the project. + * @param {string} inspectFindingName + * A fully-qualified path representing InspectFinding resource. + * @returns {string} A string representing the location. */ - matchProjectFromJobTriggerName(jobTriggerName: string) { - return this._pathTemplates.jobTriggerPathTemplate.match(jobTriggerName) - .project; + matchLocationFromInspectFindingName(inspectFindingName: string) { + return this._pathTemplates.inspectFindingPathTemplate.match( + inspectFindingName + ).location; } /** - * Parse the job_trigger from JobTrigger resource. + * Parse the finding from InspectFinding resource. * - * @param {string} jobTriggerName - * A fully-qualified path representing JobTrigger resource. - * @returns {string} A string representing the job_trigger. + * @param {string} inspectFindingName + * A fully-qualified path representing InspectFinding resource. + * @returns {string} A string representing the finding. */ - matchJobTriggerFromJobTriggerName(jobTriggerName: string) { - return this._pathTemplates.jobTriggerPathTemplate.match(jobTriggerName) - .job_trigger; + matchFindingFromInspectFindingName(inspectFindingName: string) { + return this._pathTemplates.inspectFindingPathTemplate.match( + inspectFindingName + ).finding; } /** @@ -3831,57 +4100,258 @@ export class DlpServiceClient { } /** - * Return a fully-qualified organizationStoredInfoType resource name string. + * Return a fully-qualified organizationLocationDeidentifyTemplate resource name string. * * @param {string} organization - * @param {string} stored_info_type + * @param {string} location + * @param {string} deidentify_template * @returns {string} Resource name string. */ - organizationStoredInfoTypePath(organization: string, storedInfoType: string) { - return this._pathTemplates.organizationStoredInfoTypePathTemplate.render({ - organization, - stored_info_type: storedInfoType, - }); + organizationLocationDeidentifyTemplatePath( + organization: string, + location: string, + deidentifyTemplate: string + ) { + return this._pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render( + { + organization, + location, + deidentify_template: deidentifyTemplate, + } + ); } /** - * Parse the organization from OrganizationStoredInfoType resource. + * Parse the organization from OrganizationLocationDeidentifyTemplate resource. * - * @param {string} organizationStoredInfoTypeName - * A fully-qualified path representing organization_stored_info_type resource. + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. * @returns {string} A string representing the organization. */ - matchOrganizationFromOrganizationStoredInfoTypeName( - organizationStoredInfoTypeName: string + matchOrganizationFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string ) { - return this._pathTemplates.organizationStoredInfoTypePathTemplate.match( - organizationStoredInfoTypeName + return this._pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName ).organization; } /** - * Parse the stored_info_type from OrganizationStoredInfoType resource. + * Parse the location from OrganizationLocationDeidentifyTemplate resource. * - * @param {string} organizationStoredInfoTypeName - * A fully-qualified path representing organization_stored_info_type resource. - * @returns {string} A string representing the stored_info_type. + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. + * @returns {string} A string representing the location. */ - matchStoredInfoTypeFromOrganizationStoredInfoTypeName( - organizationStoredInfoTypeName: string + matchLocationFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string ) { - return this._pathTemplates.organizationStoredInfoTypePathTemplate.match( - organizationStoredInfoTypeName - ).stored_info_type; + return this._pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName + ).location; } /** - * Return a fully-qualified project resource name string. + * Parse the deidentify_template from OrganizationLocationDeidentifyTemplate resource. * - * @param {string} project - * @returns {string} Resource name string. + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. */ - projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ + matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string + ) { + return this._pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName + ).deidentify_template; + } + + /** + * Return a fully-qualified organizationLocationInspectTemplate resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + organizationLocationInspectTemplatePath( + organization: string, + location: string, + inspectTemplate: string + ) { + return this._pathTemplates.organizationLocationInspectTemplatePathTemplate.render( + { + organization, + location, + inspect_template: inspectTemplate, + } + ); + } + + /** + * Parse the organization from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string + ) { + return this._pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName + ).organization; + } + + /** + * Parse the location from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string + ) { + return this._pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName + ).location; + } + + /** + * Parse the inspect_template from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string + ) { + return this._pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName + ).inspect_template; + } + + /** + * Return a fully-qualified organizationLocationStoredInfoType resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + organizationLocationStoredInfoTypePath( + organization: string, + location: string, + storedInfoType: string + ) { + return this._pathTemplates.organizationLocationStoredInfoTypePathTemplate.render( + { + organization, + location, + stored_info_type: storedInfoType, + } + ); + } + + /** + * Parse the organization from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName + ).organization; + } + + /** + * Parse the location from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName + ).location; + } + + /** + * Parse the stored_info_type from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName + ).stored_info_type; + } + + /** + * Return a fully-qualified organizationStoredInfoType resource name string. + * + * @param {string} organization + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + organizationStoredInfoTypePath(organization: string, storedInfoType: string) { + return this._pathTemplates.organizationStoredInfoTypePathTemplate.render({ + organization, + stored_info_type: storedInfoType, + }); + } + + /** + * Parse the organization from OrganizationStoredInfoType resource. + * + * @param {string} organizationStoredInfoTypeName + * A fully-qualified path representing organization_stored_info_type resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationStoredInfoTypeName( + organizationStoredInfoTypeName: string + ) { + return this._pathTemplates.organizationStoredInfoTypePathTemplate.match( + organizationStoredInfoTypeName + ).organization; + } + + /** + * Parse the stored_info_type from OrganizationStoredInfoType resource. + * + * @param {string} organizationStoredInfoTypeName + * A fully-qualified path representing organization_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromOrganizationStoredInfoTypeName( + organizationStoredInfoTypeName: string + ) { + return this._pathTemplates.organizationStoredInfoTypePathTemplate.match( + organizationStoredInfoTypeName + ).stored_info_type; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this._pathTemplates.projectPathTemplate.render({ project, }); } @@ -3941,6 +4411,46 @@ export class DlpServiceClient { ).deidentify_template; } + /** + * Return a fully-qualified projectDlpJob resource name string. + * + * @param {string} project + * @param {string} dlp_job + * @returns {string} Resource name string. + */ + projectDlpJobPath(project: string, dlpJob: string) { + return this._pathTemplates.projectDlpJobPathTemplate.render({ + project, + dlp_job: dlpJob, + }); + } + + /** + * Parse the project from ProjectDlpJob resource. + * + * @param {string} projectDlpJobName + * A fully-qualified path representing project_dlp_job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectDlpJobName(projectDlpJobName: string) { + return this._pathTemplates.projectDlpJobPathTemplate.match( + projectDlpJobName + ).project; + } + + /** + * Parse the dlp_job from ProjectDlpJob resource. + * + * @param {string} projectDlpJobName + * A fully-qualified path representing project_dlp_job resource. + * @returns {string} A string representing the dlp_job. + */ + matchDlpJobFromProjectDlpJobName(projectDlpJobName: string) { + return this._pathTemplates.projectDlpJobPathTemplate.match( + projectDlpJobName + ).dlp_job; + } + /** * Return a fully-qualified projectInspectTemplate resource name string. * @@ -3985,6 +4495,369 @@ export class DlpServiceClient { ).inspect_template; } + /** + * Return a fully-qualified projectJobTrigger resource name string. + * + * @param {string} project + * @param {string} job_trigger + * @returns {string} Resource name string. + */ + projectJobTriggerPath(project: string, jobTrigger: string) { + return this._pathTemplates.projectJobTriggerPathTemplate.render({ + project, + job_trigger: jobTrigger, + }); + } + + /** + * Parse the project from ProjectJobTrigger resource. + * + * @param {string} projectJobTriggerName + * A fully-qualified path representing project_job_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectJobTriggerName(projectJobTriggerName: string) { + return this._pathTemplates.projectJobTriggerPathTemplate.match( + projectJobTriggerName + ).project; + } + + /** + * Parse the job_trigger from ProjectJobTrigger resource. + * + * @param {string} projectJobTriggerName + * A fully-qualified path representing project_job_trigger resource. + * @returns {string} A string representing the job_trigger. + */ + matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName: string) { + return this._pathTemplates.projectJobTriggerPathTemplate.match( + projectJobTriggerName + ).job_trigger; + } + + /** + * Return a fully-qualified projectLocationDeidentifyTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deidentify_template + * @returns {string} Resource name string. + */ + projectLocationDeidentifyTemplatePath( + project: string, + location: string, + deidentifyTemplate: string + ) { + return this._pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render( + { + project, + location, + deidentify_template: deidentifyTemplate, + } + ); + } + + /** + * Parse the project from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string + ) { + return this._pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName + ).project; + } + + /** + * Parse the location from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string + ) { + return this._pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName + ).location; + } + + /** + * Parse the deidentify_template from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. + */ + matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string + ) { + return this._pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName + ).deidentify_template; + } + + /** + * Return a fully-qualified projectLocationDlpJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dlp_job + * @returns {string} Resource name string. + */ + projectLocationDlpJobPath(project: string, location: string, dlpJob: string) { + return this._pathTemplates.projectLocationDlpJobPathTemplate.render({ + project, + location, + dlp_job: dlpJob, + }); + } + + /** + * Parse the project from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDlpJobName(projectLocationDlpJobName: string) { + return this._pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName + ).project; + } + + /** + * Parse the location from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDlpJobName( + projectLocationDlpJobName: string + ) { + return this._pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName + ).location; + } + + /** + * Parse the dlp_job from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the dlp_job. + */ + matchDlpJobFromProjectLocationDlpJobName(projectLocationDlpJobName: string) { + return this._pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName + ).dlp_job; + } + + /** + * Return a fully-qualified projectLocationInspectTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + projectLocationInspectTemplatePath( + project: string, + location: string, + inspectTemplate: string + ) { + return this._pathTemplates.projectLocationInspectTemplatePathTemplate.render( + { + project, + location, + inspect_template: inspectTemplate, + } + ); + } + + /** + * Parse the project from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string + ) { + return this._pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName + ).project; + } + + /** + * Parse the location from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string + ) { + return this._pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName + ).location; + } + + /** + * Parse the inspect_template from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string + ) { + return this._pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName + ).inspect_template; + } + + /** + * Return a fully-qualified projectLocationJobTrigger resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job_trigger + * @returns {string} Resource name string. + */ + projectLocationJobTriggerPath( + project: string, + location: string, + jobTrigger: string + ) { + return this._pathTemplates.projectLocationJobTriggerPathTemplate.render({ + project, + location, + job_trigger: jobTrigger, + }); + } + + /** + * Parse the project from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string + ) { + return this._pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName + ).project; + } + + /** + * Parse the location from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string + ) { + return this._pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName + ).location; + } + + /** + * Parse the job_trigger from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the job_trigger. + */ + matchJobTriggerFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string + ) { + return this._pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName + ).job_trigger; + } + + /** + * Return a fully-qualified projectLocationStoredInfoType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + projectLocationStoredInfoTypePath( + project: string, + location: string, + storedInfoType: string + ) { + return this._pathTemplates.projectLocationStoredInfoTypePathTemplate.render( + { + project, + location, + stored_info_type: storedInfoType, + } + ); + } + + /** + * Parse the project from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName + ).project; + } + + /** + * Parse the location from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName + ).location; + } + + /** + * Parse the stored_info_type from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string + ) { + return this._pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName + ).stored_info_type; + } + /** * Return a fully-qualified projectStoredInfoType resource name string. * diff --git a/packages/google-privacy-dlp/src/v2/dlp_service_client_config.json b/packages/google-privacy-dlp/src/v2/dlp_service_client_config.json index 51ba5b04bd8..13b3869dcb2 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client_config.json +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client_config.json @@ -105,6 +105,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "HybridInspectJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "GetJobTrigger": { "timeout_millis": 300000, "retry_codes_name": "idempotent", @@ -174,6 +179,16 @@ "timeout_millis": 300000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "HybridInspectDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "FinishDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-privacy-dlp/src/v2/index.ts b/packages/google-privacy-dlp/src/v2/index.ts index 89340104df6..d1ccdeeb5af 100644 --- a/packages/google-privacy-dlp/src/v2/index.ts +++ b/packages/google-privacy-dlp/src/v2/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-privacy-dlp/synth.metadata b/packages/google-privacy-dlp/synth.metadata index 7fa20c81aff..db69a2c121e 100644 --- a/packages/google-privacy-dlp/synth.metadata +++ b/packages/google-privacy-dlp/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-03-05T23:06:49.605335Z", + "updateTime": "2020-03-22T11:26:00.043290Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282", - "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871", + "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\nb6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], diff --git a/packages/google-privacy-dlp/synth.py b/packages/google-privacy-dlp/synth.py index ca2148d336a..90943e84dd1 100644 --- a/packages/google-privacy-dlp/synth.py +++ b/packages/google-privacy-dlp/synth.py @@ -40,4 +40,4 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npm', 'compileProtos', 'run']) +subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.js b/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.js index c933827caea..3d28ccd56e6 100644 --- a/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.js +++ b/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.ts b/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.ts index 6d2a3b3a373..b3f26313aea 100644 --- a/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.ts +++ b/packages/google-privacy-dlp/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-privacy-dlp/system-test/install.ts b/packages/google-privacy-dlp/system-test/install.ts index c9aa74ec221..c4d80e9c0c8 100644 --- a/packages/google-privacy-dlp/system-test/install.ts +++ b/packages/google-privacy-dlp/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-privacy-dlp/test/gapic-dlp_service-v2.ts b/packages/google-privacy-dlp/test/gapic-dlp_service-v2.ts index e156bfa340b..f6c2fbc2b99 100644 --- a/packages/google-privacy-dlp/test/gapic-dlp_service-v2.ts +++ b/packages/google-privacy-dlp/test/gapic-dlp_service-v2.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -884,6 +884,61 @@ describe('v2.DlpServiceClient', () => { }); }); }); + describe('hybridInspectJobTrigger', () => { + it('invokes hybridInspectJobTrigger without error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.hybridInspectJobTrigger = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.hybridInspectJobTrigger(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes hybridInspectJobTrigger with error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.hybridInspectJobTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + client.hybridInspectJobTrigger( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); describe('getJobTrigger', () => { it('invokes getJobTrigger without error', done => { const client = new dlpserviceModule.v2.DlpServiceClient({ @@ -1456,6 +1511,110 @@ describe('v2.DlpServiceClient', () => { }); }); }); + describe('hybridInspectDlpJob', () => { + it('invokes hybridInspectDlpJob without error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.hybridInspectDlpJob = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.hybridInspectDlpJob(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes hybridInspectDlpJob with error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IHybridInspectDlpJobRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.hybridInspectDlpJob = mockSimpleGrpcMethod( + request, + null, + error + ); + client.hybridInspectDlpJob(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('finishDlpJob', () => { + it('invokes finishDlpJob without error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.finishDlpJob = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.finishDlpJob(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes finishDlpJob with error', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Initialize client before mocking + client.initialize(); + // Mock request + const request: protosTypes.google.privacy.dlp.v2.IFinishDlpJobRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.finishDlpJob = mockSimpleGrpcMethod( + request, + null, + error + ); + client.finishDlpJob(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); describe('listInspectTemplates', () => { it('invokes listInspectTemplates without error', done => { const client = new dlpserviceModule.v2.DlpServiceClient({ diff --git a/packages/google-privacy-dlp/webpack.config.js b/packages/google-privacy-dlp/webpack.config.js index 859b426fa0c..8a2c31b7391 100644 --- a/packages/google-privacy-dlp/webpack.config.js +++ b/packages/google-privacy-dlp/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.