From fd742fd058f24755f171a7ccbdcca1092354f44f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 10 Jul 2020 15:42:14 -0700 Subject: [PATCH] build: typo in gitattribute, and edit retry code names field (#503) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix: typeo in nodejs .gitattribute replace `test` to `text` Source-Author: Summer Ji Source-Date: Wed Jul 8 14:02:57 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- packages/google-privacy-dlp/.gitattributes | 2 +- .../protos/google/privacy/dlp/v2/dlp.proto | 281 +-- .../google/privacy/dlp/v2/storage.proto | 20 +- .../google-privacy-dlp/protos/protos.d.ts | 486 ++--- packages/google-privacy-dlp/protos/protos.js | 1676 +++++++++-------- .../google-privacy-dlp/protos/protos.json | 205 +- .../src/v2/dlp_service_client.ts | 218 ++- .../src/v2/dlp_service_client_config.json | 6 +- packages/google-privacy-dlp/synth.metadata | 14 +- .../test/gapic_dlp_service_v2.ts | 40 + 10 files changed, 1591 insertions(+), 1357 deletions(-) diff --git a/packages/google-privacy-dlp/.gitattributes b/packages/google-privacy-dlp/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-privacy-dlp/.gitattributes +++ b/packages/google-privacy-dlp/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated 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 dea496258a5..781ac1c4534 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 @@ -16,7 +16,6 @@ syntax = "proto3"; package google.privacy.dlp.v2; -import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -29,6 +28,7 @@ import "google/rpc/status.proto"; import "google/type/date.proto"; import "google/type/dayofweek.proto"; import "google/type/timeofday.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Dlp.V2"; option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; @@ -37,6 +37,11 @@ option java_outer_classname = "DlpProto"; option java_package = "com.google.privacy.dlp.v2"; option php_namespace = "Google\\Cloud\\Dlp\\V2"; option ruby_package = "Google::Cloud::Dlp::V2"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/DlpContent" + pattern: "projects/{project}/dlpContent" + pattern: "projects/{project}/locations/{location}/dlpContent" +}; option (google.api.resource_definition) = { type: "dlp.googleapis.com/OrganizationLocation" pattern: "organizations/{organization}/locations/{location}" @@ -808,6 +813,12 @@ message ByteContentItem { // avro AVRO = 11; + + // csv + CSV = 12; + + // tsv + TSV = 13; } // The type of data stored in the bytes string. Default will be TEXT_UTF8. @@ -873,8 +884,8 @@ message Finding { }; // Resource name in format - // projects/{project}/locations/{location}/findings/{finding} - // Populated only when viewing persisted findings. + // 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 @@ -1143,11 +1154,12 @@ message RedactImageRequest { Color redaction_color = 3; } - // The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id}. + // The parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + child_type: "dlp.googleapis.com/DlpContent" + }]; // Deprecated. This field has no effect. string location_id = 8; @@ -1194,11 +1206,12 @@ message RedactImageResponse { // Request to de-identify a list of items. message DeidentifyContentRequest { - // The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id}. + // Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + child_type: "dlp.googleapis.com/DlpContent" + }]; // Configuration for the de-identification of the content item. // Items specified here will override the template referenced by the @@ -1243,10 +1256,12 @@ message DeidentifyContentResponse { // Request to re-identify an item. message ReidentifyContentRequest { // Required. The parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "dlp.googleapis.com/DlpContent" } ]; @@ -1298,11 +1313,12 @@ message ReidentifyContentResponse { // Request to search for potentially sensitive info in a ContentItem. message InspectContentRequest { - // The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id} + // Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [(google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - }]; + child_type: "dlp.googleapis.com/DlpContent" + }]; // Configuration for the inspector. What specified here will override // the template referenced by the inspect_template_name argument. @@ -1432,7 +1448,7 @@ message InspectDataSourceDetails { Result result = 3; } -// Statistics related to processing hybrid inspect requests.s +// Statistics related to processing hybrid inspect requests. message HybridInspectStatistics { // The number of hybrid inspection requests processed within this job. int64 processed_count = 1; @@ -1467,8 +1483,10 @@ message InfoTypeDescription { // Request for the list of infoTypes. message ListInfoTypesRequest { - // The parent resource name, for example locations/{location_id} + // The parent resource name. + // - Format:locations/[LOCATION-ID] string parent = 4; + // BCP-47 language code for localized infoType friendly // names. If omitted, or if localized strings are not available, // en-US strings will be returned. @@ -1553,11 +1571,10 @@ 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]; } @@ -1670,16 +1687,15 @@ 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. @@ -1698,8 +1714,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. @@ -1772,8 +1788,7 @@ 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. @@ -1853,8 +1868,7 @@ 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 @@ -2268,12 +2282,16 @@ 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. @@ -2357,18 +2375,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]; @@ -2393,9 +2411,8 @@ message BucketingConfig { // Upper bound of the range, exclusive; type must match min. Value max = 2; - // Replacement value for this bucket. If not provided - // the default behavior will be to hyphenate the min-max range. - Value replacement_value = 3; + // Required. Replacement value for this bucket. + Value replacement_value = 3 [(google.api.field_behavior) = REQUIRED]; } // Set of buckets. Ranges must be non-overlapping. @@ -2562,15 +2579,14 @@ 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. @@ -3058,8 +3074,11 @@ message Action { // Request message for CreateInspectTemplate. message CreateInspectTemplateRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location-id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3082,8 +3101,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, @@ -3101,8 +3120,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, @@ -3114,8 +3133,11 @@ message GetInspectTemplateRequest { // Request message for ListInspectTemplates. message ListInspectTemplatesRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3162,9 +3184,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) = { @@ -3175,12 +3197,13 @@ message DeleteInspectTemplateRequest { // Request message for CreateJobTrigger. message CreateJobTriggerRequest { - // Required. The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "dlp.googleapis.com/JobTrigger" } ]; @@ -3203,7 +3226,9 @@ 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" + } ]; } @@ -3213,7 +3238,9 @@ 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. @@ -3229,7 +3256,9 @@ 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" + } ]; } @@ -3237,12 +3266,13 @@ message GetJobTriggerRequest { // jobs such as calculating risk metrics or inspecting Google Cloud // Storage. message CreateDlpJobRequest { - // Required. The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "dlp.googleapis.com/DlpJob" } ]; @@ -3267,12 +3297,13 @@ message CreateDlpJobRequest { // Request message for ListJobTriggers. message ListJobTriggersRequest { - // Required. The parent resource name, for example `projects/my-project-id` - // or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "dlp.googleapis.com/JobTrigger" } ]; @@ -3347,7 +3378,9 @@ 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" + } ]; } @@ -3443,18 +3476,21 @@ 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" + } ]; } // The request message for listing DLP jobs. message ListDlpJobsRequest { - // Required. The parent resource name, for example projects/my-project-id - // or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] string parent = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "dlp.googleapis.com/DlpJob" } ]; @@ -3530,7 +3566,9 @@ 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" + } ]; } @@ -3539,7 +3577,9 @@ 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" } + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } ]; } @@ -3548,14 +3588,19 @@ 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" + } ]; } // Request message for CreateDeidentifyTemplate. message CreateDeidentifyTemplateRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3564,8 +3609,7 @@ 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 @@ -3579,9 +3623,8 @@ 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, @@ -3599,9 +3642,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) = { @@ -3612,8 +3655,11 @@ message GetDeidentifyTemplateRequest { // Request message for ListDeidentifyTemplates. message ListDeidentifyTemplatesRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3661,9 +3707,8 @@ 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, @@ -3790,8 +3835,11 @@ message StoredInfoType { // Request message for CreateStoredInfoType. message CreateStoredInfoTypeRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location_id} + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3835,8 +3883,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, @@ -3848,8 +3896,11 @@ message GetStoredInfoTypeRequest { // Request message for ListStoredInfoTypes. message ListStoredInfoTypesRequest { - // Required. The parent resource name, for example projects/my-project-id or - // organizations/my-org-id or projects/my-project-id/locations/{location_id}. + // Required. Parent resource name. + // - Format:projects/[PROJECT-ID] + // - Format:organizations/[ORGANIZATION-ID] + // - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + // - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3897,8 +3948,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, @@ -3910,11 +3961,13 @@ 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`. + // 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" } + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } ]; // The item to inspect. @@ -3923,11 +3976,13 @@ message HybridInspectJobTriggerRequest { // 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`. + // 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" } + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } ]; // The item to inspect. @@ -4064,7 +4119,7 @@ enum MetadataType { // Unused METADATATYPE_UNSPECIFIED = 0; - // General file metadata provided by GCS. + // General file metadata provided by Cloud Storage. STORAGE_METADATA = 2; } 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 9276bb4b54e..b25cf4fe77d 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 @@ -18,6 +18,7 @@ package google.privacy.dlp.v2; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Dlp.V2"; option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; @@ -520,12 +521,17 @@ message StorageConfig { TimespanConfig timespan_config = 6; } -// Definitions of file type groups to scan. +// Definitions of file type groups to scan. New types will be added to this +// list. enum FileType { // Includes all files. FILE_TYPE_UNSPECIFIED = 0; - // Includes all file extensions not covered by text file types. + // Includes all file extensions not covered by another entry. Binary + // scanning attempts to convert the content of the file to utf_8 to scan + // the file. + // If you wish to avoid this fall back, specify one or more of the other + // FileType's in your storage scan. BINARY_FILE = 1; // Included file extensions: @@ -542,10 +548,12 @@ enum FileType { // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. IMAGE = 3; + // Word files >30 MB will be scanned as binary files. // Included file extensions: // docx, dotx, docm, dotm WORD = 5; + // PDF files >30 MB will be scanned as binary files. // Included file extensions: // pdf PDF = 6; @@ -553,6 +561,14 @@ enum FileType { // Included file extensions: // avro AVRO = 7; + + // Included file extensions: + // csv + CSV = 8; + + // Included file extensions: + // tsv + TSV = 9; } // Configuration to control jobs where the content being inspected is outside diff --git a/packages/google-privacy-dlp/protos/protos.d.ts b/packages/google-privacy-dlp/protos/protos.d.ts index de4460510d3..bd9564c918c 100644 --- a/packages/google-privacy-dlp/protos/protos.d.ts +++ b/packages/google-privacy-dlp/protos/protos.d.ts @@ -1605,7 +1605,9 @@ export namespace google { TEXT_UTF8 = 5, WORD_DOCUMENT = 7, PDF = 8, - AVRO = 11 + AVRO = 11, + CSV = 12, + TSV = 13 } } @@ -20738,7 +20740,9 @@ export namespace google { IMAGE = 3, WORD = 5, PDF = 6, - AVRO = 7 + AVRO = 7, + CSV = 8, + TSV = 9 } /** Properties of a HybridOptions. */ @@ -21728,6 +21732,242 @@ export namespace google { /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Http. */ interface IHttp { @@ -22066,242 +22306,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace protobuf. */ @@ -24694,11 +24698,11 @@ export namespace google { /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - /** MethodOptions .google.api.methodSignature */ ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); } /** Represents a MethodOptions. */ diff --git a/packages/google-privacy-dlp/protos/protos.js b/packages/google-privacy-dlp/protos/protos.js index ef05eaeebc2..3215e5b60c5 100644 --- a/packages/google-privacy-dlp/protos/protos.js +++ b/packages/google-privacy-dlp/protos/protos.js @@ -3369,6 +3369,8 @@ case 7: case 8: case 11: + case 12: + case 13: break; } if (message.data != null && message.hasOwnProperty("data")) @@ -3430,6 +3432,14 @@ case 11: message.type = 11; break; + case "CSV": + case 12: + message.type = 12; + break; + case "TSV": + case 13: + message.type = 13; + break; } if (object.data != null) if (typeof object.data === "string") @@ -3494,6 +3504,8 @@ * @property {number} WORD_DOCUMENT=7 WORD_DOCUMENT value * @property {number} PDF=8 PDF value * @property {number} AVRO=11 AVRO value + * @property {number} CSV=12 CSV value + * @property {number} TSV=13 TSV value */ ByteContentItem.BytesType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -3507,6 +3519,8 @@ values[valuesById[7] = "WORD_DOCUMENT"] = 7; values[valuesById[8] = "PDF"] = 8; values[valuesById[11] = "AVRO"] = 11; + values[valuesById[12] = "CSV"] = 12; + values[valuesById[13] = "TSV"] = 13; return values; })(); @@ -49230,6 +49244,8 @@ case 5: case 6: case 7: + case 8: + case 9: break; } } @@ -49311,6 +49327,14 @@ case 7: message.fileTypes[i] = 7; break; + case "CSV": + case 8: + message.fileTypes[i] = 8; + break; + case "TSV": + case 9: + message.fileTypes[i] = 9; + break; } } switch (object.sampleMethod) { @@ -51014,6 +51038,8 @@ * @property {number} WORD=5 WORD value * @property {number} PDF=6 PDF value * @property {number} AVRO=7 AVRO value + * @property {number} CSV=8 CSV value + * @property {number} TSV=9 TSV value */ v2.FileType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -51024,6 +51050,8 @@ values[valuesById[5] = "WORD"] = 5; values[valuesById[6] = "PDF"] = 6; values[valuesById[7] = "AVRO"] = 7; + values[valuesById[8] = "CSV"] = 8; + values[valuesById[9] = "TSV"] = 9; return values; })(); @@ -53402,26 +53430,52 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53429,91 +53483,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + ResourceDescriptor.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.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -53524,143 +53630,196 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; })(); - api.HttpRule = (function() { + api.ResourceReference = (function() { /** - * Properties of a HttpRule. + * Properties of a ResourceReference. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new HttpRule. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53668,209 +53827,88 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + ResourceReference.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.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -53881,240 +53919,118 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54122,88 +54038,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.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.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -54214,144 +54133,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54359,143 +54277,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.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.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -54506,196 +54490,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.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.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54703,88 +54731,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.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.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -54795,96 +54823,96 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.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.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; @@ -61603,8 +61631,8 @@ * @property {boolean|null} [deprecated] MethodOptions deprecated * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http */ /** @@ -61649,20 +61677,20 @@ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http * @memberof google.protobuf.MethodOptions * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** * Creates a new MethodOptions instance using the specified properties. @@ -61745,14 +61773,14 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; case 1051: if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) message[".google.api.methodSignature"] = []; message[".google.api.methodSignature"].push(reader.string()); break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -61809,11 +61837,6 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; @@ -61821,6 +61844,11 @@ if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } return null; }; @@ -61862,11 +61890,6 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } if (object[".google.api.methodSignature"]) { if (!Array.isArray(object[".google.api.methodSignature"])) throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); @@ -61874,6 +61897,11 @@ for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } return message; }; diff --git a/packages/google-privacy-dlp/protos/protos.json b/packages/google-privacy-dlp/protos/protos.json index beac43f6032..36329497f8d 100644 --- a/packages/google-privacy-dlp/protos/protos.json +++ b/packages/google-privacy-dlp/protos/protos.json @@ -524,7 +524,9 @@ "TEXT_UTF8": 5, "WORD_DOCUMENT": 7, "PDF": 8, - "AVRO": 11 + "AVRO": 11, + "CSV": 12, + "TSV": 13 } } } @@ -859,7 +861,7 @@ "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" } }, "locationId": { @@ -949,7 +951,7 @@ "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" } }, "deidentifyConfig": { @@ -997,7 +999,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" } }, "reidentifyConfig": { @@ -1044,7 +1046,7 @@ "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" } }, "inspectConfig": { @@ -2208,7 +2210,10 @@ }, "replacementValue": { "type": "Value", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } } @@ -2991,7 +2996,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/JobTrigger" } }, "jobTrigger": { @@ -3070,7 +3075,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpJob" } }, "inspectJob": { @@ -3098,7 +3103,7 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/JobTrigger" } }, "pageToken": { @@ -3258,7 +3263,7 @@ "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpJob" } }, "filter": { @@ -4238,7 +4243,9 @@ "IMAGE": 3, "WORD": 5, "PDF": 6, - "AVRO": 7 + "AVRO": 7, + "CSV": 8, + "TSV": 9 } }, "HybridOptions": { @@ -4402,99 +4409,12 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "HttpProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, "methodSignature": { "rule": "repeated", "type": "string", @@ -4592,6 +4512,93 @@ "id": 2 } } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } } } }, 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 10998025b9a..587db74dee1 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -198,6 +198,9 @@ export class DlpServiceClient { projectDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/deidentifyTemplates/{deidentify_template}' ), + projectDlpContentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/dlpContent' + ), projectDlpJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/dlpJobs/{dlp_job}' ), @@ -458,8 +461,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id} + * Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig * Configuration for the inspector. What specified here will override * the template referenced by the inspect_template_name argument. @@ -561,8 +565,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * The parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.locationId * Deprecated. This field has no effect. * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig @@ -660,8 +665,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.DeidentifyConfig} request.deidentifyConfig * Configuration for the de-identification of the content item. * Items specified here will override the template referenced by the @@ -771,6 +777,8 @@ export class DlpServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.DeidentifyConfig} request.reidentifyConfig * Configuration for the re-identification of the content item. * This field shares the same proto message type that is used for @@ -884,7 +892,8 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The parent resource name, for example locations/{location_id} + * The parent resource name. + * - Format:locations/[LOCATION-ID] * @param {string} request.languageCode * BCP-47 language code for localized infoType friendly * names. If omitted, or if localized strings are not available, @@ -979,8 +988,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location-id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate * Required. The InspectTemplate to create. * @param {string} request.templateId @@ -1078,8 +1090,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. @@ -1173,8 +1185,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. @@ -1264,9 +1276,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. @@ -1357,8 +1369,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate * Required. The DeidentifyTemplate to create. * @param {string} request.templateId @@ -1461,9 +1476,8 @@ 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. @@ -1562,9 +1576,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. @@ -1654,9 +1668,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 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. @@ -1747,8 +1760,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger * Required. The JobTrigger to create. * @param {string} request.triggerId @@ -1936,8 +1950,8 @@ export class DlpServiceClient { * @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`. + * 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] @@ -2289,8 +2303,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.InspectJobConfig} request.inspectJob * Set to control what and how to inspect. * @param {google.privacy.dlp.v2.RiskAnalysisJobConfig} request.riskJob @@ -2637,8 +2652,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id} + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config * Required. Configuration of the storedInfoType to create. * @param {string} request.storedInfoTypeId @@ -2832,8 +2850,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. @@ -2922,8 +2940,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. @@ -3017,8 +3035,8 @@ export class DlpServiceClient { * @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`. + * 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] @@ -3194,8 +3212,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListInspectTemplates`. @@ -3297,8 +3318,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListInspectTemplates`. @@ -3356,8 +3380,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListInspectTemplates`. @@ -3446,8 +3473,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListDeidentifyTemplates`. @@ -3553,8 +3583,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListDeidentifyTemplates`. @@ -3612,8 +3645,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListDeidentifyTemplates`. @@ -3697,8 +3733,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example `projects/my-project-id` - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to ListJobTriggers. `order_by` field must not @@ -3825,8 +3862,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example `projects/my-project-id` - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to ListJobTriggers. `order_by` field must not @@ -3911,8 +3949,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example `projects/my-project-id` - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to ListJobTriggers. `order_by` field must not @@ -4024,8 +4063,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.filter * Allows filtering. * @@ -4152,8 +4192,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.filter * Allows filtering. * @@ -4240,8 +4281,9 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id - * or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] * @param {string} request.filter * Allows filtering. * @@ -4359,8 +4401,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListStoredInfoTypes`. @@ -4463,8 +4508,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListStoredInfoTypes`. @@ -4523,8 +4571,11 @@ export class DlpServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource name, for example projects/my-project-id or - * organizations/my-org-id or projects/my-project-id/locations/{location_id}. + * Required. Parent resource name. + * - Format:projects/[PROJECT-ID] + * - Format:organizations/[ORGANIZATION-ID] + * - Format:projects/[PROJECT-ID]/locations/[LOCATION-ID] + * - Format:organizations/[ORGANIZATION-ID]/locations/[LOCATION-ID] * @param {string} request.pageToken * Page token to continue retrieval. Comes from previous call * to `ListStoredInfoTypes`. @@ -5060,6 +5111,31 @@ export class DlpServiceClient { ).deidentify_template; } + /** + * Return a fully-qualified projectDlpContent resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectDlpContentPath(project: string) { + return this.pathTemplates.projectDlpContentPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectDlpContent resource. + * + * @param {string} projectDlpContentName + * A fully-qualified path representing project_dlpContent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectDlpContentName(projectDlpContentName: string) { + return this.pathTemplates.projectDlpContentPathTemplate.match( + projectDlpContentName + ).project; + } + /** * Return a fully-qualified projectDlpJob 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 13b3869dcb2..bcdbe63fe82 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 @@ -107,7 +107,7 @@ }, "HybridInspectJobTrigger": { "timeout_millis": 300000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetJobTrigger": { @@ -182,12 +182,12 @@ }, "HybridInspectDlpJob": { "timeout_millis": 300000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "FinishDlpJob": { "timeout_millis": 300000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" } } diff --git a/packages/google-privacy-dlp/synth.metadata b/packages/google-privacy-dlp/synth.metadata index ecd8095a4bc..168c3c0ab33 100644 --- a/packages/google-privacy-dlp/synth.metadata +++ b/packages/google-privacy-dlp/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-dlp.git", - "sha": "6dddfe95a3391ba94e7d6bd65fbed3a79287db25" + "remote": "https://github.com/googleapis/nodejs-dlp.git", + "sha": "0559d195e0cf2831f9b94ab4097aa76ba595b2f5" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], 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 3cf271d8298..5c1e1d292b4 100644 --- a/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts +++ b/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts @@ -5619,6 +5619,46 @@ describe('v2.DlpServiceClient', () => { }); }); + describe('projectDlpContent', () => { + const fakePath = '/rendered/path/projectDlpContent'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectDlpContentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectDlpContentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectDlpContentPath', () => { + const result = client.projectDlpContentPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectDlpContentPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectDlpContentName', () => { + const result = client.matchProjectFromProjectDlpContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectDlpContentPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectDlpJob', () => { const fakePath = '/rendered/path/projectDlpJob'; const expectedParameters = {